diff --git a/web/.gitignore b/web/.gitignore index 0a782fc551..990f12d561 100644 --- a/web/.gitignore +++ b/web/.gitignore @@ -8,4 +8,7 @@ node_modules .plans/ optimization_results/ optimizations/ -filestorage/ \ No newline at end of file +filestorage/ + +# SDK output is generated on `pnpm install` (see packages/sdk/generateAll.ts). +packages/sdk/generated/ \ No newline at end of file diff --git a/web/package.json b/web/package.json index bff7ebe6bc..d1fd038dc9 100644 --- a/web/package.json +++ b/web/package.json @@ -6,6 +6,7 @@ "description": "A monorepo comprising the packages for nemo studio.", "scripts": { "preinstall": "npx only-allow pnpm", + "postinstall": "pnpm --filter @nemo/sdk gen:all", "test": "pnpm run -r test", "test:e2e": "pnpm run -r test:e2e", "build": "pnpm run -r build", @@ -14,7 +15,7 @@ "format": "prettier --check .", "format:fix": "prettier --write .", "check": "pnpm run -r check", - "gen": "pnpm --filter @nemo/sdk gen:all", + "gen": "pnpm --filter @nemo/sdk gen:all-force", "gen:check": "pnpm tsx packages/scripts/src/check-generated-files.ts", "deps:studio": "pnpm tsx packages/scripts/src/deps-check.ts packages/studio", "deps:common": "pnpm tsx packages/scripts/src/deps-check.ts packages/common", diff --git a/web/packages/sdk/generateAll.ts b/web/packages/sdk/generateAll.ts index 69e574a711..d815aabc68 100644 --- a/web/packages/sdk/generateAll.ts +++ b/web/packages/sdk/generateAll.ts @@ -3,13 +3,24 @@ // SPDX-License-Identifier: Apache-2.0 /** - * This script generates types for all OpenAPI specs in the NeMo Platform repository. - * It uses concurrently for parallel execution while maintaining a clean structure. + * Generates types for all OpenAPI specs in the NeMo Platform repository. + * + * The generated tree under `./generated/` is gitignored. To keep `pnpm install` + * cheap, this script writes a content-hash sentinel after a successful run and + * skips regeneration when the inputs haven't changed. Pass `--force` to bypass. */ +import crypto from 'crypto'; import { execSync } from 'child_process'; +import fs from 'fs'; +import path from 'path'; import { serviceConfigs } from './orval/constants'; +const FORCE = process.argv.includes('--force'); +const GENERATED_DIR = path.join(__dirname, 'generated'); +const HASH_FILE = path.join(GENERATED_DIR, '.input-hash'); +const ORVAL_DIR = path.join(__dirname, 'orval'); + const services = Object.keys(serviceConfigs) as Array; interface GenerationConfig { @@ -31,13 +42,90 @@ const generateCommands = (config: GenerationConfig) => { return baseCommand; }; +const readOrvalVersion = (): string => { + try { + const orvalPkg = JSON.parse( + fs.readFileSync(path.join(__dirname, 'node_modules', 'orval', 'package.json'), 'utf8') + ); + return String(orvalPkg.version ?? 'unknown'); + } catch { + return 'unknown'; + } +}; + +/** + * Hash inputs to generation: all spec YAMLs, the orval version, and the + * generator source files. Any of these changing invalidates the cache. + */ +const computeInputHash = (): string => { + const hash = crypto.createHash('sha256'); + + for (const [service, config] of Object.entries(serviceConfigs)) { + hash.update(`service:${service}\n`); + if (config.url.startsWith('http')) { + // Remote specs aren't cacheable here; including the URL still lets the + // hash invalidate when the URL itself changes. + hash.update(`url:${config.url}\n`); + continue; + } + const filePath = path.resolve(ORVAL_DIR, config.url); + hash.update(fs.readFileSync(filePath)); + hash.update('\n'); + } + + hash.update(`orval:${readOrvalVersion()}\n`); + + const generatorSources = [ + path.join(ORVAL_DIR, 'generate.ts'), + path.join(ORVAL_DIR, 'constants.ts'), + path.join(ORVAL_DIR, 'generateCustomFetcher.ts'), + path.join(__dirname, 'generateAll.ts'), + ]; + for (const file of generatorSources) { + if (fs.existsSync(file)) { + hash.update(fs.readFileSync(file)); + hash.update('\n'); + } + } + + return hash.digest('hex'); +}; + +/** + * The cache is valid only when (1) the hash file exists and matches the + * current input hash, and (2) the generated tree actually has content beyond + * the sentinel — protects against partially-deleted output. + */ +const isCacheValid = (currentHash: string): boolean => { + if (!fs.existsSync(HASH_FILE)) return false; + if (!fs.existsSync(GENERATED_DIR)) return false; + const entries = fs.readdirSync(GENERATED_DIR).filter((name) => name !== '.input-hash'); + if (entries.length === 0) return false; + const stored = fs.readFileSync(HASH_FILE, 'utf8').trim(); + return stored === currentHash; +}; + +const writeHash = (hash: string) => { + fs.mkdirSync(GENERATED_DIR, { recursive: true }); + fs.writeFileSync(HASH_FILE, hash); +}; + const main = async () => { - console.log('šŸš€ Starting parallel type generation for all services...\n'); + const currentHash = computeInputHash(); - // Build the concurrently command with all generation commands - const commands = generationConfigs.map(generateCommands); + if (!FORCE && isCacheValid(currentHash)) { + console.log('āœ“ SDK is up to date (input hash matches). Skipping generation.'); + console.log(' Pass --force to regenerate anyway.'); + return; + } - // Create the concurrently command with names and colors + if (FORCE) { + console.log('šŸ” --force passed; regenerating regardless of input hash.\n'); + } else { + console.log('šŸš€ Inputs changed (or no cached hash). Regenerating SDK...\n'); + } + + const commands = generationConfigs.map(generateCommands); const serviceNames = generationConfigs.map((config) => config.service); const colors = ['red', 'blue', 'green', 'yellow', 'magenta', 'cyan', 'purple', 'white', 'gray']; @@ -59,6 +147,7 @@ const main = async () => { try { execSync(concurrentlyCommand, { stdio: 'inherit' }); + writeHash(currentHash); console.log('\nšŸŽ‰ All type generation completed successfully!'); } catch { console.error('\nšŸ’„ Some type generation failed. Check the output above for details.'); diff --git a/web/packages/sdk/generated/agents/api.ts b/web/packages/sdk/generated/agents/api.ts deleted file mode 100644 index 6da9dd040d..0000000000 --- a/web/packages/sdk/generated/agents/api.ts +++ /dev/null @@ -1,3097 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ -import { useMutation, useQuery, useSuspenseQuery } from '@tanstack/react-query'; -import type { - DataTag, - DefinedInitialDataOptions, - DefinedUseQueryResult, - MutationFunction, - QueryClient, - QueryFunction, - QueryKey, - UndefinedInitialDataOptions, - UseMutationOptions, - UseMutationResult, - UseQueryOptions, - UseQueryResult, - UseSuspenseQueryOptions, - UseSuspenseQueryResult, -} from '@tanstack/react-query'; - -import type { - Agent, - AgentDeployment, - AgentsGetJobLogsParams, - AgentsListAgentsParams, - AgentsListDeploymentsParams, - AgentsListJobsParams, - CreateAgentRequest, - CreateDeploymentRequest, - EvaluateJob, - EvaluateJobRequest, - EvaluateJobsPage, - HTTPValidationError, - NemoListResponseAgent, - NemoListResponseAgentDeployment, - PlatformJobListResultResponse, - PlatformJobLogPage, - PlatformJobResultResponse, - PlatformJobStatusResponse, -} from './schema'; - -import { customFetch } from '../fetchers/agents'; -import type { ErrorType } from '../fetchers/agents'; -type AwaitedInput = PromiseLike | T; - -type Awaited = O extends AwaitedInput ? T : never; - -/** - * Create a new agent from a NAT workflow config. - * @summary Create Agent - */ -export const agentsCreateAgent = ( - workspace: string, - createAgentRequest: CreateAgentRequest, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/agents/v2/workspaces/${encodeURIComponent(String(workspace))}/agents`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: createAgentRequest, - signal, - }); -}; - -export const getAgentsCreateAgentMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: CreateAgentRequest }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: CreateAgentRequest }, - TContext -> => { - const mutationKey = ['agentsCreateAgent']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; data: CreateAgentRequest } - > = (props) => { - const { workspace, data } = props ?? {}; - - return agentsCreateAgent(workspace, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type AgentsCreateAgentMutationResult = NonNullable< - Awaited> ->; -export type AgentsCreateAgentMutationBody = CreateAgentRequest; -export type AgentsCreateAgentMutationError = ErrorType; - -/** - * @summary Create Agent - */ -export const useAgentsCreateAgent = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: CreateAgentRequest }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; data: CreateAgentRequest }, - TContext -> => { - return useMutation(getAgentsCreateAgentMutationOptions(options), queryClient); -}; - -/** - * List all agents in the workspace with pagination and filter support. - * @summary List Agents - */ -export const agentsListAgents = ( - workspace: string, - params?: AgentsListAgentsParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/agents/v2/workspaces/${encodeURIComponent(String(workspace))}/agents`, - method: 'GET', - params, - signal, - }); -}; - -export const getAgentsListAgentsQueryKey = (workspace: string, params?: AgentsListAgentsParams) => { - return [`/apis/agents/v2/workspaces/${workspace}/agents`, ...(params ? [params] : [])] as const; -}; - -export const getAgentsListAgentsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: AgentsListAgentsParams, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getAgentsListAgentsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - agentsListAgents(workspace, params, signal); - - return { queryKey, queryFn, enabled: !!workspace, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type AgentsListAgentsQueryResult = NonNullable>>; -export type AgentsListAgentsQueryError = ErrorType; - -export function useAgentsListAgents< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | AgentsListAgentsParams, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useAgentsListAgents< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: AgentsListAgentsParams, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useAgentsListAgents< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: AgentsListAgentsParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List Agents - */ - -export function useAgentsListAgents< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: AgentsListAgentsParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getAgentsListAgentsQueryOptions(workspace, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getAgentsListAgentsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: AgentsListAgentsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getAgentsListAgentsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - agentsListAgents(workspace, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type AgentsListAgentsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type AgentsListAgentsSuspenseQueryError = ErrorType; - -export function useAgentsListAgentsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | AgentsListAgentsParams, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useAgentsListAgentsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: AgentsListAgentsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useAgentsListAgentsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: AgentsListAgentsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List Agents - */ - -export function useAgentsListAgentsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: AgentsListAgentsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getAgentsListAgentsSuspenseQueryOptions(workspace, params, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Get a specific agent by name. - * @summary Get Agent - */ -export const agentsGetAgent = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/agents/v2/workspaces/${encodeURIComponent(String(workspace))}/agents/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getAgentsGetAgentQueryKey = (workspace: string, name: string) => { - return [`/apis/agents/v2/workspaces/${workspace}/agents/${name}`] as const; -}; - -export const getAgentsGetAgentQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getAgentsGetAgentQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - agentsGetAgent(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type AgentsGetAgentQueryResult = NonNullable>>; -export type AgentsGetAgentQueryError = ErrorType; - -export function useAgentsGetAgent< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useAgentsGetAgent< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useAgentsGetAgent< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Agent - */ - -export function useAgentsGetAgent< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getAgentsGetAgentQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getAgentsGetAgentSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getAgentsGetAgentQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - agentsGetAgent(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type AgentsGetAgentSuspenseQueryResult = NonNullable< - Awaited> ->; -export type AgentsGetAgentSuspenseQueryError = ErrorType; - -export function useAgentsGetAgentSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useAgentsGetAgentSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useAgentsGetAgentSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Agent - */ - -export function useAgentsGetAgentSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getAgentsGetAgentSuspenseQueryOptions(workspace, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Delete an agent by name. - -Returns 409 if any deployments in a live state (pending/starting/running) -still reference this agent. Delete or wait for those deployments to finish -before deleting the agent. - * @summary Delete Agent - */ -export const agentsDeleteAgent = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/agents/v2/workspaces/${encodeURIComponent(String(workspace))}/agents/${encodeURIComponent(String(name))}`, - method: 'DELETE', - signal, - }); -}; - -export const getAgentsDeleteAgentMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - const mutationKey = ['agentsDeleteAgent']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string } - > = (props) => { - const { workspace, name } = props ?? {}; - - return agentsDeleteAgent(workspace, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type AgentsDeleteAgentMutationResult = NonNullable< - Awaited> ->; - -export type AgentsDeleteAgentMutationError = ErrorType; - -/** - * @summary Delete Agent - */ -export const useAgentsDeleteAgent = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - return useMutation(getAgentsDeleteAgentMutationOptions(options), queryClient); -}; - -/** - * Create a new deployment for an existing agent. - -The deployment starts in ``pending`` state and is picked up by the -deployment controller on its next reconcile cycle. - * @summary Create Deployment - */ -export const agentsCreateDeployment = ( - workspace: string, - createDeploymentRequest: CreateDeploymentRequest, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/agents/v2/workspaces/${encodeURIComponent(String(workspace))}/deployments`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: createDeploymentRequest, - signal, - }); -}; - -export const getAgentsCreateDeploymentMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: CreateDeploymentRequest }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: CreateDeploymentRequest }, - TContext -> => { - const mutationKey = ['agentsCreateDeployment']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; data: CreateDeploymentRequest } - > = (props) => { - const { workspace, data } = props ?? {}; - - return agentsCreateDeployment(workspace, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type AgentsCreateDeploymentMutationResult = NonNullable< - Awaited> ->; -export type AgentsCreateDeploymentMutationBody = CreateDeploymentRequest; -export type AgentsCreateDeploymentMutationError = ErrorType; - -/** - * @summary Create Deployment - */ -export const useAgentsCreateDeployment = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: CreateDeploymentRequest }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; data: CreateDeploymentRequest }, - TContext -> => { - return useMutation(getAgentsCreateDeploymentMutationOptions(options), queryClient); -}; - -/** - * List all deployments in the workspace with pagination and filter support. - * @summary List Deployments - */ -export const agentsListDeployments = ( - workspace: string, - params?: AgentsListDeploymentsParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/agents/v2/workspaces/${encodeURIComponent(String(workspace))}/deployments`, - method: 'GET', - params, - signal, - }); -}; - -export const getAgentsListDeploymentsQueryKey = ( - workspace: string, - params?: AgentsListDeploymentsParams -) => { - return [ - `/apis/agents/v2/workspaces/${workspace}/deployments`, - ...(params ? [params] : []), - ] as const; -}; - -export const getAgentsListDeploymentsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: AgentsListDeploymentsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getAgentsListDeploymentsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - agentsListDeployments(workspace, params, signal); - - return { queryKey, queryFn, enabled: !!workspace, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type AgentsListDeploymentsQueryResult = NonNullable< - Awaited> ->; -export type AgentsListDeploymentsQueryError = ErrorType; - -export function useAgentsListDeployments< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | AgentsListDeploymentsParams, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useAgentsListDeployments< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: AgentsListDeploymentsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useAgentsListDeployments< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: AgentsListDeploymentsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List Deployments - */ - -export function useAgentsListDeployments< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: AgentsListDeploymentsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getAgentsListDeploymentsQueryOptions(workspace, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getAgentsListDeploymentsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: AgentsListDeploymentsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getAgentsListDeploymentsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - agentsListDeployments(workspace, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type AgentsListDeploymentsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type AgentsListDeploymentsSuspenseQueryError = ErrorType; - -export function useAgentsListDeploymentsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | AgentsListDeploymentsParams, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useAgentsListDeploymentsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: AgentsListDeploymentsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useAgentsListDeploymentsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: AgentsListDeploymentsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List Deployments - */ - -export function useAgentsListDeploymentsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: AgentsListDeploymentsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getAgentsListDeploymentsSuspenseQueryOptions(workspace, params, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Get a deployment by name. - * @summary Get Deployment - */ -export const agentsGetDeployment = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/agents/v2/workspaces/${encodeURIComponent(String(workspace))}/deployments/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getAgentsGetDeploymentQueryKey = (workspace: string, name: string) => { - return [`/apis/agents/v2/workspaces/${workspace}/deployments/${name}`] as const; -}; - -export const getAgentsGetDeploymentQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getAgentsGetDeploymentQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - agentsGetDeployment(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type AgentsGetDeploymentQueryResult = NonNullable< - Awaited> ->; -export type AgentsGetDeploymentQueryError = ErrorType; - -export function useAgentsGetDeployment< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useAgentsGetDeployment< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useAgentsGetDeployment< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Deployment - */ - -export function useAgentsGetDeployment< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getAgentsGetDeploymentQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getAgentsGetDeploymentSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getAgentsGetDeploymentQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - agentsGetDeployment(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type AgentsGetDeploymentSuspenseQueryResult = NonNullable< - Awaited> ->; -export type AgentsGetDeploymentSuspenseQueryError = ErrorType; - -export function useAgentsGetDeploymentSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useAgentsGetDeploymentSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useAgentsGetDeploymentSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Deployment - */ - -export function useAgentsGetDeploymentSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getAgentsGetDeploymentSuspenseQueryOptions(workspace, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Stop and remove a deployment. - -Marks the deployment as ``deleting``. The controller terminates the -subprocess and removes the entity on the next reconcile cycle. - * @summary Delete Deployment - */ -export const agentsDeleteDeployment = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/agents/v2/workspaces/${encodeURIComponent(String(workspace))}/deployments/${encodeURIComponent(String(name))}`, - method: 'DELETE', - signal, - }); -}; - -export const getAgentsDeleteDeploymentMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - const mutationKey = ['agentsDeleteDeployment']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string } - > = (props) => { - const { workspace, name } = props ?? {}; - - return agentsDeleteDeployment(workspace, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type AgentsDeleteDeploymentMutationResult = NonNullable< - Awaited> ->; - -export type AgentsDeleteDeploymentMutationError = ErrorType; - -/** - * @summary Delete Deployment - */ -export const useAgentsDeleteDeployment = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - return useMutation(getAgentsDeleteDeploymentMutationOptions(options), queryClient); -}; - -/** - * @summary Create Job - */ -export const agentsCreateJob = ( - workspace: string, - evaluateJobRequest: EvaluateJobRequest, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/agents/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/evaluate`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: evaluateJobRequest, - signal, - }); -}; - -export const getAgentsCreateJobMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: EvaluateJobRequest }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: EvaluateJobRequest }, - TContext -> => { - const mutationKey = ['agentsCreateJob']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; data: EvaluateJobRequest } - > = (props) => { - const { workspace, data } = props ?? {}; - - return agentsCreateJob(workspace, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type AgentsCreateJobMutationResult = NonNullable< - Awaited> ->; -export type AgentsCreateJobMutationBody = EvaluateJobRequest; -export type AgentsCreateJobMutationError = ErrorType; - -/** - * @summary Create Job - */ -export const useAgentsCreateJob = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: EvaluateJobRequest }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; data: EvaluateJobRequest }, - TContext -> => { - return useMutation(getAgentsCreateJobMutationOptions(options), queryClient); -}; - -/** - * @summary List Jobs - */ -export const agentsListJobs = ( - workspace: string, - params?: AgentsListJobsParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/agents/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/evaluate`, - method: 'GET', - params, - signal, - }); -}; - -export const getAgentsListJobsQueryKey = (workspace: string, params?: AgentsListJobsParams) => { - return [ - `/apis/agents/v2/workspaces/${workspace}/jobs/evaluate`, - ...(params ? [params] : []), - ] as const; -}; - -export const getAgentsListJobsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: AgentsListJobsParams, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getAgentsListJobsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - agentsListJobs(workspace, params, signal); - - return { queryKey, queryFn, enabled: !!workspace, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type AgentsListJobsQueryResult = NonNullable>>; -export type AgentsListJobsQueryError = ErrorType; - -export function useAgentsListJobs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | AgentsListJobsParams, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useAgentsListJobs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: AgentsListJobsParams, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useAgentsListJobs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: AgentsListJobsParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List Jobs - */ - -export function useAgentsListJobs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: AgentsListJobsParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getAgentsListJobsQueryOptions(workspace, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getAgentsListJobsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: AgentsListJobsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getAgentsListJobsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - agentsListJobs(workspace, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type AgentsListJobsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type AgentsListJobsSuspenseQueryError = ErrorType; - -export function useAgentsListJobsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | AgentsListJobsParams, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useAgentsListJobsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: AgentsListJobsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useAgentsListJobsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: AgentsListJobsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List Jobs - */ - -export function useAgentsListJobsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: AgentsListJobsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getAgentsListJobsSuspenseQueryOptions(workspace, params, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Get Job Result - */ -export const agentsGetJobResult = ( - workspace: string, - job: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/agents/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/evaluate/${encodeURIComponent(String(job))}/results/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getAgentsGetJobResultQueryKey = (workspace: string, job: string, name: string) => { - return [`/apis/agents/v2/workspaces/${workspace}/jobs/evaluate/${job}/results/${name}`] as const; -}; - -export const getAgentsGetJobResultQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getAgentsGetJobResultQueryKey(workspace, job, name); - - const queryFn: QueryFunction>> = ({ signal }) => - agentsGetJobResult(workspace, job, name, signal); - - return { - queryKey, - queryFn, - enabled: !!(workspace && job && name), - ...queryOptions, - } as UseQueryOptions>, TError, TData> & { - queryKey: DataTag; - }; -}; - -export type AgentsGetJobResultQueryResult = NonNullable< - Awaited> ->; -export type AgentsGetJobResultQueryError = ErrorType; - -export function useAgentsGetJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useAgentsGetJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useAgentsGetJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Result - */ - -export function useAgentsGetJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getAgentsGetJobResultQueryOptions(workspace, job, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getAgentsGetJobResultSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getAgentsGetJobResultQueryKey(workspace, job, name); - - const queryFn: QueryFunction>> = ({ signal }) => - agentsGetJobResult(workspace, job, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type AgentsGetJobResultSuspenseQueryResult = NonNullable< - Awaited> ->; -export type AgentsGetJobResultSuspenseQueryError = ErrorType; - -export function useAgentsGetJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useAgentsGetJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useAgentsGetJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Result - */ - -export function useAgentsGetJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getAgentsGetJobResultSuspenseQueryOptions(workspace, job, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Download Job Result - */ -export const agentsDownloadJobResult = ( - workspace: string, - job: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/agents/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/evaluate/${encodeURIComponent(String(job))}/results/${encodeURIComponent(String(name))}/download`, - method: 'GET', - responseType: 'blob', - signal, - }); -}; - -export const getAgentsDownloadJobResultQueryKey = ( - workspace: string, - job: string, - name: string -) => { - return [ - `/apis/agents/v2/workspaces/${workspace}/jobs/evaluate/${job}/results/${name}/download`, - ] as const; -}; - -export const getAgentsDownloadJobResultQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getAgentsDownloadJobResultQueryKey(workspace, job, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => agentsDownloadJobResult(workspace, job, name, signal); - - return { - queryKey, - queryFn, - enabled: !!(workspace && job && name), - ...queryOptions, - } as UseQueryOptions>, TError, TData> & { - queryKey: DataTag; - }; -}; - -export type AgentsDownloadJobResultQueryResult = NonNullable< - Awaited> ->; -export type AgentsDownloadJobResultQueryError = ErrorType; - -export function useAgentsDownloadJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useAgentsDownloadJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useAgentsDownloadJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Download Job Result - */ - -export function useAgentsDownloadJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getAgentsDownloadJobResultQueryOptions(workspace, job, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getAgentsDownloadJobResultSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getAgentsDownloadJobResultQueryKey(workspace, job, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => agentsDownloadJobResult(workspace, job, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type AgentsDownloadJobResultSuspenseQueryResult = NonNullable< - Awaited> ->; -export type AgentsDownloadJobResultSuspenseQueryError = ErrorType; - -export function useAgentsDownloadJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useAgentsDownloadJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useAgentsDownloadJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Download Job Result - */ - -export function useAgentsDownloadJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getAgentsDownloadJobResultSuspenseQueryOptions( - workspace, - job, - name, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Get Job - */ -export const agentsGetJob = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/agents/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/evaluate/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getAgentsGetJobQueryKey = (workspace: string, name: string) => { - return [`/apis/agents/v2/workspaces/${workspace}/jobs/evaluate/${name}`] as const; -}; - -export const getAgentsGetJobQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getAgentsGetJobQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - agentsGetJob(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type AgentsGetJobQueryResult = NonNullable>>; -export type AgentsGetJobQueryError = ErrorType; - -export function useAgentsGetJob< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useAgentsGetJob< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useAgentsGetJob< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job - */ - -export function useAgentsGetJob< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getAgentsGetJobQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getAgentsGetJobSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getAgentsGetJobQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - agentsGetJob(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type AgentsGetJobSuspenseQueryResult = NonNullable>>; -export type AgentsGetJobSuspenseQueryError = ErrorType; - -export function useAgentsGetJobSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useAgentsGetJobSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useAgentsGetJobSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job - */ - -export function useAgentsGetJobSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getAgentsGetJobSuspenseQueryOptions(workspace, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Delete Job - */ -export const agentsDeleteJob = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/agents/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/evaluate/${encodeURIComponent(String(name))}`, - method: 'DELETE', - signal, - }); -}; - -export const getAgentsDeleteJobMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - const mutationKey = ['agentsDeleteJob']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string } - > = (props) => { - const { workspace, name } = props ?? {}; - - return agentsDeleteJob(workspace, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type AgentsDeleteJobMutationResult = NonNullable< - Awaited> ->; - -export type AgentsDeleteJobMutationError = ErrorType; - -/** - * @summary Delete Job - */ -export const useAgentsDeleteJob = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - return useMutation(getAgentsDeleteJobMutationOptions(options), queryClient); -}; - -/** - * @summary Cancel Job - */ -export const agentsCancelJob = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/agents/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/evaluate/${encodeURIComponent(String(name))}/cancel`, - method: 'POST', - signal, - }); -}; - -export const getAgentsCancelJobMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - const mutationKey = ['agentsCancelJob']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string } - > = (props) => { - const { workspace, name } = props ?? {}; - - return agentsCancelJob(workspace, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type AgentsCancelJobMutationResult = NonNullable< - Awaited> ->; - -export type AgentsCancelJobMutationError = ErrorType; - -/** - * @summary Cancel Job - */ -export const useAgentsCancelJob = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - return useMutation(getAgentsCancelJobMutationOptions(options), queryClient); -}; - -/** - * @summary Get Job Logs - */ -export const agentsGetJobLogs = ( - workspace: string, - name: string, - params?: AgentsGetJobLogsParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/agents/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/evaluate/${encodeURIComponent(String(name))}/logs`, - method: 'GET', - params, - signal, - }); -}; - -export const getAgentsGetJobLogsQueryKey = ( - workspace: string, - name: string, - params?: AgentsGetJobLogsParams -) => { - return [ - `/apis/agents/v2/workspaces/${workspace}/jobs/evaluate/${name}/logs`, - ...(params ? [params] : []), - ] as const; -}; - -export const getAgentsGetJobLogsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: AgentsGetJobLogsParams, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getAgentsGetJobLogsQueryKey(workspace, name, params); - - const queryFn: QueryFunction>> = ({ signal }) => - agentsGetJobLogs(workspace, name, params, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type AgentsGetJobLogsQueryResult = NonNullable>>; -export type AgentsGetJobLogsQueryError = ErrorType; - -export function useAgentsGetJobLogs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params: undefined | AgentsGetJobLogsParams, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useAgentsGetJobLogs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: AgentsGetJobLogsParams, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useAgentsGetJobLogs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: AgentsGetJobLogsParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Logs - */ - -export function useAgentsGetJobLogs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: AgentsGetJobLogsParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getAgentsGetJobLogsQueryOptions(workspace, name, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getAgentsGetJobLogsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: AgentsGetJobLogsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getAgentsGetJobLogsQueryKey(workspace, name, params); - - const queryFn: QueryFunction>> = ({ signal }) => - agentsGetJobLogs(workspace, name, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type AgentsGetJobLogsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type AgentsGetJobLogsSuspenseQueryError = ErrorType; - -export function useAgentsGetJobLogsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params: undefined | AgentsGetJobLogsParams, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useAgentsGetJobLogsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: AgentsGetJobLogsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useAgentsGetJobLogsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: AgentsGetJobLogsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Logs - */ - -export function useAgentsGetJobLogsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: AgentsGetJobLogsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getAgentsGetJobLogsSuspenseQueryOptions(workspace, name, params, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary List Job Results - */ -export const agentsListJobResults = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/agents/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/evaluate/${encodeURIComponent(String(name))}/results`, - method: 'GET', - signal, - }); -}; - -export const getAgentsListJobResultsQueryKey = (workspace: string, name: string) => { - return [`/apis/agents/v2/workspaces/${workspace}/jobs/evaluate/${name}/results`] as const; -}; - -export const getAgentsListJobResultsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getAgentsListJobResultsQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - agentsListJobResults(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type AgentsListJobResultsQueryResult = NonNullable< - Awaited> ->; -export type AgentsListJobResultsQueryError = ErrorType; - -export function useAgentsListJobResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useAgentsListJobResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useAgentsListJobResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List Job Results - */ - -export function useAgentsListJobResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getAgentsListJobResultsQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getAgentsListJobResultsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getAgentsListJobResultsQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - agentsListJobResults(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type AgentsListJobResultsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type AgentsListJobResultsSuspenseQueryError = ErrorType; - -export function useAgentsListJobResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useAgentsListJobResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useAgentsListJobResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List Job Results - */ - -export function useAgentsListJobResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getAgentsListJobResultsSuspenseQueryOptions(workspace, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Get Job Status - */ -export const agentsGetJobStatus = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/agents/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/evaluate/${encodeURIComponent(String(name))}/status`, - method: 'GET', - signal, - }); -}; - -export const getAgentsGetJobStatusQueryKey = (workspace: string, name: string) => { - return [`/apis/agents/v2/workspaces/${workspace}/jobs/evaluate/${name}/status`] as const; -}; - -export const getAgentsGetJobStatusQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getAgentsGetJobStatusQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - agentsGetJobStatus(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type AgentsGetJobStatusQueryResult = NonNullable< - Awaited> ->; -export type AgentsGetJobStatusQueryError = ErrorType; - -export function useAgentsGetJobStatus< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useAgentsGetJobStatus< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useAgentsGetJobStatus< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Status - */ - -export function useAgentsGetJobStatus< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getAgentsGetJobStatusQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getAgentsGetJobStatusSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getAgentsGetJobStatusQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - agentsGetJobStatus(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type AgentsGetJobStatusSuspenseQueryResult = NonNullable< - Awaited> ->; -export type AgentsGetJobStatusSuspenseQueryError = ErrorType; - -export function useAgentsGetJobStatusSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useAgentsGetJobStatusSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useAgentsGetJobStatusSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Status - */ - -export function useAgentsGetJobStatusSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getAgentsGetJobStatusSuspenseQueryOptions(workspace, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} diff --git a/web/packages/sdk/generated/agents/schema/Agent.ts b/web/packages/sdk/generated/agents/schema/Agent.ts deleted file mode 100644 index be2dba9b2d..0000000000 --- a/web/packages/sdk/generated/agents/schema/Agent.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ -import type { AgentConfig } from './AgentConfig'; - -/** - * An agent definition — stores the NAT workflow config and metadata. - -Entity type: ``agent`` -Primary lookup: by ``name`` within a ``workspace``. - */ -export interface Agent { - /** Entity name within the workspace */ - name?: string; - /** - * Workspace identifier - * @pattern ^[\w\-\+.@:]+$ - */ - workspace: string; - /** The name of the project associated with this entity. */ - project?: string; - /** Human-readable description of the agent. */ - description?: string; - /** NAT workflow config (YAML-equivalent dict, keyed by component name). */ - config?: AgentConfig; - /** platform-internal schema version tag for the agent config dict. Not read or validated by NAT — used by NeMo Platform for future config migration. Currently only 'nat-workflow-v1' is supported. */ - config_format?: string; - readonly id: string; - readonly created_at: string; - readonly created_by: string | null; - readonly updated_at: string; - readonly updated_by: string | null; - /** Alias for id for backwards compatibility. */ - readonly entity_id: string; - /** Parent entity ID for nested entities. */ - readonly parent: string; -} diff --git a/web/packages/sdk/generated/agents/schema/AgentConfig.ts b/web/packages/sdk/generated/agents/schema/AgentConfig.ts deleted file mode 100644 index 49978f9edb..0000000000 --- a/web/packages/sdk/generated/agents/schema/AgentConfig.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ - -/** - * NAT workflow config (YAML-equivalent dict, keyed by component name). - */ -export type AgentConfig = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/agents/schema/AgentDeployment.ts b/web/packages/sdk/generated/agents/schema/AgentDeployment.ts deleted file mode 100644 index eb08c1138d..0000000000 --- a/web/packages/sdk/generated/agents/schema/AgentDeployment.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ -import type { AgentDeploymentConfig } from './AgentDeploymentConfig'; -import type { AgentDeploymentStatus } from './AgentDeploymentStatus'; - -/** - * A running (or pending) deployment of an Agent. - -Entity type: ``agent_deployment`` -Lifecycle: pending → starting → running | failed. -The :class:`~nemo_agents_plugin.runner.controller.AgentDeploymentController` -drives state transitions by reconciling this entity against the -:class:`~nemo_agents_plugin.runner.backend.RunnerBackend`. - */ -export interface AgentDeployment { - /** Entity name within the workspace */ - name?: string; - /** - * Workspace identifier - * @pattern ^[\w\-\+.@:]+$ - */ - workspace: string; - /** The name of the project associated with this entity. */ - project?: string; - /** Name of the Agent entity this deployment is for. */ - agent?: string; - /** Resolved agent config with IGW URL injected, written when the deployment is created. */ - config?: AgentDeploymentConfig; - /** Lifecycle status: pending | starting | running | failed | deleting. */ - status?: AgentDeploymentStatus; - /** HTTP endpoint of the running agent process (e.g. http://localhost:9001). */ - endpoint?: string; - /** Port the agent process is listening on. */ - port?: number; - /** OS process ID of the agent subprocess. */ - pid?: number; - /** Error message if status is 'failed'. */ - error?: string; - readonly id: string; - readonly created_at: string; - readonly created_by: string | null; - readonly updated_at: string; - readonly updated_by: string | null; - /** Alias for id for backwards compatibility. */ - readonly entity_id: string; - /** Parent entity ID for nested entities. */ - readonly parent: string; -} diff --git a/web/packages/sdk/generated/agents/schema/AgentDeploymentConfig.ts b/web/packages/sdk/generated/agents/schema/AgentDeploymentConfig.ts deleted file mode 100644 index 2e3798c444..0000000000 --- a/web/packages/sdk/generated/agents/schema/AgentDeploymentConfig.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ - -/** - * Resolved agent config with IGW URL injected, written when the deployment is created. - */ -export type AgentDeploymentConfig = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/agents/schema/AgentDeploymentStatus.ts b/web/packages/sdk/generated/agents/schema/AgentDeploymentStatus.ts deleted file mode 100644 index 5c5f96d3ac..0000000000 --- a/web/packages/sdk/generated/agents/schema/AgentDeploymentStatus.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ - -/** - * Lifecycle status: pending | starting | running | failed | deleting. - */ -export type AgentDeploymentStatus = - (typeof AgentDeploymentStatus)[keyof typeof AgentDeploymentStatus]; - -export const AgentDeploymentStatus = { - pending: 'pending', - starting: 'starting', - running: 'running', - failed: 'failed', - deleting: 'deleting', -} as const; diff --git a/web/packages/sdk/generated/agents/schema/AgentsGetJobLogsParams.ts b/web/packages/sdk/generated/agents/schema/AgentsGetJobLogsParams.ts deleted file mode 100644 index b883f5df43..0000000000 --- a/web/packages/sdk/generated/agents/schema/AgentsGetJobLogsParams.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ - -export type AgentsGetJobLogsParams = { - limit?: number; - page_cursor?: string; -}; diff --git a/web/packages/sdk/generated/agents/schema/AgentsListAgentsParams.ts b/web/packages/sdk/generated/agents/schema/AgentsListAgentsParams.ts deleted file mode 100644 index f21d86aeac..0000000000 --- a/web/packages/sdk/generated/agents/schema/AgentsListAgentsParams.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ - -export type AgentsListAgentsParams = { - /** - * @minimum 1 - */ - page?: number; - /** - * @minimum 1 - * @maximum 100 - */ - page_size?: number; - sort?: string; -}; diff --git a/web/packages/sdk/generated/agents/schema/AgentsListDeploymentsParams.ts b/web/packages/sdk/generated/agents/schema/AgentsListDeploymentsParams.ts deleted file mode 100644 index a8f36e0e6d..0000000000 --- a/web/packages/sdk/generated/agents/schema/AgentsListDeploymentsParams.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ - -export type AgentsListDeploymentsParams = { - /** - * @minimum 1 - */ - page?: number; - /** - * @minimum 1 - * @maximum 100 - */ - page_size?: number; - sort?: string; -}; diff --git a/web/packages/sdk/generated/agents/schema/AgentsListJobsParams.ts b/web/packages/sdk/generated/agents/schema/AgentsListJobsParams.ts deleted file mode 100644 index 82e4ba2b59..0000000000 --- a/web/packages/sdk/generated/agents/schema/AgentsListJobsParams.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ -import type { EvaluateJobsListFilter } from './EvaluateJobsListFilter'; -import type { EvaluateJobsSortField } from './EvaluateJobsSortField'; - -export type AgentsListJobsParams = { - /** - * Page number. - * @exclusiveMinimum 0 - */ - page?: number; - /** - * Page size. - * @exclusiveMinimum 0 - */ - page_size?: number; - /** - * The field to sort by. To sort in decreasing order, use `-` in front of the field name. - */ - sort?: EvaluateJobsSortField; - /** - * Filter jobs on various criteria. - */ - filter?: EvaluateJobsListFilter; -}; diff --git a/web/packages/sdk/generated/agents/schema/CreateAgentRequest.ts b/web/packages/sdk/generated/agents/schema/CreateAgentRequest.ts deleted file mode 100644 index 892dcbfb51..0000000000 --- a/web/packages/sdk/generated/agents/schema/CreateAgentRequest.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ -import type { CreateAgentRequestConfig } from './CreateAgentRequestConfig'; - -/** - * Request body for ``POST /v2/workspaces/{workspace}/agents``. - */ -export interface CreateAgentRequest { - /** Unique agent name within the workspace. */ - name: string; - /** Human-readable description. */ - description?: string; - /** NAT workflow config dict. */ - config: CreateAgentRequestConfig; - /** Config format identifier. */ - config_format?: string; -} diff --git a/web/packages/sdk/generated/agents/schema/CreateAgentRequestConfig.ts b/web/packages/sdk/generated/agents/schema/CreateAgentRequestConfig.ts deleted file mode 100644 index 3f448516cc..0000000000 --- a/web/packages/sdk/generated/agents/schema/CreateAgentRequestConfig.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ - -/** - * NAT workflow config dict. - */ -export type CreateAgentRequestConfig = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/agents/schema/CreateDeploymentRequest.ts b/web/packages/sdk/generated/agents/schema/CreateDeploymentRequest.ts deleted file mode 100644 index 736608c444..0000000000 --- a/web/packages/sdk/generated/agents/schema/CreateDeploymentRequest.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ - -/** - * Request body for ``POST /v2/workspaces/{workspace}/deployments``. - */ -export interface CreateDeploymentRequest { - /** Name of the Agent to deploy. */ - agent: string; - /** Optional deployment name. Auto-generated from agent name + random suffix if omitted. */ - name?: string; -} diff --git a/web/packages/sdk/generated/agents/schema/DatetimeFilter.ts b/web/packages/sdk/generated/agents/schema/DatetimeFilter.ts deleted file mode 100644 index a6ef4dc0b2..0000000000 --- a/web/packages/sdk/generated/agents/schema/DatetimeFilter.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ - -export interface DatetimeFilter { - /** Filter for results greater than or equal to this datetime. */ - $gte?: string; - /** Filter for results less than or equal to this datetime. */ - $lte?: string; -} diff --git a/web/packages/sdk/generated/agents/schema/EvaluateAgentSpec.ts b/web/packages/sdk/generated/agents/schema/EvaluateAgentSpec.ts deleted file mode 100644 index 70995896f8..0000000000 --- a/web/packages/sdk/generated/agents/schema/EvaluateAgentSpec.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ - -/** - * Spec for an agent evaluation job. - -Field declaration order also drives the auto-generated CLI flag -order — keep the most-frequently-set knobs first. - -Attributes: - agent: The agent to evaluate against. Accepts either a - platform-managed agent reference (``"name"`` or - ``"workspace/name"``) or a literal HTTP(S) endpoint URL. The - shape is auto-detected at run time — values containing - ``"://"`` are treated as URLs (and forwarded to - ``nat eval --endpoint`` verbatim); anything else is resolved - to the platform gateway URL - ``{base_url}/apis/agents/v2/workspaces/{workspace}/agents/{name}/-``. - When ``None`` the eval config is expected to include an - inline agent workflow. - eval_config: Path to the NAT evaluation YAML config file. When - ``eval_config_fileset`` is set, this is interpreted relative - to the downloaded fileset's contents. - eval_config_fileset: Optional fileset reference (``name`` or - ``workspace/name``) that pre-stages the eval YAML and any - sibling files (e.g. dataset). Used by platform-managed - submissions where the ``agents.evaluate-agent`` function - uploads everything before submitting; local CLI runs leave - this ``None`` and let ``eval_config`` be a real local path. - output: Where to put the eval outputs. Accepts either a local - directory path (``./out``, ``/abs/out``, ``~/out``) or an - NeMo Platform fileset reference (``"name"`` or ``"workspace/name"``). - Path-shaped values write directly to disk; bare names upload - results to the named fileset, creating it on demand. When - ``None`` the job writes to ``ctx.storage.persistent / - "results"`` — the platform-injected persistent volume in - container runs, a tempdir under ``$TMPDIR`` for local CLI - runs. - workspace: NeMo Platform workspace used to scope gateway URL injection, - ``--agent`` resolution, and ``--output`` fileset creation - when those values are given as bare names. - */ -export interface EvaluateAgentSpec { - /** Agent to evaluate against — either a platform-managed agent reference (e.g. 'calculator', 'workspace/calculator') or an HTTP(S) endpoint URL (e.g. 'http://localhost:8080'). Bare names resolve to the platform gateway URL '{base_url}/apis/agents/v2/workspaces/{workspace}/agents/{name}/-'; URLs are passed through to 'nat eval --endpoint' verbatim. When omitted, the eval config must include an inline agent workflow. */ - agent?: string; - /** Path to the NAT evaluation YAML config file. */ - eval_config: string; - /** Optional fileset reference (``name`` or ``workspace/name``). When set, the runner downloads the fileset's contents into a tempdir and resolves ``eval_config`` relative to that dir. Local CLI runs leave this ``None``. */ - eval_config_fileset?: string; - /** Where to write eval outputs — either a local directory (path-shaped: starts with '/', './', '../', '~/') or a NeMo Platform fileset reference ('name' or 'workspace/name'). Filesets are created on demand if missing. Defaults to /results (the platform-injected persistent volume) when not provided. */ - output?: string; - /** Workspace name used to construct the Inference Gateway URL when injecting base_url into judge LLMs that have none set, and to resolve --agent / --output to gateway endpoints / fileset names when given a bare name. */ - workspace?: string; -} diff --git a/web/packages/sdk/generated/agents/schema/EvaluateJob.ts b/web/packages/sdk/generated/agents/schema/EvaluateJob.ts deleted file mode 100644 index 384d0f78c9..0000000000 --- a/web/packages/sdk/generated/agents/schema/EvaluateJob.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ -import type { EvaluateAgentSpec } from './EvaluateAgentSpec'; -import type { EvaluateJobCustomFields } from './EvaluateJobCustomFields'; -import type { EvaluateJobErrorDetails } from './EvaluateJobErrorDetails'; -import type { EvaluateJobOwnership } from './EvaluateJobOwnership'; -import type { EvaluateJobStatusDetails } from './EvaluateJobStatusDetails'; -import type { PlatformJobStatus } from './PlatformJobStatus'; - -export interface EvaluateJob { - id?: string; - name: string; - description?: string; - project?: string; - workspace?: string; - created_at?: string; - updated_at?: string; - spec: EvaluateAgentSpec; - status?: PlatformJobStatus; - status_details?: EvaluateJobStatusDetails; - error_details?: EvaluateJobErrorDetails; - ownership?: EvaluateJobOwnership; - custom_fields?: EvaluateJobCustomFields; -} diff --git a/web/packages/sdk/generated/agents/schema/EvaluateJobCustomFields.ts b/web/packages/sdk/generated/agents/schema/EvaluateJobCustomFields.ts deleted file mode 100644 index 2082215865..0000000000 --- a/web/packages/sdk/generated/agents/schema/EvaluateJobCustomFields.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ - -export type EvaluateJobCustomFields = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/agents/schema/EvaluateJobErrorDetails.ts b/web/packages/sdk/generated/agents/schema/EvaluateJobErrorDetails.ts deleted file mode 100644 index 2656591a45..0000000000 --- a/web/packages/sdk/generated/agents/schema/EvaluateJobErrorDetails.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ - -export type EvaluateJobErrorDetails = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/agents/schema/EvaluateJobOwnership.ts b/web/packages/sdk/generated/agents/schema/EvaluateJobOwnership.ts deleted file mode 100644 index 7b2488fcdd..0000000000 --- a/web/packages/sdk/generated/agents/schema/EvaluateJobOwnership.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ - -export type EvaluateJobOwnership = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/agents/schema/EvaluateJobRequest.ts b/web/packages/sdk/generated/agents/schema/EvaluateJobRequest.ts deleted file mode 100644 index 4b129f5e13..0000000000 --- a/web/packages/sdk/generated/agents/schema/EvaluateJobRequest.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ -import type { EvaluateAgentSpec } from './EvaluateAgentSpec'; -import type { EvaluateJobRequestCustomFields } from './EvaluateJobRequestCustomFields'; -import type { EvaluateJobRequestOwnership } from './EvaluateJobRequestOwnership'; - -export interface EvaluateJobRequest { - name?: string; - description?: string; - project?: string; - spec: EvaluateAgentSpec; - ownership?: EvaluateJobRequestOwnership; - custom_fields?: EvaluateJobRequestCustomFields; -} diff --git a/web/packages/sdk/generated/agents/schema/EvaluateJobRequestCustomFields.ts b/web/packages/sdk/generated/agents/schema/EvaluateJobRequestCustomFields.ts deleted file mode 100644 index 6195751a67..0000000000 --- a/web/packages/sdk/generated/agents/schema/EvaluateJobRequestCustomFields.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ - -export type EvaluateJobRequestCustomFields = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/agents/schema/EvaluateJobRequestOwnership.ts b/web/packages/sdk/generated/agents/schema/EvaluateJobRequestOwnership.ts deleted file mode 100644 index f5928902ca..0000000000 --- a/web/packages/sdk/generated/agents/schema/EvaluateJobRequestOwnership.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ - -export type EvaluateJobRequestOwnership = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/agents/schema/EvaluateJobStatusDetails.ts b/web/packages/sdk/generated/agents/schema/EvaluateJobStatusDetails.ts deleted file mode 100644 index 92c645be37..0000000000 --- a/web/packages/sdk/generated/agents/schema/EvaluateJobStatusDetails.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ - -export type EvaluateJobStatusDetails = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/agents/schema/EvaluateJobsListFilter.ts b/web/packages/sdk/generated/agents/schema/EvaluateJobsListFilter.ts deleted file mode 100644 index 19ebc8cc8a..0000000000 --- a/web/packages/sdk/generated/agents/schema/EvaluateJobsListFilter.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ -import type { DatetimeFilter } from './DatetimeFilter'; -import type { PlatformJobStatus } from './PlatformJobStatus'; - -export interface EvaluateJobsListFilter { - /** Jobs created at 'gte' datetime or 'lte' datetime. */ - created_at?: DatetimeFilter; - /** Name of the job. */ - name?: string; - /** Workspace of the job. */ - workspace?: string; - /** Project containing the job. */ - project?: string; - /** The current status. */ - status?: PlatformJobStatus; - /** Jobs updated at 'gte' datetime or 'lte' datetime. */ - updated_at?: DatetimeFilter; -} diff --git a/web/packages/sdk/generated/agents/schema/EvaluateJobsPage.ts b/web/packages/sdk/generated/agents/schema/EvaluateJobsPage.ts deleted file mode 100644 index 8d5b616016..0000000000 --- a/web/packages/sdk/generated/agents/schema/EvaluateJobsPage.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ -import type { EvaluateJob } from './EvaluateJob'; -import type { EvaluateJobsPageFilter } from './EvaluateJobsPageFilter'; -import type { PaginationData } from './PaginationData'; - -export interface EvaluateJobsPage { - data: EvaluateJob[]; - /** Pagination information. */ - pagination?: PaginationData; - /** The field on which the results are sorted. */ - sort?: string; - /** Filtering information. */ - filter?: EvaluateJobsPageFilter; -} diff --git a/web/packages/sdk/generated/agents/schema/EvaluateJobsPageFilter.ts b/web/packages/sdk/generated/agents/schema/EvaluateJobsPageFilter.ts deleted file mode 100644 index 1092ea5658..0000000000 --- a/web/packages/sdk/generated/agents/schema/EvaluateJobsPageFilter.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ - -/** - * Filtering information. - */ -export type EvaluateJobsPageFilter = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/agents/schema/EvaluateJobsSortField.ts b/web/packages/sdk/generated/agents/schema/EvaluateJobsSortField.ts deleted file mode 100644 index 895a5520bc..0000000000 --- a/web/packages/sdk/generated/agents/schema/EvaluateJobsSortField.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ - -export type EvaluateJobsSortField = - (typeof EvaluateJobsSortField)[keyof typeof EvaluateJobsSortField]; - -export const EvaluateJobsSortField = { - created_at: 'created_at', - '-created_at': '-created_at', - updated_at: 'updated_at', - '-updated_at': '-updated_at', -} as const; diff --git a/web/packages/sdk/generated/agents/schema/FileStorageType.ts b/web/packages/sdk/generated/agents/schema/FileStorageType.ts deleted file mode 100644 index bef2b8e0b7..0000000000 --- a/web/packages/sdk/generated/agents/schema/FileStorageType.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ - -export type FileStorageType = (typeof FileStorageType)[keyof typeof FileStorageType]; - -export const FileStorageType = { - fileset: 'fileset', -} as const; diff --git a/web/packages/sdk/generated/agents/schema/HTTPValidationError.ts b/web/packages/sdk/generated/agents/schema/HTTPValidationError.ts deleted file mode 100644 index 0237114bc9..0000000000 --- a/web/packages/sdk/generated/agents/schema/HTTPValidationError.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ -import type { ValidationError } from './ValidationError'; - -export interface HTTPValidationError { - detail?: ValidationError[]; -} diff --git a/web/packages/sdk/generated/agents/schema/NemoListResponseAgent.ts b/web/packages/sdk/generated/agents/schema/NemoListResponseAgent.ts deleted file mode 100644 index 4e22abe19b..0000000000 --- a/web/packages/sdk/generated/agents/schema/NemoListResponseAgent.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ -import type { Agent } from './Agent'; -import type { PaginationData } from './PaginationData'; - -export interface NemoListResponseAgent { - data: Agent[]; - /** Pagination metadata — page, page_size, total_results, etc. */ - pagination?: PaginationData; - /** Sort field applied to this result set (e.g. '-created_at'). */ - sort?: string; - /** Filter criteria echoed back from the request. */ - filter?: unknown; -} diff --git a/web/packages/sdk/generated/agents/schema/NemoListResponseAgentDeployment.ts b/web/packages/sdk/generated/agents/schema/NemoListResponseAgentDeployment.ts deleted file mode 100644 index 04e08f7481..0000000000 --- a/web/packages/sdk/generated/agents/schema/NemoListResponseAgentDeployment.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ -import type { AgentDeployment } from './AgentDeployment'; -import type { PaginationData } from './PaginationData'; - -export interface NemoListResponseAgentDeployment { - data: AgentDeployment[]; - /** Pagination metadata — page, page_size, total_results, etc. */ - pagination?: PaginationData; - /** Sort field applied to this result set (e.g. '-created_at'). */ - sort?: string; - /** Filter criteria echoed back from the request. */ - filter?: unknown; -} diff --git a/web/packages/sdk/generated/agents/schema/PaginationData.ts b/web/packages/sdk/generated/agents/schema/PaginationData.ts deleted file mode 100644 index 59120afd37..0000000000 --- a/web/packages/sdk/generated/agents/schema/PaginationData.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ - -export interface PaginationData { - /** The current page number. */ - page: number; - /** The page size used for the query. */ - page_size: number; - /** The size for the current page. */ - current_page_size: number; - /** The total number of pages. */ - total_pages: number; - /** The total number of results. */ - total_results: number; -} diff --git a/web/packages/sdk/generated/agents/schema/PlatformJobListResultResponse.ts b/web/packages/sdk/generated/agents/schema/PlatformJobListResultResponse.ts deleted file mode 100644 index 958a006073..0000000000 --- a/web/packages/sdk/generated/agents/schema/PlatformJobListResultResponse.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ -import type { PlatformJobResultResponse } from './PlatformJobResultResponse'; - -export interface PlatformJobListResultResponse { - data: PlatformJobResultResponse[]; -} diff --git a/web/packages/sdk/generated/agents/schema/PlatformJobLog.ts b/web/packages/sdk/generated/agents/schema/PlatformJobLog.ts deleted file mode 100644 index bd06e409f4..0000000000 --- a/web/packages/sdk/generated/agents/schema/PlatformJobLog.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ - -export interface PlatformJobLog { - timestamp: string; - job: string; - job_step: string; - job_task: string; - message: string; -} diff --git a/web/packages/sdk/generated/agents/schema/PlatformJobLogPage.ts b/web/packages/sdk/generated/agents/schema/PlatformJobLogPage.ts deleted file mode 100644 index f38cd54cf6..0000000000 --- a/web/packages/sdk/generated/agents/schema/PlatformJobLogPage.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ -import type { PlatformJobLog } from './PlatformJobLog'; - -export interface PlatformJobLogPage { - data: PlatformJobLog[]; - total: number; - next_page: string; - prev_page: string; -} diff --git a/web/packages/sdk/generated/agents/schema/PlatformJobResultResponse.ts b/web/packages/sdk/generated/agents/schema/PlatformJobResultResponse.ts deleted file mode 100644 index 4d9d17cab7..0000000000 --- a/web/packages/sdk/generated/agents/schema/PlatformJobResultResponse.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ -import type { FileStorageType } from './FileStorageType'; - -export interface PlatformJobResultResponse { - name: string; - job: string; - workspace: string; - project?: string; - created_at?: string; - updated_at?: string; - artifact_url: string; - artifact_storage_type: FileStorageType; - download_url?: string; -} diff --git a/web/packages/sdk/generated/agents/schema/PlatformJobStatus.ts b/web/packages/sdk/generated/agents/schema/PlatformJobStatus.ts deleted file mode 100644 index 683531a775..0000000000 --- a/web/packages/sdk/generated/agents/schema/PlatformJobStatus.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ - -/** - * Enumeration of possible job statuses. - -This enum represents the various states a job can be in during its lifecycle, -from creation to a terminal state. - */ -export type PlatformJobStatus = (typeof PlatformJobStatus)[keyof typeof PlatformJobStatus]; - -export const PlatformJobStatus = { - created: 'created', - pending: 'pending', - active: 'active', - cancelled: 'cancelled', - cancelling: 'cancelling', - error: 'error', - completed: 'completed', - paused: 'paused', - pausing: 'pausing', - resuming: 'resuming', -} as const; diff --git a/web/packages/sdk/generated/agents/schema/PlatformJobStatusResponse.ts b/web/packages/sdk/generated/agents/schema/PlatformJobStatusResponse.ts deleted file mode 100644 index 4de43effeb..0000000000 --- a/web/packages/sdk/generated/agents/schema/PlatformJobStatusResponse.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ -import type { PlatformJobStatus } from './PlatformJobStatus'; -import type { PlatformJobStatusResponseErrorDetails } from './PlatformJobStatusResponseErrorDetails'; -import type { PlatformJobStatusResponseStatusDetails } from './PlatformJobStatusResponseStatusDetails'; -import type { PlatformJobStepStatusResponse } from './PlatformJobStepStatusResponse'; - -export interface PlatformJobStatusResponse { - id: string; - name: string; - status: PlatformJobStatus; - status_details: PlatformJobStatusResponseStatusDetails; - error_details: PlatformJobStatusResponseErrorDetails; - steps: PlatformJobStepStatusResponse[]; - created_at: string; - updated_at: string; -} diff --git a/web/packages/sdk/generated/agents/schema/PlatformJobStatusResponseErrorDetails.ts b/web/packages/sdk/generated/agents/schema/PlatformJobStatusResponseErrorDetails.ts deleted file mode 100644 index aa29bc6fa7..0000000000 --- a/web/packages/sdk/generated/agents/schema/PlatformJobStatusResponseErrorDetails.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ - -export type PlatformJobStatusResponseErrorDetails = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/agents/schema/PlatformJobStatusResponseStatusDetails.ts b/web/packages/sdk/generated/agents/schema/PlatformJobStatusResponseStatusDetails.ts deleted file mode 100644 index 953aae83e0..0000000000 --- a/web/packages/sdk/generated/agents/schema/PlatformJobStatusResponseStatusDetails.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ - -export type PlatformJobStatusResponseStatusDetails = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/agents/schema/PlatformJobStepStatusResponse.ts b/web/packages/sdk/generated/agents/schema/PlatformJobStepStatusResponse.ts deleted file mode 100644 index ca8197aac8..0000000000 --- a/web/packages/sdk/generated/agents/schema/PlatformJobStepStatusResponse.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ -import type { PlatformJobStatus } from './PlatformJobStatus'; -import type { PlatformJobStepStatusResponseErrorDetails } from './PlatformJobStepStatusResponseErrorDetails'; -import type { PlatformJobStepStatusResponseStatusDetails } from './PlatformJobStepStatusResponseStatusDetails'; -import type { PlatformJobTaskStatusResponse } from './PlatformJobTaskStatusResponse'; - -export interface PlatformJobStepStatusResponse { - id: string; - name: string; - status: PlatformJobStatus; - status_details: PlatformJobStepStatusResponseStatusDetails; - error_details: PlatformJobStepStatusResponseErrorDetails; - tasks: PlatformJobTaskStatusResponse[]; - created_at: string; - updated_at: string; -} diff --git a/web/packages/sdk/generated/agents/schema/PlatformJobStepStatusResponseErrorDetails.ts b/web/packages/sdk/generated/agents/schema/PlatformJobStepStatusResponseErrorDetails.ts deleted file mode 100644 index 530b475fab..0000000000 --- a/web/packages/sdk/generated/agents/schema/PlatformJobStepStatusResponseErrorDetails.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ - -export type PlatformJobStepStatusResponseErrorDetails = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/agents/schema/PlatformJobStepStatusResponseStatusDetails.ts b/web/packages/sdk/generated/agents/schema/PlatformJobStepStatusResponseStatusDetails.ts deleted file mode 100644 index 67e7648c7d..0000000000 --- a/web/packages/sdk/generated/agents/schema/PlatformJobStepStatusResponseStatusDetails.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ - -export type PlatformJobStepStatusResponseStatusDetails = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/agents/schema/PlatformJobTaskStatusResponse.ts b/web/packages/sdk/generated/agents/schema/PlatformJobTaskStatusResponse.ts deleted file mode 100644 index b06bbc75d3..0000000000 --- a/web/packages/sdk/generated/agents/schema/PlatformJobTaskStatusResponse.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ -import type { PlatformJobStatus } from './PlatformJobStatus'; -import type { PlatformJobTaskStatusResponseErrorDetails } from './PlatformJobTaskStatusResponseErrorDetails'; -import type { PlatformJobTaskStatusResponseStatusDetails } from './PlatformJobTaskStatusResponseStatusDetails'; - -export interface PlatformJobTaskStatusResponse { - id: string; - name: string; - status: PlatformJobStatus; - status_details: PlatformJobTaskStatusResponseStatusDetails; - error_details: PlatformJobTaskStatusResponseErrorDetails; - error_stack: string; - created_at: string; - updated_at: string; -} diff --git a/web/packages/sdk/generated/agents/schema/PlatformJobTaskStatusResponseErrorDetails.ts b/web/packages/sdk/generated/agents/schema/PlatformJobTaskStatusResponseErrorDetails.ts deleted file mode 100644 index fa43a2ef87..0000000000 --- a/web/packages/sdk/generated/agents/schema/PlatformJobTaskStatusResponseErrorDetails.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ - -export type PlatformJobTaskStatusResponseErrorDetails = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/agents/schema/PlatformJobTaskStatusResponseStatusDetails.ts b/web/packages/sdk/generated/agents/schema/PlatformJobTaskStatusResponseStatusDetails.ts deleted file mode 100644 index 6cb70d987b..0000000000 --- a/web/packages/sdk/generated/agents/schema/PlatformJobTaskStatusResponseStatusDetails.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ - -export type PlatformJobTaskStatusResponseStatusDetails = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/agents/schema/ValidationError.ts b/web/packages/sdk/generated/agents/schema/ValidationError.ts deleted file mode 100644 index 453fd175c3..0000000000 --- a/web/packages/sdk/generated/agents/schema/ValidationError.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ -import type { ValidationErrorCtx } from './ValidationErrorCtx'; - -export interface ValidationError { - loc: (string | number)[]; - msg: string; - type: string; - input?: unknown; - ctx?: ValidationErrorCtx; -} diff --git a/web/packages/sdk/generated/agents/schema/ValidationErrorCtx.ts b/web/packages/sdk/generated/agents/schema/ValidationErrorCtx.ts deleted file mode 100644 index 8de9a36aeb..0000000000 --- a/web/packages/sdk/generated/agents/schema/ValidationErrorCtx.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ - -export type ValidationErrorCtx = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/agents/schema/index.ts b/web/packages/sdk/generated/agents/schema/index.ts deleted file mode 100644 index 599c7b0d0c..0000000000 --- a/web/packages/sdk/generated/agents/schema/index.ts +++ /dev/null @@ -1,56 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ - -export * from './Agent'; -export * from './AgentConfig'; -export * from './AgentDeployment'; -export * from './AgentDeploymentConfig'; -export * from './AgentDeploymentStatus'; -export * from './AgentsGetJobLogsParams'; -export * from './AgentsListAgentsParams'; -export * from './AgentsListDeploymentsParams'; -export * from './AgentsListJobsParams'; -export * from './CreateAgentRequest'; -export * from './CreateAgentRequestConfig'; -export * from './CreateDeploymentRequest'; -export * from './DatetimeFilter'; -export * from './EvaluateAgentSpec'; -export * from './EvaluateJob'; -export * from './EvaluateJobCustomFields'; -export * from './EvaluateJobErrorDetails'; -export * from './EvaluateJobOwnership'; -export * from './EvaluateJobRequest'; -export * from './EvaluateJobRequestCustomFields'; -export * from './EvaluateJobRequestOwnership'; -export * from './EvaluateJobsListFilter'; -export * from './EvaluateJobsPage'; -export * from './EvaluateJobsPageFilter'; -export * from './EvaluateJobsSortField'; -export * from './EvaluateJobStatusDetails'; -export * from './FileStorageType'; -export * from './HTTPValidationError'; -export * from './NemoListResponseAgent'; -export * from './NemoListResponseAgentDeployment'; -export * from './PaginationData'; -export * from './PlatformJobListResultResponse'; -export * from './PlatformJobLog'; -export * from './PlatformJobLogPage'; -export * from './PlatformJobResultResponse'; -export * from './PlatformJobStatus'; -export * from './PlatformJobStatusResponse'; -export * from './PlatformJobStatusResponseErrorDetails'; -export * from './PlatformJobStatusResponseStatusDetails'; -export * from './PlatformJobStepStatusResponse'; -export * from './PlatformJobStepStatusResponseErrorDetails'; -export * from './PlatformJobStepStatusResponseStatusDetails'; -export * from './PlatformJobTaskStatusResponse'; -export * from './PlatformJobTaskStatusResponseErrorDetails'; -export * from './PlatformJobTaskStatusResponseStatusDetails'; -export * from './ValidationError'; -export * from './ValidationErrorCtx'; diff --git a/web/packages/sdk/generated/agents/zod/agent-deployments.ts b/web/packages/sdk/generated/agents/zod/agent-deployments.ts deleted file mode 100644 index bfe34e70a7..0000000000 --- a/web/packages/sdk/generated/agents/zod/agent-deployments.ts +++ /dev/null @@ -1,227 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ -import * as zod from 'zod'; - -/** - * Create a new deployment for an existing agent. - -The deployment starts in ``pending`` state and is picked up by the -deployment controller on its next reconcile cycle. - * @summary Create Deployment - */ -export const AgentsCreateDeploymentParams = zod.object({ - workspace: zod.string(), -}); - -export const AgentsCreateDeploymentBody = zod - .object({ - agent: zod.string().describe('Name of the Agent to deploy.'), - name: zod - .string() - .optional() - .describe( - 'Optional deployment name. Auto-generated from agent name + random suffix if omitted.' - ), - }) - .describe('Request body for ``POST \/v2\/workspaces\/{workspace}\/deployments``.'); - -/** - * List all deployments in the workspace with pagination and filter support. - * @summary List Deployments - */ -export const AgentsListDeploymentsParams = zod.object({ - workspace: zod.string(), -}); - -export const agentsListDeploymentsQueryPageDefault = 1; - -export const agentsListDeploymentsQueryPageSizeDefault = 20; -export const agentsListDeploymentsQueryPageSizeMax = 100; - -export const agentsListDeploymentsQuerySortDefault = `-created_at`; - -export const AgentsListDeploymentsQueryParams = zod.object({ - page: zod.number().min(1).default(agentsListDeploymentsQueryPageDefault), - page_size: zod - .number() - .min(1) - .max(agentsListDeploymentsQueryPageSizeMax) - .default(agentsListDeploymentsQueryPageSizeDefault), - sort: zod.string().default(agentsListDeploymentsQuerySortDefault), -}); - -export const agentsListDeploymentsResponseDataItemNameDefault = ``; -export const agentsListDeploymentsResponseDataItemWorkspaceRegExp = new RegExp('^[\\w\\-\\+.@:]+$'); -export const agentsListDeploymentsResponseDataItemAgentDefault = ``; -export const agentsListDeploymentsResponseDataItemStatusDefault = `pending`; -export const agentsListDeploymentsResponseDataItemEndpointDefault = ``; -export const agentsListDeploymentsResponseDataItemPortDefault = 0; -export const agentsListDeploymentsResponseDataItemPidDefault = 0; -export const agentsListDeploymentsResponseDataItemErrorDefault = ``; - -export const AgentsListDeploymentsResponse = zod.object({ - data: zod.array( - zod - .object({ - name: zod - .string() - .default(agentsListDeploymentsResponseDataItemNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(agentsListDeploymentsResponseDataItemWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - agent: zod - .string() - .default(agentsListDeploymentsResponseDataItemAgentDefault) - .describe('Name of the Agent entity this deployment is for.'), - config: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Resolved agent config with IGW URL injected, written when the deployment is created.' - ), - status: zod - .enum(['pending', 'starting', 'running', 'failed', 'deleting']) - .default(agentsListDeploymentsResponseDataItemStatusDefault) - .describe('Lifecycle status: pending | starting | running | failed | deleting.'), - endpoint: zod - .string() - .default(agentsListDeploymentsResponseDataItemEndpointDefault) - .describe('HTTP endpoint of the running agent process (e.g. http:\/\/localhost:9001).'), - port: zod - .number() - .default(agentsListDeploymentsResponseDataItemPortDefault) - .describe('Port the agent process is listening on.'), - pid: zod - .number() - .default(agentsListDeploymentsResponseDataItemPidDefault) - .describe('OS process ID of the agent subprocess.'), - error: zod - .string() - .default(agentsListDeploymentsResponseDataItemErrorDefault) - .describe("Error message if status is 'failed'."), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe( - 'A running (or pending) deployment of an Agent.\n\nEntity type: ``agent_deployment``\nLifecycle: pending → starting → running | failed.\nThe :class:`~nemo_agents_plugin.runner.controller.AgentDeploymentController`\ndrives state transitions by reconciling this entity against the\n:class:`~nemo_agents_plugin.runner.backend.RunnerBackend`.' - ) - ), - pagination: zod - .object({ - page: zod.number().describe('The current page number.'), - page_size: zod.number().describe('The page size used for the query.'), - current_page_size: zod.number().describe('The size for the current page.'), - total_pages: zod.number().describe('The total number of pages.'), - total_results: zod.number().describe('The total number of results.'), - }) - .optional() - .describe('Pagination metadata — page, page_size, total_results, etc.'), - sort: zod - .string() - .optional() - .describe("Sort field applied to this result set (e.g. '-created_at')."), - filter: zod.unknown().optional().describe('Filter criteria echoed back from the request.'), -}); - -/** - * Get a deployment by name. - * @summary Get Deployment - */ -export const AgentsGetDeploymentParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const agentsGetDeploymentResponseNameDefault = ``; -export const agentsGetDeploymentResponseWorkspaceRegExp = new RegExp('^[\\w\\-\\+.@:]+$'); -export const agentsGetDeploymentResponseAgentDefault = ``; -export const agentsGetDeploymentResponseStatusDefault = `pending`; -export const agentsGetDeploymentResponseEndpointDefault = ``; -export const agentsGetDeploymentResponsePortDefault = 0; -export const agentsGetDeploymentResponsePidDefault = 0; -export const agentsGetDeploymentResponseErrorDefault = ``; - -export const AgentsGetDeploymentResponse = zod - .object({ - name: zod - .string() - .default(agentsGetDeploymentResponseNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(agentsGetDeploymentResponseWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - agent: zod - .string() - .default(agentsGetDeploymentResponseAgentDefault) - .describe('Name of the Agent entity this deployment is for.'), - config: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Resolved agent config with IGW URL injected, written when the deployment is created.' - ), - status: zod - .enum(['pending', 'starting', 'running', 'failed', 'deleting']) - .default(agentsGetDeploymentResponseStatusDefault) - .describe('Lifecycle status: pending | starting | running | failed | deleting.'), - endpoint: zod - .string() - .default(agentsGetDeploymentResponseEndpointDefault) - .describe('HTTP endpoint of the running agent process (e.g. http:\/\/localhost:9001).'), - port: zod - .number() - .default(agentsGetDeploymentResponsePortDefault) - .describe('Port the agent process is listening on.'), - pid: zod - .number() - .default(agentsGetDeploymentResponsePidDefault) - .describe('OS process ID of the agent subprocess.'), - error: zod - .string() - .default(agentsGetDeploymentResponseErrorDefault) - .describe("Error message if status is 'failed'."), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe( - 'A running (or pending) deployment of an Agent.\n\nEntity type: ``agent_deployment``\nLifecycle: pending → starting → running | failed.\nThe :class:`~nemo_agents_plugin.runner.controller.AgentDeploymentController`\ndrives state transitions by reconciling this entity against the\n:class:`~nemo_agents_plugin.runner.backend.RunnerBackend`.' - ); - -/** - * Stop and remove a deployment. - -Marks the deployment as ``deleting``. The controller terminates the -subprocess and removes the entity on the next reconcile cycle. - * @summary Delete Deployment - */ -export const AgentsDeleteDeploymentParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); diff --git a/web/packages/sdk/generated/agents/zod/agents.ts b/web/packages/sdk/generated/agents/zod/agents.ts deleted file mode 100644 index 78ca68e216..0000000000 --- a/web/packages/sdk/generated/agents/zod/agents.ts +++ /dev/null @@ -1,729 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * agents (plugin) - */ -import * as zod from 'zod'; - -/** - * Create a new agent from a NAT workflow config. - * @summary Create Agent - */ -export const AgentsCreateAgentParams = zod.object({ - workspace: zod.string(), -}); - -export const agentsCreateAgentBodyDescriptionDefault = ``; -export const agentsCreateAgentBodyConfigFormatDefault = `nat-workflow-v1`; - -export const AgentsCreateAgentBody = zod - .object({ - name: zod.string().describe('Unique agent name within the workspace.'), - description: zod - .string() - .default(agentsCreateAgentBodyDescriptionDefault) - .describe('Human-readable description.'), - config: zod.record(zod.string(), zod.unknown()).describe('NAT workflow config dict.'), - config_format: zod - .string() - .default(agentsCreateAgentBodyConfigFormatDefault) - .describe('Config format identifier.'), - }) - .describe('Request body for ``POST \/v2\/workspaces\/{workspace}\/agents``.'); - -/** - * List all agents in the workspace with pagination and filter support. - * @summary List Agents - */ -export const AgentsListAgentsParams = zod.object({ - workspace: zod.string(), -}); - -export const agentsListAgentsQueryPageDefault = 1; - -export const agentsListAgentsQueryPageSizeDefault = 20; -export const agentsListAgentsQueryPageSizeMax = 100; - -export const agentsListAgentsQuerySortDefault = `-created_at`; - -export const AgentsListAgentsQueryParams = zod.object({ - page: zod.number().min(1).default(agentsListAgentsQueryPageDefault), - page_size: zod - .number() - .min(1) - .max(agentsListAgentsQueryPageSizeMax) - .default(agentsListAgentsQueryPageSizeDefault), - sort: zod.string().default(agentsListAgentsQuerySortDefault), -}); - -export const agentsListAgentsResponseDataItemNameDefault = ``; -export const agentsListAgentsResponseDataItemWorkspaceRegExp = new RegExp('^[\\w\\-\\+.@:]+$'); -export const agentsListAgentsResponseDataItemDescriptionDefault = ``; -export const agentsListAgentsResponseDataItemConfigFormatDefault = `nat-workflow-v1`; - -export const AgentsListAgentsResponse = zod.object({ - data: zod.array( - zod - .object({ - name: zod - .string() - .default(agentsListAgentsResponseDataItemNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(agentsListAgentsResponseDataItemWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - description: zod - .string() - .default(agentsListAgentsResponseDataItemDescriptionDefault) - .describe('Human-readable description of the agent.'), - config: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('NAT workflow config (YAML-equivalent dict, keyed by component name).'), - config_format: zod - .string() - .default(agentsListAgentsResponseDataItemConfigFormatDefault) - .describe( - "platform-internal schema version tag for the agent config dict. Not read or validated by NAT — used by NeMo Platform for future config migration. Currently only 'nat-workflow-v1' is supported." - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe( - 'An agent definition — stores the NAT workflow config and metadata.\n\nEntity type: ``agent``\nPrimary lookup: by ``name`` within a ``workspace``.' - ) - ), - pagination: zod - .object({ - page: zod.number().describe('The current page number.'), - page_size: zod.number().describe('The page size used for the query.'), - current_page_size: zod.number().describe('The size for the current page.'), - total_pages: zod.number().describe('The total number of pages.'), - total_results: zod.number().describe('The total number of results.'), - }) - .optional() - .describe('Pagination metadata — page, page_size, total_results, etc.'), - sort: zod - .string() - .optional() - .describe("Sort field applied to this result set (e.g. '-created_at')."), - filter: zod.unknown().optional().describe('Filter criteria echoed back from the request.'), -}); - -/** - * Get a specific agent by name. - * @summary Get Agent - */ -export const AgentsGetAgentParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const agentsGetAgentResponseNameDefault = ``; -export const agentsGetAgentResponseWorkspaceRegExp = new RegExp('^[\\w\\-\\+.@:]+$'); -export const agentsGetAgentResponseDescriptionDefault = ``; -export const agentsGetAgentResponseConfigFormatDefault = `nat-workflow-v1`; - -export const AgentsGetAgentResponse = zod - .object({ - name: zod - .string() - .default(agentsGetAgentResponseNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(agentsGetAgentResponseWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - description: zod - .string() - .default(agentsGetAgentResponseDescriptionDefault) - .describe('Human-readable description of the agent.'), - config: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('NAT workflow config (YAML-equivalent dict, keyed by component name).'), - config_format: zod - .string() - .default(agentsGetAgentResponseConfigFormatDefault) - .describe( - "platform-internal schema version tag for the agent config dict. Not read or validated by NAT — used by NeMo Platform for future config migration. Currently only 'nat-workflow-v1' is supported." - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe( - 'An agent definition — stores the NAT workflow config and metadata.\n\nEntity type: ``agent``\nPrimary lookup: by ``name`` within a ``workspace``.' - ); - -/** - * Delete an agent by name. - -Returns 409 if any deployments in a live state (pending/starting/running) -still reference this agent. Delete or wait for those deployments to finish -before deleting the agent. - * @summary Delete Agent - */ -export const AgentsDeleteAgentParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -/** - * @summary Create Job - */ -export const AgentsCreateJobParams = zod.object({ - workspace: zod.string(), -}); - -export const agentsCreateJobBodySpecWorkspaceDefault = `default`; - -export const AgentsCreateJobBody = zod.object({ - name: zod.string().optional(), - description: zod.string().optional(), - project: zod.string().optional(), - spec: zod - .object({ - agent: zod - .string() - .optional() - .describe( - "Agent to evaluate against — either a platform-managed agent reference (e.g. 'calculator', 'workspace\/calculator') or an HTTP(S) endpoint URL (e.g. 'http:\/\/localhost:8080'). Bare names resolve to the platform gateway URL '{base_url}\/apis\/agents\/v2\/workspaces\/{workspace}\/agents\/{name}\/-'; URLs are passed through to 'nat eval --endpoint' verbatim. When omitted, the eval config must include an inline agent workflow." - ), - eval_config: zod.string().describe('Path to the NAT evaluation YAML config file.'), - eval_config_fileset: zod - .string() - .optional() - .describe( - "Optional fileset reference (``name`` or ``workspace\/name``). When set, the runner downloads the fileset's contents into a tempdir and resolves ``eval_config`` relative to that dir. Local CLI runs leave this ``None``." - ), - output: zod - .string() - .optional() - .describe( - "Where to write eval outputs — either a local directory (path-shaped: starts with '\/', '.\/', '..\/', '~\/') or a NeMo Platform fileset reference ('name' or 'workspace\/name'). Filesets are created on demand if missing. Defaults to \/results (the platform-injected persistent volume) when not provided." - ), - workspace: zod - .string() - .default(agentsCreateJobBodySpecWorkspaceDefault) - .describe( - 'Workspace name used to construct the Inference Gateway URL when injecting base_url into judge LLMs that have none set, and to resolve --agent \/ --output to gateway endpoints \/ fileset names when given a bare name.' - ), - }) - .describe( - 'Spec for an agent evaluation job.\n\nField declaration order also drives the auto-generated CLI flag\norder — keep the most-frequently-set knobs first.\n\nAttributes:\n agent: The agent to evaluate against. Accepts either a\n platform-managed agent reference (``\"name\"`` or\n ``\"workspace\/name\"``) or a literal HTTP(S) endpoint URL. The\n shape is auto-detected at run time — values containing\n ``\":\/\/\"`` are treated as URLs (and forwarded to\n ``nat eval --endpoint`` verbatim); anything else is resolved\n to the platform gateway URL\n ``{base_url}\/apis\/agents\/v2\/workspaces\/{workspace}\/agents\/{name}\/-``.\n When ``None`` the eval config is expected to include an\n inline agent workflow.\n eval_config: Path to the NAT evaluation YAML config file. When\n ``eval_config_fileset`` is set, this is interpreted relative\n to the downloaded fileset\'s contents.\n eval_config_fileset: Optional fileset reference (``name`` or\n ``workspace\/name``) that pre-stages the eval YAML and any\n sibling files (e.g. dataset). Used by platform-managed\n submissions where the ``agents.evaluate-agent`` function\n uploads everything before submitting; local CLI runs leave\n this ``None`` and let ``eval_config`` be a real local path.\n output: Where to put the eval outputs. Accepts either a local\n directory path (``.\/out``, ``\/abs\/out``, ``~\/out``) or an\n NeMo Platform fileset reference (``\"name\"`` or ``\"workspace\/name\"``).\n Path-shaped values write directly to disk; bare names upload\n results to the named fileset, creating it on demand. When\n ``None`` the job writes to ``ctx.storage.persistent \/\n \"results\"`` — the platform-injected persistent volume in\n container runs, a tempdir under ``$TMPDIR`` for local CLI\n runs.\n workspace: NeMo Platform workspace used to scope gateway URL injection,\n ``--agent`` resolution, and ``--output`` fileset creation\n when those values are given as bare names.' - ), - ownership: zod.record(zod.string(), zod.unknown()).optional(), - custom_fields: zod.record(zod.string(), zod.unknown()).optional(), -}); - -/** - * @summary List Jobs - */ -export const AgentsListJobsParams = zod.object({ - workspace: zod.string(), -}); - -export const agentsListJobsQueryPageDefault = 1; -export const agentsListJobsQueryPageExclusiveMin = 0; - -export const agentsListJobsQueryPageSizeDefault = 10; -export const agentsListJobsQueryPageSizeExclusiveMin = 0; - -export const agentsListJobsQuerySortDefault = `-created_at`; - -export const AgentsListJobsQueryParams = zod.object({ - page: zod - .number() - .gt(agentsListJobsQueryPageExclusiveMin) - .default(agentsListJobsQueryPageDefault) - .describe('Page number.'), - page_size: zod - .number() - .gt(agentsListJobsQueryPageSizeExclusiveMin) - .default(agentsListJobsQueryPageSizeDefault) - .describe('Page size.'), - sort: zod - .enum(['created_at', '-created_at', 'updated_at', '-updated_at']) - .default(agentsListJobsQuerySortDefault) - .describe( - 'The field to sort by. To sort in decreasing order, use `-` in front of the field name.' - ), - filter: zod - .object({ - created_at: zod - .object({ - $gte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results greater than or equal to this datetime.'), - $lte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results less than or equal to this datetime.'), - }) - .optional() - .describe("Jobs created at 'gte' datetime or 'lte' datetime."), - name: zod.string().optional().describe('Name of the job.'), - workspace: zod.string().optional().describe('Workspace of the job.'), - project: zod.string().optional().describe('Project containing the job.'), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ) - .optional() - .describe('The current status.'), - updated_at: zod - .object({ - $gte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results greater than or equal to this datetime.'), - $lte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results less than or equal to this datetime.'), - }) - .optional() - .describe("Jobs updated at 'gte' datetime or 'lte' datetime."), - }) - .optional() - .describe('Filter jobs on various criteria.'), -}); - -export const agentsListJobsResponseDataItemSpecWorkspaceDefault = `default`; - -export const AgentsListJobsResponse = zod.object({ - data: zod.array( - zod.object({ - id: zod.string().optional(), - name: zod.string(), - description: zod.string().optional(), - project: zod.string().optional(), - workspace: zod.string().optional(), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - spec: zod - .object({ - agent: zod - .string() - .optional() - .describe( - "Agent to evaluate against — either a platform-managed agent reference (e.g. 'calculator', 'workspace\/calculator') or an HTTP(S) endpoint URL (e.g. 'http:\/\/localhost:8080'). Bare names resolve to the platform gateway URL '{base_url}\/apis\/agents\/v2\/workspaces\/{workspace}\/agents\/{name}\/-'; URLs are passed through to 'nat eval --endpoint' verbatim. When omitted, the eval config must include an inline agent workflow." - ), - eval_config: zod.string().describe('Path to the NAT evaluation YAML config file.'), - eval_config_fileset: zod - .string() - .optional() - .describe( - "Optional fileset reference (``name`` or ``workspace\/name``). When set, the runner downloads the fileset's contents into a tempdir and resolves ``eval_config`` relative to that dir. Local CLI runs leave this ``None``." - ), - output: zod - .string() - .optional() - .describe( - "Where to write eval outputs — either a local directory (path-shaped: starts with '\/', '.\/', '..\/', '~\/') or a NeMo Platform fileset reference ('name' or 'workspace\/name'). Filesets are created on demand if missing. Defaults to \/results (the platform-injected persistent volume) when not provided." - ), - workspace: zod - .string() - .default(agentsListJobsResponseDataItemSpecWorkspaceDefault) - .describe( - 'Workspace name used to construct the Inference Gateway URL when injecting base_url into judge LLMs that have none set, and to resolve --agent \/ --output to gateway endpoints \/ fileset names when given a bare name.' - ), - }) - .describe( - 'Spec for an agent evaluation job.\n\nField declaration order also drives the auto-generated CLI flag\norder — keep the most-frequently-set knobs first.\n\nAttributes:\n agent: The agent to evaluate against. Accepts either a\n platform-managed agent reference (``\"name\"`` or\n ``\"workspace\/name\"``) or a literal HTTP(S) endpoint URL. The\n shape is auto-detected at run time — values containing\n ``\":\/\/\"`` are treated as URLs (and forwarded to\n ``nat eval --endpoint`` verbatim); anything else is resolved\n to the platform gateway URL\n ``{base_url}\/apis\/agents\/v2\/workspaces\/{workspace}\/agents\/{name}\/-``.\n When ``None`` the eval config is expected to include an\n inline agent workflow.\n eval_config: Path to the NAT evaluation YAML config file. When\n ``eval_config_fileset`` is set, this is interpreted relative\n to the downloaded fileset\'s contents.\n eval_config_fileset: Optional fileset reference (``name`` or\n ``workspace\/name``) that pre-stages the eval YAML and any\n sibling files (e.g. dataset). Used by platform-managed\n submissions where the ``agents.evaluate-agent`` function\n uploads everything before submitting; local CLI runs leave\n this ``None`` and let ``eval_config`` be a real local path.\n output: Where to put the eval outputs. Accepts either a local\n directory path (``.\/out``, ``\/abs\/out``, ``~\/out``) or an\n NeMo Platform fileset reference (``\"name\"`` or ``\"workspace\/name\"``).\n Path-shaped values write directly to disk; bare names upload\n results to the named fileset, creating it on demand. When\n ``None`` the job writes to ``ctx.storage.persistent \/\n \"results\"`` — the platform-injected persistent volume in\n container runs, a tempdir under ``$TMPDIR`` for local CLI\n runs.\n workspace: NeMo Platform workspace used to scope gateway URL injection,\n ``--agent`` resolution, and ``--output`` fileset creation\n when those values are given as bare names.' - ), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .optional() - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ), - status_details: zod.record(zod.string(), zod.unknown()).optional(), - error_details: zod.record(zod.string(), zod.unknown()).optional(), - ownership: zod.record(zod.string(), zod.unknown()).optional(), - custom_fields: zod.record(zod.string(), zod.unknown()).optional(), - }) - ), - pagination: zod - .object({ - page: zod.number().describe('The current page number.'), - page_size: zod.number().describe('The page size used for the query.'), - current_page_size: zod.number().describe('The size for the current page.'), - total_pages: zod.number().describe('The total number of pages.'), - total_results: zod.number().describe('The total number of results.'), - }) - .optional() - .describe('Pagination information.'), - sort: zod.string().optional().describe('The field on which the results are sorted.'), - filter: zod.record(zod.string(), zod.unknown()).optional().describe('Filtering information.'), -}); - -/** - * @summary Get Job Result - */ -export const AgentsGetJobResultParams = zod.object({ - workspace: zod.string(), - job: zod.string(), - name: zod.string(), -}); - -export const AgentsGetJobResultResponse = zod.object({ - name: zod.string(), - job: zod.string(), - workspace: zod.string(), - project: zod.string().optional(), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - artifact_url: zod.string(), - artifact_storage_type: zod.enum(['fileset']), - download_url: zod.string().optional(), -}); - -/** - * @summary Download Job Result - */ -export const AgentsDownloadJobResultParams = zod.object({ - workspace: zod.string(), - job: zod.string(), - name: zod.string(), -}); - -/** - * @summary Get Job - */ -export const AgentsGetJobParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const agentsGetJobResponseSpecWorkspaceDefault = `default`; - -export const AgentsGetJobResponse = zod.object({ - id: zod.string().optional(), - name: zod.string(), - description: zod.string().optional(), - project: zod.string().optional(), - workspace: zod.string().optional(), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - spec: zod - .object({ - agent: zod - .string() - .optional() - .describe( - "Agent to evaluate against — either a platform-managed agent reference (e.g. 'calculator', 'workspace\/calculator') or an HTTP(S) endpoint URL (e.g. 'http:\/\/localhost:8080'). Bare names resolve to the platform gateway URL '{base_url}\/apis\/agents\/v2\/workspaces\/{workspace}\/agents\/{name}\/-'; URLs are passed through to 'nat eval --endpoint' verbatim. When omitted, the eval config must include an inline agent workflow." - ), - eval_config: zod.string().describe('Path to the NAT evaluation YAML config file.'), - eval_config_fileset: zod - .string() - .optional() - .describe( - "Optional fileset reference (``name`` or ``workspace\/name``). When set, the runner downloads the fileset's contents into a tempdir and resolves ``eval_config`` relative to that dir. Local CLI runs leave this ``None``." - ), - output: zod - .string() - .optional() - .describe( - "Where to write eval outputs — either a local directory (path-shaped: starts with '\/', '.\/', '..\/', '~\/') or a NeMo Platform fileset reference ('name' or 'workspace\/name'). Filesets are created on demand if missing. Defaults to \/results (the platform-injected persistent volume) when not provided." - ), - workspace: zod - .string() - .default(agentsGetJobResponseSpecWorkspaceDefault) - .describe( - 'Workspace name used to construct the Inference Gateway URL when injecting base_url into judge LLMs that have none set, and to resolve --agent \/ --output to gateway endpoints \/ fileset names when given a bare name.' - ), - }) - .describe( - 'Spec for an agent evaluation job.\n\nField declaration order also drives the auto-generated CLI flag\norder — keep the most-frequently-set knobs first.\n\nAttributes:\n agent: The agent to evaluate against. Accepts either a\n platform-managed agent reference (``\"name\"`` or\n ``\"workspace\/name\"``) or a literal HTTP(S) endpoint URL. The\n shape is auto-detected at run time — values containing\n ``\":\/\/\"`` are treated as URLs (and forwarded to\n ``nat eval --endpoint`` verbatim); anything else is resolved\n to the platform gateway URL\n ``{base_url}\/apis\/agents\/v2\/workspaces\/{workspace}\/agents\/{name}\/-``.\n When ``None`` the eval config is expected to include an\n inline agent workflow.\n eval_config: Path to the NAT evaluation YAML config file. When\n ``eval_config_fileset`` is set, this is interpreted relative\n to the downloaded fileset\'s contents.\n eval_config_fileset: Optional fileset reference (``name`` or\n ``workspace\/name``) that pre-stages the eval YAML and any\n sibling files (e.g. dataset). Used by platform-managed\n submissions where the ``agents.evaluate-agent`` function\n uploads everything before submitting; local CLI runs leave\n this ``None`` and let ``eval_config`` be a real local path.\n output: Where to put the eval outputs. Accepts either a local\n directory path (``.\/out``, ``\/abs\/out``, ``~\/out``) or an\n NeMo Platform fileset reference (``\"name\"`` or ``\"workspace\/name\"``).\n Path-shaped values write directly to disk; bare names upload\n results to the named fileset, creating it on demand. When\n ``None`` the job writes to ``ctx.storage.persistent \/\n \"results\"`` — the platform-injected persistent volume in\n container runs, a tempdir under ``$TMPDIR`` for local CLI\n runs.\n workspace: NeMo Platform workspace used to scope gateway URL injection,\n ``--agent`` resolution, and ``--output`` fileset creation\n when those values are given as bare names.' - ), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .optional() - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ), - status_details: zod.record(zod.string(), zod.unknown()).optional(), - error_details: zod.record(zod.string(), zod.unknown()).optional(), - ownership: zod.record(zod.string(), zod.unknown()).optional(), - custom_fields: zod.record(zod.string(), zod.unknown()).optional(), -}); - -/** - * @summary Delete Job - */ -export const AgentsDeleteJobParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -/** - * @summary Cancel Job - */ -export const AgentsCancelJobParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const agentsCancelJobResponseSpecWorkspaceDefault = `default`; - -export const AgentsCancelJobResponse = zod.object({ - id: zod.string().optional(), - name: zod.string(), - description: zod.string().optional(), - project: zod.string().optional(), - workspace: zod.string().optional(), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - spec: zod - .object({ - agent: zod - .string() - .optional() - .describe( - "Agent to evaluate against — either a platform-managed agent reference (e.g. 'calculator', 'workspace\/calculator') or an HTTP(S) endpoint URL (e.g. 'http:\/\/localhost:8080'). Bare names resolve to the platform gateway URL '{base_url}\/apis\/agents\/v2\/workspaces\/{workspace}\/agents\/{name}\/-'; URLs are passed through to 'nat eval --endpoint' verbatim. When omitted, the eval config must include an inline agent workflow." - ), - eval_config: zod.string().describe('Path to the NAT evaluation YAML config file.'), - eval_config_fileset: zod - .string() - .optional() - .describe( - "Optional fileset reference (``name`` or ``workspace\/name``). When set, the runner downloads the fileset's contents into a tempdir and resolves ``eval_config`` relative to that dir. Local CLI runs leave this ``None``." - ), - output: zod - .string() - .optional() - .describe( - "Where to write eval outputs — either a local directory (path-shaped: starts with '\/', '.\/', '..\/', '~\/') or a NeMo Platform fileset reference ('name' or 'workspace\/name'). Filesets are created on demand if missing. Defaults to \/results (the platform-injected persistent volume) when not provided." - ), - workspace: zod - .string() - .default(agentsCancelJobResponseSpecWorkspaceDefault) - .describe( - 'Workspace name used to construct the Inference Gateway URL when injecting base_url into judge LLMs that have none set, and to resolve --agent \/ --output to gateway endpoints \/ fileset names when given a bare name.' - ), - }) - .describe( - 'Spec for an agent evaluation job.\n\nField declaration order also drives the auto-generated CLI flag\norder — keep the most-frequently-set knobs first.\n\nAttributes:\n agent: The agent to evaluate against. Accepts either a\n platform-managed agent reference (``\"name\"`` or\n ``\"workspace\/name\"``) or a literal HTTP(S) endpoint URL. The\n shape is auto-detected at run time — values containing\n ``\":\/\/\"`` are treated as URLs (and forwarded to\n ``nat eval --endpoint`` verbatim); anything else is resolved\n to the platform gateway URL\n ``{base_url}\/apis\/agents\/v2\/workspaces\/{workspace}\/agents\/{name}\/-``.\n When ``None`` the eval config is expected to include an\n inline agent workflow.\n eval_config: Path to the NAT evaluation YAML config file. When\n ``eval_config_fileset`` is set, this is interpreted relative\n to the downloaded fileset\'s contents.\n eval_config_fileset: Optional fileset reference (``name`` or\n ``workspace\/name``) that pre-stages the eval YAML and any\n sibling files (e.g. dataset). Used by platform-managed\n submissions where the ``agents.evaluate-agent`` function\n uploads everything before submitting; local CLI runs leave\n this ``None`` and let ``eval_config`` be a real local path.\n output: Where to put the eval outputs. Accepts either a local\n directory path (``.\/out``, ``\/abs\/out``, ``~\/out``) or an\n NeMo Platform fileset reference (``\"name\"`` or ``\"workspace\/name\"``).\n Path-shaped values write directly to disk; bare names upload\n results to the named fileset, creating it on demand. When\n ``None`` the job writes to ``ctx.storage.persistent \/\n \"results\"`` — the platform-injected persistent volume in\n container runs, a tempdir under ``$TMPDIR`` for local CLI\n runs.\n workspace: NeMo Platform workspace used to scope gateway URL injection,\n ``--agent`` resolution, and ``--output`` fileset creation\n when those values are given as bare names.' - ), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .optional() - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ), - status_details: zod.record(zod.string(), zod.unknown()).optional(), - error_details: zod.record(zod.string(), zod.unknown()).optional(), - ownership: zod.record(zod.string(), zod.unknown()).optional(), - custom_fields: zod.record(zod.string(), zod.unknown()).optional(), -}); - -/** - * @summary Get Job Logs - */ -export const AgentsGetJobLogsParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const AgentsGetJobLogsQueryParams = zod.object({ - limit: zod.number().optional(), - page_cursor: zod.string().optional(), -}); - -export const AgentsGetJobLogsResponse = zod.object({ - data: zod.array( - zod.object({ - timestamp: zod.string().datetime({}), - job: zod.string(), - job_step: zod.string(), - job_task: zod.string(), - message: zod.string(), - }) - ), - total: zod.number(), - next_page: zod.string(), - prev_page: zod.string(), -}); - -/** - * @summary List Job Results - */ -export const AgentsListJobResultsParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const AgentsListJobResultsResponse = zod.object({ - data: zod.array( - zod.object({ - name: zod.string(), - job: zod.string(), - workspace: zod.string(), - project: zod.string().optional(), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - artifact_url: zod.string(), - artifact_storage_type: zod.enum(['fileset']), - download_url: zod.string().optional(), - }) - ), -}); - -/** - * @summary Get Job Status - */ -export const AgentsGetJobStatusParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const AgentsGetJobStatusResponse = zod.object({ - id: zod.string(), - name: zod.string(), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ), - status_details: zod.record(zod.string(), zod.unknown()), - error_details: zod.record(zod.string(), zod.unknown()), - steps: zod.array( - zod.object({ - id: zod.string(), - name: zod.string(), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ), - status_details: zod.record(zod.string(), zod.unknown()), - error_details: zod.record(zod.string(), zod.unknown()), - tasks: zod.array( - zod.object({ - id: zod.string(), - name: zod.string(), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ), - status_details: zod.record(zod.string(), zod.unknown()), - error_details: zod.record(zod.string(), zod.unknown()), - error_stack: zod.string(), - created_at: zod.string().datetime({}), - updated_at: zod.string().datetime({}), - }) - ), - created_at: zod.string().datetime({}), - updated_at: zod.string().datetime({}), - }) - ), - created_at: zod.string().datetime({}), - updated_at: zod.string().datetime({}), -}); diff --git a/web/packages/sdk/generated/data-designer/api.ts b/web/packages/sdk/generated/data-designer/api.ts deleted file mode 100644 index a1f2e9c1d1..0000000000 --- a/web/packages/sdk/generated/data-designer/api.ts +++ /dev/null @@ -1,2062 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import { useMutation, useQuery, useSuspenseQuery } from '@tanstack/react-query'; -import type { - DataTag, - DefinedInitialDataOptions, - DefinedUseQueryResult, - MutationFunction, - QueryClient, - QueryFunction, - QueryKey, - UndefinedInitialDataOptions, - UseMutationOptions, - UseMutationResult, - UseQueryOptions, - UseQueryResult, - UseSuspenseQueryOptions, - UseSuspenseQueryResult, -} from '@tanstack/react-query'; - -import type { - CreateJob, - CreateJobRequest, - CreateJobsPage, - DataDesignerGetJobLogsParams, - DataDesignerListJobsParams, - HTTPValidationError, - PlatformJobListResultResponse, - PlatformJobLogPage, - PlatformJobResultResponse, - PlatformJobStatusResponse, - PreviewSpec, -} from './schema'; - -import { customFetch } from '../fetchers/data-designer'; -import type { ErrorType } from '../fetchers/data-designer'; -type AwaitedInput = PromiseLike | T; - -type Awaited = O extends AwaitedInput ? T : never; - -/** - * @summary Create Job - */ -export const dataDesignerCreateJob = ( - workspace: string, - createJobRequest: CreateJobRequest, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/data-designer/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/create`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: createJobRequest, - signal, - }); -}; - -export const getDataDesignerCreateJobMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: CreateJobRequest }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: CreateJobRequest }, - TContext -> => { - const mutationKey = ['dataDesignerCreateJob']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; data: CreateJobRequest } - > = (props) => { - const { workspace, data } = props ?? {}; - - return dataDesignerCreateJob(workspace, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type DataDesignerCreateJobMutationResult = NonNullable< - Awaited> ->; -export type DataDesignerCreateJobMutationBody = CreateJobRequest; -export type DataDesignerCreateJobMutationError = ErrorType; - -/** - * @summary Create Job - */ -export const useDataDesignerCreateJob = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: CreateJobRequest }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; data: CreateJobRequest }, - TContext -> => { - return useMutation(getDataDesignerCreateJobMutationOptions(options), queryClient); -}; - -/** - * @summary List Jobs - */ -export const dataDesignerListJobs = ( - workspace: string, - params?: DataDesignerListJobsParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/data-designer/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/create`, - method: 'GET', - params, - signal, - }); -}; - -export const getDataDesignerListJobsQueryKey = ( - workspace: string, - params?: DataDesignerListJobsParams -) => { - return [ - `/apis/data-designer/v2/workspaces/${workspace}/jobs/create`, - ...(params ? [params] : []), - ] as const; -}; - -export const getDataDesignerListJobsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: DataDesignerListJobsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getDataDesignerListJobsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - dataDesignerListJobs(workspace, params, signal); - - return { queryKey, queryFn, enabled: !!workspace, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type DataDesignerListJobsQueryResult = NonNullable< - Awaited> ->; -export type DataDesignerListJobsQueryError = ErrorType; - -export function useDataDesignerListJobs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | DataDesignerListJobsParams, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useDataDesignerListJobs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: DataDesignerListJobsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useDataDesignerListJobs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: DataDesignerListJobsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List Jobs - */ - -export function useDataDesignerListJobs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: DataDesignerListJobsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getDataDesignerListJobsQueryOptions(workspace, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getDataDesignerListJobsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: DataDesignerListJobsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getDataDesignerListJobsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - dataDesignerListJobs(workspace, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type DataDesignerListJobsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type DataDesignerListJobsSuspenseQueryError = ErrorType; - -export function useDataDesignerListJobsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | DataDesignerListJobsParams, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useDataDesignerListJobsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: DataDesignerListJobsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useDataDesignerListJobsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: DataDesignerListJobsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List Jobs - */ - -export function useDataDesignerListJobsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: DataDesignerListJobsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getDataDesignerListJobsSuspenseQueryOptions(workspace, params, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Get Job Result - */ -export const dataDesignerGetJobResult = ( - workspace: string, - job: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/data-designer/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/create/${encodeURIComponent(String(job))}/results/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getDataDesignerGetJobResultQueryKey = ( - workspace: string, - job: string, - name: string -) => { - return [ - `/apis/data-designer/v2/workspaces/${workspace}/jobs/create/${job}/results/${name}`, - ] as const; -}; - -export const getDataDesignerGetJobResultQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getDataDesignerGetJobResultQueryKey(workspace, job, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => dataDesignerGetJobResult(workspace, job, name, signal); - - return { - queryKey, - queryFn, - enabled: !!(workspace && job && name), - ...queryOptions, - } as UseQueryOptions>, TError, TData> & { - queryKey: DataTag; - }; -}; - -export type DataDesignerGetJobResultQueryResult = NonNullable< - Awaited> ->; -export type DataDesignerGetJobResultQueryError = ErrorType; - -export function useDataDesignerGetJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useDataDesignerGetJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useDataDesignerGetJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Result - */ - -export function useDataDesignerGetJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getDataDesignerGetJobResultQueryOptions(workspace, job, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getDataDesignerGetJobResultSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getDataDesignerGetJobResultQueryKey(workspace, job, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => dataDesignerGetJobResult(workspace, job, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type DataDesignerGetJobResultSuspenseQueryResult = NonNullable< - Awaited> ->; -export type DataDesignerGetJobResultSuspenseQueryError = ErrorType; - -export function useDataDesignerGetJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useDataDesignerGetJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useDataDesignerGetJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Result - */ - -export function useDataDesignerGetJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getDataDesignerGetJobResultSuspenseQueryOptions( - workspace, - job, - name, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Download Job Result - */ -export const dataDesignerDownloadJobResult = ( - workspace: string, - job: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/data-designer/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/create/${encodeURIComponent(String(job))}/results/${encodeURIComponent(String(name))}/download`, - method: 'GET', - responseType: 'blob', - signal, - }); -}; - -export const getDataDesignerDownloadJobResultQueryKey = ( - workspace: string, - job: string, - name: string -) => { - return [ - `/apis/data-designer/v2/workspaces/${workspace}/jobs/create/${job}/results/${name}/download`, - ] as const; -}; - -export const getDataDesignerDownloadJobResultQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getDataDesignerDownloadJobResultQueryKey(workspace, job, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => dataDesignerDownloadJobResult(workspace, job, name, signal); - - return { - queryKey, - queryFn, - enabled: !!(workspace && job && name), - ...queryOptions, - } as UseQueryOptions>, TError, TData> & { - queryKey: DataTag; - }; -}; - -export type DataDesignerDownloadJobResultQueryResult = NonNullable< - Awaited> ->; -export type DataDesignerDownloadJobResultQueryError = ErrorType; - -export function useDataDesignerDownloadJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useDataDesignerDownloadJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useDataDesignerDownloadJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Download Job Result - */ - -export function useDataDesignerDownloadJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getDataDesignerDownloadJobResultQueryOptions(workspace, job, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getDataDesignerDownloadJobResultSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getDataDesignerDownloadJobResultQueryKey(workspace, job, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => dataDesignerDownloadJobResult(workspace, job, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type DataDesignerDownloadJobResultSuspenseQueryResult = NonNullable< - Awaited> ->; -export type DataDesignerDownloadJobResultSuspenseQueryError = ErrorType; - -export function useDataDesignerDownloadJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useDataDesignerDownloadJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useDataDesignerDownloadJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Download Job Result - */ - -export function useDataDesignerDownloadJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getDataDesignerDownloadJobResultSuspenseQueryOptions( - workspace, - job, - name, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Get Job - */ -export const dataDesignerGetJob = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/data-designer/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/create/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getDataDesignerGetJobQueryKey = (workspace: string, name: string) => { - return [`/apis/data-designer/v2/workspaces/${workspace}/jobs/create/${name}`] as const; -}; - -export const getDataDesignerGetJobQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getDataDesignerGetJobQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - dataDesignerGetJob(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type DataDesignerGetJobQueryResult = NonNullable< - Awaited> ->; -export type DataDesignerGetJobQueryError = ErrorType; - -export function useDataDesignerGetJob< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useDataDesignerGetJob< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useDataDesignerGetJob< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job - */ - -export function useDataDesignerGetJob< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getDataDesignerGetJobQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getDataDesignerGetJobSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getDataDesignerGetJobQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - dataDesignerGetJob(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type DataDesignerGetJobSuspenseQueryResult = NonNullable< - Awaited> ->; -export type DataDesignerGetJobSuspenseQueryError = ErrorType; - -export function useDataDesignerGetJobSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useDataDesignerGetJobSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useDataDesignerGetJobSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job - */ - -export function useDataDesignerGetJobSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getDataDesignerGetJobSuspenseQueryOptions(workspace, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Delete Job - */ -export const dataDesignerDeleteJob = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/data-designer/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/create/${encodeURIComponent(String(name))}`, - method: 'DELETE', - signal, - }); -}; - -export const getDataDesignerDeleteJobMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - const mutationKey = ['dataDesignerDeleteJob']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string } - > = (props) => { - const { workspace, name } = props ?? {}; - - return dataDesignerDeleteJob(workspace, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type DataDesignerDeleteJobMutationResult = NonNullable< - Awaited> ->; - -export type DataDesignerDeleteJobMutationError = ErrorType; - -/** - * @summary Delete Job - */ -export const useDataDesignerDeleteJob = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - return useMutation(getDataDesignerDeleteJobMutationOptions(options), queryClient); -}; - -/** - * @summary Cancel Job - */ -export const dataDesignerCancelJob = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/data-designer/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/create/${encodeURIComponent(String(name))}/cancel`, - method: 'POST', - signal, - }); -}; - -export const getDataDesignerCancelJobMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - const mutationKey = ['dataDesignerCancelJob']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string } - > = (props) => { - const { workspace, name } = props ?? {}; - - return dataDesignerCancelJob(workspace, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type DataDesignerCancelJobMutationResult = NonNullable< - Awaited> ->; - -export type DataDesignerCancelJobMutationError = ErrorType; - -/** - * @summary Cancel Job - */ -export const useDataDesignerCancelJob = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - return useMutation(getDataDesignerCancelJobMutationOptions(options), queryClient); -}; - -/** - * @summary Get Job Logs - */ -export const dataDesignerGetJobLogs = ( - workspace: string, - name: string, - params?: DataDesignerGetJobLogsParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/data-designer/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/create/${encodeURIComponent(String(name))}/logs`, - method: 'GET', - params, - signal, - }); -}; - -export const getDataDesignerGetJobLogsQueryKey = ( - workspace: string, - name: string, - params?: DataDesignerGetJobLogsParams -) => { - return [ - `/apis/data-designer/v2/workspaces/${workspace}/jobs/create/${name}/logs`, - ...(params ? [params] : []), - ] as const; -}; - -export const getDataDesignerGetJobLogsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: DataDesignerGetJobLogsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getDataDesignerGetJobLogsQueryKey(workspace, name, params); - - const queryFn: QueryFunction>> = ({ signal }) => - dataDesignerGetJobLogs(workspace, name, params, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type DataDesignerGetJobLogsQueryResult = NonNullable< - Awaited> ->; -export type DataDesignerGetJobLogsQueryError = ErrorType; - -export function useDataDesignerGetJobLogs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params: undefined | DataDesignerGetJobLogsParams, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useDataDesignerGetJobLogs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: DataDesignerGetJobLogsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useDataDesignerGetJobLogs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: DataDesignerGetJobLogsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Logs - */ - -export function useDataDesignerGetJobLogs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: DataDesignerGetJobLogsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getDataDesignerGetJobLogsQueryOptions(workspace, name, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getDataDesignerGetJobLogsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: DataDesignerGetJobLogsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getDataDesignerGetJobLogsQueryKey(workspace, name, params); - - const queryFn: QueryFunction>> = ({ signal }) => - dataDesignerGetJobLogs(workspace, name, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type DataDesignerGetJobLogsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type DataDesignerGetJobLogsSuspenseQueryError = ErrorType; - -export function useDataDesignerGetJobLogsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params: undefined | DataDesignerGetJobLogsParams, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useDataDesignerGetJobLogsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: DataDesignerGetJobLogsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useDataDesignerGetJobLogsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: DataDesignerGetJobLogsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Logs - */ - -export function useDataDesignerGetJobLogsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: DataDesignerGetJobLogsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getDataDesignerGetJobLogsSuspenseQueryOptions( - workspace, - name, - params, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary List Job Results - */ -export const dataDesignerListJobResults = ( - workspace: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/data-designer/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/create/${encodeURIComponent(String(name))}/results`, - method: 'GET', - signal, - }); -}; - -export const getDataDesignerListJobResultsQueryKey = (workspace: string, name: string) => { - return [`/apis/data-designer/v2/workspaces/${workspace}/jobs/create/${name}/results`] as const; -}; - -export const getDataDesignerListJobResultsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getDataDesignerListJobResultsQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => dataDesignerListJobResults(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type DataDesignerListJobResultsQueryResult = NonNullable< - Awaited> ->; -export type DataDesignerListJobResultsQueryError = ErrorType; - -export function useDataDesignerListJobResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useDataDesignerListJobResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useDataDesignerListJobResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List Job Results - */ - -export function useDataDesignerListJobResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getDataDesignerListJobResultsQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getDataDesignerListJobResultsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getDataDesignerListJobResultsQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => dataDesignerListJobResults(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type DataDesignerListJobResultsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type DataDesignerListJobResultsSuspenseQueryError = ErrorType; - -export function useDataDesignerListJobResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useDataDesignerListJobResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useDataDesignerListJobResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List Job Results - */ - -export function useDataDesignerListJobResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getDataDesignerListJobResultsSuspenseQueryOptions(workspace, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Get Job Status - */ -export const dataDesignerGetJobStatus = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/data-designer/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/create/${encodeURIComponent(String(name))}/status`, - method: 'GET', - signal, - }); -}; - -export const getDataDesignerGetJobStatusQueryKey = (workspace: string, name: string) => { - return [`/apis/data-designer/v2/workspaces/${workspace}/jobs/create/${name}/status`] as const; -}; - -export const getDataDesignerGetJobStatusQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getDataDesignerGetJobStatusQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => dataDesignerGetJobStatus(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type DataDesignerGetJobStatusQueryResult = NonNullable< - Awaited> ->; -export type DataDesignerGetJobStatusQueryError = ErrorType; - -export function useDataDesignerGetJobStatus< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useDataDesignerGetJobStatus< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useDataDesignerGetJobStatus< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Status - */ - -export function useDataDesignerGetJobStatus< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getDataDesignerGetJobStatusQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getDataDesignerGetJobStatusSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getDataDesignerGetJobStatusQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => dataDesignerGetJobStatus(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type DataDesignerGetJobStatusSuspenseQueryResult = NonNullable< - Awaited> ->; -export type DataDesignerGetJobStatusSuspenseQueryError = ErrorType; - -export function useDataDesignerGetJobStatusSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useDataDesignerGetJobStatusSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useDataDesignerGetJobStatusSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Status - */ - -export function useDataDesignerGetJobStatusSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getDataDesignerGetJobStatusSuspenseQueryOptions(workspace, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Generate a small preview dataset by streaming NDJSON frames. - * @summary Generate a small preview dataset by streaming NDJSON frames. - */ -export const dataDesignerPreviewfunctionRoute = ( - workspace: string, - previewSpec: PreviewSpec, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/data-designer/v2/workspaces/${encodeURIComponent(String(workspace))}/preview`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: previewSpec, - signal, - }); -}; - -export const getDataDesignerPreviewfunctionRouteMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: PreviewSpec }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: PreviewSpec }, - TContext -> => { - const mutationKey = ['dataDesignerPreviewfunctionRoute']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; data: PreviewSpec } - > = (props) => { - const { workspace, data } = props ?? {}; - - return dataDesignerPreviewfunctionRoute(workspace, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type DataDesignerPreviewfunctionRouteMutationResult = NonNullable< - Awaited> ->; -export type DataDesignerPreviewfunctionRouteMutationBody = PreviewSpec; -export type DataDesignerPreviewfunctionRouteMutationError = ErrorType; - -/** - * @summary Generate a small preview dataset by streaming NDJSON frames. - */ -export const useDataDesignerPreviewfunctionRoute = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: PreviewSpec }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; data: PreviewSpec }, - TContext -> => { - return useMutation(getDataDesignerPreviewfunctionRouteMutationOptions(options), queryClient); -}; diff --git a/web/packages/sdk/generated/data-designer/schema/AgentRolloutFormat.ts b/web/packages/sdk/generated/data-designer/schema/AgentRolloutFormat.ts deleted file mode 100644 index f9f37ff673..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/AgentRolloutFormat.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export type AgentRolloutFormat = (typeof AgentRolloutFormat)[keyof typeof AgentRolloutFormat]; - -export const AgentRolloutFormat = { - atif: 'atif', - claude_code: 'claude_code', - codex: 'codex', - hermes_agent: 'hermes_agent', - pi_coding_agent: 'pi_coding_agent', -} as const; diff --git a/web/packages/sdk/generated/data-designer/schema/AgentRolloutSeedSource.ts b/web/packages/sdk/generated/data-designer/schema/AgentRolloutSeedSource.ts deleted file mode 100644 index 4d585cbe9a..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/AgentRolloutSeedSource.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { AgentRolloutFormat } from './AgentRolloutFormat'; - -export interface AgentRolloutSeedSource { - seed_type?: 'agent_rollout'; - /** Directory containing agent rollout artifacts. This field is required for ATIF trajectories. When omitted, built-in defaults are used for formats that define one. Claude Code defaults to ~/.claude/projects, Codex defaults to ~/.codex/sessions, Hermes Agent defaults to ~/.hermes/sessions, and Pi Coding Agent defaults to ~/.pi/agent/sessions. Relative paths are resolved from the current working directory when the config is loaded, not from the config file location. */ - path?: string; - /** Case-sensitive filename pattern used to match agent rollout files. When omitted, ATIF defaults to '*.json', Claude Code, Codex, and Pi Coding Agent default to '*.jsonl', and Hermes Agent defaults to '*.json*'. */ - file_pattern?: string; - /** Whether to search nested subdirectories under the provided directory for matching files. */ - recursive?: boolean; - /** Built-in agent rollout format to use for parsing trace files. */ - format: AgentRolloutFormat; -} diff --git a/web/packages/sdk/generated/data-designer/schema/BaseModel.ts b/web/packages/sdk/generated/data-designer/schema/BaseModel.ts deleted file mode 100644 index 1c304401a5..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/BaseModel.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export interface BaseModel { - [key: string]: unknown; -} diff --git a/web/packages/sdk/generated/data-designer/schema/BernoulliMixtureSamplerParams.ts b/web/packages/sdk/generated/data-designer/schema/BernoulliMixtureSamplerParams.ts deleted file mode 100644 index 6e937d84f0..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/BernoulliMixtureSamplerParams.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { BernoulliMixtureSamplerParamsDistParams } from './BernoulliMixtureSamplerParamsDistParams'; - -/** - * Parameters for sampling from a Bernoulli mixture distribution. - -Combines a Bernoulli distribution with another continuous distribution, creating a mixture -where values are either 0 (with probability 1-p) or sampled from the specified distribution -(with probability p). This is useful for modeling scenarios with many zero values mixed with -a continuous distribution of non-zero values. - -Common use cases include modeling sparse events, zero-inflated data, or situations where -an outcome either doesn't occur (0) or follows a specific distribution when it does occur. - -Attributes: - p (required): Probability of sampling from the mixture distribution (non-zero outcome). - Must be between 0.0 and 1.0 (inclusive). With probability 1-p, the sample is 0. - dist_name (required): Name of the scipy.stats distribution to sample from when outcome is non-zero. - Must be a valid scipy.stats distribution name (e.g., "norm", "gamma", "expon"). - dist_params (required): Parameters for the specified scipy.stats distribution. - */ -export interface BernoulliMixtureSamplerParams { - /** - * Bernoulli distribution probability of success. - * @minimum 0 - * @maximum 1 - */ - p: number; - /** Mixture distribution name. Samples will be equal to the distribution sample with probability `p`, otherwise equal to 0. Must be a valid scipy.stats distribution name. */ - dist_name: string; - /** Parameters of the scipy.stats distribution given in `dist_name`. */ - dist_params: BernoulliMixtureSamplerParamsDistParams; - sampler_type?: 'bernoulli_mixture'; -} diff --git a/web/packages/sdk/generated/data-designer/schema/BernoulliMixtureSamplerParamsDistParams.ts b/web/packages/sdk/generated/data-designer/schema/BernoulliMixtureSamplerParamsDistParams.ts deleted file mode 100644 index f44beffd1c..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/BernoulliMixtureSamplerParamsDistParams.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * Parameters of the scipy.stats distribution given in `dist_name`. - */ -export type BernoulliMixtureSamplerParamsDistParams = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/data-designer/schema/BernoulliSamplerParams.ts b/web/packages/sdk/generated/data-designer/schema/BernoulliSamplerParams.ts deleted file mode 100644 index 3b96260a34..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/BernoulliSamplerParams.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * Parameters for sampling from a Bernoulli distribution. - -Samples binary values (0 or 1) representing the outcome of a single trial with a fixed -probability of success. This is the simplest discrete probability distribution, useful for -modeling binary outcomes like success/failure, yes/no, or true/false. - -Attributes: - p (required): Probability of success (sampling 1). Must be between 0.0 and 1.0 (inclusive). - The probability of failure (sampling 0) is automatically 1 - p. - */ -export interface BernoulliSamplerParams { - /** - * Probability of success. - * @minimum 0 - * @maximum 1 - */ - p: number; - sampler_type?: 'bernoulli'; -} diff --git a/web/packages/sdk/generated/data-designer/schema/BinomialSamplerParams.ts b/web/packages/sdk/generated/data-designer/schema/BinomialSamplerParams.ts deleted file mode 100644 index 7f5b49fe53..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/BinomialSamplerParams.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * Parameters for sampling from a Binomial distribution. - -Samples integer values representing the number of successes in a fixed number of independent -Bernoulli trials, each with the same probability of success. Commonly used to model the number -of successful outcomes in repeated experiments. - -Attributes: - n (required): Number of independent trials. Must be a positive integer. - p (required): Probability of success on each trial. Must be between 0.0 and 1.0 (inclusive). - */ -export interface BinomialSamplerParams { - /** Number of trials. */ - n: number; - /** - * Probability of success on each trial. - * @minimum 0 - * @maximum 1 - */ - p: number; - sampler_type?: 'binomial'; -} diff --git a/web/packages/sdk/generated/data-designer/schema/CategorySamplerParams.ts b/web/packages/sdk/generated/data-designer/schema/CategorySamplerParams.ts deleted file mode 100644 index aa3cfca44b..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/CategorySamplerParams.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * Parameters for categorical sampling with optional probability weighting. - -Samples values from a discrete set of categories. When weights are provided, values are -sampled according to their assigned probabilities. Without weights, uniform sampling is used. - -Attributes: - values (required): List of possible categorical values to sample from. Can contain strings, integers, - or floats. Must contain at least one value. - weights: Optional unnormalized probability weights for each value. If provided, must be - the same length as `values`. Weights are automatically normalized to sum to 1.0. - Larger weights result in higher sampling probability for the corresponding value. - */ -export interface CategorySamplerParams { - /** - * List of possible categorical values that can be sampled from. - * @minItems 1 - */ - values: (string | number)[]; - /** List of unnormalized probability weights to assigned to each value, in order. Larger values will be sampled with higher probability. */ - weights?: number[]; - sampler_type?: 'category'; -} diff --git a/web/packages/sdk/generated/data-designer/schema/ChatCompletionInferenceParams.ts b/web/packages/sdk/generated/data-designer/schema/ChatCompletionInferenceParams.ts deleted file mode 100644 index 42edc2b497..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/ChatCompletionInferenceParams.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { ChatCompletionInferenceParamsExtraBody } from './ChatCompletionInferenceParamsExtraBody'; -import type { ManualDistribution } from './ManualDistribution'; -import type { UniformDistribution } from './UniformDistribution'; - -/** - * Configuration for LLM inference parameters. - -Attributes: - generation_type: Type of generation, always "chat-completion" for this class. - temperature: Sampling temperature (0.0-2.0). Can be a fixed value or a distribution for dynamic sampling. - top_p: Nucleus sampling probability (0.0-1.0). Can be a fixed value or a distribution for dynamic sampling. - max_tokens: Maximum number of tokens to generate in the response. - */ -export interface ChatCompletionInferenceParams { - generation_type?: 'chat-completion'; - /** @minimum 1 */ - max_parallel_requests?: number; - /** @minimum 1 */ - timeout?: number; - extra_body?: ChatCompletionInferenceParamsExtraBody; - temperature?: number | UniformDistribution | ManualDistribution; - top_p?: number | UniformDistribution | ManualDistribution; - /** @minimum 1 */ - max_tokens?: number; -} diff --git a/web/packages/sdk/generated/data-designer/schema/ChatCompletionInferenceParamsExtraBody.ts b/web/packages/sdk/generated/data-designer/schema/ChatCompletionInferenceParamsExtraBody.ts deleted file mode 100644 index 16e178f63d..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/ChatCompletionInferenceParamsExtraBody.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export type ChatCompletionInferenceParamsExtraBody = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/data-designer/schema/CodeLang.ts b/web/packages/sdk/generated/data-designer/schema/CodeLang.ts deleted file mode 100644 index 0c01607a88..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/CodeLang.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export type CodeLang = (typeof CodeLang)[keyof typeof CodeLang]; - -export const CodeLang = { - bash: 'bash', - c: 'c', - cobol: 'cobol', - cpp: 'cpp', - csharp: 'csharp', - go: 'go', - java: 'java', - javascript: 'javascript', - kotlin: 'kotlin', - python: 'python', - ruby: 'ruby', - rust: 'rust', - scala: 'scala', - swift: 'swift', - typescript: 'typescript', - 'sql:sqlite': 'sql:sqlite', - 'sql:tsql': 'sql:tsql', - 'sql:bigquery': 'sql:bigquery', - 'sql:mysql': 'sql:mysql', - 'sql:postgres': 'sql:postgres', - 'sql:ansi': 'sql:ansi', -} as const; diff --git a/web/packages/sdk/generated/data-designer/schema/CodeValidatorParams.ts b/web/packages/sdk/generated/data-designer/schema/CodeValidatorParams.ts deleted file mode 100644 index ab917023aa..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/CodeValidatorParams.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { CodeLang } from './CodeLang'; - -/** - * Configuration for code validation. Supports Python and SQL code validation. - -Attributes: - code_lang (required): The language of the code to validate. Supported values include: `python`, - `sql:sqlite`, `sql:postgres`, `sql:mysql`, `sql:tsql`, `sql:bigquery`, `sql:ansi`. - */ -export interface CodeValidatorParams { - /** Validator type discriminator, always 'code' for this validator */ - validator_type?: 'code'; - /** The language of the code to validate */ - code_lang: CodeLang; -} diff --git a/web/packages/sdk/generated/data-designer/schema/ColumnInequalityConstraint.ts b/web/packages/sdk/generated/data-designer/schema/ColumnInequalityConstraint.ts deleted file mode 100644 index 5f516dc1de..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/ColumnInequalityConstraint.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { InequalityOperator } from './InequalityOperator'; - -/** - * Constrain a sampler column to be less/greater than another sampler column. - -Only applies to sampler columns. - -Attributes: - rhs (required): Name of the other sampler column to compare against. - operator (required): Comparison operator (lt, le, gt, ge). - -Inherited Attributes: - target_column (required): Name of the sampler column this constraint applies to. - */ -export interface ColumnInequalityConstraint { - /** Name of the sampler column this constraint applies to */ - target_column: string; - /** Constraint type discriminator, always 'column_inequality' for this constraint */ - constraint_type?: 'column_inequality'; - /** Name of the other sampler column to compare against */ - rhs: string; - /** Comparison operator */ - operator: InequalityOperator; -} diff --git a/web/packages/sdk/generated/data-designer/schema/CreateJob.ts b/web/packages/sdk/generated/data-designer/schema/CreateJob.ts deleted file mode 100644 index 919494b123..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/CreateJob.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { CreateJobCustomFields } from './CreateJobCustomFields'; -import type { CreateJobErrorDetails } from './CreateJobErrorDetails'; -import type { CreateJobOwnership } from './CreateJobOwnership'; -import type { CreateJobStatusDetails } from './CreateJobStatusDetails'; -import type { DataDesignerStepConfig } from './DataDesignerStepConfig'; -import type { PlatformJobStatus } from './PlatformJobStatus'; - -export interface CreateJob { - id?: string; - name: string; - description?: string; - project?: string; - workspace?: string; - created_at?: string; - updated_at?: string; - spec: DataDesignerStepConfig; - status?: PlatformJobStatus; - status_details?: CreateJobStatusDetails; - error_details?: CreateJobErrorDetails; - ownership?: CreateJobOwnership; - custom_fields?: CreateJobCustomFields; -} diff --git a/web/packages/sdk/generated/data-designer/schema/CreateJobCustomFields.ts b/web/packages/sdk/generated/data-designer/schema/CreateJobCustomFields.ts deleted file mode 100644 index d344b8c675..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/CreateJobCustomFields.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export type CreateJobCustomFields = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/data-designer/schema/CreateJobErrorDetails.ts b/web/packages/sdk/generated/data-designer/schema/CreateJobErrorDetails.ts deleted file mode 100644 index 9c7e0ff4a1..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/CreateJobErrorDetails.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export type CreateJobErrorDetails = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/data-designer/schema/CreateJobOwnership.ts b/web/packages/sdk/generated/data-designer/schema/CreateJobOwnership.ts deleted file mode 100644 index e59964d089..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/CreateJobOwnership.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export type CreateJobOwnership = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/data-designer/schema/CreateJobRequest.ts b/web/packages/sdk/generated/data-designer/schema/CreateJobRequest.ts deleted file mode 100644 index d34819093c..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/CreateJobRequest.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { CreateJobRequestCustomFields } from './CreateJobRequestCustomFields'; -import type { CreateJobRequestOwnership } from './CreateJobRequestOwnership'; -import type { DataDesignerJobConfig } from './DataDesignerJobConfig'; - -export interface CreateJobRequest { - name?: string; - description?: string; - project?: string; - spec: DataDesignerJobConfig; - ownership?: CreateJobRequestOwnership; - custom_fields?: CreateJobRequestCustomFields; -} diff --git a/web/packages/sdk/generated/data-designer/schema/CreateJobRequestCustomFields.ts b/web/packages/sdk/generated/data-designer/schema/CreateJobRequestCustomFields.ts deleted file mode 100644 index 538fa05cff..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/CreateJobRequestCustomFields.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export type CreateJobRequestCustomFields = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/data-designer/schema/CreateJobRequestOwnership.ts b/web/packages/sdk/generated/data-designer/schema/CreateJobRequestOwnership.ts deleted file mode 100644 index d4e0979d31..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/CreateJobRequestOwnership.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export type CreateJobRequestOwnership = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/data-designer/schema/CreateJobStatusDetails.ts b/web/packages/sdk/generated/data-designer/schema/CreateJobStatusDetails.ts deleted file mode 100644 index bd9c0fac1f..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/CreateJobStatusDetails.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export type CreateJobStatusDetails = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/data-designer/schema/CreateJobsListFilter.ts b/web/packages/sdk/generated/data-designer/schema/CreateJobsListFilter.ts deleted file mode 100644 index 5780b2dcdf..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/CreateJobsListFilter.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { DatetimeFilter } from './DatetimeFilter'; -import type { PlatformJobStatus } from './PlatformJobStatus'; - -export interface CreateJobsListFilter { - /** Jobs created at 'gte' datetime or 'lte' datetime. */ - created_at?: DatetimeFilter; - /** Name of the job. */ - name?: string; - /** Workspace of the job. */ - workspace?: string; - /** Project containing the job. */ - project?: string; - /** The current status. */ - status?: PlatformJobStatus; - /** Jobs updated at 'gte' datetime or 'lte' datetime. */ - updated_at?: DatetimeFilter; -} diff --git a/web/packages/sdk/generated/data-designer/schema/CreateJobsPage.ts b/web/packages/sdk/generated/data-designer/schema/CreateJobsPage.ts deleted file mode 100644 index d21c14fb0e..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/CreateJobsPage.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { CreateJob } from './CreateJob'; -import type { CreateJobsPageFilter } from './CreateJobsPageFilter'; -import type { PaginationData } from './PaginationData'; - -export interface CreateJobsPage { - data: CreateJob[]; - /** Pagination information. */ - pagination?: PaginationData; - /** The field on which the results are sorted. */ - sort?: string; - /** Filtering information. */ - filter?: CreateJobsPageFilter; -} diff --git a/web/packages/sdk/generated/data-designer/schema/CreateJobsPageFilter.ts b/web/packages/sdk/generated/data-designer/schema/CreateJobsPageFilter.ts deleted file mode 100644 index fb04128053..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/CreateJobsPageFilter.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * Filtering information. - */ -export type CreateJobsPageFilter = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/data-designer/schema/CreateJobsSortField.ts b/web/packages/sdk/generated/data-designer/schema/CreateJobsSortField.ts deleted file mode 100644 index 30b352184d..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/CreateJobsSortField.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export type CreateJobsSortField = (typeof CreateJobsSortField)[keyof typeof CreateJobsSortField]; - -export const CreateJobsSortField = { - created_at: 'created_at', - '-created_at': '-created_at', - updated_at: 'updated_at', - '-updated_at': '-updated_at', -} as const; diff --git a/web/packages/sdk/generated/data-designer/schema/CustomColumnConfig.ts b/web/packages/sdk/generated/data-designer/schema/CustomColumnConfig.ts deleted file mode 100644 index 71e9fb19bc..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/CustomColumnConfig.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { BaseModel } from './BaseModel'; -import type { GenerationStrategy } from './GenerationStrategy'; -import type { SkipConfig } from './SkipConfig'; - -/** - * Configuration for custom user-defined column generators. - -Custom columns allow users to provide their own generation logic via a callable function -decorated with `@custom_column_generator`. Two strategies are supported: cell_by_cell -(default, row-based) and full_column (batch-based with DataFrame access). - -Attributes: - generator_function (required): A callable decorated with @custom_column_generator. - generation_strategy: "cell_by_cell" (row-based) or "full_column" (batch-based). - generator_params: Optional typed configuration object (Pydantic BaseModel) passed - as the second argument to the generator function. - -Inherited Attributes: - name (required): Unique name of the column to be generated. - drop: If True, generate this column but remove it from the final dataset. - */ -export interface CustomColumnConfig { - name: string; - drop?: boolean; - allow_resize?: boolean; - column_type?: 'custom'; - skip?: SkipConfig; - /** If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns. */ - propagate_skip?: boolean; - /** Function decorated with @custom_column_generator */ - generator_function: unknown; - /** Generation strategy: 'cell_by_cell' for row-based or 'full_column' for batch-based */ - generation_strategy?: GenerationStrategy; - /** Optional typed configuration object passed as second argument to generator function */ - generator_params?: BaseModel; -} diff --git a/web/packages/sdk/generated/data-designer/schema/DataDesignerConfig.ts b/web/packages/sdk/generated/data-designer/schema/DataDesignerConfig.ts deleted file mode 100644 index 49a8da4d65..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/DataDesignerConfig.ts +++ /dev/null @@ -1,68 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { ColumnInequalityConstraint } from './ColumnInequalityConstraint'; -import type { CustomColumnConfig } from './CustomColumnConfig'; -import type { DropColumnsProcessorConfig } from './DropColumnsProcessorConfig'; -import type { EmbeddingColumnConfig } from './EmbeddingColumnConfig'; -import type { ExpressionColumnConfig } from './ExpressionColumnConfig'; -import type { ImageColumnConfig } from './ImageColumnConfig'; -import type { JudgeScoreProfilerConfig } from './JudgeScoreProfilerConfig'; -import type { LLMCodeColumnConfig } from './LLMCodeColumnConfig'; -import type { LLMJudgeColumnConfig } from './LLMJudgeColumnConfig'; -import type { LLMStructuredColumnConfig } from './LLMStructuredColumnConfig'; -import type { LLMTextColumnConfig } from './LLMTextColumnConfig'; -import type { ModelConfig } from './ModelConfig'; -import type { SamplerColumnConfig } from './SamplerColumnConfig'; -import type { ScalarInequalityConstraint } from './ScalarInequalityConstraint'; -import type { SchemaTransformProcessorConfig } from './SchemaTransformProcessorConfig'; -import type { SeedConfig } from './SeedConfig'; -import type { SeedDatasetColumnConfig } from './SeedDatasetColumnConfig'; -import type { ToolConfig } from './ToolConfig'; -import type { ValidationColumnConfig } from './ValidationColumnConfig'; - -/** - * Configuration for NeMo Data Designer. - -This class defines the main configuration structure for NeMo Data Designer, -which the engine consumes when generating synthetic data. - -Attributes: - columns: Required list of column configurations defining how each column - should be generated. Must contain at least one column. - model_configs: Optional list of model configurations for LLM-based generation. - Each model config defines the model, provider, and inference parameters. - tool_configs: Optional list of tool configurations for MCP tool calling. - Each tool config defines the provider, allowed tools, and execution limits. - seed_config: Optional seed dataset settings to use for generation. - constraints: Optional list of column constraints. - profilers: Optional list of column profilers for analyzing generated data characteristics. - processors: Optional list of processor configurations for post-generation transformations. - */ -export interface DataDesignerConfig { - /** @minItems 1 */ - columns: ( - | CustomColumnConfig - | ExpressionColumnConfig - | LLMCodeColumnConfig - | LLMJudgeColumnConfig - | LLMStructuredColumnConfig - | LLMTextColumnConfig - | SamplerColumnConfig - | SeedDatasetColumnConfig - | ValidationColumnConfig - | EmbeddingColumnConfig - | ImageColumnConfig - )[]; - model_configs?: ModelConfig[]; - tool_configs?: ToolConfig[]; - seed_config?: SeedConfig; - constraints?: (ScalarInequalityConstraint | ColumnInequalityConstraint)[]; - profilers?: JudgeScoreProfilerConfig[]; - processors?: (DropColumnsProcessorConfig | SchemaTransformProcessorConfig)[]; -} diff --git a/web/packages/sdk/generated/data-designer/schema/DataDesignerGetJobLogsParams.ts b/web/packages/sdk/generated/data-designer/schema/DataDesignerGetJobLogsParams.ts deleted file mode 100644 index e51d11c84f..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/DataDesignerGetJobLogsParams.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export type DataDesignerGetJobLogsParams = { - limit?: number; - page_cursor?: string; -}; diff --git a/web/packages/sdk/generated/data-designer/schema/DataDesignerJobConfig.ts b/web/packages/sdk/generated/data-designer/schema/DataDesignerJobConfig.ts deleted file mode 100644 index 79bbfccf13..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/DataDesignerJobConfig.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { DataDesignerConfig } from './DataDesignerConfig'; - -export interface DataDesignerJobConfig { - num_records: number; - config: DataDesignerConfig; -} diff --git a/web/packages/sdk/generated/data-designer/schema/DataDesignerListJobsParams.ts b/web/packages/sdk/generated/data-designer/schema/DataDesignerListJobsParams.ts deleted file mode 100644 index dbe69f0354..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/DataDesignerListJobsParams.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { CreateJobsListFilter } from './CreateJobsListFilter'; -import type { CreateJobsSortField } from './CreateJobsSortField'; - -export type DataDesignerListJobsParams = { - /** - * Page number. - * @exclusiveMinimum 0 - */ - page?: number; - /** - * Page size. - * @exclusiveMinimum 0 - */ - page_size?: number; - /** - * The field to sort by. To sort in decreasing order, use `-` in front of the field name. - */ - sort?: CreateJobsSortField; - /** - * Filter jobs on various criteria. - */ - filter?: CreateJobsListFilter; -}; diff --git a/web/packages/sdk/generated/data-designer/schema/DataDesignerStepConfig.ts b/web/packages/sdk/generated/data-designer/schema/DataDesignerStepConfig.ts deleted file mode 100644 index 8288608aa3..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/DataDesignerStepConfig.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { DataDesignerJobConfig } from './DataDesignerJobConfig'; -import type { ModelConfig } from './ModelConfig'; -import type { ModelProvider } from './ModelProvider'; - -export interface DataDesignerStepConfig { - job_config: DataDesignerJobConfig; - model_providers: ModelProvider[]; - model_configs: ModelConfig[]; -} diff --git a/web/packages/sdk/generated/data-designer/schema/DataFrameSeedSource.ts b/web/packages/sdk/generated/data-designer/schema/DataFrameSeedSource.ts deleted file mode 100644 index cb6de7ad71..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/DataFrameSeedSource.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export const DataFrameSeedSourceValue = { - seed_type: 'df', -} as const; -export type DataFrameSeedSource = typeof DataFrameSeedSourceValue; diff --git a/web/packages/sdk/generated/data-designer/schema/DatetimeFilter.ts b/web/packages/sdk/generated/data-designer/schema/DatetimeFilter.ts deleted file mode 100644 index c4c5bc31f3..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/DatetimeFilter.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export interface DatetimeFilter { - /** Filter for results greater than or equal to this datetime. */ - $gte?: string; - /** Filter for results less than or equal to this datetime. */ - $lte?: string; -} diff --git a/web/packages/sdk/generated/data-designer/schema/DatetimeSamplerParams.ts b/web/packages/sdk/generated/data-designer/schema/DatetimeSamplerParams.ts deleted file mode 100644 index f38be807cc..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/DatetimeSamplerParams.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { DatetimeSamplerParamsUnit } from './DatetimeSamplerParamsUnit'; - -/** - * Parameters for uniform datetime sampling within a specified range. - -Samples datetime values uniformly between a start and end date with a specified granularity. -The sampling unit determines the smallest possible time interval between consecutive samples. - -Attributes: - start (required): Earliest possible datetime for the sampling range (inclusive). Must be a valid - datetime string parseable by pandas.to_datetime(). - end (required): Exclusive upper bound for the sampling range. Must be a valid - datetime string parseable by pandas.to_datetime(). - unit: Time unit for sampling granularity. Options: - - "Y": Years - - "M": Months - - "D": Days (default) - - "h": Hours - - "m": Minutes - - "s": Seconds - */ -export interface DatetimeSamplerParams { - /** Earliest possible datetime for sampling range, inclusive. */ - start: string; - /** Exclusive upper bound for datetime sampling range. */ - end: string; - /** Sampling units, e.g. the smallest possible time interval between samples. */ - unit?: DatetimeSamplerParamsUnit; - sampler_type?: 'datetime'; -} diff --git a/web/packages/sdk/generated/data-designer/schema/DatetimeSamplerParamsUnit.ts b/web/packages/sdk/generated/data-designer/schema/DatetimeSamplerParamsUnit.ts deleted file mode 100644 index 426ce17bfb..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/DatetimeSamplerParamsUnit.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * Sampling units, e.g. the smallest possible time interval between samples. - */ -export type DatetimeSamplerParamsUnit = - (typeof DatetimeSamplerParamsUnit)[keyof typeof DatetimeSamplerParamsUnit]; - -export const DatetimeSamplerParamsUnit = { - Y: 'Y', - M: 'M', - D: 'D', - h: 'h', - m: 'm', - s: 's', -} as const; diff --git a/web/packages/sdk/generated/data-designer/schema/DirectorySeedSource.ts b/web/packages/sdk/generated/data-designer/schema/DirectorySeedSource.ts deleted file mode 100644 index 75e53f4e31..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/DirectorySeedSource.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export interface DirectorySeedSource { - seed_type?: 'directory'; - /** Directory containing seed artifacts. Relative paths are resolved from the current working directory when the config is loaded, not from the config file location. */ - path: string; - /** Case-sensitive filename pattern used to match files under the provided directory. Patterns match basenames only, not relative paths. */ - file_pattern?: string; - /** Whether to search nested subdirectories under the provided directory for matching files. */ - recursive?: boolean; -} diff --git a/web/packages/sdk/generated/data-designer/schema/DistributionType.ts b/web/packages/sdk/generated/data-designer/schema/DistributionType.ts deleted file mode 100644 index 69376507f2..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/DistributionType.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * Types of distributions for sampling inference parameters. - */ -export type DistributionType = (typeof DistributionType)[keyof typeof DistributionType]; - -export const DistributionType = { - uniform: 'uniform', - manual: 'manual', -} as const; diff --git a/web/packages/sdk/generated/data-designer/schema/DropColumnsProcessorConfig.ts b/web/packages/sdk/generated/data-designer/schema/DropColumnsProcessorConfig.ts deleted file mode 100644 index efa07347d2..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/DropColumnsProcessorConfig.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * Drop columns from the output dataset (prefer ``drop=True`` in the column config). - -This processor removes specified columns from the generated dataset. The dropped -columns are saved separately in the `dropped-columns-parquet-files` directory for reference. -When this processor is added via the config builder, the corresponding column -configs are automatically marked with `drop = True`. - -Attributes: - column_names (required): List of column names to remove from the output dataset. - -Inherited Attributes: - name (required): Name of the processor. - */ -export interface DropColumnsProcessorConfig { - /** The name of the processor, used to identify the processor in the results and to write the artifacts to disk. */ - name: string; - processor_type?: 'drop_columns'; - /** List of column names to drop from the output dataset. */ - column_names: string[]; -} diff --git a/web/packages/sdk/generated/data-designer/schema/EmbeddingColumnConfig.ts b/web/packages/sdk/generated/data-designer/schema/EmbeddingColumnConfig.ts deleted file mode 100644 index b600839821..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/EmbeddingColumnConfig.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { SkipConfig } from './SkipConfig'; - -/** - * Configuration for embedding generation columns. - -Embedding columns generate embeddings for text input using a specified model. - -Attributes: - target_column (required): The column to generate embeddings for. The column could be a single text string or a list of text strings in stringified JSON format. - If it is a list of text strings in stringified JSON format, the embeddings will be generated for each text string. - model_alias (required): The model to use for embedding generation. - -Inherited Attributes: - name (required): Unique name of the column to be generated. - drop: If True, generate this column but remove it from the final dataset. - */ -export interface EmbeddingColumnConfig { - name: string; - drop?: boolean; - allow_resize?: boolean; - column_type?: 'embedding'; - skip?: SkipConfig; - /** If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns. */ - propagate_skip?: boolean; - /** Name of the text column to generate embeddings for */ - target_column: string; - /** Alias of the model to use for embedding generation */ - model_alias: string; -} diff --git a/web/packages/sdk/generated/data-designer/schema/EmbeddingInferenceParams.ts b/web/packages/sdk/generated/data-designer/schema/EmbeddingInferenceParams.ts deleted file mode 100644 index d0b2c0fc52..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/EmbeddingInferenceParams.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { EmbeddingInferenceParamsEncodingFormat } from './EmbeddingInferenceParamsEncodingFormat'; -import type { EmbeddingInferenceParamsExtraBody } from './EmbeddingInferenceParamsExtraBody'; - -/** - * Configuration for embedding generation parameters. - -Attributes: - generation_type: Type of generation, always "embedding" for this class. - encoding_format: Format of the embedding encoding ("float" or "base64"). - dimensions: Number of dimensions for the embedding. - */ -export interface EmbeddingInferenceParams { - generation_type?: 'embedding'; - /** @minimum 1 */ - max_parallel_requests?: number; - /** @minimum 1 */ - timeout?: number; - extra_body?: EmbeddingInferenceParamsExtraBody; - encoding_format?: EmbeddingInferenceParamsEncodingFormat; - dimensions?: number; -} diff --git a/web/packages/sdk/generated/data-designer/schema/EmbeddingInferenceParamsEncodingFormat.ts b/web/packages/sdk/generated/data-designer/schema/EmbeddingInferenceParamsEncodingFormat.ts deleted file mode 100644 index 6da7e9903c..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/EmbeddingInferenceParamsEncodingFormat.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export type EmbeddingInferenceParamsEncodingFormat = - (typeof EmbeddingInferenceParamsEncodingFormat)[keyof typeof EmbeddingInferenceParamsEncodingFormat]; - -export const EmbeddingInferenceParamsEncodingFormat = { - float: 'float', - base64: 'base64', -} as const; diff --git a/web/packages/sdk/generated/data-designer/schema/EmbeddingInferenceParamsExtraBody.ts b/web/packages/sdk/generated/data-designer/schema/EmbeddingInferenceParamsExtraBody.ts deleted file mode 100644 index 77e20283d6..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/EmbeddingInferenceParamsExtraBody.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export type EmbeddingInferenceParamsExtraBody = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/data-designer/schema/ExpressionColumnConfig.ts b/web/packages/sdk/generated/data-designer/schema/ExpressionColumnConfig.ts deleted file mode 100644 index ee6724a809..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/ExpressionColumnConfig.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { ExpressionColumnConfigDtype } from './ExpressionColumnConfigDtype'; -import type { SkipConfig } from './SkipConfig'; - -/** - * Configuration for derived columns using Jinja2 expressions. - -Expression columns compute values by evaluating Jinja2 templates that reference other -columns. Useful for transformations, concatenations, conditional logic, and derived -features without requiring LLM generation. The expression is evaluated row-by-row. - -Attributes: - expr (required): Jinja2 expression to evaluate. Can reference other column values using - {{ column_name }} syntax. Supports filters, conditionals, and arithmetic. - Must be a valid, non-empty Jinja2 template. - dtype: Data type to cast the result to. Must be one of "int", "float", "str", or "bool". - Defaults to "str". Type conversion is applied after expression evaluation. - -Inherited Attributes: - name (required): Unique name of the column to be generated. - drop: If True, generate this column but remove it from the final dataset. - */ -export interface ExpressionColumnConfig { - name: string; - drop?: boolean; - allow_resize?: boolean; - column_type?: 'expression'; - skip?: SkipConfig; - /** If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns. */ - propagate_skip?: boolean; - /** Jinja2 expression to compute the column value from other columns */ - expr: string; - /** Data type for expression result: 'int', 'float', 'str', or 'bool' */ - dtype?: ExpressionColumnConfigDtype; -} diff --git a/web/packages/sdk/generated/data-designer/schema/ExpressionColumnConfigDtype.ts b/web/packages/sdk/generated/data-designer/schema/ExpressionColumnConfigDtype.ts deleted file mode 100644 index e727ca92d1..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/ExpressionColumnConfigDtype.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * Data type for expression result: 'int', 'float', 'str', or 'bool' - */ -export type ExpressionColumnConfigDtype = - (typeof ExpressionColumnConfigDtype)[keyof typeof ExpressionColumnConfigDtype]; - -export const ExpressionColumnConfigDtype = { - int: 'int', - float: 'float', - str: 'str', - bool: 'bool', -} as const; diff --git a/web/packages/sdk/generated/data-designer/schema/FileContentsSeedSource.ts b/web/packages/sdk/generated/data-designer/schema/FileContentsSeedSource.ts deleted file mode 100644 index d8e0886a47..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/FileContentsSeedSource.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export interface FileContentsSeedSource { - seed_type?: 'file_contents'; - /** Directory containing seed artifacts. Relative paths are resolved from the current working directory when the config is loaded, not from the config file location. */ - path: string; - /** Case-sensitive filename pattern used to match files under the provided directory. Patterns match basenames only, not relative paths. */ - file_pattern?: string; - /** Whether to search nested subdirectories under the provided directory for matching files. */ - recursive?: boolean; - /** Text encoding used when reading matching files into the `content` column. */ - encoding?: string; -} diff --git a/web/packages/sdk/generated/data-designer/schema/FileStorageType.ts b/web/packages/sdk/generated/data-designer/schema/FileStorageType.ts deleted file mode 100644 index 81c683a118..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/FileStorageType.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export type FileStorageType = (typeof FileStorageType)[keyof typeof FileStorageType]; - -export const FileStorageType = { - fileset: 'fileset', -} as const; diff --git a/web/packages/sdk/generated/data-designer/schema/FilesetFileSeedSource.ts b/web/packages/sdk/generated/data-designer/schema/FilesetFileSeedSource.ts deleted file mode 100644 index 0cd24f0dc6..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/FilesetFileSeedSource.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export interface FilesetFileSeedSource { - seed_type?: 'nmp'; - path: string; -} diff --git a/web/packages/sdk/generated/data-designer/schema/GaussianSamplerParams.ts b/web/packages/sdk/generated/data-designer/schema/GaussianSamplerParams.ts deleted file mode 100644 index 96fcd11c0d..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/GaussianSamplerParams.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * Parameters for sampling from a Gaussian (Normal) distribution. - -Samples continuous values from a normal distribution characterized by its mean and standard -deviation. The Gaussian distribution is one of the most commonly used probability distributions, -appearing naturally in many real-world phenomena due to the Central Limit Theorem. - -Attributes: - mean (required): Mean (center) of the Gaussian distribution. This is the expected value and the - location of the distribution's peak. - stddev (required): Standard deviation of the Gaussian distribution. Controls the spread or width - of the distribution. Must be positive. - decimal_places: Optional number of decimal places to round sampled values to. If None, - values are not rounded. - */ -export interface GaussianSamplerParams { - /** Mean of the Gaussian distribution */ - mean: number; - /** Standard deviation of the Gaussian distribution */ - stddev: number; - /** Number of decimal places to round the sampled values to. */ - decimal_places?: number; - sampler_type?: 'gaussian'; -} diff --git a/web/packages/sdk/generated/data-designer/schema/GenerationStrategy.ts b/web/packages/sdk/generated/data-designer/schema/GenerationStrategy.ts deleted file mode 100644 index ff7f34f59d..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/GenerationStrategy.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * Strategy for custom column generation. - */ -export type GenerationStrategy = (typeof GenerationStrategy)[keyof typeof GenerationStrategy]; - -export const GenerationStrategy = { - cell_by_cell: 'cell_by_cell', - full_column: 'full_column', -} as const; diff --git a/web/packages/sdk/generated/data-designer/schema/HTTPValidationError.ts b/web/packages/sdk/generated/data-designer/schema/HTTPValidationError.ts deleted file mode 100644 index ed01e7ba55..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/HTTPValidationError.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { ValidationError } from './ValidationError'; - -export interface HTTPValidationError { - detail?: ValidationError[]; -} diff --git a/web/packages/sdk/generated/data-designer/schema/HuggingFaceSeedSource.ts b/web/packages/sdk/generated/data-designer/schema/HuggingFaceSeedSource.ts deleted file mode 100644 index e1573203d6..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/HuggingFaceSeedSource.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export interface HuggingFaceSeedSource { - seed_type?: 'hf'; - /** Path to the seed data in HuggingFace. Wildcards are allowed. Examples include 'datasets/my-username/my-dataset/data/000_00000.parquet', 'datasets/my-username/my-dataset/data/*.parquet', and 'datasets/my-username/my-dataset/**\/*.parquet' */ - path: string; - token?: string; - endpoint?: string; -} diff --git a/web/packages/sdk/generated/data-designer/schema/ImageColumnConfig.ts b/web/packages/sdk/generated/data-designer/schema/ImageColumnConfig.ts deleted file mode 100644 index 4a00ffb397..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/ImageColumnConfig.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { ImageContext } from './ImageContext'; -import type { SkipConfig } from './SkipConfig'; - -/** - * Configuration for image generation columns. - -Image columns generate images using either autoregressive or diffusion models. -The API used is automatically determined based on the model name: - -Attributes: - prompt (required): Prompt template for image generation. Supports Jinja2 templating to - reference other columns (e.g., "Generate an image of a {{ character_name }}"). - Must be a valid Jinja2 template. - model_alias (required): The model to use for image generation. - multi_modal_context: Optional list of image contexts for multi-modal generation. - Enables autoregressive multi-modal models to generate images based on image inputs. - Only works with autoregressive models that support image-to-image generation. - -Inherited Attributes: - name (required): Unique name of the column to be generated. - drop: If True, generate this column but remove it from the final dataset. - */ -export interface ImageColumnConfig { - name: string; - drop?: boolean; - allow_resize?: boolean; - column_type?: 'image'; - skip?: SkipConfig; - /** If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns. */ - propagate_skip?: boolean; - /** Jinja2 template for the image generation prompt; can reference other columns via {{ column_name }} */ - prompt: string; - /** Alias of the model to use for image generation */ - model_alias: string; - /** Optional list of ImageContext for multi-modal image-to-image generation */ - multi_modal_context?: ImageContext[]; -} diff --git a/web/packages/sdk/generated/data-designer/schema/ImageContext.ts b/web/packages/sdk/generated/data-designer/schema/ImageContext.ts deleted file mode 100644 index 5ec42d0812..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/ImageContext.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { ImageFormat } from './ImageFormat'; -import type { Modality } from './Modality'; -import type { ModalityDataType } from './ModalityDataType'; - -/** - * Configuration for providing image context to multimodal models. - -Attributes: - modality: The modality type (always "image"). - column_name: Name of the column containing image data. - data_type: Format of the image data ("url", "base64", or None for auto-detection). - When None, the format is auto-detected: URLs are passed through, file paths that - exist under base_path are loaded as base64, and other values are assumed to be base64. - image_format: Image format (required when data_type is explicitly "base64"). - */ -export interface ImageContext { - modality?: Modality; - column_name: string; - data_type?: ModalityDataType; - image_format?: ImageFormat; -} diff --git a/web/packages/sdk/generated/data-designer/schema/ImageFormat.ts b/web/packages/sdk/generated/data-designer/schema/ImageFormat.ts deleted file mode 100644 index 262117f2a2..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/ImageFormat.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * Supported image formats for image modality. - */ -export type ImageFormat = (typeof ImageFormat)[keyof typeof ImageFormat]; - -export const ImageFormat = { - png: 'png', - jpg: 'jpg', - jpeg: 'jpeg', - gif: 'gif', - webp: 'webp', -} as const; diff --git a/web/packages/sdk/generated/data-designer/schema/ImageInferenceParams.ts b/web/packages/sdk/generated/data-designer/schema/ImageInferenceParams.ts deleted file mode 100644 index 28953effb7..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/ImageInferenceParams.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { ImageInferenceParamsExtraBody } from './ImageInferenceParamsExtraBody'; - -/** - * Configuration for image generation models. - -Works for both diffusion and autoregressive image generation models. Pass all model-specific image options via `extra_body`. - -Attributes: - generation_type: Type of generation, always "image" for this class. - -Example: - ```python - # OpenAI-style (DALLĀ·E): quality and size in extra_body or as top-level kwargs - dd.ImageInferenceParams( - extra_body={"size": "1024x1024", "quality": "hd"} - ) - - # Gemini-style: generationConfig.imageConfig - dd.ImageInferenceParams( - extra_body={ - "generationConfig": { - "imageConfig": { - "aspectRatio": "1:1", - "imageSize": "1024" - } - } - } - ) - ``` - */ -export interface ImageInferenceParams { - generation_type?: 'image'; - /** @minimum 1 */ - max_parallel_requests?: number; - /** @minimum 1 */ - timeout?: number; - extra_body?: ImageInferenceParamsExtraBody; -} diff --git a/web/packages/sdk/generated/data-designer/schema/ImageInferenceParamsExtraBody.ts b/web/packages/sdk/generated/data-designer/schema/ImageInferenceParamsExtraBody.ts deleted file mode 100644 index 245bd73363..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/ImageInferenceParamsExtraBody.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export type ImageInferenceParamsExtraBody = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/data-designer/schema/IndexRange.ts b/web/packages/sdk/generated/data-designer/schema/IndexRange.ts deleted file mode 100644 index 875de03bf5..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/IndexRange.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export interface IndexRange { - /** - * The start index of the index range (inclusive) - * @minimum 0 - */ - start: number; - /** - * The end index of the index range (inclusive) - * @minimum 0 - */ - end: number; -} diff --git a/web/packages/sdk/generated/data-designer/schema/InequalityOperator.ts b/web/packages/sdk/generated/data-designer/schema/InequalityOperator.ts deleted file mode 100644 index 74aa17660a..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/InequalityOperator.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export type InequalityOperator = (typeof InequalityOperator)[keyof typeof InequalityOperator]; - -export const InequalityOperator = { - lt: 'lt', - le: 'le', - gt: 'gt', - ge: 'ge', -} as const; diff --git a/web/packages/sdk/generated/data-designer/schema/JudgeScoreProfilerConfig.ts b/web/packages/sdk/generated/data-designer/schema/JudgeScoreProfilerConfig.ts deleted file mode 100644 index 23323bcb06..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/JudgeScoreProfilerConfig.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * Configuration for the LLM-as-a-judge score profiler. - -Attributes: - model_alias: Alias of the LLM model to use for generating score distribution summaries. - Must match a model alias defined in the Data Designer configuration. - summary_score_sample_size: Number of score samples to include when prompting the LLM - to generate summaries. Larger sample sizes provide more context but increase - token usage. Must be at least 1 when provided. Set to None to skip LLM-generated - summaries. Defaults to 20. - */ -export interface JudgeScoreProfilerConfig { - model_alias: string; - /** @minimum 1 */ - summary_score_sample_size?: number; -} diff --git a/web/packages/sdk/generated/data-designer/schema/LLMCodeColumnConfig.ts b/web/packages/sdk/generated/data-designer/schema/LLMCodeColumnConfig.ts deleted file mode 100644 index f3db016a79..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/LLMCodeColumnConfig.ts +++ /dev/null @@ -1,65 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { CodeLang } from './CodeLang'; -import type { ImageContext } from './ImageContext'; -import type { SkipConfig } from './SkipConfig'; -import type { TraceType } from './TraceType'; - -/** - * Configuration for code generation columns using Large Language Models. - -Extends LLMTextColumnConfig to generate code snippets in specific programming languages -or SQL dialects. The generated code is automatically extracted from markdown code blocks -for the specified language. Inherits all prompt templating capabilities from LLMTextColumnConfig. - -Attributes: - code_lang (required): Programming language or SQL dialect for code generation. Supported - values include: "python", "javascript", "typescript", "java", "kotlin", "go", - "rust", "ruby", "scala", "swift", "sql:sqlite", "sql:postgres", "sql:mysql", - "sql:tsql", "sql:bigquery", "sql:ansi". See CodeLang enum for complete list. - -Inherited Attributes: - name (required): Unique name of the column to be generated. - prompt (required): Prompt template for code generation (supports Jinja2). - model_alias (required): Alias of the model configuration to use. - system_prompt: Optional system prompt (supports Jinja2). - multi_modal_context: Optional image contexts for multi-modal generation. - tool_alias: Optional tool configuration alias for MCP tool calls. - with_trace: Specifies what trace information to capture in a `{column_name}__trace` - column. Options are `TraceType.NONE` (default), `TraceType.LAST_MESSAGE`, or - `TraceType.ALL_MESSAGES`. - extract_reasoning_content: If True, creates a `{column_name}__reasoning_content` - column containing the reasoning content from the final assistant response. - drop: If True, generate this column but remove it from the final dataset. - */ -export interface LLMCodeColumnConfig { - name: string; - drop?: boolean; - allow_resize?: boolean; - column_type?: 'llm-code'; - skip?: SkipConfig; - /** If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns. */ - propagate_skip?: boolean; - /** Jinja2 template for the LLM prompt; can reference other columns via {{ column_name }} */ - prompt: string; - /** Alias of the model configuration to use for generation */ - model_alias: string; - /** Optional system prompt to set model behavior and constraints */ - system_prompt?: string; - /** Optional list of ImageContext for vision model inputs */ - multi_modal_context?: ImageContext[]; - /** Optional alias of the tool configuration to use for MCP tool calls */ - tool_alias?: string; - /** Trace capture mode: NONE, LAST_MESSAGE, or ALL_MESSAGES */ - with_trace?: TraceType; - /** If True, capture chain-of-thought in {name}__reasoning_content column */ - extract_reasoning_content?: boolean; - /** Target programming language or SQL dialect for code extraction from LLM response */ - code_lang: CodeLang; -} diff --git a/web/packages/sdk/generated/data-designer/schema/LLMJudgeColumnConfig.ts b/web/packages/sdk/generated/data-designer/schema/LLMJudgeColumnConfig.ts deleted file mode 100644 index 74ad38f8c6..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/LLMJudgeColumnConfig.ts +++ /dev/null @@ -1,68 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { ImageContext } from './ImageContext'; -import type { Score } from './Score'; -import type { SkipConfig } from './SkipConfig'; -import type { TraceType } from './TraceType'; - -/** - * Configuration for LLM-as-a-judge quality assessment and scoring columns. - -Extends LLMTextColumnConfig to create judge columns that evaluate and score other -generated content based on the defined criteria. Useful for quality assessment, preference -ranking, and multi-dimensional evaluation of generated data. Inherits prompt templating -capabilities from LLMTextColumnConfig. - -Attributes: - scores (required): List of Score objects defining the evaluation dimensions. Each score - represents a different aspect to evaluate (e.g., accuracy, relevance, fluency). - Must contain at least one score. - -Inherited Attributes: - name (required): Unique name of the column to be generated. - prompt (required): Prompt template for the judge evaluation (supports Jinja2). - model_alias (required): Alias of the model configuration to use. - system_prompt: Optional system prompt (supports Jinja2). - multi_modal_context: Optional image contexts for multi-modal generation. - tool_alias: Optional tool configuration alias for MCP tool calls. - with_trace: Specifies what trace information to capture in a `{column_name}__trace` - column. Options are `TraceType.NONE` (default), `TraceType.LAST_MESSAGE`, or - `TraceType.ALL_MESSAGES`. - extract_reasoning_content: If True, creates a `{column_name}__reasoning_content` - column containing the reasoning content from the final assistant response. - drop: If True, generate this column but remove it from the final dataset. - */ -export interface LLMJudgeColumnConfig { - name: string; - drop?: boolean; - allow_resize?: boolean; - column_type?: 'llm-judge'; - skip?: SkipConfig; - /** If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns. */ - propagate_skip?: boolean; - /** Jinja2 template for the LLM prompt; can reference other columns via {{ column_name }} */ - prompt: string; - /** Alias of the model configuration to use for generation */ - model_alias: string; - /** Optional system prompt to set model behavior and constraints */ - system_prompt?: string; - /** Optional list of ImageContext for vision model inputs */ - multi_modal_context?: ImageContext[]; - /** Optional alias of the tool configuration to use for MCP tool calls */ - tool_alias?: string; - /** Trace capture mode: NONE, LAST_MESSAGE, or ALL_MESSAGES */ - with_trace?: TraceType; - /** If True, capture chain-of-thought in {name}__reasoning_content column */ - extract_reasoning_content?: boolean; - /** - * List of Score objects defining rubric criteria for LLM judge evaluation - * @minItems 1 - */ - scores: Score[]; -} diff --git a/web/packages/sdk/generated/data-designer/schema/LLMStructuredColumnConfig.ts b/web/packages/sdk/generated/data-designer/schema/LLMStructuredColumnConfig.ts deleted file mode 100644 index fcb8c1ac18..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/LLMStructuredColumnConfig.ts +++ /dev/null @@ -1,65 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { ImageContext } from './ImageContext'; -import type { LLMStructuredColumnConfigOutputFormat } from './LLMStructuredColumnConfigOutputFormat'; -import type { SkipConfig } from './SkipConfig'; -import type { TraceType } from './TraceType'; - -/** - * Configuration for structured JSON generation columns using Large Language Models. - -Extends LLMTextColumnConfig to generate structured data conforming to a specified schema. -Uses JSON schema or Pydantic models to define the expected output structure, enabling -type-safe and validated structured output generation. Inherits prompt templating capabilities -from LLMTextColumnConfig. - -Attributes: - output_format (required): The schema defining the expected output structure. Can be either: - - A Pydantic BaseModel class (recommended) - - A JSON schema dictionary - -Inherited Attributes: - name (required): Unique name of the column to be generated. - prompt (required): Prompt template for structured generation (supports Jinja2). - model_alias (required): Alias of the model configuration to use. - system_prompt: Optional system prompt (supports Jinja2). - multi_modal_context: Optional image contexts for multi-modal generation. - tool_alias: Optional tool configuration alias for MCP tool calls. - with_trace: Specifies what trace information to capture in a `{column_name}__trace` - column. Options are `TraceType.NONE` (default), `TraceType.LAST_MESSAGE`, or - `TraceType.ALL_MESSAGES`. - extract_reasoning_content: If True, creates a `{column_name}__reasoning_content` - column containing the reasoning content from the final assistant response. - drop: If True, generate this column but remove it from the final dataset. - */ -export interface LLMStructuredColumnConfig { - name: string; - drop?: boolean; - allow_resize?: boolean; - column_type?: 'llm-structured'; - skip?: SkipConfig; - /** If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns. */ - propagate_skip?: boolean; - /** Jinja2 template for the LLM prompt; can reference other columns via {{ column_name }} */ - prompt: string; - /** Alias of the model configuration to use for generation */ - model_alias: string; - /** Optional system prompt to set model behavior and constraints */ - system_prompt?: string; - /** Optional list of ImageContext for vision model inputs */ - multi_modal_context?: ImageContext[]; - /** Optional alias of the tool configuration to use for MCP tool calls */ - tool_alias?: string; - /** Trace capture mode: NONE, LAST_MESSAGE, or ALL_MESSAGES */ - with_trace?: TraceType; - /** If True, capture chain-of-thought in {name}__reasoning_content column */ - extract_reasoning_content?: boolean; - /** Pydantic model or JSON schema dict defining the expected structured output shape */ - output_format: LLMStructuredColumnConfigOutputFormat; -} diff --git a/web/packages/sdk/generated/data-designer/schema/LLMStructuredColumnConfigOutputFormat.ts b/web/packages/sdk/generated/data-designer/schema/LLMStructuredColumnConfigOutputFormat.ts deleted file mode 100644 index d515d963aa..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/LLMStructuredColumnConfigOutputFormat.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * Pydantic model or JSON schema dict defining the expected structured output shape - */ -export type LLMStructuredColumnConfigOutputFormat = { [key: string]: unknown } | unknown; diff --git a/web/packages/sdk/generated/data-designer/schema/LLMTextColumnConfig.ts b/web/packages/sdk/generated/data-designer/schema/LLMTextColumnConfig.ts deleted file mode 100644 index eecd1a59a0..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/LLMTextColumnConfig.ts +++ /dev/null @@ -1,73 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { ImageContext } from './ImageContext'; -import type { SkipConfig } from './SkipConfig'; -import type { TraceType } from './TraceType'; - -/** - * Configuration for text generation columns using Large Language Models. - -LLM text columns generate free-form text content using language models. -Prompts support Jinja2 templating to reference values from other columns, enabling -context-aware generation. The generated text can optionally include message traces -capturing the full conversation history. - -Attributes: - prompt (required): Prompt template for text generation. Supports Jinja2 syntax to - reference other columns (e.g., "Write a story about {{ character_name }}"). - Must be a valid Jinja2 template. - model_alias (required): Alias of the model configuration to use for generation. - Must match a model alias defined when initializing the DataDesignerConfigBuilder. - system_prompt: Optional system prompt to set model behavior and constraints. - Also supports Jinja2 templating. If provided, must be a valid Jinja2 template. - Do not put any output parsing instructions in the system prompt. Instead, - use the appropriate column type for the output you want to generate - e.g., - `LLMStructuredColumnConfig` for structured output, `LLMCodeColumnConfig` for code. - multi_modal_context: Optional list of image contexts for multi-modal generation. - Enables vision-capable models to generate text based on image inputs. - tool_alias: Optional alias of the tool configuration to use for MCP tool calls. - Must match a tool alias defined when initializing the DataDesignerConfigBuilder. - When provided, the model may call permitted tools during generation. - with_trace: Specifies what trace information to capture in a `{column_name}__trace` - column. Options are: - - `TraceType.NONE` (default): No trace is captured. - - `TraceType.LAST_MESSAGE`: Only the final assistant message is captured. - - `TraceType.ALL_MESSAGES`: Full conversation history (system/user/assistant/tool). - extract_reasoning_content: If True, creates a `{column_name}__reasoning_content` column - containing only the reasoning_content from the final assistant response. This is - useful for models that expose chain-of-thought reasoning separately from the main - response. Defaults to False. - -Inherited Attributes: - name (required): Unique name of the column to be generated. - drop: If True, generate this column but remove it from the final dataset. - */ -export interface LLMTextColumnConfig { - name: string; - drop?: boolean; - allow_resize?: boolean; - column_type?: 'llm-text'; - skip?: SkipConfig; - /** If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns. */ - propagate_skip?: boolean; - /** Jinja2 template for the LLM prompt; can reference other columns via {{ column_name }} */ - prompt: string; - /** Alias of the model configuration to use for generation */ - model_alias: string; - /** Optional system prompt to set model behavior and constraints */ - system_prompt?: string; - /** Optional list of ImageContext for vision model inputs */ - multi_modal_context?: ImageContext[]; - /** Optional alias of the tool configuration to use for MCP tool calls */ - tool_alias?: string; - /** Trace capture mode: NONE, LAST_MESSAGE, or ALL_MESSAGES */ - with_trace?: TraceType; - /** If True, capture chain-of-thought in {name}__reasoning_content column */ - extract_reasoning_content?: boolean; -} diff --git a/web/packages/sdk/generated/data-designer/schema/LocalCallableValidatorParams.ts b/web/packages/sdk/generated/data-designer/schema/LocalCallableValidatorParams.ts deleted file mode 100644 index 19d05ee967..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/LocalCallableValidatorParams.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { LocalCallableValidatorParamsOutputSchema } from './LocalCallableValidatorParamsOutputSchema'; - -/** - * Configuration for local callable validation. Expects a function to be passed that validates the data. - -Attributes: - validation_function (required): Function (`Callable[[pd.DataFrame], pd.DataFrame]`) to validate the - data. Output must contain a column `is_valid` of type `bool`. - output_schema: The JSON schema for the local callable validator's output. If not provided, - the output will not be validated. - */ -export interface LocalCallableValidatorParams { - /** Validator type discriminator, always 'local_callable' for this validator */ - validator_type?: 'local_callable'; - /** Function (Callable[[pd.DataFrame], pd.DataFrame]) to validate the data */ - validation_function: unknown; - /** Expected schema for local callable validator's output */ - output_schema?: LocalCallableValidatorParamsOutputSchema; -} diff --git a/web/packages/sdk/generated/data-designer/schema/LocalCallableValidatorParamsOutputSchema.ts b/web/packages/sdk/generated/data-designer/schema/LocalCallableValidatorParamsOutputSchema.ts deleted file mode 100644 index 3e1cdf6c70..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/LocalCallableValidatorParamsOutputSchema.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * Expected schema for local callable validator's output - */ -export type LocalCallableValidatorParamsOutputSchema = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/data-designer/schema/LocalFileSeedSource.ts b/web/packages/sdk/generated/data-designer/schema/LocalFileSeedSource.ts deleted file mode 100644 index 9c33dfef28..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/LocalFileSeedSource.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export interface LocalFileSeedSource { - seed_type?: 'local'; - /** Path to a local seed dataset file or wildcard pattern. Relative paths are resolved from the current working directory when the config is loaded, not from the config file location. */ - path: string; -} diff --git a/web/packages/sdk/generated/data-designer/schema/ManualDistribution.ts b/web/packages/sdk/generated/data-designer/schema/ManualDistribution.ts deleted file mode 100644 index efd5f37252..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/ManualDistribution.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { DistributionType } from './DistributionType'; -import type { ManualDistributionParams } from './ManualDistributionParams'; - -/** - * Manual (discrete) distribution for sampling inference parameters. - -Samples from a discrete set of values with optional weights. Useful for testing -specific values or creating custom probability distributions for temperature or top_p. - -Attributes: - distribution_type: Type of distribution ("manual"). - params: Distribution parameters (values, weights). - */ -export interface ManualDistribution { - distribution_type?: DistributionType; - params: ManualDistributionParams; -} diff --git a/web/packages/sdk/generated/data-designer/schema/ManualDistributionParams.ts b/web/packages/sdk/generated/data-designer/schema/ManualDistributionParams.ts deleted file mode 100644 index e8bc0e1382..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/ManualDistributionParams.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * Parameters for manual distribution sampling. - -Attributes: - values: List of possible values to sample from. - weights: Optional list of weights for each value. If not provided, all values have equal probability. - */ -export interface ManualDistributionParams { - /** @minItems 1 */ - values: number[]; - weights?: number[]; -} diff --git a/web/packages/sdk/generated/data-designer/schema/Modality.ts b/web/packages/sdk/generated/data-designer/schema/Modality.ts deleted file mode 100644 index 43c88b3550..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/Modality.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * Supported modality types for multimodal model data. - */ -export type Modality = (typeof Modality)[keyof typeof Modality]; - -export const Modality = { - image: 'image', -} as const; diff --git a/web/packages/sdk/generated/data-designer/schema/ModalityDataType.ts b/web/packages/sdk/generated/data-designer/schema/ModalityDataType.ts deleted file mode 100644 index 7fb9f90979..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/ModalityDataType.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * Data type formats for multimodal data. - */ -export type ModalityDataType = (typeof ModalityDataType)[keyof typeof ModalityDataType]; - -export const ModalityDataType = { - url: 'url', - base64: 'base64', -} as const; diff --git a/web/packages/sdk/generated/data-designer/schema/ModelConfig.ts b/web/packages/sdk/generated/data-designer/schema/ModelConfig.ts deleted file mode 100644 index 15cb739886..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/ModelConfig.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { ChatCompletionInferenceParams } from './ChatCompletionInferenceParams'; -import type { EmbeddingInferenceParams } from './EmbeddingInferenceParams'; -import type { ImageInferenceParams } from './ImageInferenceParams'; - -/** - * Configuration for a model used for generation. - -Attributes: - alias: User-defined alias to reference in column configurations. - model: Model identifier (e.g., from build.nvidia.com or other providers). - inference_parameters: Inference parameters for the model (temperature, top_p, max_tokens, etc.). - The generation_type is determined by the type of inference_parameters. - provider: Name of the model provider. Required in a future release. Leaving - ``provider`` unset (or ``None``) currently routes through the registry's - implicit default and is **deprecated**; specify ``provider=`` explicitly. - See issue #589. - skip_health_check: Whether to skip the health check for this model. Defaults to False. - */ -export interface ModelConfig { - alias: string; - model: string; - inference_parameters?: - | ChatCompletionInferenceParams - | EmbeddingInferenceParams - | ImageInferenceParams; - provider?: string; - skip_health_check?: boolean; -} diff --git a/web/packages/sdk/generated/data-designer/schema/ModelProvider.ts b/web/packages/sdk/generated/data-designer/schema/ModelProvider.ts deleted file mode 100644 index 2e11ad10d3..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/ModelProvider.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { ModelProviderExtraBody } from './ModelProviderExtraBody'; -import type { ModelProviderExtraHeaders } from './ModelProviderExtraHeaders'; - -/** - * Configuration for a custom model provider. - -Attributes: - name: Name of the model provider. - endpoint: API endpoint URL for the provider. - provider_type: Provider type (default: "openai"). Determines the API format to use. - api_key: Optional API key for authentication. - extra_body: Additional parameters to pass in API requests. - extra_headers: Additional headers to pass in API requests. - */ -export interface ModelProvider { - name: string; - endpoint: string; - provider_type?: string; - api_key?: string; - extra_body?: ModelProviderExtraBody; - extra_headers?: ModelProviderExtraHeaders; -} diff --git a/web/packages/sdk/generated/data-designer/schema/ModelProviderExtraBody.ts b/web/packages/sdk/generated/data-designer/schema/ModelProviderExtraBody.ts deleted file mode 100644 index 5198fe5fbf..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/ModelProviderExtraBody.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export type ModelProviderExtraBody = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/data-designer/schema/ModelProviderExtraHeaders.ts b/web/packages/sdk/generated/data-designer/schema/ModelProviderExtraHeaders.ts deleted file mode 100644 index 3f8028d909..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/ModelProviderExtraHeaders.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export type ModelProviderExtraHeaders = { [key: string]: string }; diff --git a/web/packages/sdk/generated/data-designer/schema/PaginationData.ts b/web/packages/sdk/generated/data-designer/schema/PaginationData.ts deleted file mode 100644 index d91677f3d2..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/PaginationData.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export interface PaginationData { - /** The current page number. */ - page: number; - /** The page size used for the query. */ - page_size: number; - /** The size for the current page. */ - current_page_size: number; - /** The total number of pages. */ - total_pages: number; - /** The total number of results. */ - total_results: number; -} diff --git a/web/packages/sdk/generated/data-designer/schema/PartitionBlock.ts b/web/packages/sdk/generated/data-designer/schema/PartitionBlock.ts deleted file mode 100644 index 7b2d0ef86b..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/PartitionBlock.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export interface PartitionBlock { - /** - * The index of the partition to sample from - * @minimum 0 - */ - index?: number; - /** - * The total number of partitions in the dataset - * @minimum 1 - */ - num_partitions?: number; -} diff --git a/web/packages/sdk/generated/data-designer/schema/PersonFromFakerSamplerParams.ts b/web/packages/sdk/generated/data-designer/schema/PersonFromFakerSamplerParams.ts deleted file mode 100644 index 4c9a3fe0c0..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/PersonFromFakerSamplerParams.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { PersonFromFakerSamplerParamsSex } from './PersonFromFakerSamplerParamsSex'; - -/** - * Parameters for sampling synthetic person data with demographic attributes from Faker. - -Uses the Faker library to generate random personal information. The data is basic and not demographically -accurate, but is useful for quick testing, prototyping, or when realistic demographic distributions are not -relevant for your use case. For demographically accurate person data, use the `PersonSamplerParams` sampler. - -Attributes: - locale: Locale string determining the language and geographic region for synthetic people. - Can be any locale supported by Faker. - sex: If specified, filters to only sample people of the specified sex. Options: "Male" or - "Female". If None, samples both sexes. - city: If specified, filters to only sample people from the specified city or cities. Can be - a single city name (string) or a list of city names. - age_range: Two-element list [min_age, max_age] specifying the age range to sample from - (inclusive). Defaults to a standard age range. Both values must be between the minimum and - maximum allowed ages. - sampler_type: Discriminator for the sampler type. Must be `SamplerType.PERSON_FROM_FAKER`. - */ -export interface PersonFromFakerSamplerParams { - /** Locale string, determines the language and geographic locale that a synthetic person will be sampled from. E.g, en_US, en_GB, fr_FR, ... */ - locale?: string; - /** If specified, then only synthetic people of the specified sex will be sampled. */ - sex?: PersonFromFakerSamplerParamsSex; - /** If specified, then only synthetic people from these cities will be sampled. */ - city?: string | string[]; - /** - * If specified, then only synthetic people within this age range will be sampled. - * @minItems 2 - * @maxItems 2 - */ - age_range?: number[]; - sampler_type?: 'person_from_faker'; -} diff --git a/web/packages/sdk/generated/data-designer/schema/PersonFromFakerSamplerParamsSex.ts b/web/packages/sdk/generated/data-designer/schema/PersonFromFakerSamplerParamsSex.ts deleted file mode 100644 index c75bc3d194..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/PersonFromFakerSamplerParamsSex.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * If specified, then only synthetic people of the specified sex will be sampled. - */ -export type PersonFromFakerSamplerParamsSex = - (typeof PersonFromFakerSamplerParamsSex)[keyof typeof PersonFromFakerSamplerParamsSex]; - -export const PersonFromFakerSamplerParamsSex = { - Male: 'Male', - Female: 'Female', -} as const; diff --git a/web/packages/sdk/generated/data-designer/schema/PersonSamplerParams.ts b/web/packages/sdk/generated/data-designer/schema/PersonSamplerParams.ts deleted file mode 100644 index eadb0ac18f..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/PersonSamplerParams.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { PersonSamplerParamsSelectFieldValues } from './PersonSamplerParamsSelectFieldValues'; -import type { PersonSamplerParamsSex } from './PersonSamplerParamsSex'; - -/** - * Parameters for sampling synthetic person data with demographic attributes. - -Generates realistic synthetic person data including names, addresses, phone numbers, and other -demographic information from managed datasets. The sampler supports filtering by locale, sex, age, -geographic location, and selected managed-dataset fields, and can optionally include synthetic -persona descriptions. For Faker-generated person data, use PersonFromFakerSamplerParams. - -Attributes: - locale: Locale string determining the language and geographic region for synthetic people. - Must be a locale supported by a managed Nemotron Personas dataset. The dataset must - be downloaded and available in the managed assets directory. - sex: If specified, filters to only sample people of the specified sex. Options: "Male" or - "Female". If None, samples both sexes. - city: If specified, filters to only sample people from the specified city or cities. Can be - a single city name (string) or a list of city names. - age_range: Two-element list [min_age, max_age] specifying the age range to sample from - (inclusive). Defaults to a standard age range. Both values must be between minimum and - maximum allowed ages. - with_synthetic_personas: If True, appends additional synthetic persona columns including - personality traits, interests, and background descriptions. Only supported for certain - locales with managed datasets. - select_field_values: Optional field-value filters for managed datasets. Supported field - names are checked against the managed person data fields. - */ -export interface PersonSamplerParams { - /** Locale that determines the language and geographic location that a synthetic person will be sampled from. Must be a locale supported by a managed Nemotron Personas dataset. Managed datasets exist for the following locales: en_US, en_IN, en_SG, fr_FR, hi_Deva_IN, hi_Latn_IN, ja_JP, ko_KR, pt_BR. */ - locale?: string; - /** If specified, then only synthetic people of the specified sex will be sampled. */ - sex?: PersonSamplerParamsSex; - /** If specified, then only synthetic people from these cities will be sampled. */ - city?: string | string[]; - /** - * If specified, then only synthetic people within this age range will be sampled. - * @minItems 2 - * @maxItems 2 - */ - age_range?: number[]; - /** Sample synthetic people with the specified field values. This is meant to be a flexible argument for selecting a subset of the population from the managed dataset. Note that this sampler does not support rare combinations of field values and will likely fail if your desired subset is not well-represented in the managed Nemotron Personas dataset. We generally recommend using the `sex`, `city`, and `age_range` arguments to filter the population when possible. */ - select_field_values?: PersonSamplerParamsSelectFieldValues; - /** If True, then append synthetic persona columns to each generated person. */ - with_synthetic_personas?: boolean; - sampler_type?: 'person'; -} diff --git a/web/packages/sdk/generated/data-designer/schema/PersonSamplerParamsSelectFieldValues.ts b/web/packages/sdk/generated/data-designer/schema/PersonSamplerParamsSelectFieldValues.ts deleted file mode 100644 index 18c6a77f13..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/PersonSamplerParamsSelectFieldValues.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * Sample synthetic people with the specified field values. This is meant to be a flexible argument for selecting a subset of the population from the managed dataset. Note that this sampler does not support rare combinations of field values and will likely fail if your desired subset is not well-represented in the managed Nemotron Personas dataset. We generally recommend using the `sex`, `city`, and `age_range` arguments to filter the population when possible. - */ -export type PersonSamplerParamsSelectFieldValues = { [key: string]: string[] }; diff --git a/web/packages/sdk/generated/data-designer/schema/PersonSamplerParamsSex.ts b/web/packages/sdk/generated/data-designer/schema/PersonSamplerParamsSex.ts deleted file mode 100644 index 307ed73fb4..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/PersonSamplerParamsSex.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * If specified, then only synthetic people of the specified sex will be sampled. - */ -export type PersonSamplerParamsSex = - (typeof PersonSamplerParamsSex)[keyof typeof PersonSamplerParamsSex]; - -export const PersonSamplerParamsSex = { - Male: 'Male', - Female: 'Female', -} as const; diff --git a/web/packages/sdk/generated/data-designer/schema/PlatformJobListResultResponse.ts b/web/packages/sdk/generated/data-designer/schema/PlatformJobListResultResponse.ts deleted file mode 100644 index 7c3ebba256..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/PlatformJobListResultResponse.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { PlatformJobResultResponse } from './PlatformJobResultResponse'; - -export interface PlatformJobListResultResponse { - data: PlatformJobResultResponse[]; -} diff --git a/web/packages/sdk/generated/data-designer/schema/PlatformJobLog.ts b/web/packages/sdk/generated/data-designer/schema/PlatformJobLog.ts deleted file mode 100644 index 83f0487d30..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/PlatformJobLog.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export interface PlatformJobLog { - timestamp: string; - job: string; - job_step: string; - job_task: string; - message: string; -} diff --git a/web/packages/sdk/generated/data-designer/schema/PlatformJobLogPage.ts b/web/packages/sdk/generated/data-designer/schema/PlatformJobLogPage.ts deleted file mode 100644 index f7d12ead6b..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/PlatformJobLogPage.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { PlatformJobLog } from './PlatformJobLog'; - -export interface PlatformJobLogPage { - data: PlatformJobLog[]; - total: number; - next_page: string; - prev_page: string; -} diff --git a/web/packages/sdk/generated/data-designer/schema/PlatformJobResultResponse.ts b/web/packages/sdk/generated/data-designer/schema/PlatformJobResultResponse.ts deleted file mode 100644 index d695385888..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/PlatformJobResultResponse.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { FileStorageType } from './FileStorageType'; - -export interface PlatformJobResultResponse { - name: string; - job: string; - workspace: string; - project?: string; - created_at?: string; - updated_at?: string; - artifact_url: string; - artifact_storage_type: FileStorageType; - download_url?: string; -} diff --git a/web/packages/sdk/generated/data-designer/schema/PlatformJobStatus.ts b/web/packages/sdk/generated/data-designer/schema/PlatformJobStatus.ts deleted file mode 100644 index 7f51b1e5e2..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/PlatformJobStatus.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * Enumeration of possible job statuses. - -This enum represents the various states a job can be in during its lifecycle, -from creation to a terminal state. - */ -export type PlatformJobStatus = (typeof PlatformJobStatus)[keyof typeof PlatformJobStatus]; - -export const PlatformJobStatus = { - created: 'created', - pending: 'pending', - active: 'active', - cancelled: 'cancelled', - cancelling: 'cancelling', - error: 'error', - completed: 'completed', - paused: 'paused', - pausing: 'pausing', - resuming: 'resuming', -} as const; diff --git a/web/packages/sdk/generated/data-designer/schema/PlatformJobStatusResponse.ts b/web/packages/sdk/generated/data-designer/schema/PlatformJobStatusResponse.ts deleted file mode 100644 index 63d9bafcf7..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/PlatformJobStatusResponse.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { PlatformJobStatus } from './PlatformJobStatus'; -import type { PlatformJobStatusResponseErrorDetails } from './PlatformJobStatusResponseErrorDetails'; -import type { PlatformJobStatusResponseStatusDetails } from './PlatformJobStatusResponseStatusDetails'; -import type { PlatformJobStepStatusResponse } from './PlatformJobStepStatusResponse'; - -export interface PlatformJobStatusResponse { - id: string; - name: string; - status: PlatformJobStatus; - status_details: PlatformJobStatusResponseStatusDetails; - error_details: PlatformJobStatusResponseErrorDetails; - steps: PlatformJobStepStatusResponse[]; - created_at: string; - updated_at: string; -} diff --git a/web/packages/sdk/generated/data-designer/schema/PlatformJobStatusResponseErrorDetails.ts b/web/packages/sdk/generated/data-designer/schema/PlatformJobStatusResponseErrorDetails.ts deleted file mode 100644 index 0ad6f35c6d..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/PlatformJobStatusResponseErrorDetails.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export type PlatformJobStatusResponseErrorDetails = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/data-designer/schema/PlatformJobStatusResponseStatusDetails.ts b/web/packages/sdk/generated/data-designer/schema/PlatformJobStatusResponseStatusDetails.ts deleted file mode 100644 index dd0308db78..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/PlatformJobStatusResponseStatusDetails.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export type PlatformJobStatusResponseStatusDetails = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/data-designer/schema/PlatformJobStepStatusResponse.ts b/web/packages/sdk/generated/data-designer/schema/PlatformJobStepStatusResponse.ts deleted file mode 100644 index f093856420..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/PlatformJobStepStatusResponse.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { PlatformJobStatus } from './PlatformJobStatus'; -import type { PlatformJobStepStatusResponseErrorDetails } from './PlatformJobStepStatusResponseErrorDetails'; -import type { PlatformJobStepStatusResponseStatusDetails } from './PlatformJobStepStatusResponseStatusDetails'; -import type { PlatformJobTaskStatusResponse } from './PlatformJobTaskStatusResponse'; - -export interface PlatformJobStepStatusResponse { - id: string; - name: string; - status: PlatformJobStatus; - status_details: PlatformJobStepStatusResponseStatusDetails; - error_details: PlatformJobStepStatusResponseErrorDetails; - tasks: PlatformJobTaskStatusResponse[]; - created_at: string; - updated_at: string; -} diff --git a/web/packages/sdk/generated/data-designer/schema/PlatformJobStepStatusResponseErrorDetails.ts b/web/packages/sdk/generated/data-designer/schema/PlatformJobStepStatusResponseErrorDetails.ts deleted file mode 100644 index 5fb9c29491..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/PlatformJobStepStatusResponseErrorDetails.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export type PlatformJobStepStatusResponseErrorDetails = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/data-designer/schema/PlatformJobStepStatusResponseStatusDetails.ts b/web/packages/sdk/generated/data-designer/schema/PlatformJobStepStatusResponseStatusDetails.ts deleted file mode 100644 index f3b6740081..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/PlatformJobStepStatusResponseStatusDetails.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export type PlatformJobStepStatusResponseStatusDetails = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/data-designer/schema/PlatformJobTaskStatusResponse.ts b/web/packages/sdk/generated/data-designer/schema/PlatformJobTaskStatusResponse.ts deleted file mode 100644 index d4ca34f907..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/PlatformJobTaskStatusResponse.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { PlatformJobStatus } from './PlatformJobStatus'; -import type { PlatformJobTaskStatusResponseErrorDetails } from './PlatformJobTaskStatusResponseErrorDetails'; -import type { PlatformJobTaskStatusResponseStatusDetails } from './PlatformJobTaskStatusResponseStatusDetails'; - -export interface PlatformJobTaskStatusResponse { - id: string; - name: string; - status: PlatformJobStatus; - status_details: PlatformJobTaskStatusResponseStatusDetails; - error_details: PlatformJobTaskStatusResponseErrorDetails; - error_stack: string; - created_at: string; - updated_at: string; -} diff --git a/web/packages/sdk/generated/data-designer/schema/PlatformJobTaskStatusResponseErrorDetails.ts b/web/packages/sdk/generated/data-designer/schema/PlatformJobTaskStatusResponseErrorDetails.ts deleted file mode 100644 index 684c2a249d..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/PlatformJobTaskStatusResponseErrorDetails.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export type PlatformJobTaskStatusResponseErrorDetails = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/data-designer/schema/PlatformJobTaskStatusResponseStatusDetails.ts b/web/packages/sdk/generated/data-designer/schema/PlatformJobTaskStatusResponseStatusDetails.ts deleted file mode 100644 index adffec3367..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/PlatformJobTaskStatusResponseStatusDetails.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export type PlatformJobTaskStatusResponseStatusDetails = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/data-designer/schema/PoissonSamplerParams.ts b/web/packages/sdk/generated/data-designer/schema/PoissonSamplerParams.ts deleted file mode 100644 index 4624abc952..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/PoissonSamplerParams.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * Parameters for sampling from a Poisson distribution. - -Samples non-negative integer values representing the number of events occurring in a fixed -interval of time or space. The Poisson distribution is commonly used to model count data -like the number of arrivals, occurrences, or events per time period. - -The distribution is characterized by a single parameter (mean/rate), and both the mean and -variance equal this parameter value. - -Attributes: - mean (required): Mean number of events in the fixed interval (also called rate parameter Ī»). - Must be positive. This represents both the expected value and the variance of the - distribution. - */ -export interface PoissonSamplerParams { - /** Mean number of events in a fixed interval. */ - mean: number; - sampler_type?: 'poisson'; -} diff --git a/web/packages/sdk/generated/data-designer/schema/PreviewSpec.ts b/web/packages/sdk/generated/data-designer/schema/PreviewSpec.ts deleted file mode 100644 index 2e494609e9..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/PreviewSpec.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { DataDesignerConfig } from './DataDesignerConfig'; - -export interface PreviewSpec { - config: DataDesignerConfig; - num_records?: number; -} diff --git a/web/packages/sdk/generated/data-designer/schema/RemoteValidatorParams.ts b/web/packages/sdk/generated/data-designer/schema/RemoteValidatorParams.ts deleted file mode 100644 index a3893cf229..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/RemoteValidatorParams.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { RemoteValidatorParamsOutputSchema } from './RemoteValidatorParamsOutputSchema'; - -/** - * Configuration for remote validation. Sends data to a remote endpoint for validation. - -Attributes: - endpoint_url (required): The URL of the remote endpoint. - output_schema: The JSON schema for the remote validator's output. If not provided, - the output will not be validated. - timeout: The timeout for the HTTP request in seconds. Defaults to 30.0. - max_retries: The maximum number of retry attempts. Defaults to 3. - retry_backoff: The backoff factor for the retry delay in seconds. Defaults to 2.0. - max_parallel_requests: The maximum number of parallel requests to make. Defaults to 4. - */ -export interface RemoteValidatorParams { - /** Validator type discriminator, always 'remote' for this validator */ - validator_type?: 'remote'; - /** URL of the remote endpoint */ - endpoint_url: string; - /** Expected schema for remote validator's output */ - output_schema?: RemoteValidatorParamsOutputSchema; - /** - * The timeout for the HTTP request - * @exclusiveMinimum 0 - */ - timeout?: number; - /** - * The maximum number of retry attempts - * @minimum 0 - */ - max_retries?: number; - /** - * The backoff factor for the retry delay - * @exclusiveMinimum 1 - */ - retry_backoff?: number; - /** - * The maximum number of parallel requests to make - * @minimum 1 - */ - max_parallel_requests?: number; -} diff --git a/web/packages/sdk/generated/data-designer/schema/RemoteValidatorParamsOutputSchema.ts b/web/packages/sdk/generated/data-designer/schema/RemoteValidatorParamsOutputSchema.ts deleted file mode 100644 index 213032eebd..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/RemoteValidatorParamsOutputSchema.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * Expected schema for remote validator's output - */ -export type RemoteValidatorParamsOutputSchema = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/data-designer/schema/SamplerColumnConfig.ts b/web/packages/sdk/generated/data-designer/schema/SamplerColumnConfig.ts deleted file mode 100644 index d814ae052f..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/SamplerColumnConfig.ts +++ /dev/null @@ -1,91 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { BernoulliMixtureSamplerParams } from './BernoulliMixtureSamplerParams'; -import type { BernoulliSamplerParams } from './BernoulliSamplerParams'; -import type { BinomialSamplerParams } from './BinomialSamplerParams'; -import type { CategorySamplerParams } from './CategorySamplerParams'; -import type { DatetimeSamplerParams } from './DatetimeSamplerParams'; -import type { GaussianSamplerParams } from './GaussianSamplerParams'; -import type { PersonFromFakerSamplerParams } from './PersonFromFakerSamplerParams'; -import type { PersonSamplerParams } from './PersonSamplerParams'; -import type { PoissonSamplerParams } from './PoissonSamplerParams'; -import type { SamplerColumnConfigConditionalParams } from './SamplerColumnConfigConditionalParams'; -import type { SamplerType } from './SamplerType'; -import type { ScipySamplerParams } from './ScipySamplerParams'; -import type { SkipConfig } from './SkipConfig'; -import type { SubcategorySamplerParams } from './SubcategorySamplerParams'; -import type { TimeDeltaSamplerParams } from './TimeDeltaSamplerParams'; -import type { UniformSamplerParams } from './UniformSamplerParams'; -import type { UUIDSamplerParams } from './UUIDSamplerParams'; - -/** - * Configuration for columns generated using built-in samplers. - -Sampler columns provide efficient data generation for common data types and -distributions. Supported samplers include UUID generation, -datetime/timedelta sampling, person generation, category / subcategory sampling, -and various statistical distributions (uniform, gaussian, binomial, poisson, scipy). - -Attributes: - sampler_type (required): Type of sampler to use. Available types include: - "uuid", "category", "subcategory", "uniform", "gaussian", "bernoulli", - "bernoulli_mixture", "binomial", "poisson", "scipy", "person", - "person_from_faker", "datetime", "timedelta". - params (required): Parameters specific to the chosen sampler type. Type varies based on the `sampler_type` - (e.g., `CategorySamplerParams`, `UniformSamplerParams`, `PersonSamplerParams`). - conditional_params: Optional dictionary for conditional parameters. The dict keys - are the conditions that must be met (e.g., "age > 21") for the conditional parameters - to be used. The values of dict are the parameters to use when the condition is met. - convert_to: Optional type conversion to apply after sampling. For numerical samplers, - must be one of "float", "int", or "str". For datetime and timedelta samplers, accepts - a strftime format string (e.g., ``"%Y-%m-%d"``, ``"%m/%d/%Y %H:%M"``). When omitted, - datetime/timedelta columns default to ISO-8601 format (e.g., ``2024-01-15T09:30:00``). - -Inherited Attributes: - name (required): Unique name of the column to be generated. - drop: If True, generate this column but remove it from the final dataset. - -!!! tip "Displaying available samplers and their parameters" - The config builder has an `info` attribute that can be used to display the - available samplers and their parameters: - ```python - config_builder.info.display("samplers") - ``` - */ -export interface SamplerColumnConfig { - name: string; - drop?: boolean; - allow_resize?: boolean; - column_type?: 'sampler'; - skip?: SkipConfig; - /** If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns. */ - propagate_skip?: boolean; - /** Type of sampler to use (e.g., uuid, category, uniform, gaussian, person, datetime) */ - sampler_type: SamplerType; - /** Parameters specific to the chosen sampler type */ - params: - | SubcategorySamplerParams - | CategorySamplerParams - | DatetimeSamplerParams - | PersonSamplerParams - | PersonFromFakerSamplerParams - | TimeDeltaSamplerParams - | UUIDSamplerParams - | BernoulliSamplerParams - | BernoulliMixtureSamplerParams - | BinomialSamplerParams - | GaussianSamplerParams - | PoissonSamplerParams - | UniformSamplerParams - | ScipySamplerParams; - /** Optional dictionary for conditional parameters; keys are conditions, values are params to use when met */ - conditional_params?: SamplerColumnConfigConditionalParams; - /** Optional type conversion after sampling: 'float', 'int', or 'str' for numerical samplers; a strftime format string (e.g., '%Y-%m-%d') for datetime/timedelta samplers. Datetime/timedelta columns default to ISO-8601 (e.g., 2024-01-15T09:30:00) when omitted. */ - convert_to?: string; -} diff --git a/web/packages/sdk/generated/data-designer/schema/SamplerColumnConfigConditionalParams.ts b/web/packages/sdk/generated/data-designer/schema/SamplerColumnConfigConditionalParams.ts deleted file mode 100644 index 744200ea9e..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/SamplerColumnConfigConditionalParams.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { BernoulliMixtureSamplerParams } from './BernoulliMixtureSamplerParams'; -import type { BernoulliSamplerParams } from './BernoulliSamplerParams'; -import type { BinomialSamplerParams } from './BinomialSamplerParams'; -import type { CategorySamplerParams } from './CategorySamplerParams'; -import type { DatetimeSamplerParams } from './DatetimeSamplerParams'; -import type { GaussianSamplerParams } from './GaussianSamplerParams'; -import type { PersonFromFakerSamplerParams } from './PersonFromFakerSamplerParams'; -import type { PersonSamplerParams } from './PersonSamplerParams'; -import type { PoissonSamplerParams } from './PoissonSamplerParams'; -import type { ScipySamplerParams } from './ScipySamplerParams'; -import type { SubcategorySamplerParams } from './SubcategorySamplerParams'; -import type { TimeDeltaSamplerParams } from './TimeDeltaSamplerParams'; -import type { UniformSamplerParams } from './UniformSamplerParams'; -import type { UUIDSamplerParams } from './UUIDSamplerParams'; - -/** - * Optional dictionary for conditional parameters; keys are conditions, values are params to use when met - */ -export type SamplerColumnConfigConditionalParams = { - [key: string]: - | SubcategorySamplerParams - | CategorySamplerParams - | DatetimeSamplerParams - | PersonSamplerParams - | PersonFromFakerSamplerParams - | TimeDeltaSamplerParams - | UUIDSamplerParams - | BernoulliSamplerParams - | BernoulliMixtureSamplerParams - | BinomialSamplerParams - | GaussianSamplerParams - | PoissonSamplerParams - | UniformSamplerParams - | ScipySamplerParams; -}; diff --git a/web/packages/sdk/generated/data-designer/schema/SamplerType.ts b/web/packages/sdk/generated/data-designer/schema/SamplerType.ts deleted file mode 100644 index ff35880a27..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/SamplerType.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export type SamplerType = (typeof SamplerType)[keyof typeof SamplerType]; - -export const SamplerType = { - bernoulli: 'bernoulli', - bernoulli_mixture: 'bernoulli_mixture', - binomial: 'binomial', - category: 'category', - datetime: 'datetime', - gaussian: 'gaussian', - person: 'person', - person_from_faker: 'person_from_faker', - poisson: 'poisson', - scipy: 'scipy', - subcategory: 'subcategory', - timedelta: 'timedelta', - uniform: 'uniform', - uuid: 'uuid', -} as const; diff --git a/web/packages/sdk/generated/data-designer/schema/SamplingStrategy.ts b/web/packages/sdk/generated/data-designer/schema/SamplingStrategy.ts deleted file mode 100644 index 81a66030c9..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/SamplingStrategy.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export type SamplingStrategy = (typeof SamplingStrategy)[keyof typeof SamplingStrategy]; - -export const SamplingStrategy = { - ordered: 'ordered', - shuffle: 'shuffle', -} as const; diff --git a/web/packages/sdk/generated/data-designer/schema/ScalarInequalityConstraint.ts b/web/packages/sdk/generated/data-designer/schema/ScalarInequalityConstraint.ts deleted file mode 100644 index e624860c77..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/ScalarInequalityConstraint.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { InequalityOperator } from './InequalityOperator'; - -/** - * Constrain a sampler column to be less/greater than a scalar value. - -Only applies to sampler columns. - -Attributes: - rhs (required): Scalar value to compare against. - operator (required): Comparison operator (lt, le, gt, ge). - -Inherited Attributes: - target_column (required): Name of the sampler column this constraint applies to. - */ -export interface ScalarInequalityConstraint { - /** Name of the sampler column this constraint applies to */ - target_column: string; - /** Constraint type discriminator, always 'scalar_inequality' for this constraint */ - constraint_type?: 'scalar_inequality'; - /** Scalar value to compare against */ - rhs: number; - /** Comparison operator */ - operator: InequalityOperator; -} diff --git a/web/packages/sdk/generated/data-designer/schema/SchemaTransformProcessorConfig.ts b/web/packages/sdk/generated/data-designer/schema/SchemaTransformProcessorConfig.ts deleted file mode 100644 index 7a071040e1..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/SchemaTransformProcessorConfig.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { SchemaTransformProcessorConfigTemplate } from './SchemaTransformProcessorConfigTemplate'; - -/** - * Configuration for transforming the dataset schema using Jinja2 templates. - -This processor creates a new dataset with a transformed schema. Each key in the -template becomes a column in the output, and values are Jinja2 templates that -can reference any column in the batch. The transformed dataset is written to -a `processors-files/{processor_name}/` directory alongside the main dataset. - -Attributes: - template (required): Dictionary defining the output schema. Keys are new column names, - values are Jinja2 templates (strings, lists, or nested structures). - Must be JSON-serializable. - -Inherited Attributes: - name (required): Name of the processor. - */ -export interface SchemaTransformProcessorConfig { - /** The name of the processor, used to identify the processor in the results and to write the artifacts to disk. */ - name: string; - processor_type?: 'schema_transform'; - /** - Dictionary specifying columns and templates to use in the new dataset with transformed schema. - - Each key is a new column name, and each value is an object containing Jinja2 templates - for instance, a string or a list of strings. - Values must be JSON-serializable. - - Example: - - ```python - template = { - "list_of_strings": ["{{ col1 }}", "{{ col2 }}"], - "uppercase_string": "{{ col1 | upper }}", - "lowercase_string": "{{ col2 | lower }}", - } - ``` - - The above templates will create an new dataset with three columns: "list_of_strings", "uppercase_string", and "lowercase_string". - References to columns "col1" and "col2" in the templates will be replaced with the actual values of the columns in the dataset. - */ - template: SchemaTransformProcessorConfigTemplate; -} diff --git a/web/packages/sdk/generated/data-designer/schema/SchemaTransformProcessorConfigTemplate.ts b/web/packages/sdk/generated/data-designer/schema/SchemaTransformProcessorConfigTemplate.ts deleted file mode 100644 index 01d3d00353..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/SchemaTransformProcessorConfigTemplate.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * - Dictionary specifying columns and templates to use in the new dataset with transformed schema. - - Each key is a new column name, and each value is an object containing Jinja2 templates - for instance, a string or a list of strings. - Values must be JSON-serializable. - - Example: - - ```python - template = { - "list_of_strings": ["{{ col1 }}", "{{ col2 }}"], - "uppercase_string": "{{ col1 | upper }}", - "lowercase_string": "{{ col2 | lower }}", - } - ``` - - The above templates will create an new dataset with three columns: "list_of_strings", "uppercase_string", and "lowercase_string". - References to columns "col1" and "col2" in the templates will be replaced with the actual values of the columns in the dataset. - - */ -export type SchemaTransformProcessorConfigTemplate = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/data-designer/schema/ScipySamplerParams.ts b/web/packages/sdk/generated/data-designer/schema/ScipySamplerParams.ts deleted file mode 100644 index 605a2f386c..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/ScipySamplerParams.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { ScipySamplerParamsDistParams } from './ScipySamplerParamsDistParams'; - -/** - * Parameters for sampling from any scipy.stats continuous or discrete distribution. - -Provides a flexible interface to sample from the wide range of probability distributions -available in scipy.stats. This enables advanced statistical sampling beyond the built-in -distribution types (Gaussian, Uniform, etc.). - -See: [scipy.stats documentation](https://docs.scipy.org/doc/scipy/reference/stats.html) - -Attributes: - dist_name (required): Name of the scipy.stats distribution to sample from (e.g., "beta", "gamma", - "lognorm", "expon"). Must be a valid distribution name from scipy.stats. - dist_params (required): Dictionary of parameters for the specified distribution. Parameter names - and values must match the scipy.stats distribution specification (e.g., {"a": 2, "b": 5} - for beta distribution, {"scale": 1.5} for exponential). - decimal_places: Optional number of decimal places to round sampled values to. If None, - values are not rounded. - */ -export interface ScipySamplerParams { - /** Name of a scipy.stats distribution. */ - dist_name: string; - /** Parameters of the scipy.stats distribution given in `dist_name`. */ - dist_params: ScipySamplerParamsDistParams; - /** Number of decimal places to round the sampled values to. */ - decimal_places?: number; - sampler_type?: 'scipy'; -} diff --git a/web/packages/sdk/generated/data-designer/schema/ScipySamplerParamsDistParams.ts b/web/packages/sdk/generated/data-designer/schema/ScipySamplerParamsDistParams.ts deleted file mode 100644 index f9f0c95865..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/ScipySamplerParamsDistParams.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * Parameters of the scipy.stats distribution given in `dist_name`. - */ -export type ScipySamplerParamsDistParams = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/data-designer/schema/Score.ts b/web/packages/sdk/generated/data-designer/schema/Score.ts deleted file mode 100644 index e626272d00..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/Score.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { ScoreOptions } from './ScoreOptions'; - -/** - * Configuration for a "score" in an LLM judge evaluation. - -Defines a single scoring criterion with its possible values and descriptions. Multiple -Score objects can be combined in an LLMJudgeColumnConfig to create multi-dimensional -quality assessments. - -Attributes: - name (required): A clear, concise name for this scoring dimension (e.g., "Relevance", "Fluency"). - description (required): An informative and detailed assessment guide explaining how to evaluate - this dimension. Should provide clear criteria for scoring. - options (required): Dictionary mapping score values to their descriptions. Keys can be integers - (e.g., 1-5 scale) or strings (e.g., "Poor", "Good", "Excellent"). Values are - descriptions explaining what each score level means. - */ -export interface Score { - /** A clear name for this score. */ - name: string; - /** An informative and detailed assessment guide for using this score. */ - description: string; - /** Score options in the format of {score: description}. */ - options: ScoreOptions; -} diff --git a/web/packages/sdk/generated/data-designer/schema/ScoreOptions.ts b/web/packages/sdk/generated/data-designer/schema/ScoreOptions.ts deleted file mode 100644 index 75c437657b..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/ScoreOptions.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * Score options in the format of {score: description}. - */ -export type ScoreOptions = { [key: string]: string }; diff --git a/web/packages/sdk/generated/data-designer/schema/SeedConfig.ts b/web/packages/sdk/generated/data-designer/schema/SeedConfig.ts deleted file mode 100644 index 3a3ea60025..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/SeedConfig.ts +++ /dev/null @@ -1,87 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { AgentRolloutSeedSource } from './AgentRolloutSeedSource'; -import type { DataFrameSeedSource } from './DataFrameSeedSource'; -import type { DirectorySeedSource } from './DirectorySeedSource'; -import type { FileContentsSeedSource } from './FileContentsSeedSource'; -import type { FilesetFileSeedSource } from './FilesetFileSeedSource'; -import type { HuggingFaceSeedSource } from './HuggingFaceSeedSource'; -import type { IndexRange } from './IndexRange'; -import type { LocalFileSeedSource } from './LocalFileSeedSource'; -import type { PartitionBlock } from './PartitionBlock'; -import type { SamplingStrategy } from './SamplingStrategy'; - -/** - * Configuration for sampling data from a seed dataset. - -Attributes: - source: A SeedSource defining where the seed data exists - sampling_strategy: Strategy for how to sample rows from the dataset. - - ORDERED: Read rows sequentially in their original order. - - SHUFFLE: Randomly shuffle rows before sampling. When used with - selection_strategy, shuffling occurs within the selected range/partition. - selection_strategy: Optional strategy to select a subset of the dataset. - - IndexRange: Select a specific range of indices (e.g., rows 100-200). - - PartitionBlock: Select a partition by splitting the dataset into N equal parts. - Partition indices are zero-based (index=0 is the first partition, index=1 is - the second, etc.). - -Examples: - Read rows sequentially from start to end: - SeedConfig( - source=LocalFileSeedSource(path="my_data.parquet"), - sampling_strategy=SamplingStrategy.ORDERED - ) - - Read rows in random order: - SeedConfig( - source=LocalFileSeedSource(path="my_data.parquet"), - sampling_strategy=SamplingStrategy.SHUFFLE - ) - - Read specific index range (rows 100-199): - SeedConfig( - source=LocalFileSeedSource(path="my_data.parquet"), - sampling_strategy=SamplingStrategy.ORDERED, - selection_strategy=IndexRange(start=100, end=199) - ) - - Read random rows from a specific index range (shuffles within rows 100-199): - SeedConfig( - source=LocalFileSeedSource(path="my_data.parquet"), - sampling_strategy=SamplingStrategy.SHUFFLE, - selection_strategy=IndexRange(start=100, end=199) - ) - - Read from partition 2 (3rd partition, zero-based) of 5 partitions (20% of dataset): - SeedConfig( - source=LocalFileSeedSource(path="my_data.parquet"), - sampling_strategy=SamplingStrategy.ORDERED, - selection_strategy=PartitionBlock(index=2, num_partitions=5) - ) - - Read shuffled rows from partition 0 of 10 partitions (shuffles within the partition): - SeedConfig( - source=LocalFileSeedSource(path="my_data.parquet"), - sampling_strategy=SamplingStrategy.SHUFFLE, - selection_strategy=PartitionBlock(index=0, num_partitions=10) - ) - */ -export interface SeedConfig { - source: - | LocalFileSeedSource - | HuggingFaceSeedSource - | DataFrameSeedSource - | DirectorySeedSource - | FileContentsSeedSource - | AgentRolloutSeedSource - | FilesetFileSeedSource; - sampling_strategy?: SamplingStrategy; - selection_strategy?: IndexRange | PartitionBlock; -} diff --git a/web/packages/sdk/generated/data-designer/schema/SeedDatasetColumnConfig.ts b/web/packages/sdk/generated/data-designer/schema/SeedDatasetColumnConfig.ts deleted file mode 100644 index 351b829f7b..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/SeedDatasetColumnConfig.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { SkipConfig } from './SkipConfig'; - -/** - * Configuration for columns sourced from seed datasets. - -This config marks columns that come from seed data. It is typically created -automatically when calling `with_seed_dataset()` on the builder, rather than -being instantiated directly by users. - -Inherited Attributes: - name (required): Unique name of the column to be generated. - drop: If True, generate this column but remove it from the final dataset. - */ -export interface SeedDatasetColumnConfig { - name: string; - drop?: boolean; - allow_resize?: boolean; - column_type?: 'seed-dataset'; - skip?: SkipConfig; - /** If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns. */ - propagate_skip?: boolean; -} diff --git a/web/packages/sdk/generated/data-designer/schema/SkipConfig.ts b/web/packages/sdk/generated/data-designer/schema/SkipConfig.ts deleted file mode 100644 index 978a38c993..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/SkipConfig.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * Expression gate for conditional column generation. - -Attach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate -generation on a Jinja2 expression. Controls *when* to skip; propagation -of upstream skips is controlled separately by ``propagate_skip`` on -``SingleColumnConfig``. - -Attributes: - when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy, - skip generation for this row. - value: Value to write for skipped cells. Defaults to ``None`` - (becomes ``NaN``/``pd.NA`` in the DataFrame). - */ -export interface SkipConfig { - /** Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row. */ - when: string; - /** Value to write for skipped cells. Defaults to None (becomes NaN/pd.NA in DataFrame). */ - value?: boolean | number | string; -} diff --git a/web/packages/sdk/generated/data-designer/schema/SubcategorySamplerParams.ts b/web/packages/sdk/generated/data-designer/schema/SubcategorySamplerParams.ts deleted file mode 100644 index 1ebd7f4da5..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/SubcategorySamplerParams.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { SubcategorySamplerParamsValues } from './SubcategorySamplerParamsValues'; - -/** - * Parameters for subcategory sampling conditioned on a parent category column. - -Samples subcategory values based on the value of a parent category column. Each parent -category value maps to its own list of possible subcategory values, enabling hierarchical -or conditional sampling patterns. - -Attributes: - category (required): Name of the parent category column that this subcategory depends on. - The parent column must be generated before this subcategory column. - values (required): Mapping from each parent category value to a list of possible subcategory values. - Each key must correspond to a value that appears in the parent category column. - */ -export interface SubcategorySamplerParams { - /** Name of parent category to this subcategory. */ - category: string; - /** Mapping from each value of parent category to a list of subcategory values. */ - values: SubcategorySamplerParamsValues; - sampler_type?: 'subcategory'; -} diff --git a/web/packages/sdk/generated/data-designer/schema/SubcategorySamplerParamsValues.ts b/web/packages/sdk/generated/data-designer/schema/SubcategorySamplerParamsValues.ts deleted file mode 100644 index 6b8f56fad2..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/SubcategorySamplerParamsValues.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * Mapping from each value of parent category to a list of subcategory values. - */ -export type SubcategorySamplerParamsValues = { [key: string]: (string | number)[] }; diff --git a/web/packages/sdk/generated/data-designer/schema/TimeDeltaSamplerParams.ts b/web/packages/sdk/generated/data-designer/schema/TimeDeltaSamplerParams.ts deleted file mode 100644 index b578765768..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/TimeDeltaSamplerParams.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { TimeDeltaSamplerParamsUnit } from './TimeDeltaSamplerParamsUnit'; - -/** - * Parameters for sampling time deltas relative to a reference datetime column. - -Samples time offsets within a specified range and adds them to values from a reference -datetime column. This is useful for generating related datetime columns like order dates -and delivery dates, or event start times and end times. - -Note: - Years and months are not supported as timedelta units because they have variable lengths. - See: [pandas timedelta documentation](https://pandas.pydata.org/docs/user_guide/timedeltas.html) - -Attributes: - dt_min (required): Minimum time-delta value (inclusive). Must be non-negative and less than `dt_max`. - Specified in units defined by the `unit` parameter. - dt_max (required): Maximum time-delta value (exclusive). Must be positive and greater than `dt_min`. - Specified in units defined by the `unit` parameter. - reference_column_name (required): Name of an existing datetime column to add the time-delta to. - This column must be generated before the timedelta column. - unit: Time unit for the delta values. Options: - - "D": Days (default) - - "h": Hours - - "m": Minutes - - "s": Seconds - */ -export interface TimeDeltaSamplerParams { - /** - * Minimum possible time-delta for sampling range, inclusive. Must be less than `dt_max`. - * @minimum 0 - */ - dt_min: number; - /** - * Maximum possible time-delta for sampling range, exclusive. Must be greater than `dt_min`. - * @exclusiveMinimum 0 - */ - dt_max: number; - /** Name of an existing datetime column to condition time-delta sampling on. */ - reference_column_name: string; - /** Sampling units, e.g. the smallest possible time interval between samples. */ - unit?: TimeDeltaSamplerParamsUnit; - sampler_type?: 'timedelta'; -} diff --git a/web/packages/sdk/generated/data-designer/schema/TimeDeltaSamplerParamsUnit.ts b/web/packages/sdk/generated/data-designer/schema/TimeDeltaSamplerParamsUnit.ts deleted file mode 100644 index 59c2bf1e75..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/TimeDeltaSamplerParamsUnit.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * Sampling units, e.g. the smallest possible time interval between samples. - */ -export type TimeDeltaSamplerParamsUnit = - (typeof TimeDeltaSamplerParamsUnit)[keyof typeof TimeDeltaSamplerParamsUnit]; - -export const TimeDeltaSamplerParamsUnit = { - D: 'D', - h: 'h', - m: 'm', - s: 's', -} as const; diff --git a/web/packages/sdk/generated/data-designer/schema/ToolConfig.ts b/web/packages/sdk/generated/data-designer/schema/ToolConfig.ts deleted file mode 100644 index 9708576cd5..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/ToolConfig.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * Configuration for permitting MCP tools on an LLM column. - -ToolConfig defines which tools are available for use during LLM generation. -It references one or more MCP providers by name and can optionally restrict -which tools from those providers are permitted. - -Attributes: - tool_alias (str): User-defined alias to reference this tool configuration in column configs. - providers (list[str]): Names of the MCP providers to use for tool calls. Tools can be - drawn from multiple providers. - allow_tools (list[str] | None): Optional allowlist of tool names that restricts which - tools are permitted. If None, all tools from the specified providers are allowed. - Defaults to None. - max_tool_call_turns (int): Maximum number of tool-calling turns permitted in a single - generation. A turn is one iteration where the LLM requests tool calls. With parallel - tool calling, a single turn may execute multiple tools simultaneously. Defaults to 5. - timeout_sec (float | None): Timeout in seconds for MCP tool calls. Defaults to None (no timeout). - -Examples: - >>> ToolConfig( - ... tool_alias="search-tools", - ... providers=["doc-search-mcp", "web-search-mcp"], - ... allow_tools=["search_docs", "list_docs"], - ... max_tool_call_turns=10, - ... timeout_sec=30.0, - ... ) - */ -export interface ToolConfig { - tool_alias: string; - providers: string[]; - allow_tools?: string[]; - /** @minimum 1 */ - max_tool_call_turns?: number; - /** @exclusiveMinimum 0 */ - timeout_sec?: number; -} diff --git a/web/packages/sdk/generated/data-designer/schema/TraceType.ts b/web/packages/sdk/generated/data-designer/schema/TraceType.ts deleted file mode 100644 index 50b51d5a74..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/TraceType.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * Specifies the type of reasoning trace to capture for LLM columns. - -Traces capture the conversation history during LLM generation, which is -useful for debugging, analysis, and understanding model behavior. - -Attributes: - NONE: No trace is captured. This is the default. - LAST_MESSAGE: Only the final assistant message is captured. - ALL_MESSAGES: The full conversation history (system/user/assistant/tool) - is captured. - */ -export type TraceType = (typeof TraceType)[keyof typeof TraceType]; - -export const TraceType = { - none: 'none', - last_message: 'last_message', - all_messages: 'all_messages', -} as const; diff --git a/web/packages/sdk/generated/data-designer/schema/UUIDSamplerParams.ts b/web/packages/sdk/generated/data-designer/schema/UUIDSamplerParams.ts deleted file mode 100644 index 1871422c8a..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/UUIDSamplerParams.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * Parameters for generating UUID (Universally Unique Identifier) values. - -Generates UUID4 (random) identifiers with optional formatting options. UUIDs are useful -for creating unique identifiers for records, entities, or transactions. - -Attributes: - prefix: Optional string to prepend to each UUID. Useful for creating namespaced or - typed identifiers (e.g., "user-", "order-", "txn-"). - short_form: If True, truncates UUIDs to 8 characters (first segment only). Default is False - for full 32-character UUIDs (excluding hyphens). - uppercase: If True, converts all hexadecimal letters to uppercase. Default is False for - lowercase UUIDs. - */ -export interface UUIDSamplerParams { - /** String prepended to the front of the UUID. */ - prefix?: string; - /** If true, all UUIDs sampled will be truncated at 8 characters. */ - short_form?: boolean; - /** If true, all letters in the UUID will be capitalized. */ - uppercase?: boolean; - sampler_type?: 'uuid'; -} diff --git a/web/packages/sdk/generated/data-designer/schema/UniformDistribution.ts b/web/packages/sdk/generated/data-designer/schema/UniformDistribution.ts deleted file mode 100644 index 166d7257af..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/UniformDistribution.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { DistributionType } from './DistributionType'; -import type { UniformDistributionParams } from './UniformDistributionParams'; - -/** - * Uniform distribution for sampling inference parameters. - -Samples values uniformly between low and high bounds. Useful for exploring -a continuous range of values for temperature or top_p. - -Attributes: - distribution_type: Type of distribution ("uniform"). - params: Distribution parameters (low, high). - */ -export interface UniformDistribution { - distribution_type?: DistributionType; - params: UniformDistributionParams; -} diff --git a/web/packages/sdk/generated/data-designer/schema/UniformDistributionParams.ts b/web/packages/sdk/generated/data-designer/schema/UniformDistributionParams.ts deleted file mode 100644 index 07bb02eeba..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/UniformDistributionParams.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * Parameters for uniform distribution sampling. - -Attributes: - low: Lower bound (inclusive). - high: Upper bound (exclusive). - */ -export interface UniformDistributionParams { - low: number; - high: number; -} diff --git a/web/packages/sdk/generated/data-designer/schema/UniformSamplerParams.ts b/web/packages/sdk/generated/data-designer/schema/UniformSamplerParams.ts deleted file mode 100644 index 11a03b3dd1..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/UniformSamplerParams.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -/** - * Parameters for sampling from a continuous Uniform distribution. - -Samples continuous values uniformly from a specified range, where every value in the range -has equal probability of being sampled. This is useful when all values within a range are -equally likely, such as random percentages, proportions, or unbiased measurements. - -Attributes: - low (required): Lower bound of the uniform distribution (inclusive). Can be any real number. - high (required): Upper bound of the uniform distribution. Must be greater than `low`. - decimal_places: Optional number of decimal places to round sampled values to. If None, - values are not rounded and may have many decimal places. - */ -export interface UniformSamplerParams { - /** Lower bound of the uniform distribution, inclusive. */ - low: number; - /** Upper bound of the uniform distribution. */ - high: number; - /** Number of decimal places to round the sampled values to. */ - decimal_places?: number; - sampler_type?: 'uniform'; -} diff --git a/web/packages/sdk/generated/data-designer/schema/ValidationColumnConfig.ts b/web/packages/sdk/generated/data-designer/schema/ValidationColumnConfig.ts deleted file mode 100644 index 5482f31081..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/ValidationColumnConfig.ts +++ /dev/null @@ -1,67 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { CodeValidatorParams } from './CodeValidatorParams'; -import type { LocalCallableValidatorParams } from './LocalCallableValidatorParams'; -import type { RemoteValidatorParams } from './RemoteValidatorParams'; -import type { SkipConfig } from './SkipConfig'; -import type { ValidatorType } from './ValidatorType'; - -/** - * Configuration for validation columns that validate existing columns. - -Validation columns execute validation logic against specified target columns and return -structured results indicating pass/fail status with validation details. Supports multiple -validation strategies: code execution (Python/SQL), local callable functions (library only), -and remote HTTP endpoints. - -Attributes: - target_columns (required): List of column names to validate. These columns are passed to the - validator for validation. All target columns must exist in the dataset - before validation runs. - validator_type (required): The type of validator to use. Options: - - "code": Execute code (Python or SQL) for validation. The code receives a - DataFrame with target columns and must return a DataFrame with validation results. - - "local_callable": Call a local Python function with the data. Only supported - when running DataDesigner locally. - - "remote": Send data to a remote HTTP endpoint for validation. - validator_params (required): Parameters specific to the validator type. Type varies by validator: - - CodeValidatorParams: Specifies code language (python or SQL dialect like - "sql:postgres", "sql:mysql"). - - LocalCallableValidatorParams: Provides validation function (Callable[[pd.DataFrame], - pd.DataFrame]) and optional output schema for validation results. - - RemoteValidatorParams: Configures endpoint URL, HTTP timeout, retry behavior - (max_retries, retry_backoff), and parallel request limits (max_parallel_requests). - batch_size: Number of records to process in each validation batch. Defaults to 10. - Larger batches are more efficient but use more memory. Adjust based on validator - complexity and available resources. - -Inherited Attributes: - name (required): Unique name of the column to be generated. - drop: If True, generate this column but remove it from the final dataset. - */ -export interface ValidationColumnConfig { - name: string; - drop?: boolean; - allow_resize?: boolean; - column_type?: 'validation'; - skip?: SkipConfig; - /** If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns. */ - propagate_skip?: boolean; - /** List of column names to validate */ - target_columns: string[]; - /** Validation method: 'code', 'local_callable', or 'remote' */ - validator_type: ValidatorType; - /** Validator-specific parameters (e.g., CodeValidatorParams) */ - validator_params: CodeValidatorParams | LocalCallableValidatorParams | RemoteValidatorParams; - /** - * Number of records to process in each batch - * @minimum 1 - */ - batch_size?: number; -} diff --git a/web/packages/sdk/generated/data-designer/schema/ValidationError.ts b/web/packages/sdk/generated/data-designer/schema/ValidationError.ts deleted file mode 100644 index 308be6ac89..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/ValidationError.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import type { ValidationErrorCtx } from './ValidationErrorCtx'; - -export interface ValidationError { - loc: (string | number)[]; - msg: string; - type: string; - input?: unknown; - ctx?: ValidationErrorCtx; -} diff --git a/web/packages/sdk/generated/data-designer/schema/ValidationErrorCtx.ts b/web/packages/sdk/generated/data-designer/schema/ValidationErrorCtx.ts deleted file mode 100644 index 2c8143af15..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/ValidationErrorCtx.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export type ValidationErrorCtx = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/data-designer/schema/ValidatorType.ts b/web/packages/sdk/generated/data-designer/schema/ValidatorType.ts deleted file mode 100644 index 49064cbbe2..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/ValidatorType.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export type ValidatorType = (typeof ValidatorType)[keyof typeof ValidatorType]; - -export const ValidatorType = { - code: 'code', - local_callable: 'local_callable', - remote: 'remote', -} as const; diff --git a/web/packages/sdk/generated/data-designer/schema/index.ts b/web/packages/sdk/generated/data-designer/schema/index.ts deleted file mode 100644 index 26b063c216..0000000000 --- a/web/packages/sdk/generated/data-designer/schema/index.ts +++ /dev/null @@ -1,137 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ - -export * from './AgentRolloutFormat'; -export * from './AgentRolloutSeedSource'; -export * from './BaseModel'; -export * from './BernoulliMixtureSamplerParams'; -export * from './BernoulliMixtureSamplerParamsDistParams'; -export * from './BernoulliSamplerParams'; -export * from './BinomialSamplerParams'; -export * from './CategorySamplerParams'; -export * from './ChatCompletionInferenceParams'; -export * from './ChatCompletionInferenceParamsExtraBody'; -export * from './CodeLang'; -export * from './CodeValidatorParams'; -export * from './ColumnInequalityConstraint'; -export * from './CreateJob'; -export * from './CreateJobCustomFields'; -export * from './CreateJobErrorDetails'; -export * from './CreateJobOwnership'; -export * from './CreateJobRequest'; -export * from './CreateJobRequestCustomFields'; -export * from './CreateJobRequestOwnership'; -export * from './CreateJobsListFilter'; -export * from './CreateJobsPage'; -export * from './CreateJobsPageFilter'; -export * from './CreateJobsSortField'; -export * from './CreateJobStatusDetails'; -export * from './CustomColumnConfig'; -export * from './DataDesignerConfig'; -export * from './DataDesignerGetJobLogsParams'; -export * from './DataDesignerJobConfig'; -export * from './DataDesignerListJobsParams'; -export * from './DataDesignerStepConfig'; -export * from './DataFrameSeedSource'; -export * from './DatetimeFilter'; -export * from './DatetimeSamplerParams'; -export * from './DatetimeSamplerParamsUnit'; -export * from './DirectorySeedSource'; -export * from './DistributionType'; -export * from './DropColumnsProcessorConfig'; -export * from './EmbeddingColumnConfig'; -export * from './EmbeddingInferenceParams'; -export * from './EmbeddingInferenceParamsEncodingFormat'; -export * from './EmbeddingInferenceParamsExtraBody'; -export * from './ExpressionColumnConfig'; -export * from './ExpressionColumnConfigDtype'; -export * from './FileContentsSeedSource'; -export * from './FilesetFileSeedSource'; -export * from './FileStorageType'; -export * from './GaussianSamplerParams'; -export * from './GenerationStrategy'; -export * from './HTTPValidationError'; -export * from './HuggingFaceSeedSource'; -export * from './ImageColumnConfig'; -export * from './ImageContext'; -export * from './ImageFormat'; -export * from './ImageInferenceParams'; -export * from './ImageInferenceParamsExtraBody'; -export * from './IndexRange'; -export * from './InequalityOperator'; -export * from './JudgeScoreProfilerConfig'; -export * from './LLMCodeColumnConfig'; -export * from './LLMJudgeColumnConfig'; -export * from './LLMStructuredColumnConfig'; -export * from './LLMStructuredColumnConfigOutputFormat'; -export * from './LLMTextColumnConfig'; -export * from './LocalCallableValidatorParams'; -export * from './LocalCallableValidatorParamsOutputSchema'; -export * from './LocalFileSeedSource'; -export * from './ManualDistribution'; -export * from './ManualDistributionParams'; -export * from './Modality'; -export * from './ModalityDataType'; -export * from './ModelConfig'; -export * from './ModelProvider'; -export * from './ModelProviderExtraBody'; -export * from './ModelProviderExtraHeaders'; -export * from './PaginationData'; -export * from './PartitionBlock'; -export * from './PersonFromFakerSamplerParams'; -export * from './PersonFromFakerSamplerParamsSex'; -export * from './PersonSamplerParams'; -export * from './PersonSamplerParamsSelectFieldValues'; -export * from './PersonSamplerParamsSex'; -export * from './PlatformJobListResultResponse'; -export * from './PlatformJobLog'; -export * from './PlatformJobLogPage'; -export * from './PlatformJobResultResponse'; -export * from './PlatformJobStatus'; -export * from './PlatformJobStatusResponse'; -export * from './PlatformJobStatusResponseErrorDetails'; -export * from './PlatformJobStatusResponseStatusDetails'; -export * from './PlatformJobStepStatusResponse'; -export * from './PlatformJobStepStatusResponseErrorDetails'; -export * from './PlatformJobStepStatusResponseStatusDetails'; -export * from './PlatformJobTaskStatusResponse'; -export * from './PlatformJobTaskStatusResponseErrorDetails'; -export * from './PlatformJobTaskStatusResponseStatusDetails'; -export * from './PoissonSamplerParams'; -export * from './PreviewSpec'; -export * from './RemoteValidatorParams'; -export * from './RemoteValidatorParamsOutputSchema'; -export * from './SamplerColumnConfig'; -export * from './SamplerColumnConfigConditionalParams'; -export * from './SamplerType'; -export * from './SamplingStrategy'; -export * from './ScalarInequalityConstraint'; -export * from './SchemaTransformProcessorConfig'; -export * from './SchemaTransformProcessorConfigTemplate'; -export * from './ScipySamplerParams'; -export * from './ScipySamplerParamsDistParams'; -export * from './Score'; -export * from './ScoreOptions'; -export * from './SeedConfig'; -export * from './SeedDatasetColumnConfig'; -export * from './SkipConfig'; -export * from './SubcategorySamplerParams'; -export * from './SubcategorySamplerParamsValues'; -export * from './TimeDeltaSamplerParams'; -export * from './TimeDeltaSamplerParamsUnit'; -export * from './ToolConfig'; -export * from './TraceType'; -export * from './UniformDistribution'; -export * from './UniformDistributionParams'; -export * from './UniformSamplerParams'; -export * from './UUIDSamplerParams'; -export * from './ValidationColumnConfig'; -export * from './ValidationError'; -export * from './ValidationErrorCtx'; -export * from './ValidatorType'; diff --git a/web/packages/sdk/generated/data-designer/zod/data-designer.ts b/web/packages/sdk/generated/data-designer/zod/data-designer.ts deleted file mode 100644 index cdb63990b0..0000000000 --- a/web/packages/sdk/generated/data-designer/zod/data-designer.ts +++ /dev/null @@ -1,13851 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * data-designer (plugin) - */ -import * as zod from 'zod'; - -/** - * @summary Create Job - */ -export const DataDesignerCreateJobParams = zod.object({ - workspace: zod.string(), -}); - -export const dataDesignerCreateJobBodySpecConfigColumnsItemOneDropDefault = false; -export const dataDesignerCreateJobBodySpecConfigColumnsItemOneAllowResizeDefault = false; -export const dataDesignerCreateJobBodySpecConfigColumnsItemOneColumnTypeDefault = `custom`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemOnePropagateSkipDefault = true; -export const dataDesignerCreateJobBodySpecConfigColumnsItemOneGenerationStrategyDefault = `cell_by_cell`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemTwoDropDefault = false; -export const dataDesignerCreateJobBodySpecConfigColumnsItemTwoAllowResizeDefault = false; -export const dataDesignerCreateJobBodySpecConfigColumnsItemTwoColumnTypeDefault = `expression`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemTwoPropagateSkipDefault = true; -export const dataDesignerCreateJobBodySpecConfigColumnsItemTwoDtypeDefault = `str`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemThreeDropDefault = false; -export const dataDesignerCreateJobBodySpecConfigColumnsItemThreeAllowResizeDefault = false; -export const dataDesignerCreateJobBodySpecConfigColumnsItemThreeColumnTypeDefault = `llm-code`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemThreePropagateSkipDefault = true; -export const dataDesignerCreateJobBodySpecConfigColumnsItemThreeMultiModalContextItemModalityDefault = `image`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemThreeWithTraceDefault = `none`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemThreeExtractReasoningContentDefault = false; -export const dataDesignerCreateJobBodySpecConfigColumnsItemFourDropDefault = false; -export const dataDesignerCreateJobBodySpecConfigColumnsItemFourAllowResizeDefault = false; -export const dataDesignerCreateJobBodySpecConfigColumnsItemFourColumnTypeDefault = `llm-judge`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemFourPropagateSkipDefault = true; -export const dataDesignerCreateJobBodySpecConfigColumnsItemFourMultiModalContextItemModalityDefault = `image`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemFourWithTraceDefault = `none`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemFourExtractReasoningContentDefault = false; -export const dataDesignerCreateJobBodySpecConfigColumnsItemFiveDropDefault = false; -export const dataDesignerCreateJobBodySpecConfigColumnsItemFiveAllowResizeDefault = false; -export const dataDesignerCreateJobBodySpecConfigColumnsItemFiveColumnTypeDefault = `llm-structured`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemFivePropagateSkipDefault = true; -export const dataDesignerCreateJobBodySpecConfigColumnsItemFiveMultiModalContextItemModalityDefault = `image`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemFiveWithTraceDefault = `none`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemFiveExtractReasoningContentDefault = false; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSixDropDefault = false; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSixAllowResizeDefault = false; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSixColumnTypeDefault = `llm-text`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSixPropagateSkipDefault = true; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSixMultiModalContextItemModalityDefault = `image`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSixWithTraceDefault = `none`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSixExtractReasoningContentDefault = false; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenDropDefault = false; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenAllowResizeDefault = false; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenColumnTypeDefault = `sampler`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenPropagateSkipDefault = true; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsOneSamplerTypeDefault = `subcategory`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsTwoSamplerTypeDefault = `category`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsThreeUnitDefault = `D`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsThreeSamplerTypeDefault = `datetime`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsFourLocaleDefault = `en_US`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsFourAgeRangeDefault = [ - 18, 114, -]; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsFourAgeRangeMin = 2; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsFourAgeRangeMax = 2; - -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsFourWithSyntheticPersonasDefault = false; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsFourSamplerTypeDefault = `person`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsFiveLocaleDefault = `en_US`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsFiveAgeRangeDefault = [ - 18, 114, -]; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsFiveAgeRangeMin = 2; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsFiveAgeRangeMax = 2; - -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsFiveSamplerTypeDefault = `person_from_faker`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsSixDtMinMin = 0; - -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsSixDtMaxExclusiveMin = 0; - -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsSixUnitDefault = `D`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsSixSamplerTypeDefault = `timedelta`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsSevenShortFormDefault = false; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsSevenUppercaseDefault = false; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsSevenSamplerTypeDefault = `uuid`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsEightPMin = 0; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsEightPMax = 1; - -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsEightSamplerTypeDefault = `bernoulli`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsNinePMin = 0; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsNinePMax = 1; - -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsNineSamplerTypeDefault = `bernoulli_mixture`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsOnezeroPMin = 0; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsOnezeroPMax = 1; - -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsOnezeroSamplerTypeDefault = `binomial`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsOneoneSamplerTypeDefault = `gaussian`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsOnetwoSamplerTypeDefault = `poisson`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsOnethreeSamplerTypeDefault = `uniform`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsOnefourSamplerTypeDefault = `scipy`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsOneSamplerTypeDefault = `subcategory`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsTwoSamplerTypeDefault = `category`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsThreeUnitDefault = `D`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsThreeSamplerTypeDefault = `datetime`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsFourLocaleDefault = `en_US`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsFourAgeRangeDefault = - [18, 114]; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsFourAgeRangeMin = 2; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsFourAgeRangeMax = 2; - -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsFourWithSyntheticPersonasDefault = false; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsFourSamplerTypeDefault = `person`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsFiveLocaleDefault = `en_US`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsFiveAgeRangeDefault = - [18, 114]; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsFiveAgeRangeMin = 2; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsFiveAgeRangeMax = 2; - -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsFiveSamplerTypeDefault = `person_from_faker`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsSixDtMinMin = 0; - -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsSixDtMaxExclusiveMin = 0; - -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsSixUnitDefault = `D`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsSixSamplerTypeDefault = `timedelta`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsSevenShortFormDefault = false; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsSevenUppercaseDefault = false; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsSevenSamplerTypeDefault = `uuid`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsEightPMin = 0; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsEightPMax = 1; - -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsEightSamplerTypeDefault = `bernoulli`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsNinePMin = 0; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsNinePMax = 1; - -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsNineSamplerTypeDefault = `bernoulli_mixture`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsOnezeroPMin = 0; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsOnezeroPMax = 1; - -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsOnezeroSamplerTypeDefault = `binomial`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsOneoneSamplerTypeDefault = `gaussian`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsOnetwoSamplerTypeDefault = `poisson`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsOnethreeSamplerTypeDefault = `uniform`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsOnefourSamplerTypeDefault = `scipy`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemEightDropDefault = false; -export const dataDesignerCreateJobBodySpecConfigColumnsItemEightAllowResizeDefault = false; -export const dataDesignerCreateJobBodySpecConfigColumnsItemEightColumnTypeDefault = `seed-dataset`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemEightPropagateSkipDefault = true; -export const dataDesignerCreateJobBodySpecConfigColumnsItemNineDropDefault = false; -export const dataDesignerCreateJobBodySpecConfigColumnsItemNineAllowResizeDefault = false; -export const dataDesignerCreateJobBodySpecConfigColumnsItemNineColumnTypeDefault = `validation`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemNinePropagateSkipDefault = true; -export const dataDesignerCreateJobBodySpecConfigColumnsItemNineValidatorParamsOneValidatorTypeDefault = `code`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemNineValidatorParamsTwoValidatorTypeDefault = `local_callable`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemNineValidatorParamsThreeValidatorTypeDefault = `remote`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemNineValidatorParamsThreeTimeoutDefault = 30; -export const dataDesignerCreateJobBodySpecConfigColumnsItemNineValidatorParamsThreeTimeoutExclusiveMin = 0; - -export const dataDesignerCreateJobBodySpecConfigColumnsItemNineValidatorParamsThreeMaxRetriesDefault = 3; -export const dataDesignerCreateJobBodySpecConfigColumnsItemNineValidatorParamsThreeMaxRetriesMin = 0; - -export const dataDesignerCreateJobBodySpecConfigColumnsItemNineValidatorParamsThreeRetryBackoffDefault = 2; -export const dataDesignerCreateJobBodySpecConfigColumnsItemNineValidatorParamsThreeRetryBackoffExclusiveMin = 1; - -export const dataDesignerCreateJobBodySpecConfigColumnsItemNineValidatorParamsThreeMaxParallelRequestsDefault = 4; - -export const dataDesignerCreateJobBodySpecConfigColumnsItemNineBatchSizeDefault = 10; - -export const dataDesignerCreateJobBodySpecConfigColumnsItemOnezeroDropDefault = false; -export const dataDesignerCreateJobBodySpecConfigColumnsItemOnezeroAllowResizeDefault = false; -export const dataDesignerCreateJobBodySpecConfigColumnsItemOnezeroColumnTypeDefault = `embedding`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemOnezeroPropagateSkipDefault = true; -export const dataDesignerCreateJobBodySpecConfigColumnsItemOneoneDropDefault = false; -export const dataDesignerCreateJobBodySpecConfigColumnsItemOneoneAllowResizeDefault = false; -export const dataDesignerCreateJobBodySpecConfigColumnsItemOneoneColumnTypeDefault = `image`; -export const dataDesignerCreateJobBodySpecConfigColumnsItemOneonePropagateSkipDefault = true; -export const dataDesignerCreateJobBodySpecConfigColumnsItemOneoneMultiModalContextItemModalityDefault = `image`; -export const dataDesignerCreateJobBodySpecConfigModelConfigsItemInferenceParametersOneGenerationTypeDefault = `chat-completion`; -export const dataDesignerCreateJobBodySpecConfigModelConfigsItemInferenceParametersOneMaxParallelRequestsDefault = 4; - -export const dataDesignerCreateJobBodySpecConfigModelConfigsItemInferenceParametersOneTemperatureTwoDistributionTypeDefault = `uniform`; -export const dataDesignerCreateJobBodySpecConfigModelConfigsItemInferenceParametersOneTemperatureThreeDistributionTypeDefault = `manual`; -export const dataDesignerCreateJobBodySpecConfigModelConfigsItemInferenceParametersOneTopPTwoDistributionTypeDefault = `uniform`; -export const dataDesignerCreateJobBodySpecConfigModelConfigsItemInferenceParametersOneTopPThreeDistributionTypeDefault = `manual`; - -export const dataDesignerCreateJobBodySpecConfigModelConfigsItemInferenceParametersTwoGenerationTypeDefault = `embedding`; -export const dataDesignerCreateJobBodySpecConfigModelConfigsItemInferenceParametersTwoMaxParallelRequestsDefault = 4; - -export const dataDesignerCreateJobBodySpecConfigModelConfigsItemInferenceParametersTwoEncodingFormatDefault = `float`; -export const dataDesignerCreateJobBodySpecConfigModelConfigsItemInferenceParametersThreeGenerationTypeDefault = `image`; -export const dataDesignerCreateJobBodySpecConfigModelConfigsItemInferenceParametersThreeMaxParallelRequestsDefault = 4; - -export const dataDesignerCreateJobBodySpecConfigModelConfigsItemSkipHealthCheckDefault = false; -export const dataDesignerCreateJobBodySpecConfigToolConfigsItemMaxToolCallTurnsDefault = 5; - -export const dataDesignerCreateJobBodySpecConfigToolConfigsItemTimeoutSecExclusiveMin = 0; - -export const dataDesignerCreateJobBodySpecConfigSeedConfigSourceOneSeedTypeDefault = `local`; -export const dataDesignerCreateJobBodySpecConfigSeedConfigSourceTwoSeedTypeDefault = `hf`; -export const dataDesignerCreateJobBodySpecConfigSeedConfigSourceTwoEndpointDefault = `https://huggingface.co`; -export const dataDesignerCreateJobBodySpecConfigSeedConfigSourceThreeSeedTypeDefault = `df`; -export const dataDesignerCreateJobBodySpecConfigSeedConfigSourceFourSeedTypeDefault = `directory`; -export const dataDesignerCreateJobBodySpecConfigSeedConfigSourceFourFilePatternDefault = `*`; -export const dataDesignerCreateJobBodySpecConfigSeedConfigSourceFourRecursiveDefault = true; -export const dataDesignerCreateJobBodySpecConfigSeedConfigSourceFiveSeedTypeDefault = `file_contents`; -export const dataDesignerCreateJobBodySpecConfigSeedConfigSourceFiveFilePatternDefault = `*`; -export const dataDesignerCreateJobBodySpecConfigSeedConfigSourceFiveRecursiveDefault = true; -export const dataDesignerCreateJobBodySpecConfigSeedConfigSourceFiveEncodingDefault = `utf-8`; -export const dataDesignerCreateJobBodySpecConfigSeedConfigSourceSixSeedTypeDefault = `agent_rollout`; -export const dataDesignerCreateJobBodySpecConfigSeedConfigSourceSixRecursiveDefault = true; -export const dataDesignerCreateJobBodySpecConfigSeedConfigSourceSevenSeedTypeDefault = `nmp`; -export const dataDesignerCreateJobBodySpecConfigSeedConfigSamplingStrategyDefault = `ordered`; -export const dataDesignerCreateJobBodySpecConfigSeedConfigSelectionStrategyOneStartMin = 0; - -export const dataDesignerCreateJobBodySpecConfigSeedConfigSelectionStrategyOneEndMin = 0; - -export const dataDesignerCreateJobBodySpecConfigSeedConfigSelectionStrategyTwoIndexDefault = 0; -export const dataDesignerCreateJobBodySpecConfigSeedConfigSelectionStrategyTwoIndexMin = 0; - -export const dataDesignerCreateJobBodySpecConfigSeedConfigSelectionStrategyTwoNumPartitionsDefault = 1; - -export const dataDesignerCreateJobBodySpecConfigConstraintsItemOneConstraintTypeDefault = `scalar_inequality`; -export const dataDesignerCreateJobBodySpecConfigConstraintsItemTwoConstraintTypeDefault = `column_inequality`; -export const dataDesignerCreateJobBodySpecConfigProfilersItemSummaryScoreSampleSizeDefault = 20; - -export const dataDesignerCreateJobBodySpecConfigProcessorsItemOneProcessorTypeDefault = `drop_columns`; -export const dataDesignerCreateJobBodySpecConfigProcessorsItemTwoProcessorTypeDefault = `schema_transform`; - -export const DataDesignerCreateJobBody = zod.object({ - name: zod.string().optional(), - description: zod.string().optional(), - project: zod.string().optional(), - spec: zod.object({ - num_records: zod.number(), - config: zod - .object({ - columns: zod - .array( - zod.union([ - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default(dataDesignerCreateJobBodySpecConfigColumnsItemOneDropDefault), - allow_resize: zod - .boolean() - .default(dataDesignerCreateJobBodySpecConfigColumnsItemOneAllowResizeDefault), - column_type: zod - .literal('custom') - .default(dataDesignerCreateJobBodySpecConfigColumnsItemOneColumnTypeDefault), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default(dataDesignerCreateJobBodySpecConfigColumnsItemOnePropagateSkipDefault) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - generator_function: zod - .unknown() - .describe('Function decorated with @custom_column_generator'), - generation_strategy: zod - .enum(['cell_by_cell', 'full_column']) - .describe('Strategy for custom column generation.') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemOneGenerationStrategyDefault - ) - .describe( - "Generation strategy: 'cell_by_cell' for row-based or 'full_column' for batch-based" - ), - generator_params: zod - .object({}) - .passthrough() - .optional() - .describe( - 'Optional typed configuration object passed as second argument to generator function' - ), - }) - .describe( - 'Configuration for custom user-defined column generators.\n\nCustom columns allow users to provide their own generation logic via a callable function\ndecorated with `@custom_column_generator`. Two strategies are supported: cell_by_cell\n(default, row-based) and full_column (batch-based with DataFrame access).\n\nAttributes:\n generator_function (required): A callable decorated with @custom_column_generator.\n generation_strategy: \"cell_by_cell\" (row-based) or \"full_column\" (batch-based).\n generator_params: Optional typed configuration object (Pydantic BaseModel) passed\n as the second argument to the generator function.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default(dataDesignerCreateJobBodySpecConfigColumnsItemTwoDropDefault), - allow_resize: zod - .boolean() - .default(dataDesignerCreateJobBodySpecConfigColumnsItemTwoAllowResizeDefault), - column_type: zod - .literal('expression') - .default(dataDesignerCreateJobBodySpecConfigColumnsItemTwoColumnTypeDefault), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default(dataDesignerCreateJobBodySpecConfigColumnsItemTwoPropagateSkipDefault) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - expr: zod - .string() - .describe('Jinja2 expression to compute the column value from other columns'), - dtype: zod - .enum(['int', 'float', 'str', 'bool']) - .default(dataDesignerCreateJobBodySpecConfigColumnsItemTwoDtypeDefault) - .describe("Data type for expression result: 'int', 'float', 'str', or 'bool'"), - }) - .describe( - 'Configuration for derived columns using Jinja2 expressions.\n\nExpression columns compute values by evaluating Jinja2 templates that reference other\ncolumns. Useful for transformations, concatenations, conditional logic, and derived\nfeatures without requiring LLM generation. The expression is evaluated row-by-row.\n\nAttributes:\n expr (required): Jinja2 expression to evaluate. Can reference other column values using\n {{ column_name }} syntax. Supports filters, conditionals, and arithmetic.\n Must be a valid, non-empty Jinja2 template.\n dtype: Data type to cast the result to. Must be one of \"int\", \"float\", \"str\", or \"bool\".\n Defaults to \"str\". Type conversion is applied after expression evaluation.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default(dataDesignerCreateJobBodySpecConfigColumnsItemThreeDropDefault), - allow_resize: zod - .boolean() - .default(dataDesignerCreateJobBodySpecConfigColumnsItemThreeAllowResizeDefault), - column_type: zod - .literal('llm-code') - .default(dataDesignerCreateJobBodySpecConfigColumnsItemThreeColumnTypeDefault), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemThreePropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - prompt: zod - .string() - .describe( - 'Jinja2 template for the LLM prompt; can reference other columns via {{ column_name }}' - ), - model_alias: zod - .string() - .describe('Alias of the model configuration to use for generation'), - system_prompt: zod - .string() - .optional() - .describe('Optional system prompt to set model behavior and constraints'), - multi_modal_context: zod - .array( - zod - .object({ - modality: zod - .enum(['image']) - .describe('Supported modality types for multimodal model data.') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemThreeMultiModalContextItemModalityDefault - ), - column_name: zod.string(), - data_type: zod - .enum(['url', 'base64']) - .optional() - .describe('Data type formats for multimodal data.'), - image_format: zod - .enum(['png', 'jpg', 'jpeg', 'gif', 'webp']) - .optional() - .describe('Supported image formats for image modality.'), - }) - .describe( - 'Configuration for providing image context to multimodal models.\n\nAttributes:\n modality: The modality type (always \"image\").\n column_name: Name of the column containing image data.\n data_type: Format of the image data (\"url\", \"base64\", or None for auto-detection).\n When None, the format is auto-detected: URLs are passed through, file paths that\n exist under base_path are loaded as base64, and other values are assumed to be base64.\n image_format: Image format (required when data_type is explicitly \"base64\").' - ) - ) - .optional() - .describe('Optional list of ImageContext for vision model inputs'), - tool_alias: zod - .string() - .optional() - .describe('Optional alias of the tool configuration to use for MCP tool calls'), - with_trace: zod - .enum(['none', 'last_message', 'all_messages']) - .describe( - 'Specifies the type of reasoning trace to capture for LLM columns.\n\nTraces capture the conversation history during LLM generation, which is\nuseful for debugging, analysis, and understanding model behavior.\n\nAttributes:\n NONE: No trace is captured. This is the default.\n LAST_MESSAGE: Only the final assistant message is captured.\n ALL_MESSAGES: The full conversation history (system\/user\/assistant\/tool)\n is captured.' - ) - .default(dataDesignerCreateJobBodySpecConfigColumnsItemThreeWithTraceDefault) - .describe('Trace capture mode: NONE, LAST_MESSAGE, or ALL_MESSAGES'), - extract_reasoning_content: zod - .boolean() - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemThreeExtractReasoningContentDefault - ) - .describe( - 'If True, capture chain-of-thought in {name}__reasoning_content column' - ), - code_lang: zod - .enum([ - 'bash', - 'c', - 'cobol', - 'cpp', - 'csharp', - 'go', - 'java', - 'javascript', - 'kotlin', - 'python', - 'ruby', - 'rust', - 'scala', - 'swift', - 'typescript', - 'sql:sqlite', - 'sql:tsql', - 'sql:bigquery', - 'sql:mysql', - 'sql:postgres', - 'sql:ansi', - ]) - .describe( - 'Target programming language or SQL dialect for code extraction from LLM response' - ), - }) - .describe( - 'Configuration for code generation columns using Large Language Models.\n\nExtends LLMTextColumnConfig to generate code snippets in specific programming languages\nor SQL dialects. The generated code is automatically extracted from markdown code blocks\nfor the specified language. Inherits all prompt templating capabilities from LLMTextColumnConfig.\n\nAttributes:\n code_lang (required): Programming language or SQL dialect for code generation. Supported\n values include: \"python\", \"javascript\", \"typescript\", \"java\", \"kotlin\", \"go\",\n \"rust\", \"ruby\", \"scala\", \"swift\", \"sql:sqlite\", \"sql:postgres\", \"sql:mysql\",\n \"sql:tsql\", \"sql:bigquery\", \"sql:ansi\". See CodeLang enum for complete list.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n prompt (required): Prompt template for code generation (supports Jinja2).\n model_alias (required): Alias of the model configuration to use.\n system_prompt: Optional system prompt (supports Jinja2).\n multi_modal_context: Optional image contexts for multi-modal generation.\n tool_alias: Optional tool configuration alias for MCP tool calls.\n with_trace: Specifies what trace information to capture in a `{column_name}__trace`\n column. Options are `TraceType.NONE` (default), `TraceType.LAST_MESSAGE`, or\n `TraceType.ALL_MESSAGES`.\n extract_reasoning_content: If True, creates a `{column_name}__reasoning_content`\n column containing the reasoning content from the final assistant response.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default(dataDesignerCreateJobBodySpecConfigColumnsItemFourDropDefault), - allow_resize: zod - .boolean() - .default(dataDesignerCreateJobBodySpecConfigColumnsItemFourAllowResizeDefault), - column_type: zod - .literal('llm-judge') - .default(dataDesignerCreateJobBodySpecConfigColumnsItemFourColumnTypeDefault), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default(dataDesignerCreateJobBodySpecConfigColumnsItemFourPropagateSkipDefault) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - prompt: zod - .string() - .describe( - 'Jinja2 template for the LLM prompt; can reference other columns via {{ column_name }}' - ), - model_alias: zod - .string() - .describe('Alias of the model configuration to use for generation'), - system_prompt: zod - .string() - .optional() - .describe('Optional system prompt to set model behavior and constraints'), - multi_modal_context: zod - .array( - zod - .object({ - modality: zod - .enum(['image']) - .describe('Supported modality types for multimodal model data.') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemFourMultiModalContextItemModalityDefault - ), - column_name: zod.string(), - data_type: zod - .enum(['url', 'base64']) - .optional() - .describe('Data type formats for multimodal data.'), - image_format: zod - .enum(['png', 'jpg', 'jpeg', 'gif', 'webp']) - .optional() - .describe('Supported image formats for image modality.'), - }) - .describe( - 'Configuration for providing image context to multimodal models.\n\nAttributes:\n modality: The modality type (always \"image\").\n column_name: Name of the column containing image data.\n data_type: Format of the image data (\"url\", \"base64\", or None for auto-detection).\n When None, the format is auto-detected: URLs are passed through, file paths that\n exist under base_path are loaded as base64, and other values are assumed to be base64.\n image_format: Image format (required when data_type is explicitly \"base64\").' - ) - ) - .optional() - .describe('Optional list of ImageContext for vision model inputs'), - tool_alias: zod - .string() - .optional() - .describe('Optional alias of the tool configuration to use for MCP tool calls'), - with_trace: zod - .enum(['none', 'last_message', 'all_messages']) - .describe( - 'Specifies the type of reasoning trace to capture for LLM columns.\n\nTraces capture the conversation history during LLM generation, which is\nuseful for debugging, analysis, and understanding model behavior.\n\nAttributes:\n NONE: No trace is captured. This is the default.\n LAST_MESSAGE: Only the final assistant message is captured.\n ALL_MESSAGES: The full conversation history (system\/user\/assistant\/tool)\n is captured.' - ) - .default(dataDesignerCreateJobBodySpecConfigColumnsItemFourWithTraceDefault) - .describe('Trace capture mode: NONE, LAST_MESSAGE, or ALL_MESSAGES'), - extract_reasoning_content: zod - .boolean() - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemFourExtractReasoningContentDefault - ) - .describe( - 'If True, capture chain-of-thought in {name}__reasoning_content column' - ), - scores: zod - .array( - zod - .object({ - name: zod.string().describe('A clear name for this score.'), - description: zod - .string() - .describe( - 'An informative and detailed assessment guide for using this score.' - ), - options: zod - .record(zod.string(), zod.string()) - .describe('Score options in the format of {score: description}.'), - }) - .describe( - 'Configuration for a \"score\" in an LLM judge evaluation.\n\nDefines a single scoring criterion with its possible values and descriptions. Multiple\nScore objects can be combined in an LLMJudgeColumnConfig to create multi-dimensional\nquality assessments.\n\nAttributes:\n name (required): A clear, concise name for this scoring dimension (e.g., \"Relevance\", \"Fluency\").\n description (required): An informative and detailed assessment guide explaining how to evaluate\n this dimension. Should provide clear criteria for scoring.\n options (required): Dictionary mapping score values to their descriptions. Keys can be integers\n (e.g., 1-5 scale) or strings (e.g., \"Poor\", \"Good\", \"Excellent\"). Values are\n descriptions explaining what each score level means.' - ) - ) - .min(1) - .describe( - 'List of Score objects defining rubric criteria for LLM judge evaluation' - ), - }) - .describe( - 'Configuration for LLM-as-a-judge quality assessment and scoring columns.\n\nExtends LLMTextColumnConfig to create judge columns that evaluate and score other\ngenerated content based on the defined criteria. Useful for quality assessment, preference\nranking, and multi-dimensional evaluation of generated data. Inherits prompt templating\ncapabilities from LLMTextColumnConfig.\n\nAttributes:\n scores (required): List of Score objects defining the evaluation dimensions. Each score\n represents a different aspect to evaluate (e.g., accuracy, relevance, fluency).\n Must contain at least one score.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n prompt (required): Prompt template for the judge evaluation (supports Jinja2).\n model_alias (required): Alias of the model configuration to use.\n system_prompt: Optional system prompt (supports Jinja2).\n multi_modal_context: Optional image contexts for multi-modal generation.\n tool_alias: Optional tool configuration alias for MCP tool calls.\n with_trace: Specifies what trace information to capture in a `{column_name}__trace`\n column. Options are `TraceType.NONE` (default), `TraceType.LAST_MESSAGE`, or\n `TraceType.ALL_MESSAGES`.\n extract_reasoning_content: If True, creates a `{column_name}__reasoning_content`\n column containing the reasoning content from the final assistant response.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default(dataDesignerCreateJobBodySpecConfigColumnsItemFiveDropDefault), - allow_resize: zod - .boolean() - .default(dataDesignerCreateJobBodySpecConfigColumnsItemFiveAllowResizeDefault), - column_type: zod - .literal('llm-structured') - .default(dataDesignerCreateJobBodySpecConfigColumnsItemFiveColumnTypeDefault), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default(dataDesignerCreateJobBodySpecConfigColumnsItemFivePropagateSkipDefault) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - prompt: zod - .string() - .describe( - 'Jinja2 template for the LLM prompt; can reference other columns via {{ column_name }}' - ), - model_alias: zod - .string() - .describe('Alias of the model configuration to use for generation'), - system_prompt: zod - .string() - .optional() - .describe('Optional system prompt to set model behavior and constraints'), - multi_modal_context: zod - .array( - zod - .object({ - modality: zod - .enum(['image']) - .describe('Supported modality types for multimodal model data.') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemFiveMultiModalContextItemModalityDefault - ), - column_name: zod.string(), - data_type: zod - .enum(['url', 'base64']) - .optional() - .describe('Data type formats for multimodal data.'), - image_format: zod - .enum(['png', 'jpg', 'jpeg', 'gif', 'webp']) - .optional() - .describe('Supported image formats for image modality.'), - }) - .describe( - 'Configuration for providing image context to multimodal models.\n\nAttributes:\n modality: The modality type (always \"image\").\n column_name: Name of the column containing image data.\n data_type: Format of the image data (\"url\", \"base64\", or None for auto-detection).\n When None, the format is auto-detected: URLs are passed through, file paths that\n exist under base_path are loaded as base64, and other values are assumed to be base64.\n image_format: Image format (required when data_type is explicitly \"base64\").' - ) - ) - .optional() - .describe('Optional list of ImageContext for vision model inputs'), - tool_alias: zod - .string() - .optional() - .describe('Optional alias of the tool configuration to use for MCP tool calls'), - with_trace: zod - .enum(['none', 'last_message', 'all_messages']) - .describe( - 'Specifies the type of reasoning trace to capture for LLM columns.\n\nTraces capture the conversation history during LLM generation, which is\nuseful for debugging, analysis, and understanding model behavior.\n\nAttributes:\n NONE: No trace is captured. This is the default.\n LAST_MESSAGE: Only the final assistant message is captured.\n ALL_MESSAGES: The full conversation history (system\/user\/assistant\/tool)\n is captured.' - ) - .default(dataDesignerCreateJobBodySpecConfigColumnsItemFiveWithTraceDefault) - .describe('Trace capture mode: NONE, LAST_MESSAGE, or ALL_MESSAGES'), - extract_reasoning_content: zod - .boolean() - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemFiveExtractReasoningContentDefault - ) - .describe( - 'If True, capture chain-of-thought in {name}__reasoning_content column' - ), - output_format: zod - .union([zod.record(zod.string(), zod.unknown()), zod.unknown()]) - .describe( - 'Pydantic model or JSON schema dict defining the expected structured output shape' - ), - }) - .describe( - 'Configuration for structured JSON generation columns using Large Language Models.\n\nExtends LLMTextColumnConfig to generate structured data conforming to a specified schema.\nUses JSON schema or Pydantic models to define the expected output structure, enabling\ntype-safe and validated structured output generation. Inherits prompt templating capabilities\nfrom LLMTextColumnConfig.\n\nAttributes:\n output_format (required): The schema defining the expected output structure. Can be either:\n - A Pydantic BaseModel class (recommended)\n - A JSON schema dictionary\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n prompt (required): Prompt template for structured generation (supports Jinja2).\n model_alias (required): Alias of the model configuration to use.\n system_prompt: Optional system prompt (supports Jinja2).\n multi_modal_context: Optional image contexts for multi-modal generation.\n tool_alias: Optional tool configuration alias for MCP tool calls.\n with_trace: Specifies what trace information to capture in a `{column_name}__trace`\n column. Options are `TraceType.NONE` (default), `TraceType.LAST_MESSAGE`, or\n `TraceType.ALL_MESSAGES`.\n extract_reasoning_content: If True, creates a `{column_name}__reasoning_content`\n column containing the reasoning content from the final assistant response.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default(dataDesignerCreateJobBodySpecConfigColumnsItemSixDropDefault), - allow_resize: zod - .boolean() - .default(dataDesignerCreateJobBodySpecConfigColumnsItemSixAllowResizeDefault), - column_type: zod - .literal('llm-text') - .default(dataDesignerCreateJobBodySpecConfigColumnsItemSixColumnTypeDefault), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default(dataDesignerCreateJobBodySpecConfigColumnsItemSixPropagateSkipDefault) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - prompt: zod - .string() - .describe( - 'Jinja2 template for the LLM prompt; can reference other columns via {{ column_name }}' - ), - model_alias: zod - .string() - .describe('Alias of the model configuration to use for generation'), - system_prompt: zod - .string() - .optional() - .describe('Optional system prompt to set model behavior and constraints'), - multi_modal_context: zod - .array( - zod - .object({ - modality: zod - .enum(['image']) - .describe('Supported modality types for multimodal model data.') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSixMultiModalContextItemModalityDefault - ), - column_name: zod.string(), - data_type: zod - .enum(['url', 'base64']) - .optional() - .describe('Data type formats for multimodal data.'), - image_format: zod - .enum(['png', 'jpg', 'jpeg', 'gif', 'webp']) - .optional() - .describe('Supported image formats for image modality.'), - }) - .describe( - 'Configuration for providing image context to multimodal models.\n\nAttributes:\n modality: The modality type (always \"image\").\n column_name: Name of the column containing image data.\n data_type: Format of the image data (\"url\", \"base64\", or None for auto-detection).\n When None, the format is auto-detected: URLs are passed through, file paths that\n exist under base_path are loaded as base64, and other values are assumed to be base64.\n image_format: Image format (required when data_type is explicitly \"base64\").' - ) - ) - .optional() - .describe('Optional list of ImageContext for vision model inputs'), - tool_alias: zod - .string() - .optional() - .describe('Optional alias of the tool configuration to use for MCP tool calls'), - with_trace: zod - .enum(['none', 'last_message', 'all_messages']) - .describe( - 'Specifies the type of reasoning trace to capture for LLM columns.\n\nTraces capture the conversation history during LLM generation, which is\nuseful for debugging, analysis, and understanding model behavior.\n\nAttributes:\n NONE: No trace is captured. This is the default.\n LAST_MESSAGE: Only the final assistant message is captured.\n ALL_MESSAGES: The full conversation history (system\/user\/assistant\/tool)\n is captured.' - ) - .default(dataDesignerCreateJobBodySpecConfigColumnsItemSixWithTraceDefault) - .describe('Trace capture mode: NONE, LAST_MESSAGE, or ALL_MESSAGES'), - extract_reasoning_content: zod - .boolean() - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSixExtractReasoningContentDefault - ) - .describe( - 'If True, capture chain-of-thought in {name}__reasoning_content column' - ), - }) - .describe( - 'Configuration for text generation columns using Large Language Models.\n\nLLM text columns generate free-form text content using language models.\nPrompts support Jinja2 templating to reference values from other columns, enabling\ncontext-aware generation. The generated text can optionally include message traces\ncapturing the full conversation history.\n\nAttributes:\n prompt (required): Prompt template for text generation. Supports Jinja2 syntax to\n reference other columns (e.g., \"Write a story about {{ character_name }}\").\n Must be a valid Jinja2 template.\n model_alias (required): Alias of the model configuration to use for generation.\n Must match a model alias defined when initializing the DataDesignerConfigBuilder.\n system_prompt: Optional system prompt to set model behavior and constraints.\n Also supports Jinja2 templating. If provided, must be a valid Jinja2 template.\n Do not put any output parsing instructions in the system prompt. Instead,\n use the appropriate column type for the output you want to generate - e.g.,\n `LLMStructuredColumnConfig` for structured output, `LLMCodeColumnConfig` for code.\n multi_modal_context: Optional list of image contexts for multi-modal generation.\n Enables vision-capable models to generate text based on image inputs.\n tool_alias: Optional alias of the tool configuration to use for MCP tool calls.\n Must match a tool alias defined when initializing the DataDesignerConfigBuilder.\n When provided, the model may call permitted tools during generation.\n with_trace: Specifies what trace information to capture in a `{column_name}__trace`\n column. Options are:\n - `TraceType.NONE` (default): No trace is captured.\n - `TraceType.LAST_MESSAGE`: Only the final assistant message is captured.\n - `TraceType.ALL_MESSAGES`: Full conversation history (system\/user\/assistant\/tool).\n extract_reasoning_content: If True, creates a `{column_name}__reasoning_content` column\n containing only the reasoning_content from the final assistant response. This is\n useful for models that expose chain-of-thought reasoning separately from the main\n response. Defaults to False.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default(dataDesignerCreateJobBodySpecConfigColumnsItemSevenDropDefault), - allow_resize: zod - .boolean() - .default(dataDesignerCreateJobBodySpecConfigColumnsItemSevenAllowResizeDefault), - column_type: zod - .literal('sampler') - .default(dataDesignerCreateJobBodySpecConfigColumnsItemSevenColumnTypeDefault), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenPropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - sampler_type: zod - .enum([ - 'bernoulli', - 'bernoulli_mixture', - 'binomial', - 'category', - 'datetime', - 'gaussian', - 'person', - 'person_from_faker', - 'poisson', - 'scipy', - 'subcategory', - 'timedelta', - 'uniform', - 'uuid', - ]) - .describe( - 'Type of sampler to use (e.g., uuid, category, uniform, gaussian, person, datetime)' - ), - params: zod - .union([ - zod - .object({ - category: zod - .string() - .describe('Name of parent category to this subcategory.'), - values: zod - .record( - zod.string(), - zod.array(zod.union([zod.string(), zod.number(), zod.number()])) - ) - .describe( - 'Mapping from each value of parent category to a list of subcategory values.' - ), - sampler_type: zod - .literal('subcategory') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsOneSamplerTypeDefault - ), - }) - .describe( - 'Parameters for subcategory sampling conditioned on a parent category column.\n\nSamples subcategory values based on the value of a parent category column. Each parent\ncategory value maps to its own list of possible subcategory values, enabling hierarchical\nor conditional sampling patterns.\n\nAttributes:\n category (required): Name of the parent category column that this subcategory depends on.\n The parent column must be generated before this subcategory column.\n values (required): Mapping from each parent category value to a list of possible subcategory values.\n Each key must correspond to a value that appears in the parent category column.' - ), - zod - .object({ - values: zod - .array(zod.union([zod.string(), zod.number(), zod.number()])) - .min(1) - .describe( - 'List of possible categorical values that can be sampled from.' - ), - weights: zod - .array(zod.number()) - .optional() - .describe( - 'List of unnormalized probability weights to assigned to each value, in order. Larger values will be sampled with higher probability.' - ), - sampler_type: zod - .literal('category') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsTwoSamplerTypeDefault - ), - }) - .describe( - 'Parameters for categorical sampling with optional probability weighting.\n\nSamples values from a discrete set of categories. When weights are provided, values are\nsampled according to their assigned probabilities. Without weights, uniform sampling is used.\n\nAttributes:\n values (required): List of possible categorical values to sample from. Can contain strings, integers,\n or floats. Must contain at least one value.\n weights: Optional unnormalized probability weights for each value. If provided, must be\n the same length as `values`. Weights are automatically normalized to sum to 1.0.\n Larger weights result in higher sampling probability for the corresponding value.' - ), - zod - .object({ - start: zod - .string() - .describe('Earliest possible datetime for sampling range, inclusive.'), - end: zod - .string() - .describe('Exclusive upper bound for datetime sampling range.'), - unit: zod - .enum(['Y', 'M', 'D', 'h', 'm', 's']) - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsThreeUnitDefault - ) - .describe( - 'Sampling units, e.g. the smallest possible time interval between samples.' - ), - sampler_type: zod - .literal('datetime') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsThreeSamplerTypeDefault - ), - }) - .describe( - 'Parameters for uniform datetime sampling within a specified range.\n\nSamples datetime values uniformly between a start and end date with a specified granularity.\nThe sampling unit determines the smallest possible time interval between consecutive samples.\n\nAttributes:\n start (required): Earliest possible datetime for the sampling range (inclusive). Must be a valid\n datetime string parseable by pandas.to_datetime().\n end (required): Exclusive upper bound for the sampling range. Must be a valid\n datetime string parseable by pandas.to_datetime().\n unit: Time unit for sampling granularity. Options:\n - \"Y\": Years\n - \"M\": Months\n - \"D\": Days (default)\n - \"h\": Hours\n - \"m\": Minutes\n - \"s\": Seconds' - ), - zod - .object({ - locale: zod - .string() - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsFourLocaleDefault - ) - .describe( - 'Locale that determines the language and geographic location that a synthetic person will be sampled from. Must be a locale supported by a managed Nemotron Personas dataset. Managed datasets exist for the following locales: en_US, en_IN, en_SG, fr_FR, hi_Deva_IN, hi_Latn_IN, ja_JP, ko_KR, pt_BR.' - ), - sex: zod - .enum(['Male', 'Female']) - .optional() - .describe( - 'If specified, then only synthetic people of the specified sex will be sampled.' - ), - city: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe( - 'If specified, then only synthetic people from these cities will be sampled.' - ), - age_range: zod - .array(zod.number()) - .min( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsFourAgeRangeMin - ) - .max( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsFourAgeRangeMax - ) - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsFourAgeRangeDefault - ) - .describe( - 'If specified, then only synthetic people within this age range will be sampled.' - ), - select_field_values: zod - .record(zod.string(), zod.array(zod.string())) - .optional() - .describe( - 'Sample synthetic people with the specified field values. This is meant to be a flexible argument for selecting a subset of the population from the managed dataset. Note that this sampler does not support rare combinations of field values and will likely fail if your desired subset is not well-represented in the managed Nemotron Personas dataset. We generally recommend using the `sex`, `city`, and `age_range` arguments to filter the population when possible.' - ), - with_synthetic_personas: zod - .boolean() - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsFourWithSyntheticPersonasDefault - ) - .describe( - 'If True, then append synthetic persona columns to each generated person.' - ), - sampler_type: zod - .literal('person') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsFourSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling synthetic person data with demographic attributes.\n\nGenerates realistic synthetic person data including names, addresses, phone numbers, and other\ndemographic information from managed datasets. The sampler supports filtering by locale, sex, age,\ngeographic location, and selected managed-dataset fields, and can optionally include synthetic\npersona descriptions. For Faker-generated person data, use PersonFromFakerSamplerParams.\n\nAttributes:\n locale: Locale string determining the language and geographic region for synthetic people.\n Must be a locale supported by a managed Nemotron Personas dataset. The dataset must\n be downloaded and available in the managed assets directory.\n sex: If specified, filters to only sample people of the specified sex. Options: \"Male\" or\n \"Female\". If None, samples both sexes.\n city: If specified, filters to only sample people from the specified city or cities. Can be\n a single city name (string) or a list of city names.\n age_range: Two-element list [min_age, max_age] specifying the age range to sample from\n (inclusive). Defaults to a standard age range. Both values must be between minimum and\n maximum allowed ages.\n with_synthetic_personas: If True, appends additional synthetic persona columns including\n personality traits, interests, and background descriptions. Only supported for certain\n locales with managed datasets.\n select_field_values: Optional field-value filters for managed datasets. Supported field\n names are checked against the managed person data fields.' - ), - zod - .object({ - locale: zod - .string() - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsFiveLocaleDefault - ) - .describe( - 'Locale string, determines the language and geographic locale that a synthetic person will be sampled from. E.g, en_US, en_GB, fr_FR, ...' - ), - sex: zod - .enum(['Male', 'Female']) - .optional() - .describe( - 'If specified, then only synthetic people of the specified sex will be sampled.' - ), - city: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe( - 'If specified, then only synthetic people from these cities will be sampled.' - ), - age_range: zod - .array(zod.number()) - .min( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsFiveAgeRangeMin - ) - .max( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsFiveAgeRangeMax - ) - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsFiveAgeRangeDefault - ) - .describe( - 'If specified, then only synthetic people within this age range will be sampled.' - ), - sampler_type: zod - .literal('person_from_faker') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsFiveSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling synthetic person data with demographic attributes from Faker.\n\nUses the Faker library to generate random personal information. The data is basic and not demographically\naccurate, but is useful for quick testing, prototyping, or when realistic demographic distributions are not\nrelevant for your use case. For demographically accurate person data, use the `PersonSamplerParams` sampler.\n\nAttributes:\n locale: Locale string determining the language and geographic region for synthetic people.\n Can be any locale supported by Faker.\n sex: If specified, filters to only sample people of the specified sex. Options: \"Male\" or\n \"Female\". If None, samples both sexes.\n city: If specified, filters to only sample people from the specified city or cities. Can be\n a single city name (string) or a list of city names.\n age_range: Two-element list [min_age, max_age] specifying the age range to sample from\n (inclusive). Defaults to a standard age range. Both values must be between the minimum and\n maximum allowed ages.\n sampler_type: Discriminator for the sampler type. Must be `SamplerType.PERSON_FROM_FAKER`.' - ), - zod - .object({ - dt_min: zod - .number() - .min( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsSixDtMinMin - ) - .describe( - 'Minimum possible time-delta for sampling range, inclusive. Must be less than `dt_max`.' - ), - dt_max: zod - .number() - .gt( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsSixDtMaxExclusiveMin - ) - .describe( - 'Maximum possible time-delta for sampling range, exclusive. Must be greater than `dt_min`.' - ), - reference_column_name: zod - .string() - .describe( - 'Name of an existing datetime column to condition time-delta sampling on.' - ), - unit: zod - .enum(['D', 'h', 'm', 's']) - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsSixUnitDefault - ) - .describe( - 'Sampling units, e.g. the smallest possible time interval between samples.' - ), - sampler_type: zod - .literal('timedelta') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsSixSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling time deltas relative to a reference datetime column.\n\nSamples time offsets within a specified range and adds them to values from a reference\ndatetime column. This is useful for generating related datetime columns like order dates\nand delivery dates, or event start times and end times.\n\nNote:\n Years and months are not supported as timedelta units because they have variable lengths.\n See: [pandas timedelta documentation](https:\/\/pandas.pydata.org\/docs\/user_guide\/timedeltas.html)\n\nAttributes:\n dt_min (required): Minimum time-delta value (inclusive). Must be non-negative and less than `dt_max`.\n Specified in units defined by the `unit` parameter.\n dt_max (required): Maximum time-delta value (exclusive). Must be positive and greater than `dt_min`.\n Specified in units defined by the `unit` parameter.\n reference_column_name (required): Name of an existing datetime column to add the time-delta to.\n This column must be generated before the timedelta column.\n unit: Time unit for the delta values. Options:\n - \"D\": Days (default)\n - \"h\": Hours\n - \"m\": Minutes\n - \"s\": Seconds' - ), - zod - .object({ - prefix: zod - .string() - .optional() - .describe('String prepended to the front of the UUID.'), - short_form: zod - .boolean() - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsSevenShortFormDefault - ) - .describe( - 'If true, all UUIDs sampled will be truncated at 8 characters.' - ), - uppercase: zod - .boolean() - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsSevenUppercaseDefault - ) - .describe('If true, all letters in the UUID will be capitalized.'), - sampler_type: zod - .literal('uuid') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsSevenSamplerTypeDefault - ), - }) - .describe( - 'Parameters for generating UUID (Universally Unique Identifier) values.\n\nGenerates UUID4 (random) identifiers with optional formatting options. UUIDs are useful\nfor creating unique identifiers for records, entities, or transactions.\n\nAttributes:\n prefix: Optional string to prepend to each UUID. Useful for creating namespaced or\n typed identifiers (e.g., \"user-\", \"order-\", \"txn-\").\n short_form: If True, truncates UUIDs to 8 characters (first segment only). Default is False\n for full 32-character UUIDs (excluding hyphens).\n uppercase: If True, converts all hexadecimal letters to uppercase. Default is False for\n lowercase UUIDs.' - ), - zod - .object({ - p: zod - .number() - .min(dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsEightPMin) - .max(dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsEightPMax) - .describe('Probability of success.'), - sampler_type: zod - .literal('bernoulli') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsEightSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Bernoulli distribution.\n\nSamples binary values (0 or 1) representing the outcome of a single trial with a fixed\nprobability of success. This is the simplest discrete probability distribution, useful for\nmodeling binary outcomes like success\/failure, yes\/no, or true\/false.\n\nAttributes:\n p (required): Probability of success (sampling 1). Must be between 0.0 and 1.0 (inclusive).\n The probability of failure (sampling 0) is automatically 1 - p.' - ), - zod - .object({ - p: zod - .number() - .min(dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsNinePMin) - .max(dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsNinePMax) - .describe('Bernoulli distribution probability of success.'), - dist_name: zod - .string() - .describe( - 'Mixture distribution name. Samples will be equal to the distribution sample with probability `p`, otherwise equal to 0. Must be a valid scipy.stats distribution name.' - ), - dist_params: zod - .record(zod.string(), zod.unknown()) - .describe( - 'Parameters of the scipy.stats distribution given in `dist_name`.' - ), - sampler_type: zod - .literal('bernoulli_mixture') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsNineSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Bernoulli mixture distribution.\n\nCombines a Bernoulli distribution with another continuous distribution, creating a mixture\nwhere values are either 0 (with probability 1-p) or sampled from the specified distribution\n(with probability p). This is useful for modeling scenarios with many zero values mixed with\na continuous distribution of non-zero values.\n\nCommon use cases include modeling sparse events, zero-inflated data, or situations where\nan outcome either doesn\'t occur (0) or follows a specific distribution when it does occur.\n\nAttributes:\n p (required): Probability of sampling from the mixture distribution (non-zero outcome).\n Must be between 0.0 and 1.0 (inclusive). With probability 1-p, the sample is 0.\n dist_name (required): Name of the scipy.stats distribution to sample from when outcome is non-zero.\n Must be a valid scipy.stats distribution name (e.g., \"norm\", \"gamma\", \"expon\").\n dist_params (required): Parameters for the specified scipy.stats distribution.' - ), - zod - .object({ - n: zod.number().describe('Number of trials.'), - p: zod - .number() - .min( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsOnezeroPMin - ) - .max( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsOnezeroPMax - ) - .describe('Probability of success on each trial.'), - sampler_type: zod - .literal('binomial') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsOnezeroSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Binomial distribution.\n\nSamples integer values representing the number of successes in a fixed number of independent\nBernoulli trials, each with the same probability of success. Commonly used to model the number\nof successful outcomes in repeated experiments.\n\nAttributes:\n n (required): Number of independent trials. Must be a positive integer.\n p (required): Probability of success on each trial. Must be between 0.0 and 1.0 (inclusive).' - ), - zod - .object({ - mean: zod.number().describe('Mean of the Gaussian distribution'), - stddev: zod - .number() - .describe('Standard deviation of the Gaussian distribution'), - decimal_places: zod - .number() - .optional() - .describe('Number of decimal places to round the sampled values to.'), - sampler_type: zod - .literal('gaussian') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsOneoneSamplerTypeDefault - ), - }) - .describe( - "Parameters for sampling from a Gaussian (Normal) distribution.\n\nSamples continuous values from a normal distribution characterized by its mean and standard\ndeviation. The Gaussian distribution is one of the most commonly used probability distributions,\nappearing naturally in many real-world phenomena due to the Central Limit Theorem.\n\nAttributes:\n mean (required): Mean (center) of the Gaussian distribution. This is the expected value and the\n location of the distribution's peak.\n stddev (required): Standard deviation of the Gaussian distribution. Controls the spread or width\n of the distribution. Must be positive.\n decimal_places: Optional number of decimal places to round sampled values to. If None,\n values are not rounded." - ), - zod - .object({ - mean: zod.number().describe('Mean number of events in a fixed interval.'), - sampler_type: zod - .literal('poisson') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsOnetwoSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Poisson distribution.\n\nSamples non-negative integer values representing the number of events occurring in a fixed\ninterval of time or space. The Poisson distribution is commonly used to model count data\nlike the number of arrivals, occurrences, or events per time period.\n\nThe distribution is characterized by a single parameter (mean\/rate), and both the mean and\nvariance equal this parameter value.\n\nAttributes:\n mean (required): Mean number of events in the fixed interval (also called rate parameter Ī»).\n Must be positive. This represents both the expected value and the variance of the\n distribution.' - ), - zod - .object({ - low: zod - .number() - .describe('Lower bound of the uniform distribution, inclusive.'), - high: zod.number().describe('Upper bound of the uniform distribution.'), - decimal_places: zod - .number() - .optional() - .describe('Number of decimal places to round the sampled values to.'), - sampler_type: zod - .literal('uniform') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsOnethreeSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a continuous Uniform distribution.\n\nSamples continuous values uniformly from a specified range, where every value in the range\nhas equal probability of being sampled. This is useful when all values within a range are\nequally likely, such as random percentages, proportions, or unbiased measurements.\n\nAttributes:\n low (required): Lower bound of the uniform distribution (inclusive). Can be any real number.\n high (required): Upper bound of the uniform distribution. Must be greater than `low`.\n decimal_places: Optional number of decimal places to round sampled values to. If None,\n values are not rounded and may have many decimal places.' - ), - zod - .object({ - dist_name: zod.string().describe('Name of a scipy.stats distribution.'), - dist_params: zod - .record(zod.string(), zod.unknown()) - .describe( - 'Parameters of the scipy.stats distribution given in `dist_name`.' - ), - decimal_places: zod - .number() - .optional() - .describe('Number of decimal places to round the sampled values to.'), - sampler_type: zod - .literal('scipy') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenParamsOnefourSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from any scipy.stats continuous or discrete distribution.\n\nProvides a flexible interface to sample from the wide range of probability distributions\navailable in scipy.stats. This enables advanced statistical sampling beyond the built-in\ndistribution types (Gaussian, Uniform, etc.).\n\nSee: [scipy.stats documentation](https:\/\/docs.scipy.org\/doc\/scipy\/reference\/stats.html)\n\nAttributes:\n dist_name (required): Name of the scipy.stats distribution to sample from (e.g., \"beta\", \"gamma\",\n \"lognorm\", \"expon\"). Must be a valid distribution name from scipy.stats.\n dist_params (required): Dictionary of parameters for the specified distribution. Parameter names\n and values must match the scipy.stats distribution specification (e.g., {\"a\": 2, \"b\": 5}\n for beta distribution, {\"scale\": 1.5} for exponential).\n decimal_places: Optional number of decimal places to round sampled values to. If None,\n values are not rounded.' - ), - ]) - .describe('Parameters specific to the chosen sampler type'), - conditional_params: zod - .record( - zod.string(), - zod.union([ - zod - .object({ - category: zod - .string() - .describe('Name of parent category to this subcategory.'), - values: zod - .record( - zod.string(), - zod.array(zod.union([zod.string(), zod.number(), zod.number()])) - ) - .describe( - 'Mapping from each value of parent category to a list of subcategory values.' - ), - sampler_type: zod - .literal('subcategory') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsOneSamplerTypeDefault - ), - }) - .describe( - 'Parameters for subcategory sampling conditioned on a parent category column.\n\nSamples subcategory values based on the value of a parent category column. Each parent\ncategory value maps to its own list of possible subcategory values, enabling hierarchical\nor conditional sampling patterns.\n\nAttributes:\n category (required): Name of the parent category column that this subcategory depends on.\n The parent column must be generated before this subcategory column.\n values (required): Mapping from each parent category value to a list of possible subcategory values.\n Each key must correspond to a value that appears in the parent category column.' - ), - zod - .object({ - values: zod - .array(zod.union([zod.string(), zod.number(), zod.number()])) - .min(1) - .describe( - 'List of possible categorical values that can be sampled from.' - ), - weights: zod - .array(zod.number()) - .optional() - .describe( - 'List of unnormalized probability weights to assigned to each value, in order. Larger values will be sampled with higher probability.' - ), - sampler_type: zod - .literal('category') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsTwoSamplerTypeDefault - ), - }) - .describe( - 'Parameters for categorical sampling with optional probability weighting.\n\nSamples values from a discrete set of categories. When weights are provided, values are\nsampled according to their assigned probabilities. Without weights, uniform sampling is used.\n\nAttributes:\n values (required): List of possible categorical values to sample from. Can contain strings, integers,\n or floats. Must contain at least one value.\n weights: Optional unnormalized probability weights for each value. If provided, must be\n the same length as `values`. Weights are automatically normalized to sum to 1.0.\n Larger weights result in higher sampling probability for the corresponding value.' - ), - zod - .object({ - start: zod - .string() - .describe( - 'Earliest possible datetime for sampling range, inclusive.' - ), - end: zod - .string() - .describe('Exclusive upper bound for datetime sampling range.'), - unit: zod - .enum(['Y', 'M', 'D', 'h', 'm', 's']) - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsThreeUnitDefault - ) - .describe( - 'Sampling units, e.g. the smallest possible time interval between samples.' - ), - sampler_type: zod - .literal('datetime') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsThreeSamplerTypeDefault - ), - }) - .describe( - 'Parameters for uniform datetime sampling within a specified range.\n\nSamples datetime values uniformly between a start and end date with a specified granularity.\nThe sampling unit determines the smallest possible time interval between consecutive samples.\n\nAttributes:\n start (required): Earliest possible datetime for the sampling range (inclusive). Must be a valid\n datetime string parseable by pandas.to_datetime().\n end (required): Exclusive upper bound for the sampling range. Must be a valid\n datetime string parseable by pandas.to_datetime().\n unit: Time unit for sampling granularity. Options:\n - \"Y\": Years\n - \"M\": Months\n - \"D\": Days (default)\n - \"h\": Hours\n - \"m\": Minutes\n - \"s\": Seconds' - ), - zod - .object({ - locale: zod - .string() - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsFourLocaleDefault - ) - .describe( - 'Locale that determines the language and geographic location that a synthetic person will be sampled from. Must be a locale supported by a managed Nemotron Personas dataset. Managed datasets exist for the following locales: en_US, en_IN, en_SG, fr_FR, hi_Deva_IN, hi_Latn_IN, ja_JP, ko_KR, pt_BR.' - ), - sex: zod - .enum(['Male', 'Female']) - .optional() - .describe( - 'If specified, then only synthetic people of the specified sex will be sampled.' - ), - city: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe( - 'If specified, then only synthetic people from these cities will be sampled.' - ), - age_range: zod - .array(zod.number()) - .min( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsFourAgeRangeMin - ) - .max( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsFourAgeRangeMax - ) - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsFourAgeRangeDefault - ) - .describe( - 'If specified, then only synthetic people within this age range will be sampled.' - ), - select_field_values: zod - .record(zod.string(), zod.array(zod.string())) - .optional() - .describe( - 'Sample synthetic people with the specified field values. This is meant to be a flexible argument for selecting a subset of the population from the managed dataset. Note that this sampler does not support rare combinations of field values and will likely fail if your desired subset is not well-represented in the managed Nemotron Personas dataset. We generally recommend using the `sex`, `city`, and `age_range` arguments to filter the population when possible.' - ), - with_synthetic_personas: zod - .boolean() - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsFourWithSyntheticPersonasDefault - ) - .describe( - 'If True, then append synthetic persona columns to each generated person.' - ), - sampler_type: zod - .literal('person') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsFourSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling synthetic person data with demographic attributes.\n\nGenerates realistic synthetic person data including names, addresses, phone numbers, and other\ndemographic information from managed datasets. The sampler supports filtering by locale, sex, age,\ngeographic location, and selected managed-dataset fields, and can optionally include synthetic\npersona descriptions. For Faker-generated person data, use PersonFromFakerSamplerParams.\n\nAttributes:\n locale: Locale string determining the language and geographic region for synthetic people.\n Must be a locale supported by a managed Nemotron Personas dataset. The dataset must\n be downloaded and available in the managed assets directory.\n sex: If specified, filters to only sample people of the specified sex. Options: \"Male\" or\n \"Female\". If None, samples both sexes.\n city: If specified, filters to only sample people from the specified city or cities. Can be\n a single city name (string) or a list of city names.\n age_range: Two-element list [min_age, max_age] specifying the age range to sample from\n (inclusive). Defaults to a standard age range. Both values must be between minimum and\n maximum allowed ages.\n with_synthetic_personas: If True, appends additional synthetic persona columns including\n personality traits, interests, and background descriptions. Only supported for certain\n locales with managed datasets.\n select_field_values: Optional field-value filters for managed datasets. Supported field\n names are checked against the managed person data fields.' - ), - zod - .object({ - locale: zod - .string() - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsFiveLocaleDefault - ) - .describe( - 'Locale string, determines the language and geographic locale that a synthetic person will be sampled from. E.g, en_US, en_GB, fr_FR, ...' - ), - sex: zod - .enum(['Male', 'Female']) - .optional() - .describe( - 'If specified, then only synthetic people of the specified sex will be sampled.' - ), - city: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe( - 'If specified, then only synthetic people from these cities will be sampled.' - ), - age_range: zod - .array(zod.number()) - .min( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsFiveAgeRangeMin - ) - .max( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsFiveAgeRangeMax - ) - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsFiveAgeRangeDefault - ) - .describe( - 'If specified, then only synthetic people within this age range will be sampled.' - ), - sampler_type: zod - .literal('person_from_faker') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsFiveSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling synthetic person data with demographic attributes from Faker.\n\nUses the Faker library to generate random personal information. The data is basic and not demographically\naccurate, but is useful for quick testing, prototyping, or when realistic demographic distributions are not\nrelevant for your use case. For demographically accurate person data, use the `PersonSamplerParams` sampler.\n\nAttributes:\n locale: Locale string determining the language and geographic region for synthetic people.\n Can be any locale supported by Faker.\n sex: If specified, filters to only sample people of the specified sex. Options: \"Male\" or\n \"Female\". If None, samples both sexes.\n city: If specified, filters to only sample people from the specified city or cities. Can be\n a single city name (string) or a list of city names.\n age_range: Two-element list [min_age, max_age] specifying the age range to sample from\n (inclusive). Defaults to a standard age range. Both values must be between the minimum and\n maximum allowed ages.\n sampler_type: Discriminator for the sampler type. Must be `SamplerType.PERSON_FROM_FAKER`.' - ), - zod - .object({ - dt_min: zod - .number() - .min( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsSixDtMinMin - ) - .describe( - 'Minimum possible time-delta for sampling range, inclusive. Must be less than `dt_max`.' - ), - dt_max: zod - .number() - .gt( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsSixDtMaxExclusiveMin - ) - .describe( - 'Maximum possible time-delta for sampling range, exclusive. Must be greater than `dt_min`.' - ), - reference_column_name: zod - .string() - .describe( - 'Name of an existing datetime column to condition time-delta sampling on.' - ), - unit: zod - .enum(['D', 'h', 'm', 's']) - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsSixUnitDefault - ) - .describe( - 'Sampling units, e.g. the smallest possible time interval between samples.' - ), - sampler_type: zod - .literal('timedelta') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsSixSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling time deltas relative to a reference datetime column.\n\nSamples time offsets within a specified range and adds them to values from a reference\ndatetime column. This is useful for generating related datetime columns like order dates\nand delivery dates, or event start times and end times.\n\nNote:\n Years and months are not supported as timedelta units because they have variable lengths.\n See: [pandas timedelta documentation](https:\/\/pandas.pydata.org\/docs\/user_guide\/timedeltas.html)\n\nAttributes:\n dt_min (required): Minimum time-delta value (inclusive). Must be non-negative and less than `dt_max`.\n Specified in units defined by the `unit` parameter.\n dt_max (required): Maximum time-delta value (exclusive). Must be positive and greater than `dt_min`.\n Specified in units defined by the `unit` parameter.\n reference_column_name (required): Name of an existing datetime column to add the time-delta to.\n This column must be generated before the timedelta column.\n unit: Time unit for the delta values. Options:\n - \"D\": Days (default)\n - \"h\": Hours\n - \"m\": Minutes\n - \"s\": Seconds' - ), - zod - .object({ - prefix: zod - .string() - .optional() - .describe('String prepended to the front of the UUID.'), - short_form: zod - .boolean() - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsSevenShortFormDefault - ) - .describe( - 'If true, all UUIDs sampled will be truncated at 8 characters.' - ), - uppercase: zod - .boolean() - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsSevenUppercaseDefault - ) - .describe('If true, all letters in the UUID will be capitalized.'), - sampler_type: zod - .literal('uuid') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsSevenSamplerTypeDefault - ), - }) - .describe( - 'Parameters for generating UUID (Universally Unique Identifier) values.\n\nGenerates UUID4 (random) identifiers with optional formatting options. UUIDs are useful\nfor creating unique identifiers for records, entities, or transactions.\n\nAttributes:\n prefix: Optional string to prepend to each UUID. Useful for creating namespaced or\n typed identifiers (e.g., \"user-\", \"order-\", \"txn-\").\n short_form: If True, truncates UUIDs to 8 characters (first segment only). Default is False\n for full 32-character UUIDs (excluding hyphens).\n uppercase: If True, converts all hexadecimal letters to uppercase. Default is False for\n lowercase UUIDs.' - ), - zod - .object({ - p: zod - .number() - .min( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsEightPMin - ) - .max( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsEightPMax - ) - .describe('Probability of success.'), - sampler_type: zod - .literal('bernoulli') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsEightSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Bernoulli distribution.\n\nSamples binary values (0 or 1) representing the outcome of a single trial with a fixed\nprobability of success. This is the simplest discrete probability distribution, useful for\nmodeling binary outcomes like success\/failure, yes\/no, or true\/false.\n\nAttributes:\n p (required): Probability of success (sampling 1). Must be between 0.0 and 1.0 (inclusive).\n The probability of failure (sampling 0) is automatically 1 - p.' - ), - zod - .object({ - p: zod - .number() - .min( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsNinePMin - ) - .max( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsNinePMax - ) - .describe('Bernoulli distribution probability of success.'), - dist_name: zod - .string() - .describe( - 'Mixture distribution name. Samples will be equal to the distribution sample with probability `p`, otherwise equal to 0. Must be a valid scipy.stats distribution name.' - ), - dist_params: zod - .record(zod.string(), zod.unknown()) - .describe( - 'Parameters of the scipy.stats distribution given in `dist_name`.' - ), - sampler_type: zod - .literal('bernoulli_mixture') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsNineSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Bernoulli mixture distribution.\n\nCombines a Bernoulli distribution with another continuous distribution, creating a mixture\nwhere values are either 0 (with probability 1-p) or sampled from the specified distribution\n(with probability p). This is useful for modeling scenarios with many zero values mixed with\na continuous distribution of non-zero values.\n\nCommon use cases include modeling sparse events, zero-inflated data, or situations where\nan outcome either doesn\'t occur (0) or follows a specific distribution when it does occur.\n\nAttributes:\n p (required): Probability of sampling from the mixture distribution (non-zero outcome).\n Must be between 0.0 and 1.0 (inclusive). With probability 1-p, the sample is 0.\n dist_name (required): Name of the scipy.stats distribution to sample from when outcome is non-zero.\n Must be a valid scipy.stats distribution name (e.g., \"norm\", \"gamma\", \"expon\").\n dist_params (required): Parameters for the specified scipy.stats distribution.' - ), - zod - .object({ - n: zod.number().describe('Number of trials.'), - p: zod - .number() - .min( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsOnezeroPMin - ) - .max( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsOnezeroPMax - ) - .describe('Probability of success on each trial.'), - sampler_type: zod - .literal('binomial') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsOnezeroSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Binomial distribution.\n\nSamples integer values representing the number of successes in a fixed number of independent\nBernoulli trials, each with the same probability of success. Commonly used to model the number\nof successful outcomes in repeated experiments.\n\nAttributes:\n n (required): Number of independent trials. Must be a positive integer.\n p (required): Probability of success on each trial. Must be between 0.0 and 1.0 (inclusive).' - ), - zod - .object({ - mean: zod.number().describe('Mean of the Gaussian distribution'), - stddev: zod - .number() - .describe('Standard deviation of the Gaussian distribution'), - decimal_places: zod - .number() - .optional() - .describe('Number of decimal places to round the sampled values to.'), - sampler_type: zod - .literal('gaussian') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsOneoneSamplerTypeDefault - ), - }) - .describe( - "Parameters for sampling from a Gaussian (Normal) distribution.\n\nSamples continuous values from a normal distribution characterized by its mean and standard\ndeviation. The Gaussian distribution is one of the most commonly used probability distributions,\nappearing naturally in many real-world phenomena due to the Central Limit Theorem.\n\nAttributes:\n mean (required): Mean (center) of the Gaussian distribution. This is the expected value and the\n location of the distribution's peak.\n stddev (required): Standard deviation of the Gaussian distribution. Controls the spread or width\n of the distribution. Must be positive.\n decimal_places: Optional number of decimal places to round sampled values to. If None,\n values are not rounded." - ), - zod - .object({ - mean: zod - .number() - .describe('Mean number of events in a fixed interval.'), - sampler_type: zod - .literal('poisson') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsOnetwoSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Poisson distribution.\n\nSamples non-negative integer values representing the number of events occurring in a fixed\ninterval of time or space. The Poisson distribution is commonly used to model count data\nlike the number of arrivals, occurrences, or events per time period.\n\nThe distribution is characterized by a single parameter (mean\/rate), and both the mean and\nvariance equal this parameter value.\n\nAttributes:\n mean (required): Mean number of events in the fixed interval (also called rate parameter Ī»).\n Must be positive. This represents both the expected value and the variance of the\n distribution.' - ), - zod - .object({ - low: zod - .number() - .describe('Lower bound of the uniform distribution, inclusive.'), - high: zod.number().describe('Upper bound of the uniform distribution.'), - decimal_places: zod - .number() - .optional() - .describe('Number of decimal places to round the sampled values to.'), - sampler_type: zod - .literal('uniform') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsOnethreeSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a continuous Uniform distribution.\n\nSamples continuous values uniformly from a specified range, where every value in the range\nhas equal probability of being sampled. This is useful when all values within a range are\nequally likely, such as random percentages, proportions, or unbiased measurements.\n\nAttributes:\n low (required): Lower bound of the uniform distribution (inclusive). Can be any real number.\n high (required): Upper bound of the uniform distribution. Must be greater than `low`.\n decimal_places: Optional number of decimal places to round sampled values to. If None,\n values are not rounded and may have many decimal places.' - ), - zod - .object({ - dist_name: zod.string().describe('Name of a scipy.stats distribution.'), - dist_params: zod - .record(zod.string(), zod.unknown()) - .describe( - 'Parameters of the scipy.stats distribution given in `dist_name`.' - ), - decimal_places: zod - .number() - .optional() - .describe('Number of decimal places to round the sampled values to.'), - sampler_type: zod - .literal('scipy') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemSevenConditionalParamsOnefourSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from any scipy.stats continuous or discrete distribution.\n\nProvides a flexible interface to sample from the wide range of probability distributions\navailable in scipy.stats. This enables advanced statistical sampling beyond the built-in\ndistribution types (Gaussian, Uniform, etc.).\n\nSee: [scipy.stats documentation](https:\/\/docs.scipy.org\/doc\/scipy\/reference\/stats.html)\n\nAttributes:\n dist_name (required): Name of the scipy.stats distribution to sample from (e.g., \"beta\", \"gamma\",\n \"lognorm\", \"expon\"). Must be a valid distribution name from scipy.stats.\n dist_params (required): Dictionary of parameters for the specified distribution. Parameter names\n and values must match the scipy.stats distribution specification (e.g., {\"a\": 2, \"b\": 5}\n for beta distribution, {\"scale\": 1.5} for exponential).\n decimal_places: Optional number of decimal places to round sampled values to. If None,\n values are not rounded.' - ), - ]) - ) - .optional() - .describe( - 'Optional dictionary for conditional parameters; keys are conditions, values are params to use when met' - ), - convert_to: zod - .string() - .optional() - .describe( - "Optional type conversion after sampling: 'float', 'int', or 'str' for numerical samplers; a strftime format string (e.g., '%Y-%m-%d') for datetime\/timedelta samplers. Datetime\/timedelta columns default to ISO-8601 (e.g., 2024-01-15T09:30:00) when omitted." - ), - }) - .describe( - 'Configuration for columns generated using built-in samplers.\n\nSampler columns provide efficient data generation for common data types and\ndistributions. Supported samplers include UUID generation,\ndatetime\/timedelta sampling, person generation, category \/ subcategory sampling,\nand various statistical distributions (uniform, gaussian, binomial, poisson, scipy).\n\nAttributes:\n sampler_type (required): Type of sampler to use. Available types include:\n \"uuid\", \"category\", \"subcategory\", \"uniform\", \"gaussian\", \"bernoulli\",\n \"bernoulli_mixture\", \"binomial\", \"poisson\", \"scipy\", \"person\",\n \"person_from_faker\", \"datetime\", \"timedelta\".\n params (required): Parameters specific to the chosen sampler type. Type varies based on the `sampler_type`\n (e.g., `CategorySamplerParams`, `UniformSamplerParams`, `PersonSamplerParams`).\n conditional_params: Optional dictionary for conditional parameters. The dict keys\n are the conditions that must be met (e.g., \"age > 21\") for the conditional parameters\n to be used. The values of dict are the parameters to use when the condition is met.\n convert_to: Optional type conversion to apply after sampling. For numerical samplers,\n must be one of \"float\", \"int\", or \"str\". For datetime and timedelta samplers, accepts\n a strftime format string (e.g., ``\"%Y-%m-%d\"``, ``\"%m\/%d\/%Y %H:%M\"``). When omitted,\n datetime\/timedelta columns default to ISO-8601 format (e.g., ``2024-01-15T09:30:00``).\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.\n\n!!! tip \"Displaying available samplers and their parameters\"\n The config builder has an `info` attribute that can be used to display the\n available samplers and their parameters:\n ```python\n config_builder.info.display(\"samplers\")\n ```' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default(dataDesignerCreateJobBodySpecConfigColumnsItemEightDropDefault), - allow_resize: zod - .boolean() - .default(dataDesignerCreateJobBodySpecConfigColumnsItemEightAllowResizeDefault), - column_type: zod - .literal('seed-dataset') - .default(dataDesignerCreateJobBodySpecConfigColumnsItemEightColumnTypeDefault), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemEightPropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - }) - .describe( - 'Configuration for columns sourced from seed datasets.\n\nThis config marks columns that come from seed data. It is typically created\nautomatically when calling `with_seed_dataset()` on the builder, rather than\nbeing instantiated directly by users.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default(dataDesignerCreateJobBodySpecConfigColumnsItemNineDropDefault), - allow_resize: zod - .boolean() - .default(dataDesignerCreateJobBodySpecConfigColumnsItemNineAllowResizeDefault), - column_type: zod - .literal('validation') - .default(dataDesignerCreateJobBodySpecConfigColumnsItemNineColumnTypeDefault), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default(dataDesignerCreateJobBodySpecConfigColumnsItemNinePropagateSkipDefault) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - target_columns: zod - .array(zod.string()) - .describe('List of column names to validate'), - validator_type: zod - .enum(['code', 'local_callable', 'remote']) - .describe("Validation method: 'code', 'local_callable', or 'remote'"), - validator_params: zod - .union([ - zod - .object({ - validator_type: zod - .literal('code') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemNineValidatorParamsOneValidatorTypeDefault - ) - .describe( - "Validator type discriminator, always 'code' for this validator" - ), - code_lang: zod - .enum([ - 'bash', - 'c', - 'cobol', - 'cpp', - 'csharp', - 'go', - 'java', - 'javascript', - 'kotlin', - 'python', - 'ruby', - 'rust', - 'scala', - 'swift', - 'typescript', - 'sql:sqlite', - 'sql:tsql', - 'sql:bigquery', - 'sql:mysql', - 'sql:postgres', - 'sql:ansi', - ]) - .describe('The language of the code to validate'), - }) - .describe( - 'Configuration for code validation. Supports Python and SQL code validation.\n\nAttributes:\n code_lang (required): The language of the code to validate. Supported values include: `python`,\n `sql:sqlite`, `sql:postgres`, `sql:mysql`, `sql:tsql`, `sql:bigquery`, `sql:ansi`.' - ), - zod - .object({ - validator_type: zod - .literal('local_callable') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemNineValidatorParamsTwoValidatorTypeDefault - ) - .describe( - "Validator type discriminator, always 'local_callable' for this validator" - ), - validation_function: zod - .unknown() - .describe( - 'Function (Callable[[pd.DataFrame], pd.DataFrame]) to validate the data' - ), - output_schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe("Expected schema for local callable validator's output"), - }) - .describe( - "Configuration for local callable validation. Expects a function to be passed that validates the data.\n\nAttributes:\n validation_function (required): Function (`Callable[[pd.DataFrame], pd.DataFrame]`) to validate the\n data. Output must contain a column `is_valid` of type `bool`.\n output_schema: The JSON schema for the local callable validator's output. If not provided,\n the output will not be validated." - ), - zod - .object({ - validator_type: zod - .literal('remote') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemNineValidatorParamsThreeValidatorTypeDefault - ) - .describe( - "Validator type discriminator, always 'remote' for this validator" - ), - endpoint_url: zod.string().describe('URL of the remote endpoint'), - output_schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe("Expected schema for remote validator's output"), - timeout: zod - .number() - .gt( - dataDesignerCreateJobBodySpecConfigColumnsItemNineValidatorParamsThreeTimeoutExclusiveMin - ) - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemNineValidatorParamsThreeTimeoutDefault - ) - .describe('The timeout for the HTTP request'), - max_retries: zod - .number() - .min( - dataDesignerCreateJobBodySpecConfigColumnsItemNineValidatorParamsThreeMaxRetriesMin - ) - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemNineValidatorParamsThreeMaxRetriesDefault - ) - .describe('The maximum number of retry attempts'), - retry_backoff: zod - .number() - .gt( - dataDesignerCreateJobBodySpecConfigColumnsItemNineValidatorParamsThreeRetryBackoffExclusiveMin - ) - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemNineValidatorParamsThreeRetryBackoffDefault - ) - .describe('The backoff factor for the retry delay'), - max_parallel_requests: zod - .number() - .min(1) - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemNineValidatorParamsThreeMaxParallelRequestsDefault - ) - .describe('The maximum number of parallel requests to make'), - }) - .describe( - "Configuration for remote validation. Sends data to a remote endpoint for validation.\n\nAttributes:\n endpoint_url (required): The URL of the remote endpoint.\n output_schema: The JSON schema for the remote validator's output. If not provided,\n the output will not be validated.\n timeout: The timeout for the HTTP request in seconds. Defaults to 30.0.\n max_retries: The maximum number of retry attempts. Defaults to 3.\n retry_backoff: The backoff factor for the retry delay in seconds. Defaults to 2.0.\n max_parallel_requests: The maximum number of parallel requests to make. Defaults to 4." - ), - ]) - .describe('Validator-specific parameters (e.g., CodeValidatorParams)'), - batch_size: zod - .number() - .min(1) - .default(dataDesignerCreateJobBodySpecConfigColumnsItemNineBatchSizeDefault) - .describe('Number of records to process in each batch'), - }) - .describe( - 'Configuration for validation columns that validate existing columns.\n\nValidation columns execute validation logic against specified target columns and return\nstructured results indicating pass\/fail status with validation details. Supports multiple\nvalidation strategies: code execution (Python\/SQL), local callable functions (library only),\nand remote HTTP endpoints.\n\nAttributes:\n target_columns (required): List of column names to validate. These columns are passed to the\n validator for validation. All target columns must exist in the dataset\n before validation runs.\n validator_type (required): The type of validator to use. Options:\n - \"code\": Execute code (Python or SQL) for validation. The code receives a\n DataFrame with target columns and must return a DataFrame with validation results.\n - \"local_callable\": Call a local Python function with the data. Only supported\n when running DataDesigner locally.\n - \"remote\": Send data to a remote HTTP endpoint for validation.\n validator_params (required): Parameters specific to the validator type. Type varies by validator:\n - CodeValidatorParams: Specifies code language (python or SQL dialect like\n \"sql:postgres\", \"sql:mysql\").\n - LocalCallableValidatorParams: Provides validation function (Callable[[pd.DataFrame],\n pd.DataFrame]) and optional output schema for validation results.\n - RemoteValidatorParams: Configures endpoint URL, HTTP timeout, retry behavior\n (max_retries, retry_backoff), and parallel request limits (max_parallel_requests).\n batch_size: Number of records to process in each validation batch. Defaults to 10.\n Larger batches are more efficient but use more memory. Adjust based on validator\n complexity and available resources.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default(dataDesignerCreateJobBodySpecConfigColumnsItemOnezeroDropDefault), - allow_resize: zod - .boolean() - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemOnezeroAllowResizeDefault - ), - column_type: zod - .literal('embedding') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemOnezeroColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemOnezeroPropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - target_column: zod - .string() - .describe('Name of the text column to generate embeddings for'), - model_alias: zod - .string() - .describe('Alias of the model to use for embedding generation'), - }) - .describe( - 'Configuration for embedding generation columns.\n\nEmbedding columns generate embeddings for text input using a specified model.\n\nAttributes:\n target_column (required): The column to generate embeddings for. The column could be a single text string or a list of text strings in stringified JSON format.\n If it is a list of text strings in stringified JSON format, the embeddings will be generated for each text string.\n model_alias (required): The model to use for embedding generation.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default(dataDesignerCreateJobBodySpecConfigColumnsItemOneoneDropDefault), - allow_resize: zod - .boolean() - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemOneoneAllowResizeDefault - ), - column_type: zod - .literal('image') - .default(dataDesignerCreateJobBodySpecConfigColumnsItemOneoneColumnTypeDefault), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemOneonePropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - prompt: zod - .string() - .describe( - 'Jinja2 template for the image generation prompt; can reference other columns via {{ column_name }}' - ), - model_alias: zod - .string() - .describe('Alias of the model to use for image generation'), - multi_modal_context: zod - .array( - zod - .object({ - modality: zod - .enum(['image']) - .describe('Supported modality types for multimodal model data.') - .default( - dataDesignerCreateJobBodySpecConfigColumnsItemOneoneMultiModalContextItemModalityDefault - ), - column_name: zod.string(), - data_type: zod - .enum(['url', 'base64']) - .optional() - .describe('Data type formats for multimodal data.'), - image_format: zod - .enum(['png', 'jpg', 'jpeg', 'gif', 'webp']) - .optional() - .describe('Supported image formats for image modality.'), - }) - .describe( - 'Configuration for providing image context to multimodal models.\n\nAttributes:\n modality: The modality type (always \"image\").\n column_name: Name of the column containing image data.\n data_type: Format of the image data (\"url\", \"base64\", or None for auto-detection).\n When None, the format is auto-detected: URLs are passed through, file paths that\n exist under base_path are loaded as base64, and other values are assumed to be base64.\n image_format: Image format (required when data_type is explicitly \"base64\").' - ) - ) - .optional() - .describe( - 'Optional list of ImageContext for multi-modal image-to-image generation' - ), - }) - .describe( - 'Configuration for image generation columns.\n\nImage columns generate images using either autoregressive or diffusion models.\nThe API used is automatically determined based on the model name:\n\nAttributes:\n prompt (required): Prompt template for image generation. Supports Jinja2 templating to\n reference other columns (e.g., \"Generate an image of a {{ character_name }}\").\n Must be a valid Jinja2 template.\n model_alias (required): The model to use for image generation.\n multi_modal_context: Optional list of image contexts for multi-modal generation.\n Enables autoregressive multi-modal models to generate images based on image inputs.\n Only works with autoregressive models that support image-to-image generation.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - ]) - ) - .min(1), - model_configs: zod - .array( - zod - .object({ - alias: zod.string(), - model: zod.string(), - inference_parameters: zod - .union([ - zod - .object({ - generation_type: zod - .literal('chat-completion') - .default( - dataDesignerCreateJobBodySpecConfigModelConfigsItemInferenceParametersOneGenerationTypeDefault - ), - max_parallel_requests: zod - .number() - .min(1) - .default( - dataDesignerCreateJobBodySpecConfigModelConfigsItemInferenceParametersOneMaxParallelRequestsDefault - ), - timeout: zod.number().min(1).optional(), - extra_body: zod.record(zod.string(), zod.unknown()).optional(), - temperature: zod - .union([ - zod.number(), - zod - .object({ - distribution_type: zod - .enum(['uniform', 'manual']) - .describe( - 'Types of distributions for sampling inference parameters.' - ) - .default( - dataDesignerCreateJobBodySpecConfigModelConfigsItemInferenceParametersOneTemperatureTwoDistributionTypeDefault - ), - params: zod - .object({ - low: zod.number(), - high: zod.number(), - }) - .describe( - 'Parameters for uniform distribution sampling.\n\nAttributes:\n low: Lower bound (inclusive).\n high: Upper bound (exclusive).' - ), - }) - .describe( - 'Uniform distribution for sampling inference parameters.\n\nSamples values uniformly between low and high bounds. Useful for exploring\na continuous range of values for temperature or top_p.\n\nAttributes:\n distribution_type: Type of distribution (\"uniform\").\n params: Distribution parameters (low, high).' - ), - zod - .object({ - distribution_type: zod - .enum(['uniform', 'manual']) - .describe( - 'Types of distributions for sampling inference parameters.' - ) - .default( - dataDesignerCreateJobBodySpecConfigModelConfigsItemInferenceParametersOneTemperatureThreeDistributionTypeDefault - ), - params: zod - .object({ - values: zod.array(zod.number()).min(1), - weights: zod.array(zod.number()).optional(), - }) - .describe( - 'Parameters for manual distribution sampling.\n\nAttributes:\n values: List of possible values to sample from.\n weights: Optional list of weights for each value. If not provided, all values have equal probability.' - ), - }) - .describe( - 'Manual (discrete) distribution for sampling inference parameters.\n\nSamples from a discrete set of values with optional weights. Useful for testing\nspecific values or creating custom probability distributions for temperature or top_p.\n\nAttributes:\n distribution_type: Type of distribution (\"manual\").\n params: Distribution parameters (values, weights).' - ), - ]) - .optional(), - top_p: zod - .union([ - zod.number(), - zod - .object({ - distribution_type: zod - .enum(['uniform', 'manual']) - .describe( - 'Types of distributions for sampling inference parameters.' - ) - .default( - dataDesignerCreateJobBodySpecConfigModelConfigsItemInferenceParametersOneTopPTwoDistributionTypeDefault - ), - params: zod - .object({ - low: zod.number(), - high: zod.number(), - }) - .describe( - 'Parameters for uniform distribution sampling.\n\nAttributes:\n low: Lower bound (inclusive).\n high: Upper bound (exclusive).' - ), - }) - .describe( - 'Uniform distribution for sampling inference parameters.\n\nSamples values uniformly between low and high bounds. Useful for exploring\na continuous range of values for temperature or top_p.\n\nAttributes:\n distribution_type: Type of distribution (\"uniform\").\n params: Distribution parameters (low, high).' - ), - zod - .object({ - distribution_type: zod - .enum(['uniform', 'manual']) - .describe( - 'Types of distributions for sampling inference parameters.' - ) - .default( - dataDesignerCreateJobBodySpecConfigModelConfigsItemInferenceParametersOneTopPThreeDistributionTypeDefault - ), - params: zod - .object({ - values: zod.array(zod.number()).min(1), - weights: zod.array(zod.number()).optional(), - }) - .describe( - 'Parameters for manual distribution sampling.\n\nAttributes:\n values: List of possible values to sample from.\n weights: Optional list of weights for each value. If not provided, all values have equal probability.' - ), - }) - .describe( - 'Manual (discrete) distribution for sampling inference parameters.\n\nSamples from a discrete set of values with optional weights. Useful for testing\nspecific values or creating custom probability distributions for temperature or top_p.\n\nAttributes:\n distribution_type: Type of distribution (\"manual\").\n params: Distribution parameters (values, weights).' - ), - ]) - .optional(), - max_tokens: zod.number().min(1).optional(), - }) - .describe( - 'Configuration for LLM inference parameters.\n\nAttributes:\n generation_type: Type of generation, always \"chat-completion\" for this class.\n temperature: Sampling temperature (0.0-2.0). Can be a fixed value or a distribution for dynamic sampling.\n top_p: Nucleus sampling probability (0.0-1.0). Can be a fixed value or a distribution for dynamic sampling.\n max_tokens: Maximum number of tokens to generate in the response.' - ), - zod - .object({ - generation_type: zod - .literal('embedding') - .default( - dataDesignerCreateJobBodySpecConfigModelConfigsItemInferenceParametersTwoGenerationTypeDefault - ), - max_parallel_requests: zod - .number() - .min(1) - .default( - dataDesignerCreateJobBodySpecConfigModelConfigsItemInferenceParametersTwoMaxParallelRequestsDefault - ), - timeout: zod.number().min(1).optional(), - extra_body: zod.record(zod.string(), zod.unknown()).optional(), - encoding_format: zod - .enum(['float', 'base64']) - .default( - dataDesignerCreateJobBodySpecConfigModelConfigsItemInferenceParametersTwoEncodingFormatDefault - ), - dimensions: zod.number().optional(), - }) - .describe( - 'Configuration for embedding generation parameters.\n\nAttributes:\n generation_type: Type of generation, always \"embedding\" for this class.\n encoding_format: Format of the embedding encoding (\"float\" or \"base64\").\n dimensions: Number of dimensions for the embedding.' - ), - zod - .object({ - generation_type: zod - .literal('image') - .default( - dataDesignerCreateJobBodySpecConfigModelConfigsItemInferenceParametersThreeGenerationTypeDefault - ), - max_parallel_requests: zod - .number() - .min(1) - .default( - dataDesignerCreateJobBodySpecConfigModelConfigsItemInferenceParametersThreeMaxParallelRequestsDefault - ), - timeout: zod.number().min(1).optional(), - extra_body: zod.record(zod.string(), zod.unknown()).optional(), - }) - .describe( - 'Configuration for image generation models.\n\nWorks for both diffusion and autoregressive image generation models. Pass all model-specific image options via `extra_body`.\n\nAttributes:\n generation_type: Type of generation, always \"image\" for this class.\n\nExample:\n ```python\n # OpenAI-style (DALLĀ·E): quality and size in extra_body or as top-level kwargs\n dd.ImageInferenceParams(\n extra_body={\"size\": \"1024x1024\", \"quality\": \"hd\"}\n )\n\n # Gemini-style: generationConfig.imageConfig\n dd.ImageInferenceParams(\n extra_body={\n \"generationConfig\": {\n \"imageConfig\": {\n \"aspectRatio\": \"1:1\",\n \"imageSize\": \"1024\"\n }\n }\n }\n )\n ```' - ), - ]) - .optional(), - provider: zod.string().optional(), - skip_health_check: zod - .boolean() - .default( - dataDesignerCreateJobBodySpecConfigModelConfigsItemSkipHealthCheckDefault - ), - }) - .describe( - "Configuration for a model used for generation.\n\nAttributes:\n alias: User-defined alias to reference in column configurations.\n model: Model identifier (e.g., from build.nvidia.com or other providers).\n inference_parameters: Inference parameters for the model (temperature, top_p, max_tokens, etc.).\n The generation_type is determined by the type of inference_parameters.\n provider: Name of the model provider. Required in a future release. Leaving\n ``provider`` unset (or ``None``) currently routes through the registry's\n implicit default and is \*\*deprecated\*\*; specify ``provider=`` explicitly.\n See issue #589.\n skip_health_check: Whether to skip the health check for this model. Defaults to False." - ) - ) - .optional(), - tool_configs: zod - .array( - zod - .object({ - tool_alias: zod.string(), - providers: zod.array(zod.string()), - allow_tools: zod.array(zod.string()).optional(), - max_tool_call_turns: zod - .number() - .min(1) - .default( - dataDesignerCreateJobBodySpecConfigToolConfigsItemMaxToolCallTurnsDefault - ), - timeout_sec: zod - .number() - .gt(dataDesignerCreateJobBodySpecConfigToolConfigsItemTimeoutSecExclusiveMin) - .optional(), - }) - .describe( - 'Configuration for permitting MCP tools on an LLM column.\n\nToolConfig defines which tools are available for use during LLM generation.\nIt references one or more MCP providers by name and can optionally restrict\nwhich tools from those providers are permitted.\n\nAttributes:\n tool_alias (str): User-defined alias to reference this tool configuration in column configs.\n providers (list[str]): Names of the MCP providers to use for tool calls. Tools can be\n drawn from multiple providers.\n allow_tools (list[str] | None): Optional allowlist of tool names that restricts which\n tools are permitted. If None, all tools from the specified providers are allowed.\n Defaults to None.\n max_tool_call_turns (int): Maximum number of tool-calling turns permitted in a single\n generation. A turn is one iteration where the LLM requests tool calls. With parallel\n tool calling, a single turn may execute multiple tools simultaneously. Defaults to 5.\n timeout_sec (float | None): Timeout in seconds for MCP tool calls. Defaults to None (no timeout).\n\nExamples:\n >>> ToolConfig(\n ... tool_alias=\"search-tools\",\n ... providers=[\"doc-search-mcp\", \"web-search-mcp\"],\n ... allow_tools=[\"search_docs\", \"list_docs\"],\n ... max_tool_call_turns=10,\n ... timeout_sec=30.0,\n ... )' - ) - ) - .optional(), - seed_config: zod - .object({ - source: zod.union([ - zod.object({ - seed_type: zod - .literal('local') - .default(dataDesignerCreateJobBodySpecConfigSeedConfigSourceOneSeedTypeDefault), - path: zod - .string() - .describe( - 'Path to a local seed dataset file or wildcard pattern. Relative paths are resolved from the current working directory when the config is loaded, not from the config file location.' - ), - }), - zod.object({ - seed_type: zod - .literal('hf') - .default(dataDesignerCreateJobBodySpecConfigSeedConfigSourceTwoSeedTypeDefault), - path: zod - .string() - .describe( - "Path to the seed data in HuggingFace. Wildcards are allowed. Examples include 'datasets\/my-username\/my-dataset\/data\/000_00000.parquet', 'datasets\/my-username\/my-dataset\/data\/\*.parquet', and 'datasets\/my-username\/my-dataset\/\*\*\/\*.parquet'" - ), - token: zod.string().optional(), - endpoint: zod - .string() - .default(dataDesignerCreateJobBodySpecConfigSeedConfigSourceTwoEndpointDefault), - }), - zod.object({ - seed_type: zod - .literal('df') - .default(dataDesignerCreateJobBodySpecConfigSeedConfigSourceThreeSeedTypeDefault), - }), - zod.object({ - seed_type: zod - .literal('directory') - .default(dataDesignerCreateJobBodySpecConfigSeedConfigSourceFourSeedTypeDefault), - path: zod - .string() - .describe( - 'Directory containing seed artifacts. Relative paths are resolved from the current working directory when the config is loaded, not from the config file location.' - ), - file_pattern: zod - .string() - .default( - dataDesignerCreateJobBodySpecConfigSeedConfigSourceFourFilePatternDefault - ) - .describe( - 'Case-sensitive filename pattern used to match files under the provided directory. Patterns match basenames only, not relative paths.' - ), - recursive: zod - .boolean() - .default(dataDesignerCreateJobBodySpecConfigSeedConfigSourceFourRecursiveDefault) - .describe( - 'Whether to search nested subdirectories under the provided directory for matching files.' - ), - }), - zod.object({ - seed_type: zod - .literal('file_contents') - .default(dataDesignerCreateJobBodySpecConfigSeedConfigSourceFiveSeedTypeDefault), - path: zod - .string() - .describe( - 'Directory containing seed artifacts. Relative paths are resolved from the current working directory when the config is loaded, not from the config file location.' - ), - file_pattern: zod - .string() - .default( - dataDesignerCreateJobBodySpecConfigSeedConfigSourceFiveFilePatternDefault - ) - .describe( - 'Case-sensitive filename pattern used to match files under the provided directory. Patterns match basenames only, not relative paths.' - ), - recursive: zod - .boolean() - .default(dataDesignerCreateJobBodySpecConfigSeedConfigSourceFiveRecursiveDefault) - .describe( - 'Whether to search nested subdirectories under the provided directory for matching files.' - ), - encoding: zod - .string() - .default(dataDesignerCreateJobBodySpecConfigSeedConfigSourceFiveEncodingDefault) - .describe( - 'Text encoding used when reading matching files into the `content` column.' - ), - }), - zod.object({ - seed_type: zod - .literal('agent_rollout') - .default(dataDesignerCreateJobBodySpecConfigSeedConfigSourceSixSeedTypeDefault), - path: zod - .string() - .optional() - .describe( - 'Directory containing agent rollout artifacts. This field is required for ATIF trajectories. When omitted, built-in defaults are used for formats that define one. Claude Code defaults to ~\/.claude\/projects, Codex defaults to ~\/.codex\/sessions, Hermes Agent defaults to ~\/.hermes\/sessions, and Pi Coding Agent defaults to ~\/.pi\/agent\/sessions. Relative paths are resolved from the current working directory when the config is loaded, not from the config file location.' - ), - file_pattern: zod - .string() - .optional() - .describe( - "Case-sensitive filename pattern used to match agent rollout files. When omitted, ATIF defaults to '\*.json', Claude Code, Codex, and Pi Coding Agent default to '\*.jsonl', and Hermes Agent defaults to '\*.json\*'." - ), - recursive: zod - .boolean() - .default(dataDesignerCreateJobBodySpecConfigSeedConfigSourceSixRecursiveDefault) - .describe( - 'Whether to search nested subdirectories under the provided directory for matching files.' - ), - format: zod - .enum(['atif', 'claude_code', 'codex', 'hermes_agent', 'pi_coding_agent']) - .describe('Built-in agent rollout format to use for parsing trace files.'), - }), - zod.object({ - seed_type: zod - .literal('nmp') - .default(dataDesignerCreateJobBodySpecConfigSeedConfigSourceSevenSeedTypeDefault), - path: zod.string(), - }), - ]), - sampling_strategy: zod - .enum(['ordered', 'shuffle']) - .default(dataDesignerCreateJobBodySpecConfigSeedConfigSamplingStrategyDefault), - selection_strategy: zod - .union([ - zod.object({ - start: zod - .number() - .min(dataDesignerCreateJobBodySpecConfigSeedConfigSelectionStrategyOneStartMin) - .describe('The start index of the index range (inclusive)'), - end: zod - .number() - .min(dataDesignerCreateJobBodySpecConfigSeedConfigSelectionStrategyOneEndMin) - .describe('The end index of the index range (inclusive)'), - }), - zod.object({ - index: zod - .number() - .min(dataDesignerCreateJobBodySpecConfigSeedConfigSelectionStrategyTwoIndexMin) - .default( - dataDesignerCreateJobBodySpecConfigSeedConfigSelectionStrategyTwoIndexDefault - ) - .describe('The index of the partition to sample from'), - num_partitions: zod - .number() - .min(1) - .default( - dataDesignerCreateJobBodySpecConfigSeedConfigSelectionStrategyTwoNumPartitionsDefault - ) - .describe('The total number of partitions in the dataset'), - }), - ]) - .optional(), - }) - .optional() - .describe( - 'Configuration for sampling data from a seed dataset.\n\nAttributes:\n source: A SeedSource defining where the seed data exists\n sampling_strategy: Strategy for how to sample rows from the dataset.\n - ORDERED: Read rows sequentially in their original order.\n - SHUFFLE: Randomly shuffle rows before sampling. When used with\n selection_strategy, shuffling occurs within the selected range\/partition.\n selection_strategy: Optional strategy to select a subset of the dataset.\n - IndexRange: Select a specific range of indices (e.g., rows 100-200).\n - PartitionBlock: Select a partition by splitting the dataset into N equal parts.\n Partition indices are zero-based (index=0 is the first partition, index=1 is\n the second, etc.).\n\nExamples:\n Read rows sequentially from start to end:\n SeedConfig(\n source=LocalFileSeedSource(path=\"my_data.parquet\"),\n sampling_strategy=SamplingStrategy.ORDERED\n )\n\n Read rows in random order:\n SeedConfig(\n source=LocalFileSeedSource(path=\"my_data.parquet\"),\n sampling_strategy=SamplingStrategy.SHUFFLE\n )\n\n Read specific index range (rows 100-199):\n SeedConfig(\n source=LocalFileSeedSource(path=\"my_data.parquet\"),\n sampling_strategy=SamplingStrategy.ORDERED,\n selection_strategy=IndexRange(start=100, end=199)\n )\n\n Read random rows from a specific index range (shuffles within rows 100-199):\n SeedConfig(\n source=LocalFileSeedSource(path=\"my_data.parquet\"),\n sampling_strategy=SamplingStrategy.SHUFFLE,\n selection_strategy=IndexRange(start=100, end=199)\n )\n\n Read from partition 2 (3rd partition, zero-based) of 5 partitions (20% of dataset):\n SeedConfig(\n source=LocalFileSeedSource(path=\"my_data.parquet\"),\n sampling_strategy=SamplingStrategy.ORDERED,\n selection_strategy=PartitionBlock(index=2, num_partitions=5)\n )\n\n Read shuffled rows from partition 0 of 10 partitions (shuffles within the partition):\n SeedConfig(\n source=LocalFileSeedSource(path=\"my_data.parquet\"),\n sampling_strategy=SamplingStrategy.SHUFFLE,\n selection_strategy=PartitionBlock(index=0, num_partitions=10)\n )' - ), - constraints: zod - .array( - zod.union([ - zod - .object({ - target_column: zod - .string() - .describe('Name of the sampler column this constraint applies to'), - constraint_type: zod - .literal('scalar_inequality') - .default( - dataDesignerCreateJobBodySpecConfigConstraintsItemOneConstraintTypeDefault - ) - .describe( - "Constraint type discriminator, always 'scalar_inequality' for this constraint" - ), - rhs: zod.number().describe('Scalar value to compare against'), - operator: zod.enum(['lt', 'le', 'gt', 'ge']).describe('Comparison operator'), - }) - .describe( - 'Constrain a sampler column to be less\/greater than a scalar value.\n\nOnly applies to sampler columns.\n\nAttributes:\n rhs (required): Scalar value to compare against.\n operator (required): Comparison operator (lt, le, gt, ge).\n\nInherited Attributes:\n target_column (required): Name of the sampler column this constraint applies to.' - ), - zod - .object({ - target_column: zod - .string() - .describe('Name of the sampler column this constraint applies to'), - constraint_type: zod - .literal('column_inequality') - .default( - dataDesignerCreateJobBodySpecConfigConstraintsItemTwoConstraintTypeDefault - ) - .describe( - "Constraint type discriminator, always 'column_inequality' for this constraint" - ), - rhs: zod.string().describe('Name of the other sampler column to compare against'), - operator: zod.enum(['lt', 'le', 'gt', 'ge']).describe('Comparison operator'), - }) - .describe( - 'Constrain a sampler column to be less\/greater than another sampler column.\n\nOnly applies to sampler columns.\n\nAttributes:\n rhs (required): Name of the other sampler column to compare against.\n operator (required): Comparison operator (lt, le, gt, ge).\n\nInherited Attributes:\n target_column (required): Name of the sampler column this constraint applies to.' - ), - ]) - ) - .optional(), - profilers: zod - .array( - zod - .object({ - model_alias: zod.string(), - summary_score_sample_size: zod - .number() - .min(1) - .default( - dataDesignerCreateJobBodySpecConfigProfilersItemSummaryScoreSampleSizeDefault - ), - }) - .describe( - 'Configuration for the LLM-as-a-judge score profiler.\n\nAttributes:\n model_alias: Alias of the LLM model to use for generating score distribution summaries.\n Must match a model alias defined in the Data Designer configuration.\n summary_score_sample_size: Number of score samples to include when prompting the LLM\n to generate summaries. Larger sample sizes provide more context but increase\n token usage. Must be at least 1 when provided. Set to None to skip LLM-generated\n summaries. Defaults to 20.' - ) - ) - .optional(), - processors: zod - .array( - zod.union([ - zod - .object({ - name: zod - .string() - .describe( - 'The name of the processor, used to identify the processor in the results and to write the artifacts to disk.' - ), - processor_type: zod - .literal('drop_columns') - .default( - dataDesignerCreateJobBodySpecConfigProcessorsItemOneProcessorTypeDefault - ), - column_names: zod - .array(zod.string()) - .describe('List of column names to drop from the output dataset.'), - }) - .describe( - 'Drop columns from the output dataset (prefer ``drop=True`` in the column config).\n\nThis processor removes specified columns from the generated dataset. The dropped\ncolumns are saved separately in the `dropped-columns-parquet-files` directory for reference.\nWhen this processor is added via the config builder, the corresponding column\nconfigs are automatically marked with `drop = True`.\n\nAttributes:\n column_names (required): List of column names to remove from the output dataset.\n\nInherited Attributes:\n name (required): Name of the processor.' - ), - zod - .object({ - name: zod - .string() - .describe( - 'The name of the processor, used to identify the processor in the results and to write the artifacts to disk.' - ), - processor_type: zod - .literal('schema_transform') - .default( - dataDesignerCreateJobBodySpecConfigProcessorsItemTwoProcessorTypeDefault - ), - template: zod - .record(zod.string(), zod.unknown()) - .describe( - '\n Dictionary specifying columns and templates to use in the new dataset with transformed schema.\n\n Each key is a new column name, and each value is an object containing Jinja2 templates - for instance, a string or a list of strings.\n Values must be JSON-serializable.\n\n Example:\n\n ```python\n template = {\n \"list_of_strings\": [\"{{ col1 }}\", \"{{ col2 }}\"],\n \"uppercase_string\": \"{{ col1 | upper }}\",\n \"lowercase_string\": \"{{ col2 | lower }}\",\n }\n ```\n\n The above templates will create an new dataset with three columns: \"list_of_strings\", \"uppercase_string\", and \"lowercase_string\".\n References to columns \"col1\" and \"col2\" in the templates will be replaced with the actual values of the columns in the dataset.\n ' - ), - }) - .describe( - 'Configuration for transforming the dataset schema using Jinja2 templates.\n\nThis processor creates a new dataset with a transformed schema. Each key in the\ntemplate becomes a column in the output, and values are Jinja2 templates that\ncan reference any column in the batch. The transformed dataset is written to\na `processors-files\/{processor_name}\/` directory alongside the main dataset.\n\nAttributes:\n template (required): Dictionary defining the output schema. Keys are new column names,\n values are Jinja2 templates (strings, lists, or nested structures).\n Must be JSON-serializable.\n\nInherited Attributes:\n name (required): Name of the processor.' - ), - ]) - ) - .optional(), - }) - .describe( - 'Configuration for NeMo Data Designer.\n\nThis class defines the main configuration structure for NeMo Data Designer,\nwhich the engine consumes when generating synthetic data.\n\nAttributes:\n columns: Required list of column configurations defining how each column\n should be generated. Must contain at least one column.\n model_configs: Optional list of model configurations for LLM-based generation.\n Each model config defines the model, provider, and inference parameters.\n tool_configs: Optional list of tool configurations for MCP tool calling.\n Each tool config defines the provider, allowed tools, and execution limits.\n seed_config: Optional seed dataset settings to use for generation.\n constraints: Optional list of column constraints.\n profilers: Optional list of column profilers for analyzing generated data characteristics.\n processors: Optional list of processor configurations for post-generation transformations.' - ), - }), - ownership: zod.record(zod.string(), zod.unknown()).optional(), - custom_fields: zod.record(zod.string(), zod.unknown()).optional(), -}); - -/** - * @summary List Jobs - */ -export const DataDesignerListJobsParams = zod.object({ - workspace: zod.string(), -}); - -export const dataDesignerListJobsQueryPageDefault = 1; -export const dataDesignerListJobsQueryPageExclusiveMin = 0; - -export const dataDesignerListJobsQueryPageSizeDefault = 10; -export const dataDesignerListJobsQueryPageSizeExclusiveMin = 0; - -export const dataDesignerListJobsQuerySortDefault = `-created_at`; - -export const DataDesignerListJobsQueryParams = zod.object({ - page: zod - .number() - .gt(dataDesignerListJobsQueryPageExclusiveMin) - .default(dataDesignerListJobsQueryPageDefault) - .describe('Page number.'), - page_size: zod - .number() - .gt(dataDesignerListJobsQueryPageSizeExclusiveMin) - .default(dataDesignerListJobsQueryPageSizeDefault) - .describe('Page size.'), - sort: zod - .enum(['created_at', '-created_at', 'updated_at', '-updated_at']) - .default(dataDesignerListJobsQuerySortDefault) - .describe( - 'The field to sort by. To sort in decreasing order, use `-` in front of the field name.' - ), - filter: zod - .object({ - created_at: zod - .object({ - $gte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results greater than or equal to this datetime.'), - $lte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results less than or equal to this datetime.'), - }) - .optional() - .describe("Jobs created at 'gte' datetime or 'lte' datetime."), - name: zod.string().optional().describe('Name of the job.'), - workspace: zod.string().optional().describe('Workspace of the job.'), - project: zod.string().optional().describe('Project containing the job.'), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ) - .optional() - .describe('The current status.'), - updated_at: zod - .object({ - $gte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results greater than or equal to this datetime.'), - $lte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results less than or equal to this datetime.'), - }) - .optional() - .describe("Jobs updated at 'gte' datetime or 'lte' datetime."), - }) - .optional() - .describe('Filter jobs on various criteria.'), -}); - -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemOneDropDefault = false; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemOneAllowResizeDefault = false; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemOneColumnTypeDefault = `custom`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemOnePropagateSkipDefault = true; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemOneGenerationStrategyDefault = `cell_by_cell`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemTwoDropDefault = false; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemTwoAllowResizeDefault = false; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemTwoColumnTypeDefault = `expression`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemTwoPropagateSkipDefault = true; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemTwoDtypeDefault = `str`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemThreeDropDefault = false; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemThreeAllowResizeDefault = false; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemThreeColumnTypeDefault = `llm-code`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemThreePropagateSkipDefault = true; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemThreeMultiModalContextItemModalityDefault = `image`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemThreeWithTraceDefault = `none`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemThreeExtractReasoningContentDefault = false; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemFourDropDefault = false; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemFourAllowResizeDefault = false; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemFourColumnTypeDefault = `llm-judge`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemFourPropagateSkipDefault = true; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemFourMultiModalContextItemModalityDefault = `image`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemFourWithTraceDefault = `none`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemFourExtractReasoningContentDefault = false; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemFiveDropDefault = false; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemFiveAllowResizeDefault = false; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemFiveColumnTypeDefault = `llm-structured`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemFivePropagateSkipDefault = true; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemFiveMultiModalContextItemModalityDefault = `image`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemFiveWithTraceDefault = `none`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemFiveExtractReasoningContentDefault = false; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSixDropDefault = false; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSixAllowResizeDefault = false; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSixColumnTypeDefault = `llm-text`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSixPropagateSkipDefault = true; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSixMultiModalContextItemModalityDefault = `image`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSixWithTraceDefault = `none`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSixExtractReasoningContentDefault = false; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenDropDefault = false; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenAllowResizeDefault = false; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenColumnTypeDefault = `sampler`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenPropagateSkipDefault = true; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsOneSamplerTypeDefault = `subcategory`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsTwoSamplerTypeDefault = `category`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsThreeUnitDefault = `D`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsThreeSamplerTypeDefault = `datetime`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsFourLocaleDefault = `en_US`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsFourAgeRangeDefault = - [18, 114]; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsFourAgeRangeMin = 2; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsFourAgeRangeMax = 2; - -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsFourWithSyntheticPersonasDefault = false; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsFourSamplerTypeDefault = `person`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsFiveLocaleDefault = `en_US`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsFiveAgeRangeDefault = - [18, 114]; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsFiveAgeRangeMin = 2; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsFiveAgeRangeMax = 2; - -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsFiveSamplerTypeDefault = `person_from_faker`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsSixDtMinMin = 0; - -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsSixDtMaxExclusiveMin = 0; - -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsSixUnitDefault = `D`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsSixSamplerTypeDefault = `timedelta`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsSevenShortFormDefault = false; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsSevenUppercaseDefault = false; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsSevenSamplerTypeDefault = `uuid`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsEightPMin = 0; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsEightPMax = 1; - -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsEightSamplerTypeDefault = `bernoulli`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsNinePMin = 0; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsNinePMax = 1; - -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsNineSamplerTypeDefault = `bernoulli_mixture`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsOnezeroPMin = 0; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsOnezeroPMax = 1; - -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsOnezeroSamplerTypeDefault = `binomial`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsOneoneSamplerTypeDefault = `gaussian`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsOnetwoSamplerTypeDefault = `poisson`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsOnethreeSamplerTypeDefault = `uniform`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsOnefourSamplerTypeDefault = `scipy`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsOneSamplerTypeDefault = `subcategory`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsTwoSamplerTypeDefault = `category`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsThreeUnitDefault = `D`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsThreeSamplerTypeDefault = `datetime`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsFourLocaleDefault = `en_US`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsFourAgeRangeDefault = - [18, 114]; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsFourAgeRangeMin = 2; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsFourAgeRangeMax = 2; - -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsFourWithSyntheticPersonasDefault = false; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsFourSamplerTypeDefault = `person`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsFiveLocaleDefault = `en_US`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsFiveAgeRangeDefault = - [18, 114]; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsFiveAgeRangeMin = 2; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsFiveAgeRangeMax = 2; - -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsFiveSamplerTypeDefault = `person_from_faker`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsSixDtMinMin = 0; - -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsSixDtMaxExclusiveMin = 0; - -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsSixUnitDefault = `D`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsSixSamplerTypeDefault = `timedelta`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsSevenShortFormDefault = false; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsSevenUppercaseDefault = false; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsSevenSamplerTypeDefault = `uuid`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsEightPMin = 0; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsEightPMax = 1; - -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsEightSamplerTypeDefault = `bernoulli`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsNinePMin = 0; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsNinePMax = 1; - -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsNineSamplerTypeDefault = `bernoulli_mixture`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsOnezeroPMin = 0; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsOnezeroPMax = 1; - -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsOnezeroSamplerTypeDefault = `binomial`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsOneoneSamplerTypeDefault = `gaussian`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsOnetwoSamplerTypeDefault = `poisson`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsOnethreeSamplerTypeDefault = `uniform`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsOnefourSamplerTypeDefault = `scipy`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemEightDropDefault = false; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemEightAllowResizeDefault = false; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemEightColumnTypeDefault = `seed-dataset`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemEightPropagateSkipDefault = true; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemNineDropDefault = false; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemNineAllowResizeDefault = false; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemNineColumnTypeDefault = `validation`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemNinePropagateSkipDefault = true; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemNineValidatorParamsOneValidatorTypeDefault = `code`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemNineValidatorParamsTwoValidatorTypeDefault = `local_callable`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemNineValidatorParamsThreeValidatorTypeDefault = `remote`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemNineValidatorParamsThreeTimeoutDefault = 30; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemNineValidatorParamsThreeTimeoutExclusiveMin = 0; - -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemNineValidatorParamsThreeMaxRetriesDefault = 3; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemNineValidatorParamsThreeMaxRetriesMin = 0; - -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemNineValidatorParamsThreeRetryBackoffDefault = 2; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemNineValidatorParamsThreeRetryBackoffExclusiveMin = 1; - -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemNineValidatorParamsThreeMaxParallelRequestsDefault = 4; - -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemNineBatchSizeDefault = 10; - -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemOnezeroDropDefault = false; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemOnezeroAllowResizeDefault = false; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemOnezeroColumnTypeDefault = `embedding`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemOnezeroPropagateSkipDefault = true; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemOneoneDropDefault = false; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemOneoneAllowResizeDefault = false; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemOneoneColumnTypeDefault = `image`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemOneonePropagateSkipDefault = true; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemOneoneMultiModalContextItemModalityDefault = `image`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigModelConfigsItemInferenceParametersOneGenerationTypeDefault = `chat-completion`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigModelConfigsItemInferenceParametersOneMaxParallelRequestsDefault = 4; - -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigModelConfigsItemInferenceParametersOneTemperatureTwoDistributionTypeDefault = `uniform`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigModelConfigsItemInferenceParametersOneTemperatureThreeDistributionTypeDefault = `manual`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigModelConfigsItemInferenceParametersOneTopPTwoDistributionTypeDefault = `uniform`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigModelConfigsItemInferenceParametersOneTopPThreeDistributionTypeDefault = `manual`; - -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigModelConfigsItemInferenceParametersTwoGenerationTypeDefault = `embedding`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigModelConfigsItemInferenceParametersTwoMaxParallelRequestsDefault = 4; - -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigModelConfigsItemInferenceParametersTwoEncodingFormatDefault = `float`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigModelConfigsItemInferenceParametersThreeGenerationTypeDefault = `image`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigModelConfigsItemInferenceParametersThreeMaxParallelRequestsDefault = 4; - -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigModelConfigsItemSkipHealthCheckDefault = false; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigToolConfigsItemMaxToolCallTurnsDefault = 5; - -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigToolConfigsItemTimeoutSecExclusiveMin = 0; - -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSourceOneSeedTypeDefault = `local`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSourceTwoSeedTypeDefault = `hf`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSourceTwoEndpointDefault = `https://huggingface.co`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSourceThreeSeedTypeDefault = `df`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSourceFourSeedTypeDefault = `directory`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSourceFourFilePatternDefault = `*`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSourceFourRecursiveDefault = true; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSourceFiveSeedTypeDefault = `file_contents`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSourceFiveFilePatternDefault = `*`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSourceFiveRecursiveDefault = true; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSourceFiveEncodingDefault = `utf-8`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSourceSixSeedTypeDefault = `agent_rollout`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSourceSixRecursiveDefault = true; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSourceSevenSeedTypeDefault = `nmp`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSamplingStrategyDefault = `ordered`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSelectionStrategyOneStartMin = 0; - -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSelectionStrategyOneEndMin = 0; - -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSelectionStrategyTwoIndexDefault = 0; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSelectionStrategyTwoIndexMin = 0; - -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSelectionStrategyTwoNumPartitionsDefault = 1; - -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigConstraintsItemOneConstraintTypeDefault = `scalar_inequality`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigConstraintsItemTwoConstraintTypeDefault = `column_inequality`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigProfilersItemSummaryScoreSampleSizeDefault = 20; - -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigProcessorsItemOneProcessorTypeDefault = `drop_columns`; -export const dataDesignerListJobsResponseDataItemSpecJobConfigConfigProcessorsItemTwoProcessorTypeDefault = `schema_transform`; -export const dataDesignerListJobsResponseDataItemSpecModelProvidersItemProviderTypeDefault = `openai`; -export const dataDesignerListJobsResponseDataItemSpecModelConfigsItemInferenceParametersOneGenerationTypeDefault = `chat-completion`; -export const dataDesignerListJobsResponseDataItemSpecModelConfigsItemInferenceParametersOneMaxParallelRequestsDefault = 4; - -export const dataDesignerListJobsResponseDataItemSpecModelConfigsItemInferenceParametersOneTemperatureTwoDistributionTypeDefault = `uniform`; -export const dataDesignerListJobsResponseDataItemSpecModelConfigsItemInferenceParametersOneTemperatureThreeDistributionTypeDefault = `manual`; -export const dataDesignerListJobsResponseDataItemSpecModelConfigsItemInferenceParametersOneTopPTwoDistributionTypeDefault = `uniform`; -export const dataDesignerListJobsResponseDataItemSpecModelConfigsItemInferenceParametersOneTopPThreeDistributionTypeDefault = `manual`; - -export const dataDesignerListJobsResponseDataItemSpecModelConfigsItemInferenceParametersTwoGenerationTypeDefault = `embedding`; -export const dataDesignerListJobsResponseDataItemSpecModelConfigsItemInferenceParametersTwoMaxParallelRequestsDefault = 4; - -export const dataDesignerListJobsResponseDataItemSpecModelConfigsItemInferenceParametersTwoEncodingFormatDefault = `float`; -export const dataDesignerListJobsResponseDataItemSpecModelConfigsItemInferenceParametersThreeGenerationTypeDefault = `image`; -export const dataDesignerListJobsResponseDataItemSpecModelConfigsItemInferenceParametersThreeMaxParallelRequestsDefault = 4; - -export const dataDesignerListJobsResponseDataItemSpecModelConfigsItemSkipHealthCheckDefault = false; - -export const DataDesignerListJobsResponse = zod.object({ - data: zod.array( - zod.object({ - id: zod.string().optional(), - name: zod.string(), - description: zod.string().optional(), - project: zod.string().optional(), - workspace: zod.string().optional(), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - spec: zod.object({ - job_config: zod.object({ - num_records: zod.number(), - config: zod - .object({ - columns: zod - .array( - zod.union([ - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemOneDropDefault - ), - allow_resize: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemOneAllowResizeDefault - ), - column_type: zod - .literal('custom') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemOneColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemOnePropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - generator_function: zod - .unknown() - .describe('Function decorated with @custom_column_generator'), - generation_strategy: zod - .enum(['cell_by_cell', 'full_column']) - .describe('Strategy for custom column generation.') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemOneGenerationStrategyDefault - ) - .describe( - "Generation strategy: 'cell_by_cell' for row-based or 'full_column' for batch-based" - ), - generator_params: zod - .object({}) - .passthrough() - .optional() - .describe( - 'Optional typed configuration object passed as second argument to generator function' - ), - }) - .describe( - 'Configuration for custom user-defined column generators.\n\nCustom columns allow users to provide their own generation logic via a callable function\ndecorated with `@custom_column_generator`. Two strategies are supported: cell_by_cell\n(default, row-based) and full_column (batch-based with DataFrame access).\n\nAttributes:\n generator_function (required): A callable decorated with @custom_column_generator.\n generation_strategy: \"cell_by_cell\" (row-based) or \"full_column\" (batch-based).\n generator_params: Optional typed configuration object (Pydantic BaseModel) passed\n as the second argument to the generator function.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemTwoDropDefault - ), - allow_resize: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemTwoAllowResizeDefault - ), - column_type: zod - .literal('expression') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemTwoColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemTwoPropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - expr: zod - .string() - .describe( - 'Jinja2 expression to compute the column value from other columns' - ), - dtype: zod - .enum(['int', 'float', 'str', 'bool']) - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemTwoDtypeDefault - ) - .describe( - "Data type for expression result: 'int', 'float', 'str', or 'bool'" - ), - }) - .describe( - 'Configuration for derived columns using Jinja2 expressions.\n\nExpression columns compute values by evaluating Jinja2 templates that reference other\ncolumns. Useful for transformations, concatenations, conditional logic, and derived\nfeatures without requiring LLM generation. The expression is evaluated row-by-row.\n\nAttributes:\n expr (required): Jinja2 expression to evaluate. Can reference other column values using\n {{ column_name }} syntax. Supports filters, conditionals, and arithmetic.\n Must be a valid, non-empty Jinja2 template.\n dtype: Data type to cast the result to. Must be one of \"int\", \"float\", \"str\", or \"bool\".\n Defaults to \"str\". Type conversion is applied after expression evaluation.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemThreeDropDefault - ), - allow_resize: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemThreeAllowResizeDefault - ), - column_type: zod - .literal('llm-code') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemThreeColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemThreePropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - prompt: zod - .string() - .describe( - 'Jinja2 template for the LLM prompt; can reference other columns via {{ column_name }}' - ), - model_alias: zod - .string() - .describe('Alias of the model configuration to use for generation'), - system_prompt: zod - .string() - .optional() - .describe('Optional system prompt to set model behavior and constraints'), - multi_modal_context: zod - .array( - zod - .object({ - modality: zod - .enum(['image']) - .describe('Supported modality types for multimodal model data.') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemThreeMultiModalContextItemModalityDefault - ), - column_name: zod.string(), - data_type: zod - .enum(['url', 'base64']) - .optional() - .describe('Data type formats for multimodal data.'), - image_format: zod - .enum(['png', 'jpg', 'jpeg', 'gif', 'webp']) - .optional() - .describe('Supported image formats for image modality.'), - }) - .describe( - 'Configuration for providing image context to multimodal models.\n\nAttributes:\n modality: The modality type (always \"image\").\n column_name: Name of the column containing image data.\n data_type: Format of the image data (\"url\", \"base64\", or None for auto-detection).\n When None, the format is auto-detected: URLs are passed through, file paths that\n exist under base_path are loaded as base64, and other values are assumed to be base64.\n image_format: Image format (required when data_type is explicitly \"base64\").' - ) - ) - .optional() - .describe('Optional list of ImageContext for vision model inputs'), - tool_alias: zod - .string() - .optional() - .describe( - 'Optional alias of the tool configuration to use for MCP tool calls' - ), - with_trace: zod - .enum(['none', 'last_message', 'all_messages']) - .describe( - 'Specifies the type of reasoning trace to capture for LLM columns.\n\nTraces capture the conversation history during LLM generation, which is\nuseful for debugging, analysis, and understanding model behavior.\n\nAttributes:\n NONE: No trace is captured. This is the default.\n LAST_MESSAGE: Only the final assistant message is captured.\n ALL_MESSAGES: The full conversation history (system\/user\/assistant\/tool)\n is captured.' - ) - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemThreeWithTraceDefault - ) - .describe('Trace capture mode: NONE, LAST_MESSAGE, or ALL_MESSAGES'), - extract_reasoning_content: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemThreeExtractReasoningContentDefault - ) - .describe( - 'If True, capture chain-of-thought in {name}__reasoning_content column' - ), - code_lang: zod - .enum([ - 'bash', - 'c', - 'cobol', - 'cpp', - 'csharp', - 'go', - 'java', - 'javascript', - 'kotlin', - 'python', - 'ruby', - 'rust', - 'scala', - 'swift', - 'typescript', - 'sql:sqlite', - 'sql:tsql', - 'sql:bigquery', - 'sql:mysql', - 'sql:postgres', - 'sql:ansi', - ]) - .describe( - 'Target programming language or SQL dialect for code extraction from LLM response' - ), - }) - .describe( - 'Configuration for code generation columns using Large Language Models.\n\nExtends LLMTextColumnConfig to generate code snippets in specific programming languages\nor SQL dialects. The generated code is automatically extracted from markdown code blocks\nfor the specified language. Inherits all prompt templating capabilities from LLMTextColumnConfig.\n\nAttributes:\n code_lang (required): Programming language or SQL dialect for code generation. Supported\n values include: \"python\", \"javascript\", \"typescript\", \"java\", \"kotlin\", \"go\",\n \"rust\", \"ruby\", \"scala\", \"swift\", \"sql:sqlite\", \"sql:postgres\", \"sql:mysql\",\n \"sql:tsql\", \"sql:bigquery\", \"sql:ansi\". See CodeLang enum for complete list.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n prompt (required): Prompt template for code generation (supports Jinja2).\n model_alias (required): Alias of the model configuration to use.\n system_prompt: Optional system prompt (supports Jinja2).\n multi_modal_context: Optional image contexts for multi-modal generation.\n tool_alias: Optional tool configuration alias for MCP tool calls.\n with_trace: Specifies what trace information to capture in a `{column_name}__trace`\n column. Options are `TraceType.NONE` (default), `TraceType.LAST_MESSAGE`, or\n `TraceType.ALL_MESSAGES`.\n extract_reasoning_content: If True, creates a `{column_name}__reasoning_content`\n column containing the reasoning content from the final assistant response.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemFourDropDefault - ), - allow_resize: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemFourAllowResizeDefault - ), - column_type: zod - .literal('llm-judge') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemFourColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemFourPropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - prompt: zod - .string() - .describe( - 'Jinja2 template for the LLM prompt; can reference other columns via {{ column_name }}' - ), - model_alias: zod - .string() - .describe('Alias of the model configuration to use for generation'), - system_prompt: zod - .string() - .optional() - .describe('Optional system prompt to set model behavior and constraints'), - multi_modal_context: zod - .array( - zod - .object({ - modality: zod - .enum(['image']) - .describe('Supported modality types for multimodal model data.') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemFourMultiModalContextItemModalityDefault - ), - column_name: zod.string(), - data_type: zod - .enum(['url', 'base64']) - .optional() - .describe('Data type formats for multimodal data.'), - image_format: zod - .enum(['png', 'jpg', 'jpeg', 'gif', 'webp']) - .optional() - .describe('Supported image formats for image modality.'), - }) - .describe( - 'Configuration for providing image context to multimodal models.\n\nAttributes:\n modality: The modality type (always \"image\").\n column_name: Name of the column containing image data.\n data_type: Format of the image data (\"url\", \"base64\", or None for auto-detection).\n When None, the format is auto-detected: URLs are passed through, file paths that\n exist under base_path are loaded as base64, and other values are assumed to be base64.\n image_format: Image format (required when data_type is explicitly \"base64\").' - ) - ) - .optional() - .describe('Optional list of ImageContext for vision model inputs'), - tool_alias: zod - .string() - .optional() - .describe( - 'Optional alias of the tool configuration to use for MCP tool calls' - ), - with_trace: zod - .enum(['none', 'last_message', 'all_messages']) - .describe( - 'Specifies the type of reasoning trace to capture for LLM columns.\n\nTraces capture the conversation history during LLM generation, which is\nuseful for debugging, analysis, and understanding model behavior.\n\nAttributes:\n NONE: No trace is captured. This is the default.\n LAST_MESSAGE: Only the final assistant message is captured.\n ALL_MESSAGES: The full conversation history (system\/user\/assistant\/tool)\n is captured.' - ) - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemFourWithTraceDefault - ) - .describe('Trace capture mode: NONE, LAST_MESSAGE, or ALL_MESSAGES'), - extract_reasoning_content: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemFourExtractReasoningContentDefault - ) - .describe( - 'If True, capture chain-of-thought in {name}__reasoning_content column' - ), - scores: zod - .array( - zod - .object({ - name: zod.string().describe('A clear name for this score.'), - description: zod - .string() - .describe( - 'An informative and detailed assessment guide for using this score.' - ), - options: zod - .record(zod.string(), zod.string()) - .describe('Score options in the format of {score: description}.'), - }) - .describe( - 'Configuration for a \"score\" in an LLM judge evaluation.\n\nDefines a single scoring criterion with its possible values and descriptions. Multiple\nScore objects can be combined in an LLMJudgeColumnConfig to create multi-dimensional\nquality assessments.\n\nAttributes:\n name (required): A clear, concise name for this scoring dimension (e.g., \"Relevance\", \"Fluency\").\n description (required): An informative and detailed assessment guide explaining how to evaluate\n this dimension. Should provide clear criteria for scoring.\n options (required): Dictionary mapping score values to their descriptions. Keys can be integers\n (e.g., 1-5 scale) or strings (e.g., \"Poor\", \"Good\", \"Excellent\"). Values are\n descriptions explaining what each score level means.' - ) - ) - .min(1) - .describe( - 'List of Score objects defining rubric criteria for LLM judge evaluation' - ), - }) - .describe( - 'Configuration for LLM-as-a-judge quality assessment and scoring columns.\n\nExtends LLMTextColumnConfig to create judge columns that evaluate and score other\ngenerated content based on the defined criteria. Useful for quality assessment, preference\nranking, and multi-dimensional evaluation of generated data. Inherits prompt templating\ncapabilities from LLMTextColumnConfig.\n\nAttributes:\n scores (required): List of Score objects defining the evaluation dimensions. Each score\n represents a different aspect to evaluate (e.g., accuracy, relevance, fluency).\n Must contain at least one score.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n prompt (required): Prompt template for the judge evaluation (supports Jinja2).\n model_alias (required): Alias of the model configuration to use.\n system_prompt: Optional system prompt (supports Jinja2).\n multi_modal_context: Optional image contexts for multi-modal generation.\n tool_alias: Optional tool configuration alias for MCP tool calls.\n with_trace: Specifies what trace information to capture in a `{column_name}__trace`\n column. Options are `TraceType.NONE` (default), `TraceType.LAST_MESSAGE`, or\n `TraceType.ALL_MESSAGES`.\n extract_reasoning_content: If True, creates a `{column_name}__reasoning_content`\n column containing the reasoning content from the final assistant response.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemFiveDropDefault - ), - allow_resize: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemFiveAllowResizeDefault - ), - column_type: zod - .literal('llm-structured') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemFiveColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemFivePropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - prompt: zod - .string() - .describe( - 'Jinja2 template for the LLM prompt; can reference other columns via {{ column_name }}' - ), - model_alias: zod - .string() - .describe('Alias of the model configuration to use for generation'), - system_prompt: zod - .string() - .optional() - .describe('Optional system prompt to set model behavior and constraints'), - multi_modal_context: zod - .array( - zod - .object({ - modality: zod - .enum(['image']) - .describe('Supported modality types for multimodal model data.') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemFiveMultiModalContextItemModalityDefault - ), - column_name: zod.string(), - data_type: zod - .enum(['url', 'base64']) - .optional() - .describe('Data type formats for multimodal data.'), - image_format: zod - .enum(['png', 'jpg', 'jpeg', 'gif', 'webp']) - .optional() - .describe('Supported image formats for image modality.'), - }) - .describe( - 'Configuration for providing image context to multimodal models.\n\nAttributes:\n modality: The modality type (always \"image\").\n column_name: Name of the column containing image data.\n data_type: Format of the image data (\"url\", \"base64\", or None for auto-detection).\n When None, the format is auto-detected: URLs are passed through, file paths that\n exist under base_path are loaded as base64, and other values are assumed to be base64.\n image_format: Image format (required when data_type is explicitly \"base64\").' - ) - ) - .optional() - .describe('Optional list of ImageContext for vision model inputs'), - tool_alias: zod - .string() - .optional() - .describe( - 'Optional alias of the tool configuration to use for MCP tool calls' - ), - with_trace: zod - .enum(['none', 'last_message', 'all_messages']) - .describe( - 'Specifies the type of reasoning trace to capture for LLM columns.\n\nTraces capture the conversation history during LLM generation, which is\nuseful for debugging, analysis, and understanding model behavior.\n\nAttributes:\n NONE: No trace is captured. This is the default.\n LAST_MESSAGE: Only the final assistant message is captured.\n ALL_MESSAGES: The full conversation history (system\/user\/assistant\/tool)\n is captured.' - ) - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemFiveWithTraceDefault - ) - .describe('Trace capture mode: NONE, LAST_MESSAGE, or ALL_MESSAGES'), - extract_reasoning_content: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemFiveExtractReasoningContentDefault - ) - .describe( - 'If True, capture chain-of-thought in {name}__reasoning_content column' - ), - output_format: zod - .union([zod.record(zod.string(), zod.unknown()), zod.unknown()]) - .describe( - 'Pydantic model or JSON schema dict defining the expected structured output shape' - ), - }) - .describe( - 'Configuration for structured JSON generation columns using Large Language Models.\n\nExtends LLMTextColumnConfig to generate structured data conforming to a specified schema.\nUses JSON schema or Pydantic models to define the expected output structure, enabling\ntype-safe and validated structured output generation. Inherits prompt templating capabilities\nfrom LLMTextColumnConfig.\n\nAttributes:\n output_format (required): The schema defining the expected output structure. Can be either:\n - A Pydantic BaseModel class (recommended)\n - A JSON schema dictionary\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n prompt (required): Prompt template for structured generation (supports Jinja2).\n model_alias (required): Alias of the model configuration to use.\n system_prompt: Optional system prompt (supports Jinja2).\n multi_modal_context: Optional image contexts for multi-modal generation.\n tool_alias: Optional tool configuration alias for MCP tool calls.\n with_trace: Specifies what trace information to capture in a `{column_name}__trace`\n column. Options are `TraceType.NONE` (default), `TraceType.LAST_MESSAGE`, or\n `TraceType.ALL_MESSAGES`.\n extract_reasoning_content: If True, creates a `{column_name}__reasoning_content`\n column containing the reasoning content from the final assistant response.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSixDropDefault - ), - allow_resize: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSixAllowResizeDefault - ), - column_type: zod - .literal('llm-text') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSixColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSixPropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - prompt: zod - .string() - .describe( - 'Jinja2 template for the LLM prompt; can reference other columns via {{ column_name }}' - ), - model_alias: zod - .string() - .describe('Alias of the model configuration to use for generation'), - system_prompt: zod - .string() - .optional() - .describe('Optional system prompt to set model behavior and constraints'), - multi_modal_context: zod - .array( - zod - .object({ - modality: zod - .enum(['image']) - .describe('Supported modality types for multimodal model data.') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSixMultiModalContextItemModalityDefault - ), - column_name: zod.string(), - data_type: zod - .enum(['url', 'base64']) - .optional() - .describe('Data type formats for multimodal data.'), - image_format: zod - .enum(['png', 'jpg', 'jpeg', 'gif', 'webp']) - .optional() - .describe('Supported image formats for image modality.'), - }) - .describe( - 'Configuration for providing image context to multimodal models.\n\nAttributes:\n modality: The modality type (always \"image\").\n column_name: Name of the column containing image data.\n data_type: Format of the image data (\"url\", \"base64\", or None for auto-detection).\n When None, the format is auto-detected: URLs are passed through, file paths that\n exist under base_path are loaded as base64, and other values are assumed to be base64.\n image_format: Image format (required when data_type is explicitly \"base64\").' - ) - ) - .optional() - .describe('Optional list of ImageContext for vision model inputs'), - tool_alias: zod - .string() - .optional() - .describe( - 'Optional alias of the tool configuration to use for MCP tool calls' - ), - with_trace: zod - .enum(['none', 'last_message', 'all_messages']) - .describe( - 'Specifies the type of reasoning trace to capture for LLM columns.\n\nTraces capture the conversation history during LLM generation, which is\nuseful for debugging, analysis, and understanding model behavior.\n\nAttributes:\n NONE: No trace is captured. This is the default.\n LAST_MESSAGE: Only the final assistant message is captured.\n ALL_MESSAGES: The full conversation history (system\/user\/assistant\/tool)\n is captured.' - ) - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSixWithTraceDefault - ) - .describe('Trace capture mode: NONE, LAST_MESSAGE, or ALL_MESSAGES'), - extract_reasoning_content: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSixExtractReasoningContentDefault - ) - .describe( - 'If True, capture chain-of-thought in {name}__reasoning_content column' - ), - }) - .describe( - 'Configuration for text generation columns using Large Language Models.\n\nLLM text columns generate free-form text content using language models.\nPrompts support Jinja2 templating to reference values from other columns, enabling\ncontext-aware generation. The generated text can optionally include message traces\ncapturing the full conversation history.\n\nAttributes:\n prompt (required): Prompt template for text generation. Supports Jinja2 syntax to\n reference other columns (e.g., \"Write a story about {{ character_name }}\").\n Must be a valid Jinja2 template.\n model_alias (required): Alias of the model configuration to use for generation.\n Must match a model alias defined when initializing the DataDesignerConfigBuilder.\n system_prompt: Optional system prompt to set model behavior and constraints.\n Also supports Jinja2 templating. If provided, must be a valid Jinja2 template.\n Do not put any output parsing instructions in the system prompt. Instead,\n use the appropriate column type for the output you want to generate - e.g.,\n `LLMStructuredColumnConfig` for structured output, `LLMCodeColumnConfig` for code.\n multi_modal_context: Optional list of image contexts for multi-modal generation.\n Enables vision-capable models to generate text based on image inputs.\n tool_alias: Optional alias of the tool configuration to use for MCP tool calls.\n Must match a tool alias defined when initializing the DataDesignerConfigBuilder.\n When provided, the model may call permitted tools during generation.\n with_trace: Specifies what trace information to capture in a `{column_name}__trace`\n column. Options are:\n - `TraceType.NONE` (default): No trace is captured.\n - `TraceType.LAST_MESSAGE`: Only the final assistant message is captured.\n - `TraceType.ALL_MESSAGES`: Full conversation history (system\/user\/assistant\/tool).\n extract_reasoning_content: If True, creates a `{column_name}__reasoning_content` column\n containing only the reasoning_content from the final assistant response. This is\n useful for models that expose chain-of-thought reasoning separately from the main\n response. Defaults to False.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenDropDefault - ), - allow_resize: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenAllowResizeDefault - ), - column_type: zod - .literal('sampler') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenPropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - sampler_type: zod - .enum([ - 'bernoulli', - 'bernoulli_mixture', - 'binomial', - 'category', - 'datetime', - 'gaussian', - 'person', - 'person_from_faker', - 'poisson', - 'scipy', - 'subcategory', - 'timedelta', - 'uniform', - 'uuid', - ]) - .describe( - 'Type of sampler to use (e.g., uuid, category, uniform, gaussian, person, datetime)' - ), - params: zod - .union([ - zod - .object({ - category: zod - .string() - .describe('Name of parent category to this subcategory.'), - values: zod - .record( - zod.string(), - zod.array(zod.union([zod.string(), zod.number(), zod.number()])) - ) - .describe( - 'Mapping from each value of parent category to a list of subcategory values.' - ), - sampler_type: zod - .literal('subcategory') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsOneSamplerTypeDefault - ), - }) - .describe( - 'Parameters for subcategory sampling conditioned on a parent category column.\n\nSamples subcategory values based on the value of a parent category column. Each parent\ncategory value maps to its own list of possible subcategory values, enabling hierarchical\nor conditional sampling patterns.\n\nAttributes:\n category (required): Name of the parent category column that this subcategory depends on.\n The parent column must be generated before this subcategory column.\n values (required): Mapping from each parent category value to a list of possible subcategory values.\n Each key must correspond to a value that appears in the parent category column.' - ), - zod - .object({ - values: zod - .array(zod.union([zod.string(), zod.number(), zod.number()])) - .min(1) - .describe( - 'List of possible categorical values that can be sampled from.' - ), - weights: zod - .array(zod.number()) - .optional() - .describe( - 'List of unnormalized probability weights to assigned to each value, in order. Larger values will be sampled with higher probability.' - ), - sampler_type: zod - .literal('category') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsTwoSamplerTypeDefault - ), - }) - .describe( - 'Parameters for categorical sampling with optional probability weighting.\n\nSamples values from a discrete set of categories. When weights are provided, values are\nsampled according to their assigned probabilities. Without weights, uniform sampling is used.\n\nAttributes:\n values (required): List of possible categorical values to sample from. Can contain strings, integers,\n or floats. Must contain at least one value.\n weights: Optional unnormalized probability weights for each value. If provided, must be\n the same length as `values`. Weights are automatically normalized to sum to 1.0.\n Larger weights result in higher sampling probability for the corresponding value.' - ), - zod - .object({ - start: zod - .string() - .describe( - 'Earliest possible datetime for sampling range, inclusive.' - ), - end: zod - .string() - .describe('Exclusive upper bound for datetime sampling range.'), - unit: zod - .enum(['Y', 'M', 'D', 'h', 'm', 's']) - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsThreeUnitDefault - ) - .describe( - 'Sampling units, e.g. the smallest possible time interval between samples.' - ), - sampler_type: zod - .literal('datetime') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsThreeSamplerTypeDefault - ), - }) - .describe( - 'Parameters for uniform datetime sampling within a specified range.\n\nSamples datetime values uniformly between a start and end date with a specified granularity.\nThe sampling unit determines the smallest possible time interval between consecutive samples.\n\nAttributes:\n start (required): Earliest possible datetime for the sampling range (inclusive). Must be a valid\n datetime string parseable by pandas.to_datetime().\n end (required): Exclusive upper bound for the sampling range. Must be a valid\n datetime string parseable by pandas.to_datetime().\n unit: Time unit for sampling granularity. Options:\n - \"Y\": Years\n - \"M\": Months\n - \"D\": Days (default)\n - \"h\": Hours\n - \"m\": Minutes\n - \"s\": Seconds' - ), - zod - .object({ - locale: zod - .string() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsFourLocaleDefault - ) - .describe( - 'Locale that determines the language and geographic location that a synthetic person will be sampled from. Must be a locale supported by a managed Nemotron Personas dataset. Managed datasets exist for the following locales: en_US, en_IN, en_SG, fr_FR, hi_Deva_IN, hi_Latn_IN, ja_JP, ko_KR, pt_BR.' - ), - sex: zod - .enum(['Male', 'Female']) - .optional() - .describe( - 'If specified, then only synthetic people of the specified sex will be sampled.' - ), - city: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe( - 'If specified, then only synthetic people from these cities will be sampled.' - ), - age_range: zod - .array(zod.number()) - .min( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsFourAgeRangeMin - ) - .max( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsFourAgeRangeMax - ) - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsFourAgeRangeDefault - ) - .describe( - 'If specified, then only synthetic people within this age range will be sampled.' - ), - select_field_values: zod - .record(zod.string(), zod.array(zod.string())) - .optional() - .describe( - 'Sample synthetic people with the specified field values. This is meant to be a flexible argument for selecting a subset of the population from the managed dataset. Note that this sampler does not support rare combinations of field values and will likely fail if your desired subset is not well-represented in the managed Nemotron Personas dataset. We generally recommend using the `sex`, `city`, and `age_range` arguments to filter the population when possible.' - ), - with_synthetic_personas: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsFourWithSyntheticPersonasDefault - ) - .describe( - 'If True, then append synthetic persona columns to each generated person.' - ), - sampler_type: zod - .literal('person') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsFourSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling synthetic person data with demographic attributes.\n\nGenerates realistic synthetic person data including names, addresses, phone numbers, and other\ndemographic information from managed datasets. The sampler supports filtering by locale, sex, age,\ngeographic location, and selected managed-dataset fields, and can optionally include synthetic\npersona descriptions. For Faker-generated person data, use PersonFromFakerSamplerParams.\n\nAttributes:\n locale: Locale string determining the language and geographic region for synthetic people.\n Must be a locale supported by a managed Nemotron Personas dataset. The dataset must\n be downloaded and available in the managed assets directory.\n sex: If specified, filters to only sample people of the specified sex. Options: \"Male\" or\n \"Female\". If None, samples both sexes.\n city: If specified, filters to only sample people from the specified city or cities. Can be\n a single city name (string) or a list of city names.\n age_range: Two-element list [min_age, max_age] specifying the age range to sample from\n (inclusive). Defaults to a standard age range. Both values must be between minimum and\n maximum allowed ages.\n with_synthetic_personas: If True, appends additional synthetic persona columns including\n personality traits, interests, and background descriptions. Only supported for certain\n locales with managed datasets.\n select_field_values: Optional field-value filters for managed datasets. Supported field\n names are checked against the managed person data fields.' - ), - zod - .object({ - locale: zod - .string() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsFiveLocaleDefault - ) - .describe( - 'Locale string, determines the language and geographic locale that a synthetic person will be sampled from. E.g, en_US, en_GB, fr_FR, ...' - ), - sex: zod - .enum(['Male', 'Female']) - .optional() - .describe( - 'If specified, then only synthetic people of the specified sex will be sampled.' - ), - city: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe( - 'If specified, then only synthetic people from these cities will be sampled.' - ), - age_range: zod - .array(zod.number()) - .min( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsFiveAgeRangeMin - ) - .max( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsFiveAgeRangeMax - ) - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsFiveAgeRangeDefault - ) - .describe( - 'If specified, then only synthetic people within this age range will be sampled.' - ), - sampler_type: zod - .literal('person_from_faker') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsFiveSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling synthetic person data with demographic attributes from Faker.\n\nUses the Faker library to generate random personal information. The data is basic and not demographically\naccurate, but is useful for quick testing, prototyping, or when realistic demographic distributions are not\nrelevant for your use case. For demographically accurate person data, use the `PersonSamplerParams` sampler.\n\nAttributes:\n locale: Locale string determining the language and geographic region for synthetic people.\n Can be any locale supported by Faker.\n sex: If specified, filters to only sample people of the specified sex. Options: \"Male\" or\n \"Female\". If None, samples both sexes.\n city: If specified, filters to only sample people from the specified city or cities. Can be\n a single city name (string) or a list of city names.\n age_range: Two-element list [min_age, max_age] specifying the age range to sample from\n (inclusive). Defaults to a standard age range. Both values must be between the minimum and\n maximum allowed ages.\n sampler_type: Discriminator for the sampler type. Must be `SamplerType.PERSON_FROM_FAKER`.' - ), - zod - .object({ - dt_min: zod - .number() - .min( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsSixDtMinMin - ) - .describe( - 'Minimum possible time-delta for sampling range, inclusive. Must be less than `dt_max`.' - ), - dt_max: zod - .number() - .gt( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsSixDtMaxExclusiveMin - ) - .describe( - 'Maximum possible time-delta for sampling range, exclusive. Must be greater than `dt_min`.' - ), - reference_column_name: zod - .string() - .describe( - 'Name of an existing datetime column to condition time-delta sampling on.' - ), - unit: zod - .enum(['D', 'h', 'm', 's']) - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsSixUnitDefault - ) - .describe( - 'Sampling units, e.g. the smallest possible time interval between samples.' - ), - sampler_type: zod - .literal('timedelta') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsSixSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling time deltas relative to a reference datetime column.\n\nSamples time offsets within a specified range and adds them to values from a reference\ndatetime column. This is useful for generating related datetime columns like order dates\nand delivery dates, or event start times and end times.\n\nNote:\n Years and months are not supported as timedelta units because they have variable lengths.\n See: [pandas timedelta documentation](https:\/\/pandas.pydata.org\/docs\/user_guide\/timedeltas.html)\n\nAttributes:\n dt_min (required): Minimum time-delta value (inclusive). Must be non-negative and less than `dt_max`.\n Specified in units defined by the `unit` parameter.\n dt_max (required): Maximum time-delta value (exclusive). Must be positive and greater than `dt_min`.\n Specified in units defined by the `unit` parameter.\n reference_column_name (required): Name of an existing datetime column to add the time-delta to.\n This column must be generated before the timedelta column.\n unit: Time unit for the delta values. Options:\n - \"D\": Days (default)\n - \"h\": Hours\n - \"m\": Minutes\n - \"s\": Seconds' - ), - zod - .object({ - prefix: zod - .string() - .optional() - .describe('String prepended to the front of the UUID.'), - short_form: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsSevenShortFormDefault - ) - .describe( - 'If true, all UUIDs sampled will be truncated at 8 characters.' - ), - uppercase: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsSevenUppercaseDefault - ) - .describe( - 'If true, all letters in the UUID will be capitalized.' - ), - sampler_type: zod - .literal('uuid') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsSevenSamplerTypeDefault - ), - }) - .describe( - 'Parameters for generating UUID (Universally Unique Identifier) values.\n\nGenerates UUID4 (random) identifiers with optional formatting options. UUIDs are useful\nfor creating unique identifiers for records, entities, or transactions.\n\nAttributes:\n prefix: Optional string to prepend to each UUID. Useful for creating namespaced or\n typed identifiers (e.g., \"user-\", \"order-\", \"txn-\").\n short_form: If True, truncates UUIDs to 8 characters (first segment only). Default is False\n for full 32-character UUIDs (excluding hyphens).\n uppercase: If True, converts all hexadecimal letters to uppercase. Default is False for\n lowercase UUIDs.' - ), - zod - .object({ - p: zod - .number() - .min( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsEightPMin - ) - .max( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsEightPMax - ) - .describe('Probability of success.'), - sampler_type: zod - .literal('bernoulli') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsEightSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Bernoulli distribution.\n\nSamples binary values (0 or 1) representing the outcome of a single trial with a fixed\nprobability of success. This is the simplest discrete probability distribution, useful for\nmodeling binary outcomes like success\/failure, yes\/no, or true\/false.\n\nAttributes:\n p (required): Probability of success (sampling 1). Must be between 0.0 and 1.0 (inclusive).\n The probability of failure (sampling 0) is automatically 1 - p.' - ), - zod - .object({ - p: zod - .number() - .min( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsNinePMin - ) - .max( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsNinePMax - ) - .describe('Bernoulli distribution probability of success.'), - dist_name: zod - .string() - .describe( - 'Mixture distribution name. Samples will be equal to the distribution sample with probability `p`, otherwise equal to 0. Must be a valid scipy.stats distribution name.' - ), - dist_params: zod - .record(zod.string(), zod.unknown()) - .describe( - 'Parameters of the scipy.stats distribution given in `dist_name`.' - ), - sampler_type: zod - .literal('bernoulli_mixture') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsNineSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Bernoulli mixture distribution.\n\nCombines a Bernoulli distribution with another continuous distribution, creating a mixture\nwhere values are either 0 (with probability 1-p) or sampled from the specified distribution\n(with probability p). This is useful for modeling scenarios with many zero values mixed with\na continuous distribution of non-zero values.\n\nCommon use cases include modeling sparse events, zero-inflated data, or situations where\nan outcome either doesn\'t occur (0) or follows a specific distribution when it does occur.\n\nAttributes:\n p (required): Probability of sampling from the mixture distribution (non-zero outcome).\n Must be between 0.0 and 1.0 (inclusive). With probability 1-p, the sample is 0.\n dist_name (required): Name of the scipy.stats distribution to sample from when outcome is non-zero.\n Must be a valid scipy.stats distribution name (e.g., \"norm\", \"gamma\", \"expon\").\n dist_params (required): Parameters for the specified scipy.stats distribution.' - ), - zod - .object({ - n: zod.number().describe('Number of trials.'), - p: zod - .number() - .min( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsOnezeroPMin - ) - .max( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsOnezeroPMax - ) - .describe('Probability of success on each trial.'), - sampler_type: zod - .literal('binomial') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsOnezeroSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Binomial distribution.\n\nSamples integer values representing the number of successes in a fixed number of independent\nBernoulli trials, each with the same probability of success. Commonly used to model the number\nof successful outcomes in repeated experiments.\n\nAttributes:\n n (required): Number of independent trials. Must be a positive integer.\n p (required): Probability of success on each trial. Must be between 0.0 and 1.0 (inclusive).' - ), - zod - .object({ - mean: zod.number().describe('Mean of the Gaussian distribution'), - stddev: zod - .number() - .describe('Standard deviation of the Gaussian distribution'), - decimal_places: zod - .number() - .optional() - .describe( - 'Number of decimal places to round the sampled values to.' - ), - sampler_type: zod - .literal('gaussian') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsOneoneSamplerTypeDefault - ), - }) - .describe( - "Parameters for sampling from a Gaussian (Normal) distribution.\n\nSamples continuous values from a normal distribution characterized by its mean and standard\ndeviation. The Gaussian distribution is one of the most commonly used probability distributions,\nappearing naturally in many real-world phenomena due to the Central Limit Theorem.\n\nAttributes:\n mean (required): Mean (center) of the Gaussian distribution. This is the expected value and the\n location of the distribution's peak.\n stddev (required): Standard deviation of the Gaussian distribution. Controls the spread or width\n of the distribution. Must be positive.\n decimal_places: Optional number of decimal places to round sampled values to. If None,\n values are not rounded." - ), - zod - .object({ - mean: zod - .number() - .describe('Mean number of events in a fixed interval.'), - sampler_type: zod - .literal('poisson') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsOnetwoSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Poisson distribution.\n\nSamples non-negative integer values representing the number of events occurring in a fixed\ninterval of time or space. The Poisson distribution is commonly used to model count data\nlike the number of arrivals, occurrences, or events per time period.\n\nThe distribution is characterized by a single parameter (mean\/rate), and both the mean and\nvariance equal this parameter value.\n\nAttributes:\n mean (required): Mean number of events in the fixed interval (also called rate parameter Ī»).\n Must be positive. This represents both the expected value and the variance of the\n distribution.' - ), - zod - .object({ - low: zod - .number() - .describe('Lower bound of the uniform distribution, inclusive.'), - high: zod - .number() - .describe('Upper bound of the uniform distribution.'), - decimal_places: zod - .number() - .optional() - .describe( - 'Number of decimal places to round the sampled values to.' - ), - sampler_type: zod - .literal('uniform') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsOnethreeSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a continuous Uniform distribution.\n\nSamples continuous values uniformly from a specified range, where every value in the range\nhas equal probability of being sampled. This is useful when all values within a range are\nequally likely, such as random percentages, proportions, or unbiased measurements.\n\nAttributes:\n low (required): Lower bound of the uniform distribution (inclusive). Can be any real number.\n high (required): Upper bound of the uniform distribution. Must be greater than `low`.\n decimal_places: Optional number of decimal places to round sampled values to. If None,\n values are not rounded and may have many decimal places.' - ), - zod - .object({ - dist_name: zod - .string() - .describe('Name of a scipy.stats distribution.'), - dist_params: zod - .record(zod.string(), zod.unknown()) - .describe( - 'Parameters of the scipy.stats distribution given in `dist_name`.' - ), - decimal_places: zod - .number() - .optional() - .describe( - 'Number of decimal places to round the sampled values to.' - ), - sampler_type: zod - .literal('scipy') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenParamsOnefourSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from any scipy.stats continuous or discrete distribution.\n\nProvides a flexible interface to sample from the wide range of probability distributions\navailable in scipy.stats. This enables advanced statistical sampling beyond the built-in\ndistribution types (Gaussian, Uniform, etc.).\n\nSee: [scipy.stats documentation](https:\/\/docs.scipy.org\/doc\/scipy\/reference\/stats.html)\n\nAttributes:\n dist_name (required): Name of the scipy.stats distribution to sample from (e.g., \"beta\", \"gamma\",\n \"lognorm\", \"expon\"). Must be a valid distribution name from scipy.stats.\n dist_params (required): Dictionary of parameters for the specified distribution. Parameter names\n and values must match the scipy.stats distribution specification (e.g., {\"a\": 2, \"b\": 5}\n for beta distribution, {\"scale\": 1.5} for exponential).\n decimal_places: Optional number of decimal places to round sampled values to. If None,\n values are not rounded.' - ), - ]) - .describe('Parameters specific to the chosen sampler type'), - conditional_params: zod - .record( - zod.string(), - zod.union([ - zod - .object({ - category: zod - .string() - .describe('Name of parent category to this subcategory.'), - values: zod - .record( - zod.string(), - zod.array( - zod.union([zod.string(), zod.number(), zod.number()]) - ) - ) - .describe( - 'Mapping from each value of parent category to a list of subcategory values.' - ), - sampler_type: zod - .literal('subcategory') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsOneSamplerTypeDefault - ), - }) - .describe( - 'Parameters for subcategory sampling conditioned on a parent category column.\n\nSamples subcategory values based on the value of a parent category column. Each parent\ncategory value maps to its own list of possible subcategory values, enabling hierarchical\nor conditional sampling patterns.\n\nAttributes:\n category (required): Name of the parent category column that this subcategory depends on.\n The parent column must be generated before this subcategory column.\n values (required): Mapping from each parent category value to a list of possible subcategory values.\n Each key must correspond to a value that appears in the parent category column.' - ), - zod - .object({ - values: zod - .array(zod.union([zod.string(), zod.number(), zod.number()])) - .min(1) - .describe( - 'List of possible categorical values that can be sampled from.' - ), - weights: zod - .array(zod.number()) - .optional() - .describe( - 'List of unnormalized probability weights to assigned to each value, in order. Larger values will be sampled with higher probability.' - ), - sampler_type: zod - .literal('category') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsTwoSamplerTypeDefault - ), - }) - .describe( - 'Parameters for categorical sampling with optional probability weighting.\n\nSamples values from a discrete set of categories. When weights are provided, values are\nsampled according to their assigned probabilities. Without weights, uniform sampling is used.\n\nAttributes:\n values (required): List of possible categorical values to sample from. Can contain strings, integers,\n or floats. Must contain at least one value.\n weights: Optional unnormalized probability weights for each value. If provided, must be\n the same length as `values`. Weights are automatically normalized to sum to 1.0.\n Larger weights result in higher sampling probability for the corresponding value.' - ), - zod - .object({ - start: zod - .string() - .describe( - 'Earliest possible datetime for sampling range, inclusive.' - ), - end: zod - .string() - .describe('Exclusive upper bound for datetime sampling range.'), - unit: zod - .enum(['Y', 'M', 'D', 'h', 'm', 's']) - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsThreeUnitDefault - ) - .describe( - 'Sampling units, e.g. the smallest possible time interval between samples.' - ), - sampler_type: zod - .literal('datetime') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsThreeSamplerTypeDefault - ), - }) - .describe( - 'Parameters for uniform datetime sampling within a specified range.\n\nSamples datetime values uniformly between a start and end date with a specified granularity.\nThe sampling unit determines the smallest possible time interval between consecutive samples.\n\nAttributes:\n start (required): Earliest possible datetime for the sampling range (inclusive). Must be a valid\n datetime string parseable by pandas.to_datetime().\n end (required): Exclusive upper bound for the sampling range. Must be a valid\n datetime string parseable by pandas.to_datetime().\n unit: Time unit for sampling granularity. Options:\n - \"Y\": Years\n - \"M\": Months\n - \"D\": Days (default)\n - \"h\": Hours\n - \"m\": Minutes\n - \"s\": Seconds' - ), - zod - .object({ - locale: zod - .string() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsFourLocaleDefault - ) - .describe( - 'Locale that determines the language and geographic location that a synthetic person will be sampled from. Must be a locale supported by a managed Nemotron Personas dataset. Managed datasets exist for the following locales: en_US, en_IN, en_SG, fr_FR, hi_Deva_IN, hi_Latn_IN, ja_JP, ko_KR, pt_BR.' - ), - sex: zod - .enum(['Male', 'Female']) - .optional() - .describe( - 'If specified, then only synthetic people of the specified sex will be sampled.' - ), - city: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe( - 'If specified, then only synthetic people from these cities will be sampled.' - ), - age_range: zod - .array(zod.number()) - .min( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsFourAgeRangeMin - ) - .max( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsFourAgeRangeMax - ) - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsFourAgeRangeDefault - ) - .describe( - 'If specified, then only synthetic people within this age range will be sampled.' - ), - select_field_values: zod - .record(zod.string(), zod.array(zod.string())) - .optional() - .describe( - 'Sample synthetic people with the specified field values. This is meant to be a flexible argument for selecting a subset of the population from the managed dataset. Note that this sampler does not support rare combinations of field values and will likely fail if your desired subset is not well-represented in the managed Nemotron Personas dataset. We generally recommend using the `sex`, `city`, and `age_range` arguments to filter the population when possible.' - ), - with_synthetic_personas: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsFourWithSyntheticPersonasDefault - ) - .describe( - 'If True, then append synthetic persona columns to each generated person.' - ), - sampler_type: zod - .literal('person') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsFourSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling synthetic person data with demographic attributes.\n\nGenerates realistic synthetic person data including names, addresses, phone numbers, and other\ndemographic information from managed datasets. The sampler supports filtering by locale, sex, age,\ngeographic location, and selected managed-dataset fields, and can optionally include synthetic\npersona descriptions. For Faker-generated person data, use PersonFromFakerSamplerParams.\n\nAttributes:\n locale: Locale string determining the language and geographic region for synthetic people.\n Must be a locale supported by a managed Nemotron Personas dataset. The dataset must\n be downloaded and available in the managed assets directory.\n sex: If specified, filters to only sample people of the specified sex. Options: \"Male\" or\n \"Female\". If None, samples both sexes.\n city: If specified, filters to only sample people from the specified city or cities. Can be\n a single city name (string) or a list of city names.\n age_range: Two-element list [min_age, max_age] specifying the age range to sample from\n (inclusive). Defaults to a standard age range. Both values must be between minimum and\n maximum allowed ages.\n with_synthetic_personas: If True, appends additional synthetic persona columns including\n personality traits, interests, and background descriptions. Only supported for certain\n locales with managed datasets.\n select_field_values: Optional field-value filters for managed datasets. Supported field\n names are checked against the managed person data fields.' - ), - zod - .object({ - locale: zod - .string() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsFiveLocaleDefault - ) - .describe( - 'Locale string, determines the language and geographic locale that a synthetic person will be sampled from. E.g, en_US, en_GB, fr_FR, ...' - ), - sex: zod - .enum(['Male', 'Female']) - .optional() - .describe( - 'If specified, then only synthetic people of the specified sex will be sampled.' - ), - city: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe( - 'If specified, then only synthetic people from these cities will be sampled.' - ), - age_range: zod - .array(zod.number()) - .min( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsFiveAgeRangeMin - ) - .max( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsFiveAgeRangeMax - ) - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsFiveAgeRangeDefault - ) - .describe( - 'If specified, then only synthetic people within this age range will be sampled.' - ), - sampler_type: zod - .literal('person_from_faker') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsFiveSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling synthetic person data with demographic attributes from Faker.\n\nUses the Faker library to generate random personal information. The data is basic and not demographically\naccurate, but is useful for quick testing, prototyping, or when realistic demographic distributions are not\nrelevant for your use case. For demographically accurate person data, use the `PersonSamplerParams` sampler.\n\nAttributes:\n locale: Locale string determining the language and geographic region for synthetic people.\n Can be any locale supported by Faker.\n sex: If specified, filters to only sample people of the specified sex. Options: \"Male\" or\n \"Female\". If None, samples both sexes.\n city: If specified, filters to only sample people from the specified city or cities. Can be\n a single city name (string) or a list of city names.\n age_range: Two-element list [min_age, max_age] specifying the age range to sample from\n (inclusive). Defaults to a standard age range. Both values must be between the minimum and\n maximum allowed ages.\n sampler_type: Discriminator for the sampler type. Must be `SamplerType.PERSON_FROM_FAKER`.' - ), - zod - .object({ - dt_min: zod - .number() - .min( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsSixDtMinMin - ) - .describe( - 'Minimum possible time-delta for sampling range, inclusive. Must be less than `dt_max`.' - ), - dt_max: zod - .number() - .gt( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsSixDtMaxExclusiveMin - ) - .describe( - 'Maximum possible time-delta for sampling range, exclusive. Must be greater than `dt_min`.' - ), - reference_column_name: zod - .string() - .describe( - 'Name of an existing datetime column to condition time-delta sampling on.' - ), - unit: zod - .enum(['D', 'h', 'm', 's']) - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsSixUnitDefault - ) - .describe( - 'Sampling units, e.g. the smallest possible time interval between samples.' - ), - sampler_type: zod - .literal('timedelta') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsSixSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling time deltas relative to a reference datetime column.\n\nSamples time offsets within a specified range and adds them to values from a reference\ndatetime column. This is useful for generating related datetime columns like order dates\nand delivery dates, or event start times and end times.\n\nNote:\n Years and months are not supported as timedelta units because they have variable lengths.\n See: [pandas timedelta documentation](https:\/\/pandas.pydata.org\/docs\/user_guide\/timedeltas.html)\n\nAttributes:\n dt_min (required): Minimum time-delta value (inclusive). Must be non-negative and less than `dt_max`.\n Specified in units defined by the `unit` parameter.\n dt_max (required): Maximum time-delta value (exclusive). Must be positive and greater than `dt_min`.\n Specified in units defined by the `unit` parameter.\n reference_column_name (required): Name of an existing datetime column to add the time-delta to.\n This column must be generated before the timedelta column.\n unit: Time unit for the delta values. Options:\n - \"D\": Days (default)\n - \"h\": Hours\n - \"m\": Minutes\n - \"s\": Seconds' - ), - zod - .object({ - prefix: zod - .string() - .optional() - .describe('String prepended to the front of the UUID.'), - short_form: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsSevenShortFormDefault - ) - .describe( - 'If true, all UUIDs sampled will be truncated at 8 characters.' - ), - uppercase: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsSevenUppercaseDefault - ) - .describe( - 'If true, all letters in the UUID will be capitalized.' - ), - sampler_type: zod - .literal('uuid') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsSevenSamplerTypeDefault - ), - }) - .describe( - 'Parameters for generating UUID (Universally Unique Identifier) values.\n\nGenerates UUID4 (random) identifiers with optional formatting options. UUIDs are useful\nfor creating unique identifiers for records, entities, or transactions.\n\nAttributes:\n prefix: Optional string to prepend to each UUID. Useful for creating namespaced or\n typed identifiers (e.g., \"user-\", \"order-\", \"txn-\").\n short_form: If True, truncates UUIDs to 8 characters (first segment only). Default is False\n for full 32-character UUIDs (excluding hyphens).\n uppercase: If True, converts all hexadecimal letters to uppercase. Default is False for\n lowercase UUIDs.' - ), - zod - .object({ - p: zod - .number() - .min( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsEightPMin - ) - .max( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsEightPMax - ) - .describe('Probability of success.'), - sampler_type: zod - .literal('bernoulli') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsEightSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Bernoulli distribution.\n\nSamples binary values (0 or 1) representing the outcome of a single trial with a fixed\nprobability of success. This is the simplest discrete probability distribution, useful for\nmodeling binary outcomes like success\/failure, yes\/no, or true\/false.\n\nAttributes:\n p (required): Probability of success (sampling 1). Must be between 0.0 and 1.0 (inclusive).\n The probability of failure (sampling 0) is automatically 1 - p.' - ), - zod - .object({ - p: zod - .number() - .min( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsNinePMin - ) - .max( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsNinePMax - ) - .describe('Bernoulli distribution probability of success.'), - dist_name: zod - .string() - .describe( - 'Mixture distribution name. Samples will be equal to the distribution sample with probability `p`, otherwise equal to 0. Must be a valid scipy.stats distribution name.' - ), - dist_params: zod - .record(zod.string(), zod.unknown()) - .describe( - 'Parameters of the scipy.stats distribution given in `dist_name`.' - ), - sampler_type: zod - .literal('bernoulli_mixture') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsNineSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Bernoulli mixture distribution.\n\nCombines a Bernoulli distribution with another continuous distribution, creating a mixture\nwhere values are either 0 (with probability 1-p) or sampled from the specified distribution\n(with probability p). This is useful for modeling scenarios with many zero values mixed with\na continuous distribution of non-zero values.\n\nCommon use cases include modeling sparse events, zero-inflated data, or situations where\nan outcome either doesn\'t occur (0) or follows a specific distribution when it does occur.\n\nAttributes:\n p (required): Probability of sampling from the mixture distribution (non-zero outcome).\n Must be between 0.0 and 1.0 (inclusive). With probability 1-p, the sample is 0.\n dist_name (required): Name of the scipy.stats distribution to sample from when outcome is non-zero.\n Must be a valid scipy.stats distribution name (e.g., \"norm\", \"gamma\", \"expon\").\n dist_params (required): Parameters for the specified scipy.stats distribution.' - ), - zod - .object({ - n: zod.number().describe('Number of trials.'), - p: zod - .number() - .min( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsOnezeroPMin - ) - .max( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsOnezeroPMax - ) - .describe('Probability of success on each trial.'), - sampler_type: zod - .literal('binomial') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsOnezeroSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Binomial distribution.\n\nSamples integer values representing the number of successes in a fixed number of independent\nBernoulli trials, each with the same probability of success. Commonly used to model the number\nof successful outcomes in repeated experiments.\n\nAttributes:\n n (required): Number of independent trials. Must be a positive integer.\n p (required): Probability of success on each trial. Must be between 0.0 and 1.0 (inclusive).' - ), - zod - .object({ - mean: zod.number().describe('Mean of the Gaussian distribution'), - stddev: zod - .number() - .describe('Standard deviation of the Gaussian distribution'), - decimal_places: zod - .number() - .optional() - .describe( - 'Number of decimal places to round the sampled values to.' - ), - sampler_type: zod - .literal('gaussian') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsOneoneSamplerTypeDefault - ), - }) - .describe( - "Parameters for sampling from a Gaussian (Normal) distribution.\n\nSamples continuous values from a normal distribution characterized by its mean and standard\ndeviation. The Gaussian distribution is one of the most commonly used probability distributions,\nappearing naturally in many real-world phenomena due to the Central Limit Theorem.\n\nAttributes:\n mean (required): Mean (center) of the Gaussian distribution. This is the expected value and the\n location of the distribution's peak.\n stddev (required): Standard deviation of the Gaussian distribution. Controls the spread or width\n of the distribution. Must be positive.\n decimal_places: Optional number of decimal places to round sampled values to. If None,\n values are not rounded." - ), - zod - .object({ - mean: zod - .number() - .describe('Mean number of events in a fixed interval.'), - sampler_type: zod - .literal('poisson') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsOnetwoSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Poisson distribution.\n\nSamples non-negative integer values representing the number of events occurring in a fixed\ninterval of time or space. The Poisson distribution is commonly used to model count data\nlike the number of arrivals, occurrences, or events per time period.\n\nThe distribution is characterized by a single parameter (mean\/rate), and both the mean and\nvariance equal this parameter value.\n\nAttributes:\n mean (required): Mean number of events in the fixed interval (also called rate parameter Ī»).\n Must be positive. This represents both the expected value and the variance of the\n distribution.' - ), - zod - .object({ - low: zod - .number() - .describe( - 'Lower bound of the uniform distribution, inclusive.' - ), - high: zod - .number() - .describe('Upper bound of the uniform distribution.'), - decimal_places: zod - .number() - .optional() - .describe( - 'Number of decimal places to round the sampled values to.' - ), - sampler_type: zod - .literal('uniform') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsOnethreeSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a continuous Uniform distribution.\n\nSamples continuous values uniformly from a specified range, where every value in the range\nhas equal probability of being sampled. This is useful when all values within a range are\nequally likely, such as random percentages, proportions, or unbiased measurements.\n\nAttributes:\n low (required): Lower bound of the uniform distribution (inclusive). Can be any real number.\n high (required): Upper bound of the uniform distribution. Must be greater than `low`.\n decimal_places: Optional number of decimal places to round sampled values to. If None,\n values are not rounded and may have many decimal places.' - ), - zod - .object({ - dist_name: zod - .string() - .describe('Name of a scipy.stats distribution.'), - dist_params: zod - .record(zod.string(), zod.unknown()) - .describe( - 'Parameters of the scipy.stats distribution given in `dist_name`.' - ), - decimal_places: zod - .number() - .optional() - .describe( - 'Number of decimal places to round the sampled values to.' - ), - sampler_type: zod - .literal('scipy') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemSevenConditionalParamsOnefourSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from any scipy.stats continuous or discrete distribution.\n\nProvides a flexible interface to sample from the wide range of probability distributions\navailable in scipy.stats. This enables advanced statistical sampling beyond the built-in\ndistribution types (Gaussian, Uniform, etc.).\n\nSee: [scipy.stats documentation](https:\/\/docs.scipy.org\/doc\/scipy\/reference\/stats.html)\n\nAttributes:\n dist_name (required): Name of the scipy.stats distribution to sample from (e.g., \"beta\", \"gamma\",\n \"lognorm\", \"expon\"). Must be a valid distribution name from scipy.stats.\n dist_params (required): Dictionary of parameters for the specified distribution. Parameter names\n and values must match the scipy.stats distribution specification (e.g., {\"a\": 2, \"b\": 5}\n for beta distribution, {\"scale\": 1.5} for exponential).\n decimal_places: Optional number of decimal places to round sampled values to. If None,\n values are not rounded.' - ), - ]) - ) - .optional() - .describe( - 'Optional dictionary for conditional parameters; keys are conditions, values are params to use when met' - ), - convert_to: zod - .string() - .optional() - .describe( - "Optional type conversion after sampling: 'float', 'int', or 'str' for numerical samplers; a strftime format string (e.g., '%Y-%m-%d') for datetime\/timedelta samplers. Datetime\/timedelta columns default to ISO-8601 (e.g., 2024-01-15T09:30:00) when omitted." - ), - }) - .describe( - 'Configuration for columns generated using built-in samplers.\n\nSampler columns provide efficient data generation for common data types and\ndistributions. Supported samplers include UUID generation,\ndatetime\/timedelta sampling, person generation, category \/ subcategory sampling,\nand various statistical distributions (uniform, gaussian, binomial, poisson, scipy).\n\nAttributes:\n sampler_type (required): Type of sampler to use. Available types include:\n \"uuid\", \"category\", \"subcategory\", \"uniform\", \"gaussian\", \"bernoulli\",\n \"bernoulli_mixture\", \"binomial\", \"poisson\", \"scipy\", \"person\",\n \"person_from_faker\", \"datetime\", \"timedelta\".\n params (required): Parameters specific to the chosen sampler type. Type varies based on the `sampler_type`\n (e.g., `CategorySamplerParams`, `UniformSamplerParams`, `PersonSamplerParams`).\n conditional_params: Optional dictionary for conditional parameters. The dict keys\n are the conditions that must be met (e.g., \"age > 21\") for the conditional parameters\n to be used. The values of dict are the parameters to use when the condition is met.\n convert_to: Optional type conversion to apply after sampling. For numerical samplers,\n must be one of \"float\", \"int\", or \"str\". For datetime and timedelta samplers, accepts\n a strftime format string (e.g., ``\"%Y-%m-%d\"``, ``\"%m\/%d\/%Y %H:%M\"``). When omitted,\n datetime\/timedelta columns default to ISO-8601 format (e.g., ``2024-01-15T09:30:00``).\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.\n\n!!! tip \"Displaying available samplers and their parameters\"\n The config builder has an `info` attribute that can be used to display the\n available samplers and their parameters:\n ```python\n config_builder.info.display(\"samplers\")\n ```' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemEightDropDefault - ), - allow_resize: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemEightAllowResizeDefault - ), - column_type: zod - .literal('seed-dataset') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemEightColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemEightPropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - }) - .describe( - 'Configuration for columns sourced from seed datasets.\n\nThis config marks columns that come from seed data. It is typically created\nautomatically when calling `with_seed_dataset()` on the builder, rather than\nbeing instantiated directly by users.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemNineDropDefault - ), - allow_resize: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemNineAllowResizeDefault - ), - column_type: zod - .literal('validation') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemNineColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemNinePropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - target_columns: zod - .array(zod.string()) - .describe('List of column names to validate'), - validator_type: zod - .enum(['code', 'local_callable', 'remote']) - .describe("Validation method: 'code', 'local_callable', or 'remote'"), - validator_params: zod - .union([ - zod - .object({ - validator_type: zod - .literal('code') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemNineValidatorParamsOneValidatorTypeDefault - ) - .describe( - "Validator type discriminator, always 'code' for this validator" - ), - code_lang: zod - .enum([ - 'bash', - 'c', - 'cobol', - 'cpp', - 'csharp', - 'go', - 'java', - 'javascript', - 'kotlin', - 'python', - 'ruby', - 'rust', - 'scala', - 'swift', - 'typescript', - 'sql:sqlite', - 'sql:tsql', - 'sql:bigquery', - 'sql:mysql', - 'sql:postgres', - 'sql:ansi', - ]) - .describe('The language of the code to validate'), - }) - .describe( - 'Configuration for code validation. Supports Python and SQL code validation.\n\nAttributes:\n code_lang (required): The language of the code to validate. Supported values include: `python`,\n `sql:sqlite`, `sql:postgres`, `sql:mysql`, `sql:tsql`, `sql:bigquery`, `sql:ansi`.' - ), - zod - .object({ - validator_type: zod - .literal('local_callable') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemNineValidatorParamsTwoValidatorTypeDefault - ) - .describe( - "Validator type discriminator, always 'local_callable' for this validator" - ), - validation_function: zod - .unknown() - .describe( - 'Function (Callable[[pd.DataFrame], pd.DataFrame]) to validate the data' - ), - output_schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - "Expected schema for local callable validator's output" - ), - }) - .describe( - "Configuration for local callable validation. Expects a function to be passed that validates the data.\n\nAttributes:\n validation_function (required): Function (`Callable[[pd.DataFrame], pd.DataFrame]`) to validate the\n data. Output must contain a column `is_valid` of type `bool`.\n output_schema: The JSON schema for the local callable validator's output. If not provided,\n the output will not be validated." - ), - zod - .object({ - validator_type: zod - .literal('remote') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemNineValidatorParamsThreeValidatorTypeDefault - ) - .describe( - "Validator type discriminator, always 'remote' for this validator" - ), - endpoint_url: zod.string().describe('URL of the remote endpoint'), - output_schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe("Expected schema for remote validator's output"), - timeout: zod - .number() - .gt( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemNineValidatorParamsThreeTimeoutExclusiveMin - ) - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemNineValidatorParamsThreeTimeoutDefault - ) - .describe('The timeout for the HTTP request'), - max_retries: zod - .number() - .min( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemNineValidatorParamsThreeMaxRetriesMin - ) - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemNineValidatorParamsThreeMaxRetriesDefault - ) - .describe('The maximum number of retry attempts'), - retry_backoff: zod - .number() - .gt( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemNineValidatorParamsThreeRetryBackoffExclusiveMin - ) - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemNineValidatorParamsThreeRetryBackoffDefault - ) - .describe('The backoff factor for the retry delay'), - max_parallel_requests: zod - .number() - .min(1) - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemNineValidatorParamsThreeMaxParallelRequestsDefault - ) - .describe('The maximum number of parallel requests to make'), - }) - .describe( - "Configuration for remote validation. Sends data to a remote endpoint for validation.\n\nAttributes:\n endpoint_url (required): The URL of the remote endpoint.\n output_schema: The JSON schema for the remote validator's output. If not provided,\n the output will not be validated.\n timeout: The timeout for the HTTP request in seconds. Defaults to 30.0.\n max_retries: The maximum number of retry attempts. Defaults to 3.\n retry_backoff: The backoff factor for the retry delay in seconds. Defaults to 2.0.\n max_parallel_requests: The maximum number of parallel requests to make. Defaults to 4." - ), - ]) - .describe('Validator-specific parameters (e.g., CodeValidatorParams)'), - batch_size: zod - .number() - .min(1) - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemNineBatchSizeDefault - ) - .describe('Number of records to process in each batch'), - }) - .describe( - 'Configuration for validation columns that validate existing columns.\n\nValidation columns execute validation logic against specified target columns and return\nstructured results indicating pass\/fail status with validation details. Supports multiple\nvalidation strategies: code execution (Python\/SQL), local callable functions (library only),\nand remote HTTP endpoints.\n\nAttributes:\n target_columns (required): List of column names to validate. These columns are passed to the\n validator for validation. All target columns must exist in the dataset\n before validation runs.\n validator_type (required): The type of validator to use. Options:\n - \"code\": Execute code (Python or SQL) for validation. The code receives a\n DataFrame with target columns and must return a DataFrame with validation results.\n - \"local_callable\": Call a local Python function with the data. Only supported\n when running DataDesigner locally.\n - \"remote\": Send data to a remote HTTP endpoint for validation.\n validator_params (required): Parameters specific to the validator type. Type varies by validator:\n - CodeValidatorParams: Specifies code language (python or SQL dialect like\n \"sql:postgres\", \"sql:mysql\").\n - LocalCallableValidatorParams: Provides validation function (Callable[[pd.DataFrame],\n pd.DataFrame]) and optional output schema for validation results.\n - RemoteValidatorParams: Configures endpoint URL, HTTP timeout, retry behavior\n (max_retries, retry_backoff), and parallel request limits (max_parallel_requests).\n batch_size: Number of records to process in each validation batch. Defaults to 10.\n Larger batches are more efficient but use more memory. Adjust based on validator\n complexity and available resources.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemOnezeroDropDefault - ), - allow_resize: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemOnezeroAllowResizeDefault - ), - column_type: zod - .literal('embedding') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemOnezeroColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemOnezeroPropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - target_column: zod - .string() - .describe('Name of the text column to generate embeddings for'), - model_alias: zod - .string() - .describe('Alias of the model to use for embedding generation'), - }) - .describe( - 'Configuration for embedding generation columns.\n\nEmbedding columns generate embeddings for text input using a specified model.\n\nAttributes:\n target_column (required): The column to generate embeddings for. The column could be a single text string or a list of text strings in stringified JSON format.\n If it is a list of text strings in stringified JSON format, the embeddings will be generated for each text string.\n model_alias (required): The model to use for embedding generation.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemOneoneDropDefault - ), - allow_resize: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemOneoneAllowResizeDefault - ), - column_type: zod - .literal('image') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemOneoneColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemOneonePropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - prompt: zod - .string() - .describe( - 'Jinja2 template for the image generation prompt; can reference other columns via {{ column_name }}' - ), - model_alias: zod - .string() - .describe('Alias of the model to use for image generation'), - multi_modal_context: zod - .array( - zod - .object({ - modality: zod - .enum(['image']) - .describe('Supported modality types for multimodal model data.') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigColumnsItemOneoneMultiModalContextItemModalityDefault - ), - column_name: zod.string(), - data_type: zod - .enum(['url', 'base64']) - .optional() - .describe('Data type formats for multimodal data.'), - image_format: zod - .enum(['png', 'jpg', 'jpeg', 'gif', 'webp']) - .optional() - .describe('Supported image formats for image modality.'), - }) - .describe( - 'Configuration for providing image context to multimodal models.\n\nAttributes:\n modality: The modality type (always \"image\").\n column_name: Name of the column containing image data.\n data_type: Format of the image data (\"url\", \"base64\", or None for auto-detection).\n When None, the format is auto-detected: URLs are passed through, file paths that\n exist under base_path are loaded as base64, and other values are assumed to be base64.\n image_format: Image format (required when data_type is explicitly \"base64\").' - ) - ) - .optional() - .describe( - 'Optional list of ImageContext for multi-modal image-to-image generation' - ), - }) - .describe( - 'Configuration for image generation columns.\n\nImage columns generate images using either autoregressive or diffusion models.\nThe API used is automatically determined based on the model name:\n\nAttributes:\n prompt (required): Prompt template for image generation. Supports Jinja2 templating to\n reference other columns (e.g., \"Generate an image of a {{ character_name }}\").\n Must be a valid Jinja2 template.\n model_alias (required): The model to use for image generation.\n multi_modal_context: Optional list of image contexts for multi-modal generation.\n Enables autoregressive multi-modal models to generate images based on image inputs.\n Only works with autoregressive models that support image-to-image generation.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - ]) - ) - .min(1), - model_configs: zod - .array( - zod - .object({ - alias: zod.string(), - model: zod.string(), - inference_parameters: zod - .union([ - zod - .object({ - generation_type: zod - .literal('chat-completion') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigModelConfigsItemInferenceParametersOneGenerationTypeDefault - ), - max_parallel_requests: zod - .number() - .min(1) - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigModelConfigsItemInferenceParametersOneMaxParallelRequestsDefault - ), - timeout: zod.number().min(1).optional(), - extra_body: zod.record(zod.string(), zod.unknown()).optional(), - temperature: zod - .union([ - zod.number(), - zod - .object({ - distribution_type: zod - .enum(['uniform', 'manual']) - .describe( - 'Types of distributions for sampling inference parameters.' - ) - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigModelConfigsItemInferenceParametersOneTemperatureTwoDistributionTypeDefault - ), - params: zod - .object({ - low: zod.number(), - high: zod.number(), - }) - .describe( - 'Parameters for uniform distribution sampling.\n\nAttributes:\n low: Lower bound (inclusive).\n high: Upper bound (exclusive).' - ), - }) - .describe( - 'Uniform distribution for sampling inference parameters.\n\nSamples values uniformly between low and high bounds. Useful for exploring\na continuous range of values for temperature or top_p.\n\nAttributes:\n distribution_type: Type of distribution (\"uniform\").\n params: Distribution parameters (low, high).' - ), - zod - .object({ - distribution_type: zod - .enum(['uniform', 'manual']) - .describe( - 'Types of distributions for sampling inference parameters.' - ) - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigModelConfigsItemInferenceParametersOneTemperatureThreeDistributionTypeDefault - ), - params: zod - .object({ - values: zod.array(zod.number()).min(1), - weights: zod.array(zod.number()).optional(), - }) - .describe( - 'Parameters for manual distribution sampling.\n\nAttributes:\n values: List of possible values to sample from.\n weights: Optional list of weights for each value. If not provided, all values have equal probability.' - ), - }) - .describe( - 'Manual (discrete) distribution for sampling inference parameters.\n\nSamples from a discrete set of values with optional weights. Useful for testing\nspecific values or creating custom probability distributions for temperature or top_p.\n\nAttributes:\n distribution_type: Type of distribution (\"manual\").\n params: Distribution parameters (values, weights).' - ), - ]) - .optional(), - top_p: zod - .union([ - zod.number(), - zod - .object({ - distribution_type: zod - .enum(['uniform', 'manual']) - .describe( - 'Types of distributions for sampling inference parameters.' - ) - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigModelConfigsItemInferenceParametersOneTopPTwoDistributionTypeDefault - ), - params: zod - .object({ - low: zod.number(), - high: zod.number(), - }) - .describe( - 'Parameters for uniform distribution sampling.\n\nAttributes:\n low: Lower bound (inclusive).\n high: Upper bound (exclusive).' - ), - }) - .describe( - 'Uniform distribution for sampling inference parameters.\n\nSamples values uniformly between low and high bounds. Useful for exploring\na continuous range of values for temperature or top_p.\n\nAttributes:\n distribution_type: Type of distribution (\"uniform\").\n params: Distribution parameters (low, high).' - ), - zod - .object({ - distribution_type: zod - .enum(['uniform', 'manual']) - .describe( - 'Types of distributions for sampling inference parameters.' - ) - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigModelConfigsItemInferenceParametersOneTopPThreeDistributionTypeDefault - ), - params: zod - .object({ - values: zod.array(zod.number()).min(1), - weights: zod.array(zod.number()).optional(), - }) - .describe( - 'Parameters for manual distribution sampling.\n\nAttributes:\n values: List of possible values to sample from.\n weights: Optional list of weights for each value. If not provided, all values have equal probability.' - ), - }) - .describe( - 'Manual (discrete) distribution for sampling inference parameters.\n\nSamples from a discrete set of values with optional weights. Useful for testing\nspecific values or creating custom probability distributions for temperature or top_p.\n\nAttributes:\n distribution_type: Type of distribution (\"manual\").\n params: Distribution parameters (values, weights).' - ), - ]) - .optional(), - max_tokens: zod.number().min(1).optional(), - }) - .describe( - 'Configuration for LLM inference parameters.\n\nAttributes:\n generation_type: Type of generation, always \"chat-completion\" for this class.\n temperature: Sampling temperature (0.0-2.0). Can be a fixed value or a distribution for dynamic sampling.\n top_p: Nucleus sampling probability (0.0-1.0). Can be a fixed value or a distribution for dynamic sampling.\n max_tokens: Maximum number of tokens to generate in the response.' - ), - zod - .object({ - generation_type: zod - .literal('embedding') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigModelConfigsItemInferenceParametersTwoGenerationTypeDefault - ), - max_parallel_requests: zod - .number() - .min(1) - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigModelConfigsItemInferenceParametersTwoMaxParallelRequestsDefault - ), - timeout: zod.number().min(1).optional(), - extra_body: zod.record(zod.string(), zod.unknown()).optional(), - encoding_format: zod - .enum(['float', 'base64']) - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigModelConfigsItemInferenceParametersTwoEncodingFormatDefault - ), - dimensions: zod.number().optional(), - }) - .describe( - 'Configuration for embedding generation parameters.\n\nAttributes:\n generation_type: Type of generation, always \"embedding\" for this class.\n encoding_format: Format of the embedding encoding (\"float\" or \"base64\").\n dimensions: Number of dimensions for the embedding.' - ), - zod - .object({ - generation_type: zod - .literal('image') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigModelConfigsItemInferenceParametersThreeGenerationTypeDefault - ), - max_parallel_requests: zod - .number() - .min(1) - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigModelConfigsItemInferenceParametersThreeMaxParallelRequestsDefault - ), - timeout: zod.number().min(1).optional(), - extra_body: zod.record(zod.string(), zod.unknown()).optional(), - }) - .describe( - 'Configuration for image generation models.\n\nWorks for both diffusion and autoregressive image generation models. Pass all model-specific image options via `extra_body`.\n\nAttributes:\n generation_type: Type of generation, always \"image\" for this class.\n\nExample:\n ```python\n # OpenAI-style (DALLĀ·E): quality and size in extra_body or as top-level kwargs\n dd.ImageInferenceParams(\n extra_body={\"size\": \"1024x1024\", \"quality\": \"hd\"}\n )\n\n # Gemini-style: generationConfig.imageConfig\n dd.ImageInferenceParams(\n extra_body={\n \"generationConfig\": {\n \"imageConfig\": {\n \"aspectRatio\": \"1:1\",\n \"imageSize\": \"1024\"\n }\n }\n }\n )\n ```' - ), - ]) - .optional(), - provider: zod.string().optional(), - skip_health_check: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigModelConfigsItemSkipHealthCheckDefault - ), - }) - .describe( - "Configuration for a model used for generation.\n\nAttributes:\n alias: User-defined alias to reference in column configurations.\n model: Model identifier (e.g., from build.nvidia.com or other providers).\n inference_parameters: Inference parameters for the model (temperature, top_p, max_tokens, etc.).\n The generation_type is determined by the type of inference_parameters.\n provider: Name of the model provider. Required in a future release. Leaving\n ``provider`` unset (or ``None``) currently routes through the registry's\n implicit default and is \*\*deprecated\*\*; specify ``provider=`` explicitly.\n See issue #589.\n skip_health_check: Whether to skip the health check for this model. Defaults to False." - ) - ) - .optional(), - tool_configs: zod - .array( - zod - .object({ - tool_alias: zod.string(), - providers: zod.array(zod.string()), - allow_tools: zod.array(zod.string()).optional(), - max_tool_call_turns: zod - .number() - .min(1) - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigToolConfigsItemMaxToolCallTurnsDefault - ), - timeout_sec: zod - .number() - .gt( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigToolConfigsItemTimeoutSecExclusiveMin - ) - .optional(), - }) - .describe( - 'Configuration for permitting MCP tools on an LLM column.\n\nToolConfig defines which tools are available for use during LLM generation.\nIt references one or more MCP providers by name and can optionally restrict\nwhich tools from those providers are permitted.\n\nAttributes:\n tool_alias (str): User-defined alias to reference this tool configuration in column configs.\n providers (list[str]): Names of the MCP providers to use for tool calls. Tools can be\n drawn from multiple providers.\n allow_tools (list[str] | None): Optional allowlist of tool names that restricts which\n tools are permitted. If None, all tools from the specified providers are allowed.\n Defaults to None.\n max_tool_call_turns (int): Maximum number of tool-calling turns permitted in a single\n generation. A turn is one iteration where the LLM requests tool calls. With parallel\n tool calling, a single turn may execute multiple tools simultaneously. Defaults to 5.\n timeout_sec (float | None): Timeout in seconds for MCP tool calls. Defaults to None (no timeout).\n\nExamples:\n >>> ToolConfig(\n ... tool_alias=\"search-tools\",\n ... providers=[\"doc-search-mcp\", \"web-search-mcp\"],\n ... allow_tools=[\"search_docs\", \"list_docs\"],\n ... max_tool_call_turns=10,\n ... timeout_sec=30.0,\n ... )' - ) - ) - .optional(), - seed_config: zod - .object({ - source: zod.union([ - zod.object({ - seed_type: zod - .literal('local') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSourceOneSeedTypeDefault - ), - path: zod - .string() - .describe( - 'Path to a local seed dataset file or wildcard pattern. Relative paths are resolved from the current working directory when the config is loaded, not from the config file location.' - ), - }), - zod.object({ - seed_type: zod - .literal('hf') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSourceTwoSeedTypeDefault - ), - path: zod - .string() - .describe( - "Path to the seed data in HuggingFace. Wildcards are allowed. Examples include 'datasets\/my-username\/my-dataset\/data\/000_00000.parquet', 'datasets\/my-username\/my-dataset\/data\/\*.parquet', and 'datasets\/my-username\/my-dataset\/\*\*\/\*.parquet'" - ), - token: zod.string().optional(), - endpoint: zod - .string() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSourceTwoEndpointDefault - ), - }), - zod.object({ - seed_type: zod - .literal('df') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSourceThreeSeedTypeDefault - ), - }), - zod.object({ - seed_type: zod - .literal('directory') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSourceFourSeedTypeDefault - ), - path: zod - .string() - .describe( - 'Directory containing seed artifacts. Relative paths are resolved from the current working directory when the config is loaded, not from the config file location.' - ), - file_pattern: zod - .string() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSourceFourFilePatternDefault - ) - .describe( - 'Case-sensitive filename pattern used to match files under the provided directory. Patterns match basenames only, not relative paths.' - ), - recursive: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSourceFourRecursiveDefault - ) - .describe( - 'Whether to search nested subdirectories under the provided directory for matching files.' - ), - }), - zod.object({ - seed_type: zod - .literal('file_contents') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSourceFiveSeedTypeDefault - ), - path: zod - .string() - .describe( - 'Directory containing seed artifacts. Relative paths are resolved from the current working directory when the config is loaded, not from the config file location.' - ), - file_pattern: zod - .string() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSourceFiveFilePatternDefault - ) - .describe( - 'Case-sensitive filename pattern used to match files under the provided directory. Patterns match basenames only, not relative paths.' - ), - recursive: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSourceFiveRecursiveDefault - ) - .describe( - 'Whether to search nested subdirectories under the provided directory for matching files.' - ), - encoding: zod - .string() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSourceFiveEncodingDefault - ) - .describe( - 'Text encoding used when reading matching files into the `content` column.' - ), - }), - zod.object({ - seed_type: zod - .literal('agent_rollout') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSourceSixSeedTypeDefault - ), - path: zod - .string() - .optional() - .describe( - 'Directory containing agent rollout artifacts. This field is required for ATIF trajectories. When omitted, built-in defaults are used for formats that define one. Claude Code defaults to ~\/.claude\/projects, Codex defaults to ~\/.codex\/sessions, Hermes Agent defaults to ~\/.hermes\/sessions, and Pi Coding Agent defaults to ~\/.pi\/agent\/sessions. Relative paths are resolved from the current working directory when the config is loaded, not from the config file location.' - ), - file_pattern: zod - .string() - .optional() - .describe( - "Case-sensitive filename pattern used to match agent rollout files. When omitted, ATIF defaults to '\*.json', Claude Code, Codex, and Pi Coding Agent default to '\*.jsonl', and Hermes Agent defaults to '\*.json\*'." - ), - recursive: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSourceSixRecursiveDefault - ) - .describe( - 'Whether to search nested subdirectories under the provided directory for matching files.' - ), - format: zod - .enum(['atif', 'claude_code', 'codex', 'hermes_agent', 'pi_coding_agent']) - .describe('Built-in agent rollout format to use for parsing trace files.'), - }), - zod.object({ - seed_type: zod - .literal('nmp') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSourceSevenSeedTypeDefault - ), - path: zod.string(), - }), - ]), - sampling_strategy: zod - .enum(['ordered', 'shuffle']) - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSamplingStrategyDefault - ), - selection_strategy: zod - .union([ - zod.object({ - start: zod - .number() - .min( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSelectionStrategyOneStartMin - ) - .describe('The start index of the index range (inclusive)'), - end: zod - .number() - .min( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSelectionStrategyOneEndMin - ) - .describe('The end index of the index range (inclusive)'), - }), - zod.object({ - index: zod - .number() - .min( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSelectionStrategyTwoIndexMin - ) - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSelectionStrategyTwoIndexDefault - ) - .describe('The index of the partition to sample from'), - num_partitions: zod - .number() - .min(1) - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigSeedConfigSelectionStrategyTwoNumPartitionsDefault - ) - .describe('The total number of partitions in the dataset'), - }), - ]) - .optional(), - }) - .optional() - .describe( - 'Configuration for sampling data from a seed dataset.\n\nAttributes:\n source: A SeedSource defining where the seed data exists\n sampling_strategy: Strategy for how to sample rows from the dataset.\n - ORDERED: Read rows sequentially in their original order.\n - SHUFFLE: Randomly shuffle rows before sampling. When used with\n selection_strategy, shuffling occurs within the selected range\/partition.\n selection_strategy: Optional strategy to select a subset of the dataset.\n - IndexRange: Select a specific range of indices (e.g., rows 100-200).\n - PartitionBlock: Select a partition by splitting the dataset into N equal parts.\n Partition indices are zero-based (index=0 is the first partition, index=1 is\n the second, etc.).\n\nExamples:\n Read rows sequentially from start to end:\n SeedConfig(\n source=LocalFileSeedSource(path=\"my_data.parquet\"),\n sampling_strategy=SamplingStrategy.ORDERED\n )\n\n Read rows in random order:\n SeedConfig(\n source=LocalFileSeedSource(path=\"my_data.parquet\"),\n sampling_strategy=SamplingStrategy.SHUFFLE\n )\n\n Read specific index range (rows 100-199):\n SeedConfig(\n source=LocalFileSeedSource(path=\"my_data.parquet\"),\n sampling_strategy=SamplingStrategy.ORDERED,\n selection_strategy=IndexRange(start=100, end=199)\n )\n\n Read random rows from a specific index range (shuffles within rows 100-199):\n SeedConfig(\n source=LocalFileSeedSource(path=\"my_data.parquet\"),\n sampling_strategy=SamplingStrategy.SHUFFLE,\n selection_strategy=IndexRange(start=100, end=199)\n )\n\n Read from partition 2 (3rd partition, zero-based) of 5 partitions (20% of dataset):\n SeedConfig(\n source=LocalFileSeedSource(path=\"my_data.parquet\"),\n sampling_strategy=SamplingStrategy.ORDERED,\n selection_strategy=PartitionBlock(index=2, num_partitions=5)\n )\n\n Read shuffled rows from partition 0 of 10 partitions (shuffles within the partition):\n SeedConfig(\n source=LocalFileSeedSource(path=\"my_data.parquet\"),\n sampling_strategy=SamplingStrategy.SHUFFLE,\n selection_strategy=PartitionBlock(index=0, num_partitions=10)\n )' - ), - constraints: zod - .array( - zod.union([ - zod - .object({ - target_column: zod - .string() - .describe('Name of the sampler column this constraint applies to'), - constraint_type: zod - .literal('scalar_inequality') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigConstraintsItemOneConstraintTypeDefault - ) - .describe( - "Constraint type discriminator, always 'scalar_inequality' for this constraint" - ), - rhs: zod.number().describe('Scalar value to compare against'), - operator: zod - .enum(['lt', 'le', 'gt', 'ge']) - .describe('Comparison operator'), - }) - .describe( - 'Constrain a sampler column to be less\/greater than a scalar value.\n\nOnly applies to sampler columns.\n\nAttributes:\n rhs (required): Scalar value to compare against.\n operator (required): Comparison operator (lt, le, gt, ge).\n\nInherited Attributes:\n target_column (required): Name of the sampler column this constraint applies to.' - ), - zod - .object({ - target_column: zod - .string() - .describe('Name of the sampler column this constraint applies to'), - constraint_type: zod - .literal('column_inequality') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigConstraintsItemTwoConstraintTypeDefault - ) - .describe( - "Constraint type discriminator, always 'column_inequality' for this constraint" - ), - rhs: zod - .string() - .describe('Name of the other sampler column to compare against'), - operator: zod - .enum(['lt', 'le', 'gt', 'ge']) - .describe('Comparison operator'), - }) - .describe( - 'Constrain a sampler column to be less\/greater than another sampler column.\n\nOnly applies to sampler columns.\n\nAttributes:\n rhs (required): Name of the other sampler column to compare against.\n operator (required): Comparison operator (lt, le, gt, ge).\n\nInherited Attributes:\n target_column (required): Name of the sampler column this constraint applies to.' - ), - ]) - ) - .optional(), - profilers: zod - .array( - zod - .object({ - model_alias: zod.string(), - summary_score_sample_size: zod - .number() - .min(1) - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigProfilersItemSummaryScoreSampleSizeDefault - ), - }) - .describe( - 'Configuration for the LLM-as-a-judge score profiler.\n\nAttributes:\n model_alias: Alias of the LLM model to use for generating score distribution summaries.\n Must match a model alias defined in the Data Designer configuration.\n summary_score_sample_size: Number of score samples to include when prompting the LLM\n to generate summaries. Larger sample sizes provide more context but increase\n token usage. Must be at least 1 when provided. Set to None to skip LLM-generated\n summaries. Defaults to 20.' - ) - ) - .optional(), - processors: zod - .array( - zod.union([ - zod - .object({ - name: zod - .string() - .describe( - 'The name of the processor, used to identify the processor in the results and to write the artifacts to disk.' - ), - processor_type: zod - .literal('drop_columns') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigProcessorsItemOneProcessorTypeDefault - ), - column_names: zod - .array(zod.string()) - .describe('List of column names to drop from the output dataset.'), - }) - .describe( - 'Drop columns from the output dataset (prefer ``drop=True`` in the column config).\n\nThis processor removes specified columns from the generated dataset. The dropped\ncolumns are saved separately in the `dropped-columns-parquet-files` directory for reference.\nWhen this processor is added via the config builder, the corresponding column\nconfigs are automatically marked with `drop = True`.\n\nAttributes:\n column_names (required): List of column names to remove from the output dataset.\n\nInherited Attributes:\n name (required): Name of the processor.' - ), - zod - .object({ - name: zod - .string() - .describe( - 'The name of the processor, used to identify the processor in the results and to write the artifacts to disk.' - ), - processor_type: zod - .literal('schema_transform') - .default( - dataDesignerListJobsResponseDataItemSpecJobConfigConfigProcessorsItemTwoProcessorTypeDefault - ), - template: zod - .record(zod.string(), zod.unknown()) - .describe( - '\n Dictionary specifying columns and templates to use in the new dataset with transformed schema.\n\n Each key is a new column name, and each value is an object containing Jinja2 templates - for instance, a string or a list of strings.\n Values must be JSON-serializable.\n\n Example:\n\n ```python\n template = {\n \"list_of_strings\": [\"{{ col1 }}\", \"{{ col2 }}\"],\n \"uppercase_string\": \"{{ col1 | upper }}\",\n \"lowercase_string\": \"{{ col2 | lower }}\",\n }\n ```\n\n The above templates will create an new dataset with three columns: \"list_of_strings\", \"uppercase_string\", and \"lowercase_string\".\n References to columns \"col1\" and \"col2\" in the templates will be replaced with the actual values of the columns in the dataset.\n ' - ), - }) - .describe( - 'Configuration for transforming the dataset schema using Jinja2 templates.\n\nThis processor creates a new dataset with a transformed schema. Each key in the\ntemplate becomes a column in the output, and values are Jinja2 templates that\ncan reference any column in the batch. The transformed dataset is written to\na `processors-files\/{processor_name}\/` directory alongside the main dataset.\n\nAttributes:\n template (required): Dictionary defining the output schema. Keys are new column names,\n values are Jinja2 templates (strings, lists, or nested structures).\n Must be JSON-serializable.\n\nInherited Attributes:\n name (required): Name of the processor.' - ), - ]) - ) - .optional(), - }) - .describe( - 'Configuration for NeMo Data Designer.\n\nThis class defines the main configuration structure for NeMo Data Designer,\nwhich the engine consumes when generating synthetic data.\n\nAttributes:\n columns: Required list of column configurations defining how each column\n should be generated. Must contain at least one column.\n model_configs: Optional list of model configurations for LLM-based generation.\n Each model config defines the model, provider, and inference parameters.\n tool_configs: Optional list of tool configurations for MCP tool calling.\n Each tool config defines the provider, allowed tools, and execution limits.\n seed_config: Optional seed dataset settings to use for generation.\n constraints: Optional list of column constraints.\n profilers: Optional list of column profilers for analyzing generated data characteristics.\n processors: Optional list of processor configurations for post-generation transformations.' - ), - }), - model_providers: zod.array( - zod - .object({ - name: zod.string(), - endpoint: zod.string(), - provider_type: zod - .string() - .default( - dataDesignerListJobsResponseDataItemSpecModelProvidersItemProviderTypeDefault - ), - api_key: zod.string().optional(), - extra_body: zod.record(zod.string(), zod.unknown()).optional(), - extra_headers: zod.record(zod.string(), zod.string()).optional(), - }) - .describe( - 'Configuration for a custom model provider.\n\nAttributes:\n name: Name of the model provider.\n endpoint: API endpoint URL for the provider.\n provider_type: Provider type (default: \"openai\"). Determines the API format to use.\n api_key: Optional API key for authentication.\n extra_body: Additional parameters to pass in API requests.\n extra_headers: Additional headers to pass in API requests.' - ) - ), - model_configs: zod.array( - zod - .object({ - alias: zod.string(), - model: zod.string(), - inference_parameters: zod - .union([ - zod - .object({ - generation_type: zod - .literal('chat-completion') - .default( - dataDesignerListJobsResponseDataItemSpecModelConfigsItemInferenceParametersOneGenerationTypeDefault - ), - max_parallel_requests: zod - .number() - .min(1) - .default( - dataDesignerListJobsResponseDataItemSpecModelConfigsItemInferenceParametersOneMaxParallelRequestsDefault - ), - timeout: zod.number().min(1).optional(), - extra_body: zod.record(zod.string(), zod.unknown()).optional(), - temperature: zod - .union([ - zod.number(), - zod - .object({ - distribution_type: zod - .enum(['uniform', 'manual']) - .describe( - 'Types of distributions for sampling inference parameters.' - ) - .default( - dataDesignerListJobsResponseDataItemSpecModelConfigsItemInferenceParametersOneTemperatureTwoDistributionTypeDefault - ), - params: zod - .object({ - low: zod.number(), - high: zod.number(), - }) - .describe( - 'Parameters for uniform distribution sampling.\n\nAttributes:\n low: Lower bound (inclusive).\n high: Upper bound (exclusive).' - ), - }) - .describe( - 'Uniform distribution for sampling inference parameters.\n\nSamples values uniformly between low and high bounds. Useful for exploring\na continuous range of values for temperature or top_p.\n\nAttributes:\n distribution_type: Type of distribution (\"uniform\").\n params: Distribution parameters (low, high).' - ), - zod - .object({ - distribution_type: zod - .enum(['uniform', 'manual']) - .describe( - 'Types of distributions for sampling inference parameters.' - ) - .default( - dataDesignerListJobsResponseDataItemSpecModelConfigsItemInferenceParametersOneTemperatureThreeDistributionTypeDefault - ), - params: zod - .object({ - values: zod.array(zod.number()).min(1), - weights: zod.array(zod.number()).optional(), - }) - .describe( - 'Parameters for manual distribution sampling.\n\nAttributes:\n values: List of possible values to sample from.\n weights: Optional list of weights for each value. If not provided, all values have equal probability.' - ), - }) - .describe( - 'Manual (discrete) distribution for sampling inference parameters.\n\nSamples from a discrete set of values with optional weights. Useful for testing\nspecific values or creating custom probability distributions for temperature or top_p.\n\nAttributes:\n distribution_type: Type of distribution (\"manual\").\n params: Distribution parameters (values, weights).' - ), - ]) - .optional(), - top_p: zod - .union([ - zod.number(), - zod - .object({ - distribution_type: zod - .enum(['uniform', 'manual']) - .describe( - 'Types of distributions for sampling inference parameters.' - ) - .default( - dataDesignerListJobsResponseDataItemSpecModelConfigsItemInferenceParametersOneTopPTwoDistributionTypeDefault - ), - params: zod - .object({ - low: zod.number(), - high: zod.number(), - }) - .describe( - 'Parameters for uniform distribution sampling.\n\nAttributes:\n low: Lower bound (inclusive).\n high: Upper bound (exclusive).' - ), - }) - .describe( - 'Uniform distribution for sampling inference parameters.\n\nSamples values uniformly between low and high bounds. Useful for exploring\na continuous range of values for temperature or top_p.\n\nAttributes:\n distribution_type: Type of distribution (\"uniform\").\n params: Distribution parameters (low, high).' - ), - zod - .object({ - distribution_type: zod - .enum(['uniform', 'manual']) - .describe( - 'Types of distributions for sampling inference parameters.' - ) - .default( - dataDesignerListJobsResponseDataItemSpecModelConfigsItemInferenceParametersOneTopPThreeDistributionTypeDefault - ), - params: zod - .object({ - values: zod.array(zod.number()).min(1), - weights: zod.array(zod.number()).optional(), - }) - .describe( - 'Parameters for manual distribution sampling.\n\nAttributes:\n values: List of possible values to sample from.\n weights: Optional list of weights for each value. If not provided, all values have equal probability.' - ), - }) - .describe( - 'Manual (discrete) distribution for sampling inference parameters.\n\nSamples from a discrete set of values with optional weights. Useful for testing\nspecific values or creating custom probability distributions for temperature or top_p.\n\nAttributes:\n distribution_type: Type of distribution (\"manual\").\n params: Distribution parameters (values, weights).' - ), - ]) - .optional(), - max_tokens: zod.number().min(1).optional(), - }) - .describe( - 'Configuration for LLM inference parameters.\n\nAttributes:\n generation_type: Type of generation, always \"chat-completion\" for this class.\n temperature: Sampling temperature (0.0-2.0). Can be a fixed value or a distribution for dynamic sampling.\n top_p: Nucleus sampling probability (0.0-1.0). Can be a fixed value or a distribution for dynamic sampling.\n max_tokens: Maximum number of tokens to generate in the response.' - ), - zod - .object({ - generation_type: zod - .literal('embedding') - .default( - dataDesignerListJobsResponseDataItemSpecModelConfigsItemInferenceParametersTwoGenerationTypeDefault - ), - max_parallel_requests: zod - .number() - .min(1) - .default( - dataDesignerListJobsResponseDataItemSpecModelConfigsItemInferenceParametersTwoMaxParallelRequestsDefault - ), - timeout: zod.number().min(1).optional(), - extra_body: zod.record(zod.string(), zod.unknown()).optional(), - encoding_format: zod - .enum(['float', 'base64']) - .default( - dataDesignerListJobsResponseDataItemSpecModelConfigsItemInferenceParametersTwoEncodingFormatDefault - ), - dimensions: zod.number().optional(), - }) - .describe( - 'Configuration for embedding generation parameters.\n\nAttributes:\n generation_type: Type of generation, always \"embedding\" for this class.\n encoding_format: Format of the embedding encoding (\"float\" or \"base64\").\n dimensions: Number of dimensions for the embedding.' - ), - zod - .object({ - generation_type: zod - .literal('image') - .default( - dataDesignerListJobsResponseDataItemSpecModelConfigsItemInferenceParametersThreeGenerationTypeDefault - ), - max_parallel_requests: zod - .number() - .min(1) - .default( - dataDesignerListJobsResponseDataItemSpecModelConfigsItemInferenceParametersThreeMaxParallelRequestsDefault - ), - timeout: zod.number().min(1).optional(), - extra_body: zod.record(zod.string(), zod.unknown()).optional(), - }) - .describe( - 'Configuration for image generation models.\n\nWorks for both diffusion and autoregressive image generation models. Pass all model-specific image options via `extra_body`.\n\nAttributes:\n generation_type: Type of generation, always \"image\" for this class.\n\nExample:\n ```python\n # OpenAI-style (DALLĀ·E): quality and size in extra_body or as top-level kwargs\n dd.ImageInferenceParams(\n extra_body={\"size\": \"1024x1024\", \"quality\": \"hd\"}\n )\n\n # Gemini-style: generationConfig.imageConfig\n dd.ImageInferenceParams(\n extra_body={\n \"generationConfig\": {\n \"imageConfig\": {\n \"aspectRatio\": \"1:1\",\n \"imageSize\": \"1024\"\n }\n }\n }\n )\n ```' - ), - ]) - .optional(), - provider: zod.string().optional(), - skip_health_check: zod - .boolean() - .default( - dataDesignerListJobsResponseDataItemSpecModelConfigsItemSkipHealthCheckDefault - ), - }) - .describe( - "Configuration for a model used for generation.\n\nAttributes:\n alias: User-defined alias to reference in column configurations.\n model: Model identifier (e.g., from build.nvidia.com or other providers).\n inference_parameters: Inference parameters for the model (temperature, top_p, max_tokens, etc.).\n The generation_type is determined by the type of inference_parameters.\n provider: Name of the model provider. Required in a future release. Leaving\n ``provider`` unset (or ``None``) currently routes through the registry's\n implicit default and is \*\*deprecated\*\*; specify ``provider=`` explicitly.\n See issue #589.\n skip_health_check: Whether to skip the health check for this model. Defaults to False." - ) - ), - }), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .optional() - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ), - status_details: zod.record(zod.string(), zod.unknown()).optional(), - error_details: zod.record(zod.string(), zod.unknown()).optional(), - ownership: zod.record(zod.string(), zod.unknown()).optional(), - custom_fields: zod.record(zod.string(), zod.unknown()).optional(), - }) - ), - pagination: zod - .object({ - page: zod.number().describe('The current page number.'), - page_size: zod.number().describe('The page size used for the query.'), - current_page_size: zod.number().describe('The size for the current page.'), - total_pages: zod.number().describe('The total number of pages.'), - total_results: zod.number().describe('The total number of results.'), - }) - .optional() - .describe('Pagination information.'), - sort: zod.string().optional().describe('The field on which the results are sorted.'), - filter: zod.record(zod.string(), zod.unknown()).optional().describe('Filtering information.'), -}); - -/** - * @summary Get Job Result - */ -export const DataDesignerGetJobResultParams = zod.object({ - workspace: zod.string(), - job: zod.string(), - name: zod.string(), -}); - -export const DataDesignerGetJobResultResponse = zod.object({ - name: zod.string(), - job: zod.string(), - workspace: zod.string(), - project: zod.string().optional(), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - artifact_url: zod.string(), - artifact_storage_type: zod.enum(['fileset']), - download_url: zod.string().optional(), -}); - -/** - * @summary Download Job Result - */ -export const DataDesignerDownloadJobResultParams = zod.object({ - workspace: zod.string(), - job: zod.string(), - name: zod.string(), -}); - -/** - * @summary Get Job - */ -export const DataDesignerGetJobParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemOneDropDefault = false; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemOneAllowResizeDefault = false; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemOneColumnTypeDefault = `custom`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemOnePropagateSkipDefault = true; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemOneGenerationStrategyDefault = `cell_by_cell`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemTwoDropDefault = false; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemTwoAllowResizeDefault = false; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemTwoColumnTypeDefault = `expression`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemTwoPropagateSkipDefault = true; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemTwoDtypeDefault = `str`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemThreeDropDefault = false; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemThreeAllowResizeDefault = false; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemThreeColumnTypeDefault = `llm-code`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemThreePropagateSkipDefault = true; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemThreeMultiModalContextItemModalityDefault = `image`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemThreeWithTraceDefault = `none`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemThreeExtractReasoningContentDefault = false; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemFourDropDefault = false; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemFourAllowResizeDefault = false; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemFourColumnTypeDefault = `llm-judge`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemFourPropagateSkipDefault = true; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemFourMultiModalContextItemModalityDefault = `image`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemFourWithTraceDefault = `none`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemFourExtractReasoningContentDefault = false; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemFiveDropDefault = false; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemFiveAllowResizeDefault = false; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemFiveColumnTypeDefault = `llm-structured`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemFivePropagateSkipDefault = true; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemFiveMultiModalContextItemModalityDefault = `image`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemFiveWithTraceDefault = `none`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemFiveExtractReasoningContentDefault = false; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSixDropDefault = false; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSixAllowResizeDefault = false; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSixColumnTypeDefault = `llm-text`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSixPropagateSkipDefault = true; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSixMultiModalContextItemModalityDefault = `image`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSixWithTraceDefault = `none`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSixExtractReasoningContentDefault = false; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenDropDefault = false; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenAllowResizeDefault = false; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenColumnTypeDefault = `sampler`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenPropagateSkipDefault = true; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsOneSamplerTypeDefault = `subcategory`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsTwoSamplerTypeDefault = `category`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsThreeUnitDefault = `D`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsThreeSamplerTypeDefault = `datetime`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsFourLocaleDefault = `en_US`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsFourAgeRangeDefault = - [18, 114]; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsFourAgeRangeMin = 2; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsFourAgeRangeMax = 2; - -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsFourWithSyntheticPersonasDefault = false; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsFourSamplerTypeDefault = `person`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsFiveLocaleDefault = `en_US`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsFiveAgeRangeDefault = - [18, 114]; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsFiveAgeRangeMin = 2; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsFiveAgeRangeMax = 2; - -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsFiveSamplerTypeDefault = `person_from_faker`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsSixDtMinMin = 0; - -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsSixDtMaxExclusiveMin = 0; - -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsSixUnitDefault = `D`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsSixSamplerTypeDefault = `timedelta`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsSevenShortFormDefault = false; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsSevenUppercaseDefault = false; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsSevenSamplerTypeDefault = `uuid`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsEightPMin = 0; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsEightPMax = 1; - -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsEightSamplerTypeDefault = `bernoulli`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsNinePMin = 0; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsNinePMax = 1; - -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsNineSamplerTypeDefault = `bernoulli_mixture`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsOnezeroPMin = 0; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsOnezeroPMax = 1; - -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsOnezeroSamplerTypeDefault = `binomial`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsOneoneSamplerTypeDefault = `gaussian`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsOnetwoSamplerTypeDefault = `poisson`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsOnethreeSamplerTypeDefault = `uniform`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsOnefourSamplerTypeDefault = `scipy`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsOneSamplerTypeDefault = `subcategory`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsTwoSamplerTypeDefault = `category`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsThreeUnitDefault = `D`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsThreeSamplerTypeDefault = `datetime`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFourLocaleDefault = `en_US`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFourAgeRangeDefault = - [18, 114]; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFourAgeRangeMin = 2; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFourAgeRangeMax = 2; - -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFourWithSyntheticPersonasDefault = false; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFourSamplerTypeDefault = `person`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFiveLocaleDefault = `en_US`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFiveAgeRangeDefault = - [18, 114]; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFiveAgeRangeMin = 2; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFiveAgeRangeMax = 2; - -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFiveSamplerTypeDefault = `person_from_faker`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsSixDtMinMin = 0; - -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsSixDtMaxExclusiveMin = 0; - -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsSixUnitDefault = `D`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsSixSamplerTypeDefault = `timedelta`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsSevenShortFormDefault = false; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsSevenUppercaseDefault = false; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsSevenSamplerTypeDefault = `uuid`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsEightPMin = 0; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsEightPMax = 1; - -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsEightSamplerTypeDefault = `bernoulli`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsNinePMin = 0; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsNinePMax = 1; - -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsNineSamplerTypeDefault = `bernoulli_mixture`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsOnezeroPMin = 0; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsOnezeroPMax = 1; - -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsOnezeroSamplerTypeDefault = `binomial`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsOneoneSamplerTypeDefault = `gaussian`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsOnetwoSamplerTypeDefault = `poisson`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsOnethreeSamplerTypeDefault = `uniform`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsOnefourSamplerTypeDefault = `scipy`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemEightDropDefault = false; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemEightAllowResizeDefault = false; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemEightColumnTypeDefault = `seed-dataset`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemEightPropagateSkipDefault = true; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemNineDropDefault = false; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemNineAllowResizeDefault = false; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemNineColumnTypeDefault = `validation`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemNinePropagateSkipDefault = true; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsOneValidatorTypeDefault = `code`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsTwoValidatorTypeDefault = `local_callable`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsThreeValidatorTypeDefault = `remote`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsThreeTimeoutDefault = 30; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsThreeTimeoutExclusiveMin = 0; - -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsThreeMaxRetriesDefault = 3; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsThreeMaxRetriesMin = 0; - -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsThreeRetryBackoffDefault = 2; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsThreeRetryBackoffExclusiveMin = 1; - -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsThreeMaxParallelRequestsDefault = 4; - -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemNineBatchSizeDefault = 10; - -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemOnezeroDropDefault = false; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemOnezeroAllowResizeDefault = false; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemOnezeroColumnTypeDefault = `embedding`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemOnezeroPropagateSkipDefault = true; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemOneoneDropDefault = false; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemOneoneAllowResizeDefault = false; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemOneoneColumnTypeDefault = `image`; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemOneonePropagateSkipDefault = true; -export const dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemOneoneMultiModalContextItemModalityDefault = `image`; -export const dataDesignerGetJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersOneGenerationTypeDefault = `chat-completion`; -export const dataDesignerGetJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersOneMaxParallelRequestsDefault = 4; - -export const dataDesignerGetJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersOneTemperatureTwoDistributionTypeDefault = `uniform`; -export const dataDesignerGetJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersOneTemperatureThreeDistributionTypeDefault = `manual`; -export const dataDesignerGetJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersOneTopPTwoDistributionTypeDefault = `uniform`; -export const dataDesignerGetJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersOneTopPThreeDistributionTypeDefault = `manual`; - -export const dataDesignerGetJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersTwoGenerationTypeDefault = `embedding`; -export const dataDesignerGetJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersTwoMaxParallelRequestsDefault = 4; - -export const dataDesignerGetJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersTwoEncodingFormatDefault = `float`; -export const dataDesignerGetJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersThreeGenerationTypeDefault = `image`; -export const dataDesignerGetJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersThreeMaxParallelRequestsDefault = 4; - -export const dataDesignerGetJobResponseSpecJobConfigConfigModelConfigsItemSkipHealthCheckDefault = false; -export const dataDesignerGetJobResponseSpecJobConfigConfigToolConfigsItemMaxToolCallTurnsDefault = 5; - -export const dataDesignerGetJobResponseSpecJobConfigConfigToolConfigsItemTimeoutSecExclusiveMin = 0; - -export const dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSourceOneSeedTypeDefault = `local`; -export const dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSourceTwoSeedTypeDefault = `hf`; -export const dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSourceTwoEndpointDefault = `https://huggingface.co`; -export const dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSourceThreeSeedTypeDefault = `df`; -export const dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSourceFourSeedTypeDefault = `directory`; -export const dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSourceFourFilePatternDefault = `*`; -export const dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSourceFourRecursiveDefault = true; -export const dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSourceFiveSeedTypeDefault = `file_contents`; -export const dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSourceFiveFilePatternDefault = `*`; -export const dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSourceFiveRecursiveDefault = true; -export const dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSourceFiveEncodingDefault = `utf-8`; -export const dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSourceSixSeedTypeDefault = `agent_rollout`; -export const dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSourceSixRecursiveDefault = true; -export const dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSourceSevenSeedTypeDefault = `nmp`; -export const dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSamplingStrategyDefault = `ordered`; -export const dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSelectionStrategyOneStartMin = 0; - -export const dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSelectionStrategyOneEndMin = 0; - -export const dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSelectionStrategyTwoIndexDefault = 0; -export const dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSelectionStrategyTwoIndexMin = 0; - -export const dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSelectionStrategyTwoNumPartitionsDefault = 1; - -export const dataDesignerGetJobResponseSpecJobConfigConfigConstraintsItemOneConstraintTypeDefault = `scalar_inequality`; -export const dataDesignerGetJobResponseSpecJobConfigConfigConstraintsItemTwoConstraintTypeDefault = `column_inequality`; -export const dataDesignerGetJobResponseSpecJobConfigConfigProfilersItemSummaryScoreSampleSizeDefault = 20; - -export const dataDesignerGetJobResponseSpecJobConfigConfigProcessorsItemOneProcessorTypeDefault = `drop_columns`; -export const dataDesignerGetJobResponseSpecJobConfigConfigProcessorsItemTwoProcessorTypeDefault = `schema_transform`; -export const dataDesignerGetJobResponseSpecModelProvidersItemProviderTypeDefault = `openai`; -export const dataDesignerGetJobResponseSpecModelConfigsItemInferenceParametersOneGenerationTypeDefault = `chat-completion`; -export const dataDesignerGetJobResponseSpecModelConfigsItemInferenceParametersOneMaxParallelRequestsDefault = 4; - -export const dataDesignerGetJobResponseSpecModelConfigsItemInferenceParametersOneTemperatureTwoDistributionTypeDefault = `uniform`; -export const dataDesignerGetJobResponseSpecModelConfigsItemInferenceParametersOneTemperatureThreeDistributionTypeDefault = `manual`; -export const dataDesignerGetJobResponseSpecModelConfigsItemInferenceParametersOneTopPTwoDistributionTypeDefault = `uniform`; -export const dataDesignerGetJobResponseSpecModelConfigsItemInferenceParametersOneTopPThreeDistributionTypeDefault = `manual`; - -export const dataDesignerGetJobResponseSpecModelConfigsItemInferenceParametersTwoGenerationTypeDefault = `embedding`; -export const dataDesignerGetJobResponseSpecModelConfigsItemInferenceParametersTwoMaxParallelRequestsDefault = 4; - -export const dataDesignerGetJobResponseSpecModelConfigsItemInferenceParametersTwoEncodingFormatDefault = `float`; -export const dataDesignerGetJobResponseSpecModelConfigsItemInferenceParametersThreeGenerationTypeDefault = `image`; -export const dataDesignerGetJobResponseSpecModelConfigsItemInferenceParametersThreeMaxParallelRequestsDefault = 4; - -export const dataDesignerGetJobResponseSpecModelConfigsItemSkipHealthCheckDefault = false; - -export const DataDesignerGetJobResponse = zod.object({ - id: zod.string().optional(), - name: zod.string(), - description: zod.string().optional(), - project: zod.string().optional(), - workspace: zod.string().optional(), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - spec: zod.object({ - job_config: zod.object({ - num_records: zod.number(), - config: zod - .object({ - columns: zod - .array( - zod.union([ - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemOneDropDefault - ), - allow_resize: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemOneAllowResizeDefault - ), - column_type: zod - .literal('custom') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemOneColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemOnePropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - generator_function: zod - .unknown() - .describe('Function decorated with @custom_column_generator'), - generation_strategy: zod - .enum(['cell_by_cell', 'full_column']) - .describe('Strategy for custom column generation.') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemOneGenerationStrategyDefault - ) - .describe( - "Generation strategy: 'cell_by_cell' for row-based or 'full_column' for batch-based" - ), - generator_params: zod - .object({}) - .passthrough() - .optional() - .describe( - 'Optional typed configuration object passed as second argument to generator function' - ), - }) - .describe( - 'Configuration for custom user-defined column generators.\n\nCustom columns allow users to provide their own generation logic via a callable function\ndecorated with `@custom_column_generator`. Two strategies are supported: cell_by_cell\n(default, row-based) and full_column (batch-based with DataFrame access).\n\nAttributes:\n generator_function (required): A callable decorated with @custom_column_generator.\n generation_strategy: \"cell_by_cell\" (row-based) or \"full_column\" (batch-based).\n generator_params: Optional typed configuration object (Pydantic BaseModel) passed\n as the second argument to the generator function.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemTwoDropDefault - ), - allow_resize: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemTwoAllowResizeDefault - ), - column_type: zod - .literal('expression') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemTwoColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemTwoPropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - expr: zod - .string() - .describe('Jinja2 expression to compute the column value from other columns'), - dtype: zod - .enum(['int', 'float', 'str', 'bool']) - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemTwoDtypeDefault - ) - .describe( - "Data type for expression result: 'int', 'float', 'str', or 'bool'" - ), - }) - .describe( - 'Configuration for derived columns using Jinja2 expressions.\n\nExpression columns compute values by evaluating Jinja2 templates that reference other\ncolumns. Useful for transformations, concatenations, conditional logic, and derived\nfeatures without requiring LLM generation. The expression is evaluated row-by-row.\n\nAttributes:\n expr (required): Jinja2 expression to evaluate. Can reference other column values using\n {{ column_name }} syntax. Supports filters, conditionals, and arithmetic.\n Must be a valid, non-empty Jinja2 template.\n dtype: Data type to cast the result to. Must be one of \"int\", \"float\", \"str\", or \"bool\".\n Defaults to \"str\". Type conversion is applied after expression evaluation.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemThreeDropDefault - ), - allow_resize: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemThreeAllowResizeDefault - ), - column_type: zod - .literal('llm-code') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemThreeColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemThreePropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - prompt: zod - .string() - .describe( - 'Jinja2 template for the LLM prompt; can reference other columns via {{ column_name }}' - ), - model_alias: zod - .string() - .describe('Alias of the model configuration to use for generation'), - system_prompt: zod - .string() - .optional() - .describe('Optional system prompt to set model behavior and constraints'), - multi_modal_context: zod - .array( - zod - .object({ - modality: zod - .enum(['image']) - .describe('Supported modality types for multimodal model data.') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemThreeMultiModalContextItemModalityDefault - ), - column_name: zod.string(), - data_type: zod - .enum(['url', 'base64']) - .optional() - .describe('Data type formats for multimodal data.'), - image_format: zod - .enum(['png', 'jpg', 'jpeg', 'gif', 'webp']) - .optional() - .describe('Supported image formats for image modality.'), - }) - .describe( - 'Configuration for providing image context to multimodal models.\n\nAttributes:\n modality: The modality type (always \"image\").\n column_name: Name of the column containing image data.\n data_type: Format of the image data (\"url\", \"base64\", or None for auto-detection).\n When None, the format is auto-detected: URLs are passed through, file paths that\n exist under base_path are loaded as base64, and other values are assumed to be base64.\n image_format: Image format (required when data_type is explicitly \"base64\").' - ) - ) - .optional() - .describe('Optional list of ImageContext for vision model inputs'), - tool_alias: zod - .string() - .optional() - .describe( - 'Optional alias of the tool configuration to use for MCP tool calls' - ), - with_trace: zod - .enum(['none', 'last_message', 'all_messages']) - .describe( - 'Specifies the type of reasoning trace to capture for LLM columns.\n\nTraces capture the conversation history during LLM generation, which is\nuseful for debugging, analysis, and understanding model behavior.\n\nAttributes:\n NONE: No trace is captured. This is the default.\n LAST_MESSAGE: Only the final assistant message is captured.\n ALL_MESSAGES: The full conversation history (system\/user\/assistant\/tool)\n is captured.' - ) - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemThreeWithTraceDefault - ) - .describe('Trace capture mode: NONE, LAST_MESSAGE, or ALL_MESSAGES'), - extract_reasoning_content: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemThreeExtractReasoningContentDefault - ) - .describe( - 'If True, capture chain-of-thought in {name}__reasoning_content column' - ), - code_lang: zod - .enum([ - 'bash', - 'c', - 'cobol', - 'cpp', - 'csharp', - 'go', - 'java', - 'javascript', - 'kotlin', - 'python', - 'ruby', - 'rust', - 'scala', - 'swift', - 'typescript', - 'sql:sqlite', - 'sql:tsql', - 'sql:bigquery', - 'sql:mysql', - 'sql:postgres', - 'sql:ansi', - ]) - .describe( - 'Target programming language or SQL dialect for code extraction from LLM response' - ), - }) - .describe( - 'Configuration for code generation columns using Large Language Models.\n\nExtends LLMTextColumnConfig to generate code snippets in specific programming languages\nor SQL dialects. The generated code is automatically extracted from markdown code blocks\nfor the specified language. Inherits all prompt templating capabilities from LLMTextColumnConfig.\n\nAttributes:\n code_lang (required): Programming language or SQL dialect for code generation. Supported\n values include: \"python\", \"javascript\", \"typescript\", \"java\", \"kotlin\", \"go\",\n \"rust\", \"ruby\", \"scala\", \"swift\", \"sql:sqlite\", \"sql:postgres\", \"sql:mysql\",\n \"sql:tsql\", \"sql:bigquery\", \"sql:ansi\". See CodeLang enum for complete list.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n prompt (required): Prompt template for code generation (supports Jinja2).\n model_alias (required): Alias of the model configuration to use.\n system_prompt: Optional system prompt (supports Jinja2).\n multi_modal_context: Optional image contexts for multi-modal generation.\n tool_alias: Optional tool configuration alias for MCP tool calls.\n with_trace: Specifies what trace information to capture in a `{column_name}__trace`\n column. Options are `TraceType.NONE` (default), `TraceType.LAST_MESSAGE`, or\n `TraceType.ALL_MESSAGES`.\n extract_reasoning_content: If True, creates a `{column_name}__reasoning_content`\n column containing the reasoning content from the final assistant response.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemFourDropDefault - ), - allow_resize: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemFourAllowResizeDefault - ), - column_type: zod - .literal('llm-judge') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemFourColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemFourPropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - prompt: zod - .string() - .describe( - 'Jinja2 template for the LLM prompt; can reference other columns via {{ column_name }}' - ), - model_alias: zod - .string() - .describe('Alias of the model configuration to use for generation'), - system_prompt: zod - .string() - .optional() - .describe('Optional system prompt to set model behavior and constraints'), - multi_modal_context: zod - .array( - zod - .object({ - modality: zod - .enum(['image']) - .describe('Supported modality types for multimodal model data.') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemFourMultiModalContextItemModalityDefault - ), - column_name: zod.string(), - data_type: zod - .enum(['url', 'base64']) - .optional() - .describe('Data type formats for multimodal data.'), - image_format: zod - .enum(['png', 'jpg', 'jpeg', 'gif', 'webp']) - .optional() - .describe('Supported image formats for image modality.'), - }) - .describe( - 'Configuration for providing image context to multimodal models.\n\nAttributes:\n modality: The modality type (always \"image\").\n column_name: Name of the column containing image data.\n data_type: Format of the image data (\"url\", \"base64\", or None for auto-detection).\n When None, the format is auto-detected: URLs are passed through, file paths that\n exist under base_path are loaded as base64, and other values are assumed to be base64.\n image_format: Image format (required when data_type is explicitly \"base64\").' - ) - ) - .optional() - .describe('Optional list of ImageContext for vision model inputs'), - tool_alias: zod - .string() - .optional() - .describe( - 'Optional alias of the tool configuration to use for MCP tool calls' - ), - with_trace: zod - .enum(['none', 'last_message', 'all_messages']) - .describe( - 'Specifies the type of reasoning trace to capture for LLM columns.\n\nTraces capture the conversation history during LLM generation, which is\nuseful for debugging, analysis, and understanding model behavior.\n\nAttributes:\n NONE: No trace is captured. This is the default.\n LAST_MESSAGE: Only the final assistant message is captured.\n ALL_MESSAGES: The full conversation history (system\/user\/assistant\/tool)\n is captured.' - ) - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemFourWithTraceDefault - ) - .describe('Trace capture mode: NONE, LAST_MESSAGE, or ALL_MESSAGES'), - extract_reasoning_content: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemFourExtractReasoningContentDefault - ) - .describe( - 'If True, capture chain-of-thought in {name}__reasoning_content column' - ), - scores: zod - .array( - zod - .object({ - name: zod.string().describe('A clear name for this score.'), - description: zod - .string() - .describe( - 'An informative and detailed assessment guide for using this score.' - ), - options: zod - .record(zod.string(), zod.string()) - .describe('Score options in the format of {score: description}.'), - }) - .describe( - 'Configuration for a \"score\" in an LLM judge evaluation.\n\nDefines a single scoring criterion with its possible values and descriptions. Multiple\nScore objects can be combined in an LLMJudgeColumnConfig to create multi-dimensional\nquality assessments.\n\nAttributes:\n name (required): A clear, concise name for this scoring dimension (e.g., \"Relevance\", \"Fluency\").\n description (required): An informative and detailed assessment guide explaining how to evaluate\n this dimension. Should provide clear criteria for scoring.\n options (required): Dictionary mapping score values to their descriptions. Keys can be integers\n (e.g., 1-5 scale) or strings (e.g., \"Poor\", \"Good\", \"Excellent\"). Values are\n descriptions explaining what each score level means.' - ) - ) - .min(1) - .describe( - 'List of Score objects defining rubric criteria for LLM judge evaluation' - ), - }) - .describe( - 'Configuration for LLM-as-a-judge quality assessment and scoring columns.\n\nExtends LLMTextColumnConfig to create judge columns that evaluate and score other\ngenerated content based on the defined criteria. Useful for quality assessment, preference\nranking, and multi-dimensional evaluation of generated data. Inherits prompt templating\ncapabilities from LLMTextColumnConfig.\n\nAttributes:\n scores (required): List of Score objects defining the evaluation dimensions. Each score\n represents a different aspect to evaluate (e.g., accuracy, relevance, fluency).\n Must contain at least one score.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n prompt (required): Prompt template for the judge evaluation (supports Jinja2).\n model_alias (required): Alias of the model configuration to use.\n system_prompt: Optional system prompt (supports Jinja2).\n multi_modal_context: Optional image contexts for multi-modal generation.\n tool_alias: Optional tool configuration alias for MCP tool calls.\n with_trace: Specifies what trace information to capture in a `{column_name}__trace`\n column. Options are `TraceType.NONE` (default), `TraceType.LAST_MESSAGE`, or\n `TraceType.ALL_MESSAGES`.\n extract_reasoning_content: If True, creates a `{column_name}__reasoning_content`\n column containing the reasoning content from the final assistant response.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemFiveDropDefault - ), - allow_resize: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemFiveAllowResizeDefault - ), - column_type: zod - .literal('llm-structured') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemFiveColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemFivePropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - prompt: zod - .string() - .describe( - 'Jinja2 template for the LLM prompt; can reference other columns via {{ column_name }}' - ), - model_alias: zod - .string() - .describe('Alias of the model configuration to use for generation'), - system_prompt: zod - .string() - .optional() - .describe('Optional system prompt to set model behavior and constraints'), - multi_modal_context: zod - .array( - zod - .object({ - modality: zod - .enum(['image']) - .describe('Supported modality types for multimodal model data.') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemFiveMultiModalContextItemModalityDefault - ), - column_name: zod.string(), - data_type: zod - .enum(['url', 'base64']) - .optional() - .describe('Data type formats for multimodal data.'), - image_format: zod - .enum(['png', 'jpg', 'jpeg', 'gif', 'webp']) - .optional() - .describe('Supported image formats for image modality.'), - }) - .describe( - 'Configuration for providing image context to multimodal models.\n\nAttributes:\n modality: The modality type (always \"image\").\n column_name: Name of the column containing image data.\n data_type: Format of the image data (\"url\", \"base64\", or None for auto-detection).\n When None, the format is auto-detected: URLs are passed through, file paths that\n exist under base_path are loaded as base64, and other values are assumed to be base64.\n image_format: Image format (required when data_type is explicitly \"base64\").' - ) - ) - .optional() - .describe('Optional list of ImageContext for vision model inputs'), - tool_alias: zod - .string() - .optional() - .describe( - 'Optional alias of the tool configuration to use for MCP tool calls' - ), - with_trace: zod - .enum(['none', 'last_message', 'all_messages']) - .describe( - 'Specifies the type of reasoning trace to capture for LLM columns.\n\nTraces capture the conversation history during LLM generation, which is\nuseful for debugging, analysis, and understanding model behavior.\n\nAttributes:\n NONE: No trace is captured. This is the default.\n LAST_MESSAGE: Only the final assistant message is captured.\n ALL_MESSAGES: The full conversation history (system\/user\/assistant\/tool)\n is captured.' - ) - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemFiveWithTraceDefault - ) - .describe('Trace capture mode: NONE, LAST_MESSAGE, or ALL_MESSAGES'), - extract_reasoning_content: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemFiveExtractReasoningContentDefault - ) - .describe( - 'If True, capture chain-of-thought in {name}__reasoning_content column' - ), - output_format: zod - .union([zod.record(zod.string(), zod.unknown()), zod.unknown()]) - .describe( - 'Pydantic model or JSON schema dict defining the expected structured output shape' - ), - }) - .describe( - 'Configuration for structured JSON generation columns using Large Language Models.\n\nExtends LLMTextColumnConfig to generate structured data conforming to a specified schema.\nUses JSON schema or Pydantic models to define the expected output structure, enabling\ntype-safe and validated structured output generation. Inherits prompt templating capabilities\nfrom LLMTextColumnConfig.\n\nAttributes:\n output_format (required): The schema defining the expected output structure. Can be either:\n - A Pydantic BaseModel class (recommended)\n - A JSON schema dictionary\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n prompt (required): Prompt template for structured generation (supports Jinja2).\n model_alias (required): Alias of the model configuration to use.\n system_prompt: Optional system prompt (supports Jinja2).\n multi_modal_context: Optional image contexts for multi-modal generation.\n tool_alias: Optional tool configuration alias for MCP tool calls.\n with_trace: Specifies what trace information to capture in a `{column_name}__trace`\n column. Options are `TraceType.NONE` (default), `TraceType.LAST_MESSAGE`, or\n `TraceType.ALL_MESSAGES`.\n extract_reasoning_content: If True, creates a `{column_name}__reasoning_content`\n column containing the reasoning content from the final assistant response.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSixDropDefault - ), - allow_resize: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSixAllowResizeDefault - ), - column_type: zod - .literal('llm-text') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSixColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSixPropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - prompt: zod - .string() - .describe( - 'Jinja2 template for the LLM prompt; can reference other columns via {{ column_name }}' - ), - model_alias: zod - .string() - .describe('Alias of the model configuration to use for generation'), - system_prompt: zod - .string() - .optional() - .describe('Optional system prompt to set model behavior and constraints'), - multi_modal_context: zod - .array( - zod - .object({ - modality: zod - .enum(['image']) - .describe('Supported modality types for multimodal model data.') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSixMultiModalContextItemModalityDefault - ), - column_name: zod.string(), - data_type: zod - .enum(['url', 'base64']) - .optional() - .describe('Data type formats for multimodal data.'), - image_format: zod - .enum(['png', 'jpg', 'jpeg', 'gif', 'webp']) - .optional() - .describe('Supported image formats for image modality.'), - }) - .describe( - 'Configuration for providing image context to multimodal models.\n\nAttributes:\n modality: The modality type (always \"image\").\n column_name: Name of the column containing image data.\n data_type: Format of the image data (\"url\", \"base64\", or None for auto-detection).\n When None, the format is auto-detected: URLs are passed through, file paths that\n exist under base_path are loaded as base64, and other values are assumed to be base64.\n image_format: Image format (required when data_type is explicitly \"base64\").' - ) - ) - .optional() - .describe('Optional list of ImageContext for vision model inputs'), - tool_alias: zod - .string() - .optional() - .describe( - 'Optional alias of the tool configuration to use for MCP tool calls' - ), - with_trace: zod - .enum(['none', 'last_message', 'all_messages']) - .describe( - 'Specifies the type of reasoning trace to capture for LLM columns.\n\nTraces capture the conversation history during LLM generation, which is\nuseful for debugging, analysis, and understanding model behavior.\n\nAttributes:\n NONE: No trace is captured. This is the default.\n LAST_MESSAGE: Only the final assistant message is captured.\n ALL_MESSAGES: The full conversation history (system\/user\/assistant\/tool)\n is captured.' - ) - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSixWithTraceDefault - ) - .describe('Trace capture mode: NONE, LAST_MESSAGE, or ALL_MESSAGES'), - extract_reasoning_content: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSixExtractReasoningContentDefault - ) - .describe( - 'If True, capture chain-of-thought in {name}__reasoning_content column' - ), - }) - .describe( - 'Configuration for text generation columns using Large Language Models.\n\nLLM text columns generate free-form text content using language models.\nPrompts support Jinja2 templating to reference values from other columns, enabling\ncontext-aware generation. The generated text can optionally include message traces\ncapturing the full conversation history.\n\nAttributes:\n prompt (required): Prompt template for text generation. Supports Jinja2 syntax to\n reference other columns (e.g., \"Write a story about {{ character_name }}\").\n Must be a valid Jinja2 template.\n model_alias (required): Alias of the model configuration to use for generation.\n Must match a model alias defined when initializing the DataDesignerConfigBuilder.\n system_prompt: Optional system prompt to set model behavior and constraints.\n Also supports Jinja2 templating. If provided, must be a valid Jinja2 template.\n Do not put any output parsing instructions in the system prompt. Instead,\n use the appropriate column type for the output you want to generate - e.g.,\n `LLMStructuredColumnConfig` for structured output, `LLMCodeColumnConfig` for code.\n multi_modal_context: Optional list of image contexts for multi-modal generation.\n Enables vision-capable models to generate text based on image inputs.\n tool_alias: Optional alias of the tool configuration to use for MCP tool calls.\n Must match a tool alias defined when initializing the DataDesignerConfigBuilder.\n When provided, the model may call permitted tools during generation.\n with_trace: Specifies what trace information to capture in a `{column_name}__trace`\n column. Options are:\n - `TraceType.NONE` (default): No trace is captured.\n - `TraceType.LAST_MESSAGE`: Only the final assistant message is captured.\n - `TraceType.ALL_MESSAGES`: Full conversation history (system\/user\/assistant\/tool).\n extract_reasoning_content: If True, creates a `{column_name}__reasoning_content` column\n containing only the reasoning_content from the final assistant response. This is\n useful for models that expose chain-of-thought reasoning separately from the main\n response. Defaults to False.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenDropDefault - ), - allow_resize: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenAllowResizeDefault - ), - column_type: zod - .literal('sampler') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenPropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - sampler_type: zod - .enum([ - 'bernoulli', - 'bernoulli_mixture', - 'binomial', - 'category', - 'datetime', - 'gaussian', - 'person', - 'person_from_faker', - 'poisson', - 'scipy', - 'subcategory', - 'timedelta', - 'uniform', - 'uuid', - ]) - .describe( - 'Type of sampler to use (e.g., uuid, category, uniform, gaussian, person, datetime)' - ), - params: zod - .union([ - zod - .object({ - category: zod - .string() - .describe('Name of parent category to this subcategory.'), - values: zod - .record( - zod.string(), - zod.array(zod.union([zod.string(), zod.number(), zod.number()])) - ) - .describe( - 'Mapping from each value of parent category to a list of subcategory values.' - ), - sampler_type: zod - .literal('subcategory') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsOneSamplerTypeDefault - ), - }) - .describe( - 'Parameters for subcategory sampling conditioned on a parent category column.\n\nSamples subcategory values based on the value of a parent category column. Each parent\ncategory value maps to its own list of possible subcategory values, enabling hierarchical\nor conditional sampling patterns.\n\nAttributes:\n category (required): Name of the parent category column that this subcategory depends on.\n The parent column must be generated before this subcategory column.\n values (required): Mapping from each parent category value to a list of possible subcategory values.\n Each key must correspond to a value that appears in the parent category column.' - ), - zod - .object({ - values: zod - .array(zod.union([zod.string(), zod.number(), zod.number()])) - .min(1) - .describe( - 'List of possible categorical values that can be sampled from.' - ), - weights: zod - .array(zod.number()) - .optional() - .describe( - 'List of unnormalized probability weights to assigned to each value, in order. Larger values will be sampled with higher probability.' - ), - sampler_type: zod - .literal('category') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsTwoSamplerTypeDefault - ), - }) - .describe( - 'Parameters for categorical sampling with optional probability weighting.\n\nSamples values from a discrete set of categories. When weights are provided, values are\nsampled according to their assigned probabilities. Without weights, uniform sampling is used.\n\nAttributes:\n values (required): List of possible categorical values to sample from. Can contain strings, integers,\n or floats. Must contain at least one value.\n weights: Optional unnormalized probability weights for each value. If provided, must be\n the same length as `values`. Weights are automatically normalized to sum to 1.0.\n Larger weights result in higher sampling probability for the corresponding value.' - ), - zod - .object({ - start: zod - .string() - .describe( - 'Earliest possible datetime for sampling range, inclusive.' - ), - end: zod - .string() - .describe('Exclusive upper bound for datetime sampling range.'), - unit: zod - .enum(['Y', 'M', 'D', 'h', 'm', 's']) - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsThreeUnitDefault - ) - .describe( - 'Sampling units, e.g. the smallest possible time interval between samples.' - ), - sampler_type: zod - .literal('datetime') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsThreeSamplerTypeDefault - ), - }) - .describe( - 'Parameters for uniform datetime sampling within a specified range.\n\nSamples datetime values uniformly between a start and end date with a specified granularity.\nThe sampling unit determines the smallest possible time interval between consecutive samples.\n\nAttributes:\n start (required): Earliest possible datetime for the sampling range (inclusive). Must be a valid\n datetime string parseable by pandas.to_datetime().\n end (required): Exclusive upper bound for the sampling range. Must be a valid\n datetime string parseable by pandas.to_datetime().\n unit: Time unit for sampling granularity. Options:\n - \"Y\": Years\n - \"M\": Months\n - \"D\": Days (default)\n - \"h\": Hours\n - \"m\": Minutes\n - \"s\": Seconds' - ), - zod - .object({ - locale: zod - .string() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsFourLocaleDefault - ) - .describe( - 'Locale that determines the language and geographic location that a synthetic person will be sampled from. Must be a locale supported by a managed Nemotron Personas dataset. Managed datasets exist for the following locales: en_US, en_IN, en_SG, fr_FR, hi_Deva_IN, hi_Latn_IN, ja_JP, ko_KR, pt_BR.' - ), - sex: zod - .enum(['Male', 'Female']) - .optional() - .describe( - 'If specified, then only synthetic people of the specified sex will be sampled.' - ), - city: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe( - 'If specified, then only synthetic people from these cities will be sampled.' - ), - age_range: zod - .array(zod.number()) - .min( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsFourAgeRangeMin - ) - .max( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsFourAgeRangeMax - ) - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsFourAgeRangeDefault - ) - .describe( - 'If specified, then only synthetic people within this age range will be sampled.' - ), - select_field_values: zod - .record(zod.string(), zod.array(zod.string())) - .optional() - .describe( - 'Sample synthetic people with the specified field values. This is meant to be a flexible argument for selecting a subset of the population from the managed dataset. Note that this sampler does not support rare combinations of field values and will likely fail if your desired subset is not well-represented in the managed Nemotron Personas dataset. We generally recommend using the `sex`, `city`, and `age_range` arguments to filter the population when possible.' - ), - with_synthetic_personas: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsFourWithSyntheticPersonasDefault - ) - .describe( - 'If True, then append synthetic persona columns to each generated person.' - ), - sampler_type: zod - .literal('person') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsFourSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling synthetic person data with demographic attributes.\n\nGenerates realistic synthetic person data including names, addresses, phone numbers, and other\ndemographic information from managed datasets. The sampler supports filtering by locale, sex, age,\ngeographic location, and selected managed-dataset fields, and can optionally include synthetic\npersona descriptions. For Faker-generated person data, use PersonFromFakerSamplerParams.\n\nAttributes:\n locale: Locale string determining the language and geographic region for synthetic people.\n Must be a locale supported by a managed Nemotron Personas dataset. The dataset must\n be downloaded and available in the managed assets directory.\n sex: If specified, filters to only sample people of the specified sex. Options: \"Male\" or\n \"Female\". If None, samples both sexes.\n city: If specified, filters to only sample people from the specified city or cities. Can be\n a single city name (string) or a list of city names.\n age_range: Two-element list [min_age, max_age] specifying the age range to sample from\n (inclusive). Defaults to a standard age range. Both values must be between minimum and\n maximum allowed ages.\n with_synthetic_personas: If True, appends additional synthetic persona columns including\n personality traits, interests, and background descriptions. Only supported for certain\n locales with managed datasets.\n select_field_values: Optional field-value filters for managed datasets. Supported field\n names are checked against the managed person data fields.' - ), - zod - .object({ - locale: zod - .string() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsFiveLocaleDefault - ) - .describe( - 'Locale string, determines the language and geographic locale that a synthetic person will be sampled from. E.g, en_US, en_GB, fr_FR, ...' - ), - sex: zod - .enum(['Male', 'Female']) - .optional() - .describe( - 'If specified, then only synthetic people of the specified sex will be sampled.' - ), - city: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe( - 'If specified, then only synthetic people from these cities will be sampled.' - ), - age_range: zod - .array(zod.number()) - .min( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsFiveAgeRangeMin - ) - .max( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsFiveAgeRangeMax - ) - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsFiveAgeRangeDefault - ) - .describe( - 'If specified, then only synthetic people within this age range will be sampled.' - ), - sampler_type: zod - .literal('person_from_faker') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsFiveSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling synthetic person data with demographic attributes from Faker.\n\nUses the Faker library to generate random personal information. The data is basic and not demographically\naccurate, but is useful for quick testing, prototyping, or when realistic demographic distributions are not\nrelevant for your use case. For demographically accurate person data, use the `PersonSamplerParams` sampler.\n\nAttributes:\n locale: Locale string determining the language and geographic region for synthetic people.\n Can be any locale supported by Faker.\n sex: If specified, filters to only sample people of the specified sex. Options: \"Male\" or\n \"Female\". If None, samples both sexes.\n city: If specified, filters to only sample people from the specified city or cities. Can be\n a single city name (string) or a list of city names.\n age_range: Two-element list [min_age, max_age] specifying the age range to sample from\n (inclusive). Defaults to a standard age range. Both values must be between the minimum and\n maximum allowed ages.\n sampler_type: Discriminator for the sampler type. Must be `SamplerType.PERSON_FROM_FAKER`.' - ), - zod - .object({ - dt_min: zod - .number() - .min( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsSixDtMinMin - ) - .describe( - 'Minimum possible time-delta for sampling range, inclusive. Must be less than `dt_max`.' - ), - dt_max: zod - .number() - .gt( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsSixDtMaxExclusiveMin - ) - .describe( - 'Maximum possible time-delta for sampling range, exclusive. Must be greater than `dt_min`.' - ), - reference_column_name: zod - .string() - .describe( - 'Name of an existing datetime column to condition time-delta sampling on.' - ), - unit: zod - .enum(['D', 'h', 'm', 's']) - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsSixUnitDefault - ) - .describe( - 'Sampling units, e.g. the smallest possible time interval between samples.' - ), - sampler_type: zod - .literal('timedelta') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsSixSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling time deltas relative to a reference datetime column.\n\nSamples time offsets within a specified range and adds them to values from a reference\ndatetime column. This is useful for generating related datetime columns like order dates\nand delivery dates, or event start times and end times.\n\nNote:\n Years and months are not supported as timedelta units because they have variable lengths.\n See: [pandas timedelta documentation](https:\/\/pandas.pydata.org\/docs\/user_guide\/timedeltas.html)\n\nAttributes:\n dt_min (required): Minimum time-delta value (inclusive). Must be non-negative and less than `dt_max`.\n Specified in units defined by the `unit` parameter.\n dt_max (required): Maximum time-delta value (exclusive). Must be positive and greater than `dt_min`.\n Specified in units defined by the `unit` parameter.\n reference_column_name (required): Name of an existing datetime column to add the time-delta to.\n This column must be generated before the timedelta column.\n unit: Time unit for the delta values. Options:\n - \"D\": Days (default)\n - \"h\": Hours\n - \"m\": Minutes\n - \"s\": Seconds' - ), - zod - .object({ - prefix: zod - .string() - .optional() - .describe('String prepended to the front of the UUID.'), - short_form: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsSevenShortFormDefault - ) - .describe( - 'If true, all UUIDs sampled will be truncated at 8 characters.' - ), - uppercase: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsSevenUppercaseDefault - ) - .describe('If true, all letters in the UUID will be capitalized.'), - sampler_type: zod - .literal('uuid') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsSevenSamplerTypeDefault - ), - }) - .describe( - 'Parameters for generating UUID (Universally Unique Identifier) values.\n\nGenerates UUID4 (random) identifiers with optional formatting options. UUIDs are useful\nfor creating unique identifiers for records, entities, or transactions.\n\nAttributes:\n prefix: Optional string to prepend to each UUID. Useful for creating namespaced or\n typed identifiers (e.g., \"user-\", \"order-\", \"txn-\").\n short_form: If True, truncates UUIDs to 8 characters (first segment only). Default is False\n for full 32-character UUIDs (excluding hyphens).\n uppercase: If True, converts all hexadecimal letters to uppercase. Default is False for\n lowercase UUIDs.' - ), - zod - .object({ - p: zod - .number() - .min( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsEightPMin - ) - .max( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsEightPMax - ) - .describe('Probability of success.'), - sampler_type: zod - .literal('bernoulli') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsEightSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Bernoulli distribution.\n\nSamples binary values (0 or 1) representing the outcome of a single trial with a fixed\nprobability of success. This is the simplest discrete probability distribution, useful for\nmodeling binary outcomes like success\/failure, yes\/no, or true\/false.\n\nAttributes:\n p (required): Probability of success (sampling 1). Must be between 0.0 and 1.0 (inclusive).\n The probability of failure (sampling 0) is automatically 1 - p.' - ), - zod - .object({ - p: zod - .number() - .min( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsNinePMin - ) - .max( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsNinePMax - ) - .describe('Bernoulli distribution probability of success.'), - dist_name: zod - .string() - .describe( - 'Mixture distribution name. Samples will be equal to the distribution sample with probability `p`, otherwise equal to 0. Must be a valid scipy.stats distribution name.' - ), - dist_params: zod - .record(zod.string(), zod.unknown()) - .describe( - 'Parameters of the scipy.stats distribution given in `dist_name`.' - ), - sampler_type: zod - .literal('bernoulli_mixture') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsNineSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Bernoulli mixture distribution.\n\nCombines a Bernoulli distribution with another continuous distribution, creating a mixture\nwhere values are either 0 (with probability 1-p) or sampled from the specified distribution\n(with probability p). This is useful for modeling scenarios with many zero values mixed with\na continuous distribution of non-zero values.\n\nCommon use cases include modeling sparse events, zero-inflated data, or situations where\nan outcome either doesn\'t occur (0) or follows a specific distribution when it does occur.\n\nAttributes:\n p (required): Probability of sampling from the mixture distribution (non-zero outcome).\n Must be between 0.0 and 1.0 (inclusive). With probability 1-p, the sample is 0.\n dist_name (required): Name of the scipy.stats distribution to sample from when outcome is non-zero.\n Must be a valid scipy.stats distribution name (e.g., \"norm\", \"gamma\", \"expon\").\n dist_params (required): Parameters for the specified scipy.stats distribution.' - ), - zod - .object({ - n: zod.number().describe('Number of trials.'), - p: zod - .number() - .min( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsOnezeroPMin - ) - .max( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsOnezeroPMax - ) - .describe('Probability of success on each trial.'), - sampler_type: zod - .literal('binomial') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsOnezeroSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Binomial distribution.\n\nSamples integer values representing the number of successes in a fixed number of independent\nBernoulli trials, each with the same probability of success. Commonly used to model the number\nof successful outcomes in repeated experiments.\n\nAttributes:\n n (required): Number of independent trials. Must be a positive integer.\n p (required): Probability of success on each trial. Must be between 0.0 and 1.0 (inclusive).' - ), - zod - .object({ - mean: zod.number().describe('Mean of the Gaussian distribution'), - stddev: zod - .number() - .describe('Standard deviation of the Gaussian distribution'), - decimal_places: zod - .number() - .optional() - .describe('Number of decimal places to round the sampled values to.'), - sampler_type: zod - .literal('gaussian') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsOneoneSamplerTypeDefault - ), - }) - .describe( - "Parameters for sampling from a Gaussian (Normal) distribution.\n\nSamples continuous values from a normal distribution characterized by its mean and standard\ndeviation. The Gaussian distribution is one of the most commonly used probability distributions,\nappearing naturally in many real-world phenomena due to the Central Limit Theorem.\n\nAttributes:\n mean (required): Mean (center) of the Gaussian distribution. This is the expected value and the\n location of the distribution's peak.\n stddev (required): Standard deviation of the Gaussian distribution. Controls the spread or width\n of the distribution. Must be positive.\n decimal_places: Optional number of decimal places to round sampled values to. If None,\n values are not rounded." - ), - zod - .object({ - mean: zod - .number() - .describe('Mean number of events in a fixed interval.'), - sampler_type: zod - .literal('poisson') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsOnetwoSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Poisson distribution.\n\nSamples non-negative integer values representing the number of events occurring in a fixed\ninterval of time or space. The Poisson distribution is commonly used to model count data\nlike the number of arrivals, occurrences, or events per time period.\n\nThe distribution is characterized by a single parameter (mean\/rate), and both the mean and\nvariance equal this parameter value.\n\nAttributes:\n mean (required): Mean number of events in the fixed interval (also called rate parameter Ī»).\n Must be positive. This represents both the expected value and the variance of the\n distribution.' - ), - zod - .object({ - low: zod - .number() - .describe('Lower bound of the uniform distribution, inclusive.'), - high: zod.number().describe('Upper bound of the uniform distribution.'), - decimal_places: zod - .number() - .optional() - .describe('Number of decimal places to round the sampled values to.'), - sampler_type: zod - .literal('uniform') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsOnethreeSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a continuous Uniform distribution.\n\nSamples continuous values uniformly from a specified range, where every value in the range\nhas equal probability of being sampled. This is useful when all values within a range are\nequally likely, such as random percentages, proportions, or unbiased measurements.\n\nAttributes:\n low (required): Lower bound of the uniform distribution (inclusive). Can be any real number.\n high (required): Upper bound of the uniform distribution. Must be greater than `low`.\n decimal_places: Optional number of decimal places to round sampled values to. If None,\n values are not rounded and may have many decimal places.' - ), - zod - .object({ - dist_name: zod.string().describe('Name of a scipy.stats distribution.'), - dist_params: zod - .record(zod.string(), zod.unknown()) - .describe( - 'Parameters of the scipy.stats distribution given in `dist_name`.' - ), - decimal_places: zod - .number() - .optional() - .describe('Number of decimal places to round the sampled values to.'), - sampler_type: zod - .literal('scipy') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenParamsOnefourSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from any scipy.stats continuous or discrete distribution.\n\nProvides a flexible interface to sample from the wide range of probability distributions\navailable in scipy.stats. This enables advanced statistical sampling beyond the built-in\ndistribution types (Gaussian, Uniform, etc.).\n\nSee: [scipy.stats documentation](https:\/\/docs.scipy.org\/doc\/scipy\/reference\/stats.html)\n\nAttributes:\n dist_name (required): Name of the scipy.stats distribution to sample from (e.g., \"beta\", \"gamma\",\n \"lognorm\", \"expon\"). Must be a valid distribution name from scipy.stats.\n dist_params (required): Dictionary of parameters for the specified distribution. Parameter names\n and values must match the scipy.stats distribution specification (e.g., {\"a\": 2, \"b\": 5}\n for beta distribution, {\"scale\": 1.5} for exponential).\n decimal_places: Optional number of decimal places to round sampled values to. If None,\n values are not rounded.' - ), - ]) - .describe('Parameters specific to the chosen sampler type'), - conditional_params: zod - .record( - zod.string(), - zod.union([ - zod - .object({ - category: zod - .string() - .describe('Name of parent category to this subcategory.'), - values: zod - .record( - zod.string(), - zod.array(zod.union([zod.string(), zod.number(), zod.number()])) - ) - .describe( - 'Mapping from each value of parent category to a list of subcategory values.' - ), - sampler_type: zod - .literal('subcategory') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsOneSamplerTypeDefault - ), - }) - .describe( - 'Parameters for subcategory sampling conditioned on a parent category column.\n\nSamples subcategory values based on the value of a parent category column. Each parent\ncategory value maps to its own list of possible subcategory values, enabling hierarchical\nor conditional sampling patterns.\n\nAttributes:\n category (required): Name of the parent category column that this subcategory depends on.\n The parent column must be generated before this subcategory column.\n values (required): Mapping from each parent category value to a list of possible subcategory values.\n Each key must correspond to a value that appears in the parent category column.' - ), - zod - .object({ - values: zod - .array(zod.union([zod.string(), zod.number(), zod.number()])) - .min(1) - .describe( - 'List of possible categorical values that can be sampled from.' - ), - weights: zod - .array(zod.number()) - .optional() - .describe( - 'List of unnormalized probability weights to assigned to each value, in order. Larger values will be sampled with higher probability.' - ), - sampler_type: zod - .literal('category') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsTwoSamplerTypeDefault - ), - }) - .describe( - 'Parameters for categorical sampling with optional probability weighting.\n\nSamples values from a discrete set of categories. When weights are provided, values are\nsampled according to their assigned probabilities. Without weights, uniform sampling is used.\n\nAttributes:\n values (required): List of possible categorical values to sample from. Can contain strings, integers,\n or floats. Must contain at least one value.\n weights: Optional unnormalized probability weights for each value. If provided, must be\n the same length as `values`. Weights are automatically normalized to sum to 1.0.\n Larger weights result in higher sampling probability for the corresponding value.' - ), - zod - .object({ - start: zod - .string() - .describe( - 'Earliest possible datetime for sampling range, inclusive.' - ), - end: zod - .string() - .describe('Exclusive upper bound for datetime sampling range.'), - unit: zod - .enum(['Y', 'M', 'D', 'h', 'm', 's']) - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsThreeUnitDefault - ) - .describe( - 'Sampling units, e.g. the smallest possible time interval between samples.' - ), - sampler_type: zod - .literal('datetime') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsThreeSamplerTypeDefault - ), - }) - .describe( - 'Parameters for uniform datetime sampling within a specified range.\n\nSamples datetime values uniformly between a start and end date with a specified granularity.\nThe sampling unit determines the smallest possible time interval between consecutive samples.\n\nAttributes:\n start (required): Earliest possible datetime for the sampling range (inclusive). Must be a valid\n datetime string parseable by pandas.to_datetime().\n end (required): Exclusive upper bound for the sampling range. Must be a valid\n datetime string parseable by pandas.to_datetime().\n unit: Time unit for sampling granularity. Options:\n - \"Y\": Years\n - \"M\": Months\n - \"D\": Days (default)\n - \"h\": Hours\n - \"m\": Minutes\n - \"s\": Seconds' - ), - zod - .object({ - locale: zod - .string() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFourLocaleDefault - ) - .describe( - 'Locale that determines the language and geographic location that a synthetic person will be sampled from. Must be a locale supported by a managed Nemotron Personas dataset. Managed datasets exist for the following locales: en_US, en_IN, en_SG, fr_FR, hi_Deva_IN, hi_Latn_IN, ja_JP, ko_KR, pt_BR.' - ), - sex: zod - .enum(['Male', 'Female']) - .optional() - .describe( - 'If specified, then only synthetic people of the specified sex will be sampled.' - ), - city: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe( - 'If specified, then only synthetic people from these cities will be sampled.' - ), - age_range: zod - .array(zod.number()) - .min( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFourAgeRangeMin - ) - .max( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFourAgeRangeMax - ) - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFourAgeRangeDefault - ) - .describe( - 'If specified, then only synthetic people within this age range will be sampled.' - ), - select_field_values: zod - .record(zod.string(), zod.array(zod.string())) - .optional() - .describe( - 'Sample synthetic people with the specified field values. This is meant to be a flexible argument for selecting a subset of the population from the managed dataset. Note that this sampler does not support rare combinations of field values and will likely fail if your desired subset is not well-represented in the managed Nemotron Personas dataset. We generally recommend using the `sex`, `city`, and `age_range` arguments to filter the population when possible.' - ), - with_synthetic_personas: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFourWithSyntheticPersonasDefault - ) - .describe( - 'If True, then append synthetic persona columns to each generated person.' - ), - sampler_type: zod - .literal('person') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFourSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling synthetic person data with demographic attributes.\n\nGenerates realistic synthetic person data including names, addresses, phone numbers, and other\ndemographic information from managed datasets. The sampler supports filtering by locale, sex, age,\ngeographic location, and selected managed-dataset fields, and can optionally include synthetic\npersona descriptions. For Faker-generated person data, use PersonFromFakerSamplerParams.\n\nAttributes:\n locale: Locale string determining the language and geographic region for synthetic people.\n Must be a locale supported by a managed Nemotron Personas dataset. The dataset must\n be downloaded and available in the managed assets directory.\n sex: If specified, filters to only sample people of the specified sex. Options: \"Male\" or\n \"Female\". If None, samples both sexes.\n city: If specified, filters to only sample people from the specified city or cities. Can be\n a single city name (string) or a list of city names.\n age_range: Two-element list [min_age, max_age] specifying the age range to sample from\n (inclusive). Defaults to a standard age range. Both values must be between minimum and\n maximum allowed ages.\n with_synthetic_personas: If True, appends additional synthetic persona columns including\n personality traits, interests, and background descriptions. Only supported for certain\n locales with managed datasets.\n select_field_values: Optional field-value filters for managed datasets. Supported field\n names are checked against the managed person data fields.' - ), - zod - .object({ - locale: zod - .string() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFiveLocaleDefault - ) - .describe( - 'Locale string, determines the language and geographic locale that a synthetic person will be sampled from. E.g, en_US, en_GB, fr_FR, ...' - ), - sex: zod - .enum(['Male', 'Female']) - .optional() - .describe( - 'If specified, then only synthetic people of the specified sex will be sampled.' - ), - city: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe( - 'If specified, then only synthetic people from these cities will be sampled.' - ), - age_range: zod - .array(zod.number()) - .min( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFiveAgeRangeMin - ) - .max( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFiveAgeRangeMax - ) - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFiveAgeRangeDefault - ) - .describe( - 'If specified, then only synthetic people within this age range will be sampled.' - ), - sampler_type: zod - .literal('person_from_faker') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFiveSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling synthetic person data with demographic attributes from Faker.\n\nUses the Faker library to generate random personal information. The data is basic and not demographically\naccurate, but is useful for quick testing, prototyping, or when realistic demographic distributions are not\nrelevant for your use case. For demographically accurate person data, use the `PersonSamplerParams` sampler.\n\nAttributes:\n locale: Locale string determining the language and geographic region for synthetic people.\n Can be any locale supported by Faker.\n sex: If specified, filters to only sample people of the specified sex. Options: \"Male\" or\n \"Female\". If None, samples both sexes.\n city: If specified, filters to only sample people from the specified city or cities. Can be\n a single city name (string) or a list of city names.\n age_range: Two-element list [min_age, max_age] specifying the age range to sample from\n (inclusive). Defaults to a standard age range. Both values must be between the minimum and\n maximum allowed ages.\n sampler_type: Discriminator for the sampler type. Must be `SamplerType.PERSON_FROM_FAKER`.' - ), - zod - .object({ - dt_min: zod - .number() - .min( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsSixDtMinMin - ) - .describe( - 'Minimum possible time-delta for sampling range, inclusive. Must be less than `dt_max`.' - ), - dt_max: zod - .number() - .gt( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsSixDtMaxExclusiveMin - ) - .describe( - 'Maximum possible time-delta for sampling range, exclusive. Must be greater than `dt_min`.' - ), - reference_column_name: zod - .string() - .describe( - 'Name of an existing datetime column to condition time-delta sampling on.' - ), - unit: zod - .enum(['D', 'h', 'm', 's']) - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsSixUnitDefault - ) - .describe( - 'Sampling units, e.g. the smallest possible time interval between samples.' - ), - sampler_type: zod - .literal('timedelta') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsSixSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling time deltas relative to a reference datetime column.\n\nSamples time offsets within a specified range and adds them to values from a reference\ndatetime column. This is useful for generating related datetime columns like order dates\nand delivery dates, or event start times and end times.\n\nNote:\n Years and months are not supported as timedelta units because they have variable lengths.\n See: [pandas timedelta documentation](https:\/\/pandas.pydata.org\/docs\/user_guide\/timedeltas.html)\n\nAttributes:\n dt_min (required): Minimum time-delta value (inclusive). Must be non-negative and less than `dt_max`.\n Specified in units defined by the `unit` parameter.\n dt_max (required): Maximum time-delta value (exclusive). Must be positive and greater than `dt_min`.\n Specified in units defined by the `unit` parameter.\n reference_column_name (required): Name of an existing datetime column to add the time-delta to.\n This column must be generated before the timedelta column.\n unit: Time unit for the delta values. Options:\n - \"D\": Days (default)\n - \"h\": Hours\n - \"m\": Minutes\n - \"s\": Seconds' - ), - zod - .object({ - prefix: zod - .string() - .optional() - .describe('String prepended to the front of the UUID.'), - short_form: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsSevenShortFormDefault - ) - .describe( - 'If true, all UUIDs sampled will be truncated at 8 characters.' - ), - uppercase: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsSevenUppercaseDefault - ) - .describe('If true, all letters in the UUID will be capitalized.'), - sampler_type: zod - .literal('uuid') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsSevenSamplerTypeDefault - ), - }) - .describe( - 'Parameters for generating UUID (Universally Unique Identifier) values.\n\nGenerates UUID4 (random) identifiers with optional formatting options. UUIDs are useful\nfor creating unique identifiers for records, entities, or transactions.\n\nAttributes:\n prefix: Optional string to prepend to each UUID. Useful for creating namespaced or\n typed identifiers (e.g., \"user-\", \"order-\", \"txn-\").\n short_form: If True, truncates UUIDs to 8 characters (first segment only). Default is False\n for full 32-character UUIDs (excluding hyphens).\n uppercase: If True, converts all hexadecimal letters to uppercase. Default is False for\n lowercase UUIDs.' - ), - zod - .object({ - p: zod - .number() - .min( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsEightPMin - ) - .max( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsEightPMax - ) - .describe('Probability of success.'), - sampler_type: zod - .literal('bernoulli') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsEightSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Bernoulli distribution.\n\nSamples binary values (0 or 1) representing the outcome of a single trial with a fixed\nprobability of success. This is the simplest discrete probability distribution, useful for\nmodeling binary outcomes like success\/failure, yes\/no, or true\/false.\n\nAttributes:\n p (required): Probability of success (sampling 1). Must be between 0.0 and 1.0 (inclusive).\n The probability of failure (sampling 0) is automatically 1 - p.' - ), - zod - .object({ - p: zod - .number() - .min( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsNinePMin - ) - .max( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsNinePMax - ) - .describe('Bernoulli distribution probability of success.'), - dist_name: zod - .string() - .describe( - 'Mixture distribution name. Samples will be equal to the distribution sample with probability `p`, otherwise equal to 0. Must be a valid scipy.stats distribution name.' - ), - dist_params: zod - .record(zod.string(), zod.unknown()) - .describe( - 'Parameters of the scipy.stats distribution given in `dist_name`.' - ), - sampler_type: zod - .literal('bernoulli_mixture') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsNineSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Bernoulli mixture distribution.\n\nCombines a Bernoulli distribution with another continuous distribution, creating a mixture\nwhere values are either 0 (with probability 1-p) or sampled from the specified distribution\n(with probability p). This is useful for modeling scenarios with many zero values mixed with\na continuous distribution of non-zero values.\n\nCommon use cases include modeling sparse events, zero-inflated data, or situations where\nan outcome either doesn\'t occur (0) or follows a specific distribution when it does occur.\n\nAttributes:\n p (required): Probability of sampling from the mixture distribution (non-zero outcome).\n Must be between 0.0 and 1.0 (inclusive). With probability 1-p, the sample is 0.\n dist_name (required): Name of the scipy.stats distribution to sample from when outcome is non-zero.\n Must be a valid scipy.stats distribution name (e.g., \"norm\", \"gamma\", \"expon\").\n dist_params (required): Parameters for the specified scipy.stats distribution.' - ), - zod - .object({ - n: zod.number().describe('Number of trials.'), - p: zod - .number() - .min( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsOnezeroPMin - ) - .max( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsOnezeroPMax - ) - .describe('Probability of success on each trial.'), - sampler_type: zod - .literal('binomial') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsOnezeroSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Binomial distribution.\n\nSamples integer values representing the number of successes in a fixed number of independent\nBernoulli trials, each with the same probability of success. Commonly used to model the number\nof successful outcomes in repeated experiments.\n\nAttributes:\n n (required): Number of independent trials. Must be a positive integer.\n p (required): Probability of success on each trial. Must be between 0.0 and 1.0 (inclusive).' - ), - zod - .object({ - mean: zod.number().describe('Mean of the Gaussian distribution'), - stddev: zod - .number() - .describe('Standard deviation of the Gaussian distribution'), - decimal_places: zod - .number() - .optional() - .describe( - 'Number of decimal places to round the sampled values to.' - ), - sampler_type: zod - .literal('gaussian') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsOneoneSamplerTypeDefault - ), - }) - .describe( - "Parameters for sampling from a Gaussian (Normal) distribution.\n\nSamples continuous values from a normal distribution characterized by its mean and standard\ndeviation. The Gaussian distribution is one of the most commonly used probability distributions,\nappearing naturally in many real-world phenomena due to the Central Limit Theorem.\n\nAttributes:\n mean (required): Mean (center) of the Gaussian distribution. This is the expected value and the\n location of the distribution's peak.\n stddev (required): Standard deviation of the Gaussian distribution. Controls the spread or width\n of the distribution. Must be positive.\n decimal_places: Optional number of decimal places to round sampled values to. If None,\n values are not rounded." - ), - zod - .object({ - mean: zod - .number() - .describe('Mean number of events in a fixed interval.'), - sampler_type: zod - .literal('poisson') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsOnetwoSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Poisson distribution.\n\nSamples non-negative integer values representing the number of events occurring in a fixed\ninterval of time or space. The Poisson distribution is commonly used to model count data\nlike the number of arrivals, occurrences, or events per time period.\n\nThe distribution is characterized by a single parameter (mean\/rate), and both the mean and\nvariance equal this parameter value.\n\nAttributes:\n mean (required): Mean number of events in the fixed interval (also called rate parameter Ī»).\n Must be positive. This represents both the expected value and the variance of the\n distribution.' - ), - zod - .object({ - low: zod - .number() - .describe('Lower bound of the uniform distribution, inclusive.'), - high: zod - .number() - .describe('Upper bound of the uniform distribution.'), - decimal_places: zod - .number() - .optional() - .describe( - 'Number of decimal places to round the sampled values to.' - ), - sampler_type: zod - .literal('uniform') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsOnethreeSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a continuous Uniform distribution.\n\nSamples continuous values uniformly from a specified range, where every value in the range\nhas equal probability of being sampled. This is useful when all values within a range are\nequally likely, such as random percentages, proportions, or unbiased measurements.\n\nAttributes:\n low (required): Lower bound of the uniform distribution (inclusive). Can be any real number.\n high (required): Upper bound of the uniform distribution. Must be greater than `low`.\n decimal_places: Optional number of decimal places to round sampled values to. If None,\n values are not rounded and may have many decimal places.' - ), - zod - .object({ - dist_name: zod - .string() - .describe('Name of a scipy.stats distribution.'), - dist_params: zod - .record(zod.string(), zod.unknown()) - .describe( - 'Parameters of the scipy.stats distribution given in `dist_name`.' - ), - decimal_places: zod - .number() - .optional() - .describe( - 'Number of decimal places to round the sampled values to.' - ), - sampler_type: zod - .literal('scipy') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsOnefourSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from any scipy.stats continuous or discrete distribution.\n\nProvides a flexible interface to sample from the wide range of probability distributions\navailable in scipy.stats. This enables advanced statistical sampling beyond the built-in\ndistribution types (Gaussian, Uniform, etc.).\n\nSee: [scipy.stats documentation](https:\/\/docs.scipy.org\/doc\/scipy\/reference\/stats.html)\n\nAttributes:\n dist_name (required): Name of the scipy.stats distribution to sample from (e.g., \"beta\", \"gamma\",\n \"lognorm\", \"expon\"). Must be a valid distribution name from scipy.stats.\n dist_params (required): Dictionary of parameters for the specified distribution. Parameter names\n and values must match the scipy.stats distribution specification (e.g., {\"a\": 2, \"b\": 5}\n for beta distribution, {\"scale\": 1.5} for exponential).\n decimal_places: Optional number of decimal places to round sampled values to. If None,\n values are not rounded.' - ), - ]) - ) - .optional() - .describe( - 'Optional dictionary for conditional parameters; keys are conditions, values are params to use when met' - ), - convert_to: zod - .string() - .optional() - .describe( - "Optional type conversion after sampling: 'float', 'int', or 'str' for numerical samplers; a strftime format string (e.g., '%Y-%m-%d') for datetime\/timedelta samplers. Datetime\/timedelta columns default to ISO-8601 (e.g., 2024-01-15T09:30:00) when omitted." - ), - }) - .describe( - 'Configuration for columns generated using built-in samplers.\n\nSampler columns provide efficient data generation for common data types and\ndistributions. Supported samplers include UUID generation,\ndatetime\/timedelta sampling, person generation, category \/ subcategory sampling,\nand various statistical distributions (uniform, gaussian, binomial, poisson, scipy).\n\nAttributes:\n sampler_type (required): Type of sampler to use. Available types include:\n \"uuid\", \"category\", \"subcategory\", \"uniform\", \"gaussian\", \"bernoulli\",\n \"bernoulli_mixture\", \"binomial\", \"poisson\", \"scipy\", \"person\",\n \"person_from_faker\", \"datetime\", \"timedelta\".\n params (required): Parameters specific to the chosen sampler type. Type varies based on the `sampler_type`\n (e.g., `CategorySamplerParams`, `UniformSamplerParams`, `PersonSamplerParams`).\n conditional_params: Optional dictionary for conditional parameters. The dict keys\n are the conditions that must be met (e.g., \"age > 21\") for the conditional parameters\n to be used. The values of dict are the parameters to use when the condition is met.\n convert_to: Optional type conversion to apply after sampling. For numerical samplers,\n must be one of \"float\", \"int\", or \"str\". For datetime and timedelta samplers, accepts\n a strftime format string (e.g., ``\"%Y-%m-%d\"``, ``\"%m\/%d\/%Y %H:%M\"``). When omitted,\n datetime\/timedelta columns default to ISO-8601 format (e.g., ``2024-01-15T09:30:00``).\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.\n\n!!! tip \"Displaying available samplers and their parameters\"\n The config builder has an `info` attribute that can be used to display the\n available samplers and their parameters:\n ```python\n config_builder.info.display(\"samplers\")\n ```' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemEightDropDefault - ), - allow_resize: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemEightAllowResizeDefault - ), - column_type: zod - .literal('seed-dataset') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemEightColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemEightPropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - }) - .describe( - 'Configuration for columns sourced from seed datasets.\n\nThis config marks columns that come from seed data. It is typically created\nautomatically when calling `with_seed_dataset()` on the builder, rather than\nbeing instantiated directly by users.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemNineDropDefault - ), - allow_resize: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemNineAllowResizeDefault - ), - column_type: zod - .literal('validation') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemNineColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemNinePropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - target_columns: zod - .array(zod.string()) - .describe('List of column names to validate'), - validator_type: zod - .enum(['code', 'local_callable', 'remote']) - .describe("Validation method: 'code', 'local_callable', or 'remote'"), - validator_params: zod - .union([ - zod - .object({ - validator_type: zod - .literal('code') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsOneValidatorTypeDefault - ) - .describe( - "Validator type discriminator, always 'code' for this validator" - ), - code_lang: zod - .enum([ - 'bash', - 'c', - 'cobol', - 'cpp', - 'csharp', - 'go', - 'java', - 'javascript', - 'kotlin', - 'python', - 'ruby', - 'rust', - 'scala', - 'swift', - 'typescript', - 'sql:sqlite', - 'sql:tsql', - 'sql:bigquery', - 'sql:mysql', - 'sql:postgres', - 'sql:ansi', - ]) - .describe('The language of the code to validate'), - }) - .describe( - 'Configuration for code validation. Supports Python and SQL code validation.\n\nAttributes:\n code_lang (required): The language of the code to validate. Supported values include: `python`,\n `sql:sqlite`, `sql:postgres`, `sql:mysql`, `sql:tsql`, `sql:bigquery`, `sql:ansi`.' - ), - zod - .object({ - validator_type: zod - .literal('local_callable') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsTwoValidatorTypeDefault - ) - .describe( - "Validator type discriminator, always 'local_callable' for this validator" - ), - validation_function: zod - .unknown() - .describe( - 'Function (Callable[[pd.DataFrame], pd.DataFrame]) to validate the data' - ), - output_schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe("Expected schema for local callable validator's output"), - }) - .describe( - "Configuration for local callable validation. Expects a function to be passed that validates the data.\n\nAttributes:\n validation_function (required): Function (`Callable[[pd.DataFrame], pd.DataFrame]`) to validate the\n data. Output must contain a column `is_valid` of type `bool`.\n output_schema: The JSON schema for the local callable validator's output. If not provided,\n the output will not be validated." - ), - zod - .object({ - validator_type: zod - .literal('remote') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsThreeValidatorTypeDefault - ) - .describe( - "Validator type discriminator, always 'remote' for this validator" - ), - endpoint_url: zod.string().describe('URL of the remote endpoint'), - output_schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe("Expected schema for remote validator's output"), - timeout: zod - .number() - .gt( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsThreeTimeoutExclusiveMin - ) - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsThreeTimeoutDefault - ) - .describe('The timeout for the HTTP request'), - max_retries: zod - .number() - .min( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsThreeMaxRetriesMin - ) - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsThreeMaxRetriesDefault - ) - .describe('The maximum number of retry attempts'), - retry_backoff: zod - .number() - .gt( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsThreeRetryBackoffExclusiveMin - ) - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsThreeRetryBackoffDefault - ) - .describe('The backoff factor for the retry delay'), - max_parallel_requests: zod - .number() - .min(1) - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsThreeMaxParallelRequestsDefault - ) - .describe('The maximum number of parallel requests to make'), - }) - .describe( - "Configuration for remote validation. Sends data to a remote endpoint for validation.\n\nAttributes:\n endpoint_url (required): The URL of the remote endpoint.\n output_schema: The JSON schema for the remote validator's output. If not provided,\n the output will not be validated.\n timeout: The timeout for the HTTP request in seconds. Defaults to 30.0.\n max_retries: The maximum number of retry attempts. Defaults to 3.\n retry_backoff: The backoff factor for the retry delay in seconds. Defaults to 2.0.\n max_parallel_requests: The maximum number of parallel requests to make. Defaults to 4." - ), - ]) - .describe('Validator-specific parameters (e.g., CodeValidatorParams)'), - batch_size: zod - .number() - .min(1) - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemNineBatchSizeDefault - ) - .describe('Number of records to process in each batch'), - }) - .describe( - 'Configuration for validation columns that validate existing columns.\n\nValidation columns execute validation logic against specified target columns and return\nstructured results indicating pass\/fail status with validation details. Supports multiple\nvalidation strategies: code execution (Python\/SQL), local callable functions (library only),\nand remote HTTP endpoints.\n\nAttributes:\n target_columns (required): List of column names to validate. These columns are passed to the\n validator for validation. All target columns must exist in the dataset\n before validation runs.\n validator_type (required): The type of validator to use. Options:\n - \"code\": Execute code (Python or SQL) for validation. The code receives a\n DataFrame with target columns and must return a DataFrame with validation results.\n - \"local_callable\": Call a local Python function with the data. Only supported\n when running DataDesigner locally.\n - \"remote\": Send data to a remote HTTP endpoint for validation.\n validator_params (required): Parameters specific to the validator type. Type varies by validator:\n - CodeValidatorParams: Specifies code language (python or SQL dialect like\n \"sql:postgres\", \"sql:mysql\").\n - LocalCallableValidatorParams: Provides validation function (Callable[[pd.DataFrame],\n pd.DataFrame]) and optional output schema for validation results.\n - RemoteValidatorParams: Configures endpoint URL, HTTP timeout, retry behavior\n (max_retries, retry_backoff), and parallel request limits (max_parallel_requests).\n batch_size: Number of records to process in each validation batch. Defaults to 10.\n Larger batches are more efficient but use more memory. Adjust based on validator\n complexity and available resources.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemOnezeroDropDefault - ), - allow_resize: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemOnezeroAllowResizeDefault - ), - column_type: zod - .literal('embedding') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemOnezeroColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemOnezeroPropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - target_column: zod - .string() - .describe('Name of the text column to generate embeddings for'), - model_alias: zod - .string() - .describe('Alias of the model to use for embedding generation'), - }) - .describe( - 'Configuration for embedding generation columns.\n\nEmbedding columns generate embeddings for text input using a specified model.\n\nAttributes:\n target_column (required): The column to generate embeddings for. The column could be a single text string or a list of text strings in stringified JSON format.\n If it is a list of text strings in stringified JSON format, the embeddings will be generated for each text string.\n model_alias (required): The model to use for embedding generation.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemOneoneDropDefault - ), - allow_resize: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemOneoneAllowResizeDefault - ), - column_type: zod - .literal('image') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemOneoneColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemOneonePropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - prompt: zod - .string() - .describe( - 'Jinja2 template for the image generation prompt; can reference other columns via {{ column_name }}' - ), - model_alias: zod - .string() - .describe('Alias of the model to use for image generation'), - multi_modal_context: zod - .array( - zod - .object({ - modality: zod - .enum(['image']) - .describe('Supported modality types for multimodal model data.') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigColumnsItemOneoneMultiModalContextItemModalityDefault - ), - column_name: zod.string(), - data_type: zod - .enum(['url', 'base64']) - .optional() - .describe('Data type formats for multimodal data.'), - image_format: zod - .enum(['png', 'jpg', 'jpeg', 'gif', 'webp']) - .optional() - .describe('Supported image formats for image modality.'), - }) - .describe( - 'Configuration for providing image context to multimodal models.\n\nAttributes:\n modality: The modality type (always \"image\").\n column_name: Name of the column containing image data.\n data_type: Format of the image data (\"url\", \"base64\", or None for auto-detection).\n When None, the format is auto-detected: URLs are passed through, file paths that\n exist under base_path are loaded as base64, and other values are assumed to be base64.\n image_format: Image format (required when data_type is explicitly \"base64\").' - ) - ) - .optional() - .describe( - 'Optional list of ImageContext for multi-modal image-to-image generation' - ), - }) - .describe( - 'Configuration for image generation columns.\n\nImage columns generate images using either autoregressive or diffusion models.\nThe API used is automatically determined based on the model name:\n\nAttributes:\n prompt (required): Prompt template for image generation. Supports Jinja2 templating to\n reference other columns (e.g., \"Generate an image of a {{ character_name }}\").\n Must be a valid Jinja2 template.\n model_alias (required): The model to use for image generation.\n multi_modal_context: Optional list of image contexts for multi-modal generation.\n Enables autoregressive multi-modal models to generate images based on image inputs.\n Only works with autoregressive models that support image-to-image generation.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - ]) - ) - .min(1), - model_configs: zod - .array( - zod - .object({ - alias: zod.string(), - model: zod.string(), - inference_parameters: zod - .union([ - zod - .object({ - generation_type: zod - .literal('chat-completion') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersOneGenerationTypeDefault - ), - max_parallel_requests: zod - .number() - .min(1) - .default( - dataDesignerGetJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersOneMaxParallelRequestsDefault - ), - timeout: zod.number().min(1).optional(), - extra_body: zod.record(zod.string(), zod.unknown()).optional(), - temperature: zod - .union([ - zod.number(), - zod - .object({ - distribution_type: zod - .enum(['uniform', 'manual']) - .describe( - 'Types of distributions for sampling inference parameters.' - ) - .default( - dataDesignerGetJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersOneTemperatureTwoDistributionTypeDefault - ), - params: zod - .object({ - low: zod.number(), - high: zod.number(), - }) - .describe( - 'Parameters for uniform distribution sampling.\n\nAttributes:\n low: Lower bound (inclusive).\n high: Upper bound (exclusive).' - ), - }) - .describe( - 'Uniform distribution for sampling inference parameters.\n\nSamples values uniformly between low and high bounds. Useful for exploring\na continuous range of values for temperature or top_p.\n\nAttributes:\n distribution_type: Type of distribution (\"uniform\").\n params: Distribution parameters (low, high).' - ), - zod - .object({ - distribution_type: zod - .enum(['uniform', 'manual']) - .describe( - 'Types of distributions for sampling inference parameters.' - ) - .default( - dataDesignerGetJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersOneTemperatureThreeDistributionTypeDefault - ), - params: zod - .object({ - values: zod.array(zod.number()).min(1), - weights: zod.array(zod.number()).optional(), - }) - .describe( - 'Parameters for manual distribution sampling.\n\nAttributes:\n values: List of possible values to sample from.\n weights: Optional list of weights for each value. If not provided, all values have equal probability.' - ), - }) - .describe( - 'Manual (discrete) distribution for sampling inference parameters.\n\nSamples from a discrete set of values with optional weights. Useful for testing\nspecific values or creating custom probability distributions for temperature or top_p.\n\nAttributes:\n distribution_type: Type of distribution (\"manual\").\n params: Distribution parameters (values, weights).' - ), - ]) - .optional(), - top_p: zod - .union([ - zod.number(), - zod - .object({ - distribution_type: zod - .enum(['uniform', 'manual']) - .describe( - 'Types of distributions for sampling inference parameters.' - ) - .default( - dataDesignerGetJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersOneTopPTwoDistributionTypeDefault - ), - params: zod - .object({ - low: zod.number(), - high: zod.number(), - }) - .describe( - 'Parameters for uniform distribution sampling.\n\nAttributes:\n low: Lower bound (inclusive).\n high: Upper bound (exclusive).' - ), - }) - .describe( - 'Uniform distribution for sampling inference parameters.\n\nSamples values uniformly between low and high bounds. Useful for exploring\na continuous range of values for temperature or top_p.\n\nAttributes:\n distribution_type: Type of distribution (\"uniform\").\n params: Distribution parameters (low, high).' - ), - zod - .object({ - distribution_type: zod - .enum(['uniform', 'manual']) - .describe( - 'Types of distributions for sampling inference parameters.' - ) - .default( - dataDesignerGetJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersOneTopPThreeDistributionTypeDefault - ), - params: zod - .object({ - values: zod.array(zod.number()).min(1), - weights: zod.array(zod.number()).optional(), - }) - .describe( - 'Parameters for manual distribution sampling.\n\nAttributes:\n values: List of possible values to sample from.\n weights: Optional list of weights for each value. If not provided, all values have equal probability.' - ), - }) - .describe( - 'Manual (discrete) distribution for sampling inference parameters.\n\nSamples from a discrete set of values with optional weights. Useful for testing\nspecific values or creating custom probability distributions for temperature or top_p.\n\nAttributes:\n distribution_type: Type of distribution (\"manual\").\n params: Distribution parameters (values, weights).' - ), - ]) - .optional(), - max_tokens: zod.number().min(1).optional(), - }) - .describe( - 'Configuration for LLM inference parameters.\n\nAttributes:\n generation_type: Type of generation, always \"chat-completion\" for this class.\n temperature: Sampling temperature (0.0-2.0). Can be a fixed value or a distribution for dynamic sampling.\n top_p: Nucleus sampling probability (0.0-1.0). Can be a fixed value or a distribution for dynamic sampling.\n max_tokens: Maximum number of tokens to generate in the response.' - ), - zod - .object({ - generation_type: zod - .literal('embedding') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersTwoGenerationTypeDefault - ), - max_parallel_requests: zod - .number() - .min(1) - .default( - dataDesignerGetJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersTwoMaxParallelRequestsDefault - ), - timeout: zod.number().min(1).optional(), - extra_body: zod.record(zod.string(), zod.unknown()).optional(), - encoding_format: zod - .enum(['float', 'base64']) - .default( - dataDesignerGetJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersTwoEncodingFormatDefault - ), - dimensions: zod.number().optional(), - }) - .describe( - 'Configuration for embedding generation parameters.\n\nAttributes:\n generation_type: Type of generation, always \"embedding\" for this class.\n encoding_format: Format of the embedding encoding (\"float\" or \"base64\").\n dimensions: Number of dimensions for the embedding.' - ), - zod - .object({ - generation_type: zod - .literal('image') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersThreeGenerationTypeDefault - ), - max_parallel_requests: zod - .number() - .min(1) - .default( - dataDesignerGetJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersThreeMaxParallelRequestsDefault - ), - timeout: zod.number().min(1).optional(), - extra_body: zod.record(zod.string(), zod.unknown()).optional(), - }) - .describe( - 'Configuration for image generation models.\n\nWorks for both diffusion and autoregressive image generation models. Pass all model-specific image options via `extra_body`.\n\nAttributes:\n generation_type: Type of generation, always \"image\" for this class.\n\nExample:\n ```python\n # OpenAI-style (DALLĀ·E): quality and size in extra_body or as top-level kwargs\n dd.ImageInferenceParams(\n extra_body={\"size\": \"1024x1024\", \"quality\": \"hd\"}\n )\n\n # Gemini-style: generationConfig.imageConfig\n dd.ImageInferenceParams(\n extra_body={\n \"generationConfig\": {\n \"imageConfig\": {\n \"aspectRatio\": \"1:1\",\n \"imageSize\": \"1024\"\n }\n }\n }\n )\n ```' - ), - ]) - .optional(), - provider: zod.string().optional(), - skip_health_check: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigModelConfigsItemSkipHealthCheckDefault - ), - }) - .describe( - "Configuration for a model used for generation.\n\nAttributes:\n alias: User-defined alias to reference in column configurations.\n model: Model identifier (e.g., from build.nvidia.com or other providers).\n inference_parameters: Inference parameters for the model (temperature, top_p, max_tokens, etc.).\n The generation_type is determined by the type of inference_parameters.\n provider: Name of the model provider. Required in a future release. Leaving\n ``provider`` unset (or ``None``) currently routes through the registry's\n implicit default and is \*\*deprecated\*\*; specify ``provider=`` explicitly.\n See issue #589.\n skip_health_check: Whether to skip the health check for this model. Defaults to False." - ) - ) - .optional(), - tool_configs: zod - .array( - zod - .object({ - tool_alias: zod.string(), - providers: zod.array(zod.string()), - allow_tools: zod.array(zod.string()).optional(), - max_tool_call_turns: zod - .number() - .min(1) - .default( - dataDesignerGetJobResponseSpecJobConfigConfigToolConfigsItemMaxToolCallTurnsDefault - ), - timeout_sec: zod - .number() - .gt( - dataDesignerGetJobResponseSpecJobConfigConfigToolConfigsItemTimeoutSecExclusiveMin - ) - .optional(), - }) - .describe( - 'Configuration for permitting MCP tools on an LLM column.\n\nToolConfig defines which tools are available for use during LLM generation.\nIt references one or more MCP providers by name and can optionally restrict\nwhich tools from those providers are permitted.\n\nAttributes:\n tool_alias (str): User-defined alias to reference this tool configuration in column configs.\n providers (list[str]): Names of the MCP providers to use for tool calls. Tools can be\n drawn from multiple providers.\n allow_tools (list[str] | None): Optional allowlist of tool names that restricts which\n tools are permitted. If None, all tools from the specified providers are allowed.\n Defaults to None.\n max_tool_call_turns (int): Maximum number of tool-calling turns permitted in a single\n generation. A turn is one iteration where the LLM requests tool calls. With parallel\n tool calling, a single turn may execute multiple tools simultaneously. Defaults to 5.\n timeout_sec (float | None): Timeout in seconds for MCP tool calls. Defaults to None (no timeout).\n\nExamples:\n >>> ToolConfig(\n ... tool_alias=\"search-tools\",\n ... providers=[\"doc-search-mcp\", \"web-search-mcp\"],\n ... allow_tools=[\"search_docs\", \"list_docs\"],\n ... max_tool_call_turns=10,\n ... timeout_sec=30.0,\n ... )' - ) - ) - .optional(), - seed_config: zod - .object({ - source: zod.union([ - zod.object({ - seed_type: zod - .literal('local') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSourceOneSeedTypeDefault - ), - path: zod - .string() - .describe( - 'Path to a local seed dataset file or wildcard pattern. Relative paths are resolved from the current working directory when the config is loaded, not from the config file location.' - ), - }), - zod.object({ - seed_type: zod - .literal('hf') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSourceTwoSeedTypeDefault - ), - path: zod - .string() - .describe( - "Path to the seed data in HuggingFace. Wildcards are allowed. Examples include 'datasets\/my-username\/my-dataset\/data\/000_00000.parquet', 'datasets\/my-username\/my-dataset\/data\/\*.parquet', and 'datasets\/my-username\/my-dataset\/\*\*\/\*.parquet'" - ), - token: zod.string().optional(), - endpoint: zod - .string() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSourceTwoEndpointDefault - ), - }), - zod.object({ - seed_type: zod - .literal('df') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSourceThreeSeedTypeDefault - ), - }), - zod.object({ - seed_type: zod - .literal('directory') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSourceFourSeedTypeDefault - ), - path: zod - .string() - .describe( - 'Directory containing seed artifacts. Relative paths are resolved from the current working directory when the config is loaded, not from the config file location.' - ), - file_pattern: zod - .string() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSourceFourFilePatternDefault - ) - .describe( - 'Case-sensitive filename pattern used to match files under the provided directory. Patterns match basenames only, not relative paths.' - ), - recursive: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSourceFourRecursiveDefault - ) - .describe( - 'Whether to search nested subdirectories under the provided directory for matching files.' - ), - }), - zod.object({ - seed_type: zod - .literal('file_contents') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSourceFiveSeedTypeDefault - ), - path: zod - .string() - .describe( - 'Directory containing seed artifacts. Relative paths are resolved from the current working directory when the config is loaded, not from the config file location.' - ), - file_pattern: zod - .string() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSourceFiveFilePatternDefault - ) - .describe( - 'Case-sensitive filename pattern used to match files under the provided directory. Patterns match basenames only, not relative paths.' - ), - recursive: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSourceFiveRecursiveDefault - ) - .describe( - 'Whether to search nested subdirectories under the provided directory for matching files.' - ), - encoding: zod - .string() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSourceFiveEncodingDefault - ) - .describe( - 'Text encoding used when reading matching files into the `content` column.' - ), - }), - zod.object({ - seed_type: zod - .literal('agent_rollout') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSourceSixSeedTypeDefault - ), - path: zod - .string() - .optional() - .describe( - 'Directory containing agent rollout artifacts. This field is required for ATIF trajectories. When omitted, built-in defaults are used for formats that define one. Claude Code defaults to ~\/.claude\/projects, Codex defaults to ~\/.codex\/sessions, Hermes Agent defaults to ~\/.hermes\/sessions, and Pi Coding Agent defaults to ~\/.pi\/agent\/sessions. Relative paths are resolved from the current working directory when the config is loaded, not from the config file location.' - ), - file_pattern: zod - .string() - .optional() - .describe( - "Case-sensitive filename pattern used to match agent rollout files. When omitted, ATIF defaults to '\*.json', Claude Code, Codex, and Pi Coding Agent default to '\*.jsonl', and Hermes Agent defaults to '\*.json\*'." - ), - recursive: zod - .boolean() - .default( - dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSourceSixRecursiveDefault - ) - .describe( - 'Whether to search nested subdirectories under the provided directory for matching files.' - ), - format: zod - .enum(['atif', 'claude_code', 'codex', 'hermes_agent', 'pi_coding_agent']) - .describe('Built-in agent rollout format to use for parsing trace files.'), - }), - zod.object({ - seed_type: zod - .literal('nmp') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSourceSevenSeedTypeDefault - ), - path: zod.string(), - }), - ]), - sampling_strategy: zod - .enum(['ordered', 'shuffle']) - .default( - dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSamplingStrategyDefault - ), - selection_strategy: zod - .union([ - zod.object({ - start: zod - .number() - .min( - dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSelectionStrategyOneStartMin - ) - .describe('The start index of the index range (inclusive)'), - end: zod - .number() - .min( - dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSelectionStrategyOneEndMin - ) - .describe('The end index of the index range (inclusive)'), - }), - zod.object({ - index: zod - .number() - .min( - dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSelectionStrategyTwoIndexMin - ) - .default( - dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSelectionStrategyTwoIndexDefault - ) - .describe('The index of the partition to sample from'), - num_partitions: zod - .number() - .min(1) - .default( - dataDesignerGetJobResponseSpecJobConfigConfigSeedConfigSelectionStrategyTwoNumPartitionsDefault - ) - .describe('The total number of partitions in the dataset'), - }), - ]) - .optional(), - }) - .optional() - .describe( - 'Configuration for sampling data from a seed dataset.\n\nAttributes:\n source: A SeedSource defining where the seed data exists\n sampling_strategy: Strategy for how to sample rows from the dataset.\n - ORDERED: Read rows sequentially in their original order.\n - SHUFFLE: Randomly shuffle rows before sampling. When used with\n selection_strategy, shuffling occurs within the selected range\/partition.\n selection_strategy: Optional strategy to select a subset of the dataset.\n - IndexRange: Select a specific range of indices (e.g., rows 100-200).\n - PartitionBlock: Select a partition by splitting the dataset into N equal parts.\n Partition indices are zero-based (index=0 is the first partition, index=1 is\n the second, etc.).\n\nExamples:\n Read rows sequentially from start to end:\n SeedConfig(\n source=LocalFileSeedSource(path=\"my_data.parquet\"),\n sampling_strategy=SamplingStrategy.ORDERED\n )\n\n Read rows in random order:\n SeedConfig(\n source=LocalFileSeedSource(path=\"my_data.parquet\"),\n sampling_strategy=SamplingStrategy.SHUFFLE\n )\n\n Read specific index range (rows 100-199):\n SeedConfig(\n source=LocalFileSeedSource(path=\"my_data.parquet\"),\n sampling_strategy=SamplingStrategy.ORDERED,\n selection_strategy=IndexRange(start=100, end=199)\n )\n\n Read random rows from a specific index range (shuffles within rows 100-199):\n SeedConfig(\n source=LocalFileSeedSource(path=\"my_data.parquet\"),\n sampling_strategy=SamplingStrategy.SHUFFLE,\n selection_strategy=IndexRange(start=100, end=199)\n )\n\n Read from partition 2 (3rd partition, zero-based) of 5 partitions (20% of dataset):\n SeedConfig(\n source=LocalFileSeedSource(path=\"my_data.parquet\"),\n sampling_strategy=SamplingStrategy.ORDERED,\n selection_strategy=PartitionBlock(index=2, num_partitions=5)\n )\n\n Read shuffled rows from partition 0 of 10 partitions (shuffles within the partition):\n SeedConfig(\n source=LocalFileSeedSource(path=\"my_data.parquet\"),\n sampling_strategy=SamplingStrategy.SHUFFLE,\n selection_strategy=PartitionBlock(index=0, num_partitions=10)\n )' - ), - constraints: zod - .array( - zod.union([ - zod - .object({ - target_column: zod - .string() - .describe('Name of the sampler column this constraint applies to'), - constraint_type: zod - .literal('scalar_inequality') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigConstraintsItemOneConstraintTypeDefault - ) - .describe( - "Constraint type discriminator, always 'scalar_inequality' for this constraint" - ), - rhs: zod.number().describe('Scalar value to compare against'), - operator: zod.enum(['lt', 'le', 'gt', 'ge']).describe('Comparison operator'), - }) - .describe( - 'Constrain a sampler column to be less\/greater than a scalar value.\n\nOnly applies to sampler columns.\n\nAttributes:\n rhs (required): Scalar value to compare against.\n operator (required): Comparison operator (lt, le, gt, ge).\n\nInherited Attributes:\n target_column (required): Name of the sampler column this constraint applies to.' - ), - zod - .object({ - target_column: zod - .string() - .describe('Name of the sampler column this constraint applies to'), - constraint_type: zod - .literal('column_inequality') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigConstraintsItemTwoConstraintTypeDefault - ) - .describe( - "Constraint type discriminator, always 'column_inequality' for this constraint" - ), - rhs: zod - .string() - .describe('Name of the other sampler column to compare against'), - operator: zod.enum(['lt', 'le', 'gt', 'ge']).describe('Comparison operator'), - }) - .describe( - 'Constrain a sampler column to be less\/greater than another sampler column.\n\nOnly applies to sampler columns.\n\nAttributes:\n rhs (required): Name of the other sampler column to compare against.\n operator (required): Comparison operator (lt, le, gt, ge).\n\nInherited Attributes:\n target_column (required): Name of the sampler column this constraint applies to.' - ), - ]) - ) - .optional(), - profilers: zod - .array( - zod - .object({ - model_alias: zod.string(), - summary_score_sample_size: zod - .number() - .min(1) - .default( - dataDesignerGetJobResponseSpecJobConfigConfigProfilersItemSummaryScoreSampleSizeDefault - ), - }) - .describe( - 'Configuration for the LLM-as-a-judge score profiler.\n\nAttributes:\n model_alias: Alias of the LLM model to use for generating score distribution summaries.\n Must match a model alias defined in the Data Designer configuration.\n summary_score_sample_size: Number of score samples to include when prompting the LLM\n to generate summaries. Larger sample sizes provide more context but increase\n token usage. Must be at least 1 when provided. Set to None to skip LLM-generated\n summaries. Defaults to 20.' - ) - ) - .optional(), - processors: zod - .array( - zod.union([ - zod - .object({ - name: zod - .string() - .describe( - 'The name of the processor, used to identify the processor in the results and to write the artifacts to disk.' - ), - processor_type: zod - .literal('drop_columns') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigProcessorsItemOneProcessorTypeDefault - ), - column_names: zod - .array(zod.string()) - .describe('List of column names to drop from the output dataset.'), - }) - .describe( - 'Drop columns from the output dataset (prefer ``drop=True`` in the column config).\n\nThis processor removes specified columns from the generated dataset. The dropped\ncolumns are saved separately in the `dropped-columns-parquet-files` directory for reference.\nWhen this processor is added via the config builder, the corresponding column\nconfigs are automatically marked with `drop = True`.\n\nAttributes:\n column_names (required): List of column names to remove from the output dataset.\n\nInherited Attributes:\n name (required): Name of the processor.' - ), - zod - .object({ - name: zod - .string() - .describe( - 'The name of the processor, used to identify the processor in the results and to write the artifacts to disk.' - ), - processor_type: zod - .literal('schema_transform') - .default( - dataDesignerGetJobResponseSpecJobConfigConfigProcessorsItemTwoProcessorTypeDefault - ), - template: zod - .record(zod.string(), zod.unknown()) - .describe( - '\n Dictionary specifying columns and templates to use in the new dataset with transformed schema.\n\n Each key is a new column name, and each value is an object containing Jinja2 templates - for instance, a string or a list of strings.\n Values must be JSON-serializable.\n\n Example:\n\n ```python\n template = {\n \"list_of_strings\": [\"{{ col1 }}\", \"{{ col2 }}\"],\n \"uppercase_string\": \"{{ col1 | upper }}\",\n \"lowercase_string\": \"{{ col2 | lower }}\",\n }\n ```\n\n The above templates will create an new dataset with three columns: \"list_of_strings\", \"uppercase_string\", and \"lowercase_string\".\n References to columns \"col1\" and \"col2\" in the templates will be replaced with the actual values of the columns in the dataset.\n ' - ), - }) - .describe( - 'Configuration for transforming the dataset schema using Jinja2 templates.\n\nThis processor creates a new dataset with a transformed schema. Each key in the\ntemplate becomes a column in the output, and values are Jinja2 templates that\ncan reference any column in the batch. The transformed dataset is written to\na `processors-files\/{processor_name}\/` directory alongside the main dataset.\n\nAttributes:\n template (required): Dictionary defining the output schema. Keys are new column names,\n values are Jinja2 templates (strings, lists, or nested structures).\n Must be JSON-serializable.\n\nInherited Attributes:\n name (required): Name of the processor.' - ), - ]) - ) - .optional(), - }) - .describe( - 'Configuration for NeMo Data Designer.\n\nThis class defines the main configuration structure for NeMo Data Designer,\nwhich the engine consumes when generating synthetic data.\n\nAttributes:\n columns: Required list of column configurations defining how each column\n should be generated. Must contain at least one column.\n model_configs: Optional list of model configurations for LLM-based generation.\n Each model config defines the model, provider, and inference parameters.\n tool_configs: Optional list of tool configurations for MCP tool calling.\n Each tool config defines the provider, allowed tools, and execution limits.\n seed_config: Optional seed dataset settings to use for generation.\n constraints: Optional list of column constraints.\n profilers: Optional list of column profilers for analyzing generated data characteristics.\n processors: Optional list of processor configurations for post-generation transformations.' - ), - }), - model_providers: zod.array( - zod - .object({ - name: zod.string(), - endpoint: zod.string(), - provider_type: zod - .string() - .default(dataDesignerGetJobResponseSpecModelProvidersItemProviderTypeDefault), - api_key: zod.string().optional(), - extra_body: zod.record(zod.string(), zod.unknown()).optional(), - extra_headers: zod.record(zod.string(), zod.string()).optional(), - }) - .describe( - 'Configuration for a custom model provider.\n\nAttributes:\n name: Name of the model provider.\n endpoint: API endpoint URL for the provider.\n provider_type: Provider type (default: \"openai\"). Determines the API format to use.\n api_key: Optional API key for authentication.\n extra_body: Additional parameters to pass in API requests.\n extra_headers: Additional headers to pass in API requests.' - ) - ), - model_configs: zod.array( - zod - .object({ - alias: zod.string(), - model: zod.string(), - inference_parameters: zod - .union([ - zod - .object({ - generation_type: zod - .literal('chat-completion') - .default( - dataDesignerGetJobResponseSpecModelConfigsItemInferenceParametersOneGenerationTypeDefault - ), - max_parallel_requests: zod - .number() - .min(1) - .default( - dataDesignerGetJobResponseSpecModelConfigsItemInferenceParametersOneMaxParallelRequestsDefault - ), - timeout: zod.number().min(1).optional(), - extra_body: zod.record(zod.string(), zod.unknown()).optional(), - temperature: zod - .union([ - zod.number(), - zod - .object({ - distribution_type: zod - .enum(['uniform', 'manual']) - .describe('Types of distributions for sampling inference parameters.') - .default( - dataDesignerGetJobResponseSpecModelConfigsItemInferenceParametersOneTemperatureTwoDistributionTypeDefault - ), - params: zod - .object({ - low: zod.number(), - high: zod.number(), - }) - .describe( - 'Parameters for uniform distribution sampling.\n\nAttributes:\n low: Lower bound (inclusive).\n high: Upper bound (exclusive).' - ), - }) - .describe( - 'Uniform distribution for sampling inference parameters.\n\nSamples values uniformly between low and high bounds. Useful for exploring\na continuous range of values for temperature or top_p.\n\nAttributes:\n distribution_type: Type of distribution (\"uniform\").\n params: Distribution parameters (low, high).' - ), - zod - .object({ - distribution_type: zod - .enum(['uniform', 'manual']) - .describe('Types of distributions for sampling inference parameters.') - .default( - dataDesignerGetJobResponseSpecModelConfigsItemInferenceParametersOneTemperatureThreeDistributionTypeDefault - ), - params: zod - .object({ - values: zod.array(zod.number()).min(1), - weights: zod.array(zod.number()).optional(), - }) - .describe( - 'Parameters for manual distribution sampling.\n\nAttributes:\n values: List of possible values to sample from.\n weights: Optional list of weights for each value. If not provided, all values have equal probability.' - ), - }) - .describe( - 'Manual (discrete) distribution for sampling inference parameters.\n\nSamples from a discrete set of values with optional weights. Useful for testing\nspecific values or creating custom probability distributions for temperature or top_p.\n\nAttributes:\n distribution_type: Type of distribution (\"manual\").\n params: Distribution parameters (values, weights).' - ), - ]) - .optional(), - top_p: zod - .union([ - zod.number(), - zod - .object({ - distribution_type: zod - .enum(['uniform', 'manual']) - .describe('Types of distributions for sampling inference parameters.') - .default( - dataDesignerGetJobResponseSpecModelConfigsItemInferenceParametersOneTopPTwoDistributionTypeDefault - ), - params: zod - .object({ - low: zod.number(), - high: zod.number(), - }) - .describe( - 'Parameters for uniform distribution sampling.\n\nAttributes:\n low: Lower bound (inclusive).\n high: Upper bound (exclusive).' - ), - }) - .describe( - 'Uniform distribution for sampling inference parameters.\n\nSamples values uniformly between low and high bounds. Useful for exploring\na continuous range of values for temperature or top_p.\n\nAttributes:\n distribution_type: Type of distribution (\"uniform\").\n params: Distribution parameters (low, high).' - ), - zod - .object({ - distribution_type: zod - .enum(['uniform', 'manual']) - .describe('Types of distributions for sampling inference parameters.') - .default( - dataDesignerGetJobResponseSpecModelConfigsItemInferenceParametersOneTopPThreeDistributionTypeDefault - ), - params: zod - .object({ - values: zod.array(zod.number()).min(1), - weights: zod.array(zod.number()).optional(), - }) - .describe( - 'Parameters for manual distribution sampling.\n\nAttributes:\n values: List of possible values to sample from.\n weights: Optional list of weights for each value. If not provided, all values have equal probability.' - ), - }) - .describe( - 'Manual (discrete) distribution for sampling inference parameters.\n\nSamples from a discrete set of values with optional weights. Useful for testing\nspecific values or creating custom probability distributions for temperature or top_p.\n\nAttributes:\n distribution_type: Type of distribution (\"manual\").\n params: Distribution parameters (values, weights).' - ), - ]) - .optional(), - max_tokens: zod.number().min(1).optional(), - }) - .describe( - 'Configuration for LLM inference parameters.\n\nAttributes:\n generation_type: Type of generation, always \"chat-completion\" for this class.\n temperature: Sampling temperature (0.0-2.0). Can be a fixed value or a distribution for dynamic sampling.\n top_p: Nucleus sampling probability (0.0-1.0). Can be a fixed value or a distribution for dynamic sampling.\n max_tokens: Maximum number of tokens to generate in the response.' - ), - zod - .object({ - generation_type: zod - .literal('embedding') - .default( - dataDesignerGetJobResponseSpecModelConfigsItemInferenceParametersTwoGenerationTypeDefault - ), - max_parallel_requests: zod - .number() - .min(1) - .default( - dataDesignerGetJobResponseSpecModelConfigsItemInferenceParametersTwoMaxParallelRequestsDefault - ), - timeout: zod.number().min(1).optional(), - extra_body: zod.record(zod.string(), zod.unknown()).optional(), - encoding_format: zod - .enum(['float', 'base64']) - .default( - dataDesignerGetJobResponseSpecModelConfigsItemInferenceParametersTwoEncodingFormatDefault - ), - dimensions: zod.number().optional(), - }) - .describe( - 'Configuration for embedding generation parameters.\n\nAttributes:\n generation_type: Type of generation, always \"embedding\" for this class.\n encoding_format: Format of the embedding encoding (\"float\" or \"base64\").\n dimensions: Number of dimensions for the embedding.' - ), - zod - .object({ - generation_type: zod - .literal('image') - .default( - dataDesignerGetJobResponseSpecModelConfigsItemInferenceParametersThreeGenerationTypeDefault - ), - max_parallel_requests: zod - .number() - .min(1) - .default( - dataDesignerGetJobResponseSpecModelConfigsItemInferenceParametersThreeMaxParallelRequestsDefault - ), - timeout: zod.number().min(1).optional(), - extra_body: zod.record(zod.string(), zod.unknown()).optional(), - }) - .describe( - 'Configuration for image generation models.\n\nWorks for both diffusion and autoregressive image generation models. Pass all model-specific image options via `extra_body`.\n\nAttributes:\n generation_type: Type of generation, always \"image\" for this class.\n\nExample:\n ```python\n # OpenAI-style (DALLĀ·E): quality and size in extra_body or as top-level kwargs\n dd.ImageInferenceParams(\n extra_body={\"size\": \"1024x1024\", \"quality\": \"hd\"}\n )\n\n # Gemini-style: generationConfig.imageConfig\n dd.ImageInferenceParams(\n extra_body={\n \"generationConfig\": {\n \"imageConfig\": {\n \"aspectRatio\": \"1:1\",\n \"imageSize\": \"1024\"\n }\n }\n }\n )\n ```' - ), - ]) - .optional(), - provider: zod.string().optional(), - skip_health_check: zod - .boolean() - .default(dataDesignerGetJobResponseSpecModelConfigsItemSkipHealthCheckDefault), - }) - .describe( - "Configuration for a model used for generation.\n\nAttributes:\n alias: User-defined alias to reference in column configurations.\n model: Model identifier (e.g., from build.nvidia.com or other providers).\n inference_parameters: Inference parameters for the model (temperature, top_p, max_tokens, etc.).\n The generation_type is determined by the type of inference_parameters.\n provider: Name of the model provider. Required in a future release. Leaving\n ``provider`` unset (or ``None``) currently routes through the registry's\n implicit default and is \*\*deprecated\*\*; specify ``provider=`` explicitly.\n See issue #589.\n skip_health_check: Whether to skip the health check for this model. Defaults to False." - ) - ), - }), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .optional() - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ), - status_details: zod.record(zod.string(), zod.unknown()).optional(), - error_details: zod.record(zod.string(), zod.unknown()).optional(), - ownership: zod.record(zod.string(), zod.unknown()).optional(), - custom_fields: zod.record(zod.string(), zod.unknown()).optional(), -}); - -/** - * @summary Delete Job - */ -export const DataDesignerDeleteJobParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -/** - * @summary Cancel Job - */ -export const DataDesignerCancelJobParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemOneDropDefault = false; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemOneAllowResizeDefault = false; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemOneColumnTypeDefault = `custom`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemOnePropagateSkipDefault = true; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemOneGenerationStrategyDefault = `cell_by_cell`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemTwoDropDefault = false; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemTwoAllowResizeDefault = false; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemTwoColumnTypeDefault = `expression`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemTwoPropagateSkipDefault = true; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemTwoDtypeDefault = `str`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemThreeDropDefault = false; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemThreeAllowResizeDefault = false; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemThreeColumnTypeDefault = `llm-code`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemThreePropagateSkipDefault = true; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemThreeMultiModalContextItemModalityDefault = `image`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemThreeWithTraceDefault = `none`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemThreeExtractReasoningContentDefault = false; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemFourDropDefault = false; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemFourAllowResizeDefault = false; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemFourColumnTypeDefault = `llm-judge`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemFourPropagateSkipDefault = true; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemFourMultiModalContextItemModalityDefault = `image`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemFourWithTraceDefault = `none`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemFourExtractReasoningContentDefault = false; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemFiveDropDefault = false; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemFiveAllowResizeDefault = false; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemFiveColumnTypeDefault = `llm-structured`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemFivePropagateSkipDefault = true; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemFiveMultiModalContextItemModalityDefault = `image`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemFiveWithTraceDefault = `none`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemFiveExtractReasoningContentDefault = false; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSixDropDefault = false; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSixAllowResizeDefault = false; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSixColumnTypeDefault = `llm-text`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSixPropagateSkipDefault = true; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSixMultiModalContextItemModalityDefault = `image`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSixWithTraceDefault = `none`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSixExtractReasoningContentDefault = false; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenDropDefault = false; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenAllowResizeDefault = false; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenColumnTypeDefault = `sampler`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenPropagateSkipDefault = true; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsOneSamplerTypeDefault = `subcategory`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsTwoSamplerTypeDefault = `category`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsThreeUnitDefault = `D`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsThreeSamplerTypeDefault = `datetime`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsFourLocaleDefault = `en_US`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsFourAgeRangeDefault = - [18, 114]; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsFourAgeRangeMin = 2; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsFourAgeRangeMax = 2; - -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsFourWithSyntheticPersonasDefault = false; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsFourSamplerTypeDefault = `person`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsFiveLocaleDefault = `en_US`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsFiveAgeRangeDefault = - [18, 114]; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsFiveAgeRangeMin = 2; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsFiveAgeRangeMax = 2; - -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsFiveSamplerTypeDefault = `person_from_faker`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsSixDtMinMin = 0; - -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsSixDtMaxExclusiveMin = 0; - -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsSixUnitDefault = `D`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsSixSamplerTypeDefault = `timedelta`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsSevenShortFormDefault = false; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsSevenUppercaseDefault = false; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsSevenSamplerTypeDefault = `uuid`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsEightPMin = 0; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsEightPMax = 1; - -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsEightSamplerTypeDefault = `bernoulli`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsNinePMin = 0; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsNinePMax = 1; - -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsNineSamplerTypeDefault = `bernoulli_mixture`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsOnezeroPMin = 0; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsOnezeroPMax = 1; - -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsOnezeroSamplerTypeDefault = `binomial`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsOneoneSamplerTypeDefault = `gaussian`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsOnetwoSamplerTypeDefault = `poisson`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsOnethreeSamplerTypeDefault = `uniform`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsOnefourSamplerTypeDefault = `scipy`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsOneSamplerTypeDefault = `subcategory`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsTwoSamplerTypeDefault = `category`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsThreeUnitDefault = `D`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsThreeSamplerTypeDefault = `datetime`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFourLocaleDefault = `en_US`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFourAgeRangeDefault = - [18, 114]; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFourAgeRangeMin = 2; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFourAgeRangeMax = 2; - -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFourWithSyntheticPersonasDefault = false; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFourSamplerTypeDefault = `person`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFiveLocaleDefault = `en_US`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFiveAgeRangeDefault = - [18, 114]; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFiveAgeRangeMin = 2; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFiveAgeRangeMax = 2; - -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFiveSamplerTypeDefault = `person_from_faker`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsSixDtMinMin = 0; - -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsSixDtMaxExclusiveMin = 0; - -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsSixUnitDefault = `D`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsSixSamplerTypeDefault = `timedelta`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsSevenShortFormDefault = false; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsSevenUppercaseDefault = false; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsSevenSamplerTypeDefault = `uuid`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsEightPMin = 0; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsEightPMax = 1; - -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsEightSamplerTypeDefault = `bernoulli`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsNinePMin = 0; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsNinePMax = 1; - -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsNineSamplerTypeDefault = `bernoulli_mixture`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsOnezeroPMin = 0; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsOnezeroPMax = 1; - -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsOnezeroSamplerTypeDefault = `binomial`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsOneoneSamplerTypeDefault = `gaussian`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsOnetwoSamplerTypeDefault = `poisson`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsOnethreeSamplerTypeDefault = `uniform`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsOnefourSamplerTypeDefault = `scipy`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemEightDropDefault = false; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemEightAllowResizeDefault = false; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemEightColumnTypeDefault = `seed-dataset`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemEightPropagateSkipDefault = true; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemNineDropDefault = false; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemNineAllowResizeDefault = false; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemNineColumnTypeDefault = `validation`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemNinePropagateSkipDefault = true; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsOneValidatorTypeDefault = `code`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsTwoValidatorTypeDefault = `local_callable`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsThreeValidatorTypeDefault = `remote`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsThreeTimeoutDefault = 30; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsThreeTimeoutExclusiveMin = 0; - -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsThreeMaxRetriesDefault = 3; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsThreeMaxRetriesMin = 0; - -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsThreeRetryBackoffDefault = 2; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsThreeRetryBackoffExclusiveMin = 1; - -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsThreeMaxParallelRequestsDefault = 4; - -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemNineBatchSizeDefault = 10; - -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemOnezeroDropDefault = false; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemOnezeroAllowResizeDefault = false; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemOnezeroColumnTypeDefault = `embedding`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemOnezeroPropagateSkipDefault = true; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemOneoneDropDefault = false; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemOneoneAllowResizeDefault = false; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemOneoneColumnTypeDefault = `image`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemOneonePropagateSkipDefault = true; -export const dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemOneoneMultiModalContextItemModalityDefault = `image`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersOneGenerationTypeDefault = `chat-completion`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersOneMaxParallelRequestsDefault = 4; - -export const dataDesignerCancelJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersOneTemperatureTwoDistributionTypeDefault = `uniform`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersOneTemperatureThreeDistributionTypeDefault = `manual`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersOneTopPTwoDistributionTypeDefault = `uniform`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersOneTopPThreeDistributionTypeDefault = `manual`; - -export const dataDesignerCancelJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersTwoGenerationTypeDefault = `embedding`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersTwoMaxParallelRequestsDefault = 4; - -export const dataDesignerCancelJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersTwoEncodingFormatDefault = `float`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersThreeGenerationTypeDefault = `image`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersThreeMaxParallelRequestsDefault = 4; - -export const dataDesignerCancelJobResponseSpecJobConfigConfigModelConfigsItemSkipHealthCheckDefault = false; -export const dataDesignerCancelJobResponseSpecJobConfigConfigToolConfigsItemMaxToolCallTurnsDefault = 5; - -export const dataDesignerCancelJobResponseSpecJobConfigConfigToolConfigsItemTimeoutSecExclusiveMin = 0; - -export const dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSourceOneSeedTypeDefault = `local`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSourceTwoSeedTypeDefault = `hf`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSourceTwoEndpointDefault = `https://huggingface.co`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSourceThreeSeedTypeDefault = `df`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSourceFourSeedTypeDefault = `directory`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSourceFourFilePatternDefault = `*`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSourceFourRecursiveDefault = true; -export const dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSourceFiveSeedTypeDefault = `file_contents`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSourceFiveFilePatternDefault = `*`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSourceFiveRecursiveDefault = true; -export const dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSourceFiveEncodingDefault = `utf-8`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSourceSixSeedTypeDefault = `agent_rollout`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSourceSixRecursiveDefault = true; -export const dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSourceSevenSeedTypeDefault = `nmp`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSamplingStrategyDefault = `ordered`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSelectionStrategyOneStartMin = 0; - -export const dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSelectionStrategyOneEndMin = 0; - -export const dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSelectionStrategyTwoIndexDefault = 0; -export const dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSelectionStrategyTwoIndexMin = 0; - -export const dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSelectionStrategyTwoNumPartitionsDefault = 1; - -export const dataDesignerCancelJobResponseSpecJobConfigConfigConstraintsItemOneConstraintTypeDefault = `scalar_inequality`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigConstraintsItemTwoConstraintTypeDefault = `column_inequality`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigProfilersItemSummaryScoreSampleSizeDefault = 20; - -export const dataDesignerCancelJobResponseSpecJobConfigConfigProcessorsItemOneProcessorTypeDefault = `drop_columns`; -export const dataDesignerCancelJobResponseSpecJobConfigConfigProcessorsItemTwoProcessorTypeDefault = `schema_transform`; -export const dataDesignerCancelJobResponseSpecModelProvidersItemProviderTypeDefault = `openai`; -export const dataDesignerCancelJobResponseSpecModelConfigsItemInferenceParametersOneGenerationTypeDefault = `chat-completion`; -export const dataDesignerCancelJobResponseSpecModelConfigsItemInferenceParametersOneMaxParallelRequestsDefault = 4; - -export const dataDesignerCancelJobResponseSpecModelConfigsItemInferenceParametersOneTemperatureTwoDistributionTypeDefault = `uniform`; -export const dataDesignerCancelJobResponseSpecModelConfigsItemInferenceParametersOneTemperatureThreeDistributionTypeDefault = `manual`; -export const dataDesignerCancelJobResponseSpecModelConfigsItemInferenceParametersOneTopPTwoDistributionTypeDefault = `uniform`; -export const dataDesignerCancelJobResponseSpecModelConfigsItemInferenceParametersOneTopPThreeDistributionTypeDefault = `manual`; - -export const dataDesignerCancelJobResponseSpecModelConfigsItemInferenceParametersTwoGenerationTypeDefault = `embedding`; -export const dataDesignerCancelJobResponseSpecModelConfigsItemInferenceParametersTwoMaxParallelRequestsDefault = 4; - -export const dataDesignerCancelJobResponseSpecModelConfigsItemInferenceParametersTwoEncodingFormatDefault = `float`; -export const dataDesignerCancelJobResponseSpecModelConfigsItemInferenceParametersThreeGenerationTypeDefault = `image`; -export const dataDesignerCancelJobResponseSpecModelConfigsItemInferenceParametersThreeMaxParallelRequestsDefault = 4; - -export const dataDesignerCancelJobResponseSpecModelConfigsItemSkipHealthCheckDefault = false; - -export const DataDesignerCancelJobResponse = zod.object({ - id: zod.string().optional(), - name: zod.string(), - description: zod.string().optional(), - project: zod.string().optional(), - workspace: zod.string().optional(), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - spec: zod.object({ - job_config: zod.object({ - num_records: zod.number(), - config: zod - .object({ - columns: zod - .array( - zod.union([ - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemOneDropDefault - ), - allow_resize: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemOneAllowResizeDefault - ), - column_type: zod - .literal('custom') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemOneColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemOnePropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - generator_function: zod - .unknown() - .describe('Function decorated with @custom_column_generator'), - generation_strategy: zod - .enum(['cell_by_cell', 'full_column']) - .describe('Strategy for custom column generation.') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemOneGenerationStrategyDefault - ) - .describe( - "Generation strategy: 'cell_by_cell' for row-based or 'full_column' for batch-based" - ), - generator_params: zod - .object({}) - .passthrough() - .optional() - .describe( - 'Optional typed configuration object passed as second argument to generator function' - ), - }) - .describe( - 'Configuration for custom user-defined column generators.\n\nCustom columns allow users to provide their own generation logic via a callable function\ndecorated with `@custom_column_generator`. Two strategies are supported: cell_by_cell\n(default, row-based) and full_column (batch-based with DataFrame access).\n\nAttributes:\n generator_function (required): A callable decorated with @custom_column_generator.\n generation_strategy: \"cell_by_cell\" (row-based) or \"full_column\" (batch-based).\n generator_params: Optional typed configuration object (Pydantic BaseModel) passed\n as the second argument to the generator function.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemTwoDropDefault - ), - allow_resize: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemTwoAllowResizeDefault - ), - column_type: zod - .literal('expression') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemTwoColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemTwoPropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - expr: zod - .string() - .describe('Jinja2 expression to compute the column value from other columns'), - dtype: zod - .enum(['int', 'float', 'str', 'bool']) - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemTwoDtypeDefault - ) - .describe( - "Data type for expression result: 'int', 'float', 'str', or 'bool'" - ), - }) - .describe( - 'Configuration for derived columns using Jinja2 expressions.\n\nExpression columns compute values by evaluating Jinja2 templates that reference other\ncolumns. Useful for transformations, concatenations, conditional logic, and derived\nfeatures without requiring LLM generation. The expression is evaluated row-by-row.\n\nAttributes:\n expr (required): Jinja2 expression to evaluate. Can reference other column values using\n {{ column_name }} syntax. Supports filters, conditionals, and arithmetic.\n Must be a valid, non-empty Jinja2 template.\n dtype: Data type to cast the result to. Must be one of \"int\", \"float\", \"str\", or \"bool\".\n Defaults to \"str\". Type conversion is applied after expression evaluation.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemThreeDropDefault - ), - allow_resize: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemThreeAllowResizeDefault - ), - column_type: zod - .literal('llm-code') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemThreeColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemThreePropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - prompt: zod - .string() - .describe( - 'Jinja2 template for the LLM prompt; can reference other columns via {{ column_name }}' - ), - model_alias: zod - .string() - .describe('Alias of the model configuration to use for generation'), - system_prompt: zod - .string() - .optional() - .describe('Optional system prompt to set model behavior and constraints'), - multi_modal_context: zod - .array( - zod - .object({ - modality: zod - .enum(['image']) - .describe('Supported modality types for multimodal model data.') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemThreeMultiModalContextItemModalityDefault - ), - column_name: zod.string(), - data_type: zod - .enum(['url', 'base64']) - .optional() - .describe('Data type formats for multimodal data.'), - image_format: zod - .enum(['png', 'jpg', 'jpeg', 'gif', 'webp']) - .optional() - .describe('Supported image formats for image modality.'), - }) - .describe( - 'Configuration for providing image context to multimodal models.\n\nAttributes:\n modality: The modality type (always \"image\").\n column_name: Name of the column containing image data.\n data_type: Format of the image data (\"url\", \"base64\", or None for auto-detection).\n When None, the format is auto-detected: URLs are passed through, file paths that\n exist under base_path are loaded as base64, and other values are assumed to be base64.\n image_format: Image format (required when data_type is explicitly \"base64\").' - ) - ) - .optional() - .describe('Optional list of ImageContext for vision model inputs'), - tool_alias: zod - .string() - .optional() - .describe( - 'Optional alias of the tool configuration to use for MCP tool calls' - ), - with_trace: zod - .enum(['none', 'last_message', 'all_messages']) - .describe( - 'Specifies the type of reasoning trace to capture for LLM columns.\n\nTraces capture the conversation history during LLM generation, which is\nuseful for debugging, analysis, and understanding model behavior.\n\nAttributes:\n NONE: No trace is captured. This is the default.\n LAST_MESSAGE: Only the final assistant message is captured.\n ALL_MESSAGES: The full conversation history (system\/user\/assistant\/tool)\n is captured.' - ) - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemThreeWithTraceDefault - ) - .describe('Trace capture mode: NONE, LAST_MESSAGE, or ALL_MESSAGES'), - extract_reasoning_content: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemThreeExtractReasoningContentDefault - ) - .describe( - 'If True, capture chain-of-thought in {name}__reasoning_content column' - ), - code_lang: zod - .enum([ - 'bash', - 'c', - 'cobol', - 'cpp', - 'csharp', - 'go', - 'java', - 'javascript', - 'kotlin', - 'python', - 'ruby', - 'rust', - 'scala', - 'swift', - 'typescript', - 'sql:sqlite', - 'sql:tsql', - 'sql:bigquery', - 'sql:mysql', - 'sql:postgres', - 'sql:ansi', - ]) - .describe( - 'Target programming language or SQL dialect for code extraction from LLM response' - ), - }) - .describe( - 'Configuration for code generation columns using Large Language Models.\n\nExtends LLMTextColumnConfig to generate code snippets in specific programming languages\nor SQL dialects. The generated code is automatically extracted from markdown code blocks\nfor the specified language. Inherits all prompt templating capabilities from LLMTextColumnConfig.\n\nAttributes:\n code_lang (required): Programming language or SQL dialect for code generation. Supported\n values include: \"python\", \"javascript\", \"typescript\", \"java\", \"kotlin\", \"go\",\n \"rust\", \"ruby\", \"scala\", \"swift\", \"sql:sqlite\", \"sql:postgres\", \"sql:mysql\",\n \"sql:tsql\", \"sql:bigquery\", \"sql:ansi\". See CodeLang enum for complete list.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n prompt (required): Prompt template for code generation (supports Jinja2).\n model_alias (required): Alias of the model configuration to use.\n system_prompt: Optional system prompt (supports Jinja2).\n multi_modal_context: Optional image contexts for multi-modal generation.\n tool_alias: Optional tool configuration alias for MCP tool calls.\n with_trace: Specifies what trace information to capture in a `{column_name}__trace`\n column. Options are `TraceType.NONE` (default), `TraceType.LAST_MESSAGE`, or\n `TraceType.ALL_MESSAGES`.\n extract_reasoning_content: If True, creates a `{column_name}__reasoning_content`\n column containing the reasoning content from the final assistant response.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemFourDropDefault - ), - allow_resize: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemFourAllowResizeDefault - ), - column_type: zod - .literal('llm-judge') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemFourColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemFourPropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - prompt: zod - .string() - .describe( - 'Jinja2 template for the LLM prompt; can reference other columns via {{ column_name }}' - ), - model_alias: zod - .string() - .describe('Alias of the model configuration to use for generation'), - system_prompt: zod - .string() - .optional() - .describe('Optional system prompt to set model behavior and constraints'), - multi_modal_context: zod - .array( - zod - .object({ - modality: zod - .enum(['image']) - .describe('Supported modality types for multimodal model data.') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemFourMultiModalContextItemModalityDefault - ), - column_name: zod.string(), - data_type: zod - .enum(['url', 'base64']) - .optional() - .describe('Data type formats for multimodal data.'), - image_format: zod - .enum(['png', 'jpg', 'jpeg', 'gif', 'webp']) - .optional() - .describe('Supported image formats for image modality.'), - }) - .describe( - 'Configuration for providing image context to multimodal models.\n\nAttributes:\n modality: The modality type (always \"image\").\n column_name: Name of the column containing image data.\n data_type: Format of the image data (\"url\", \"base64\", or None for auto-detection).\n When None, the format is auto-detected: URLs are passed through, file paths that\n exist under base_path are loaded as base64, and other values are assumed to be base64.\n image_format: Image format (required when data_type is explicitly \"base64\").' - ) - ) - .optional() - .describe('Optional list of ImageContext for vision model inputs'), - tool_alias: zod - .string() - .optional() - .describe( - 'Optional alias of the tool configuration to use for MCP tool calls' - ), - with_trace: zod - .enum(['none', 'last_message', 'all_messages']) - .describe( - 'Specifies the type of reasoning trace to capture for LLM columns.\n\nTraces capture the conversation history during LLM generation, which is\nuseful for debugging, analysis, and understanding model behavior.\n\nAttributes:\n NONE: No trace is captured. This is the default.\n LAST_MESSAGE: Only the final assistant message is captured.\n ALL_MESSAGES: The full conversation history (system\/user\/assistant\/tool)\n is captured.' - ) - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemFourWithTraceDefault - ) - .describe('Trace capture mode: NONE, LAST_MESSAGE, or ALL_MESSAGES'), - extract_reasoning_content: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemFourExtractReasoningContentDefault - ) - .describe( - 'If True, capture chain-of-thought in {name}__reasoning_content column' - ), - scores: zod - .array( - zod - .object({ - name: zod.string().describe('A clear name for this score.'), - description: zod - .string() - .describe( - 'An informative and detailed assessment guide for using this score.' - ), - options: zod - .record(zod.string(), zod.string()) - .describe('Score options in the format of {score: description}.'), - }) - .describe( - 'Configuration for a \"score\" in an LLM judge evaluation.\n\nDefines a single scoring criterion with its possible values and descriptions. Multiple\nScore objects can be combined in an LLMJudgeColumnConfig to create multi-dimensional\nquality assessments.\n\nAttributes:\n name (required): A clear, concise name for this scoring dimension (e.g., \"Relevance\", \"Fluency\").\n description (required): An informative and detailed assessment guide explaining how to evaluate\n this dimension. Should provide clear criteria for scoring.\n options (required): Dictionary mapping score values to their descriptions. Keys can be integers\n (e.g., 1-5 scale) or strings (e.g., \"Poor\", \"Good\", \"Excellent\"). Values are\n descriptions explaining what each score level means.' - ) - ) - .min(1) - .describe( - 'List of Score objects defining rubric criteria for LLM judge evaluation' - ), - }) - .describe( - 'Configuration for LLM-as-a-judge quality assessment and scoring columns.\n\nExtends LLMTextColumnConfig to create judge columns that evaluate and score other\ngenerated content based on the defined criteria. Useful for quality assessment, preference\nranking, and multi-dimensional evaluation of generated data. Inherits prompt templating\ncapabilities from LLMTextColumnConfig.\n\nAttributes:\n scores (required): List of Score objects defining the evaluation dimensions. Each score\n represents a different aspect to evaluate (e.g., accuracy, relevance, fluency).\n Must contain at least one score.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n prompt (required): Prompt template for the judge evaluation (supports Jinja2).\n model_alias (required): Alias of the model configuration to use.\n system_prompt: Optional system prompt (supports Jinja2).\n multi_modal_context: Optional image contexts for multi-modal generation.\n tool_alias: Optional tool configuration alias for MCP tool calls.\n with_trace: Specifies what trace information to capture in a `{column_name}__trace`\n column. Options are `TraceType.NONE` (default), `TraceType.LAST_MESSAGE`, or\n `TraceType.ALL_MESSAGES`.\n extract_reasoning_content: If True, creates a `{column_name}__reasoning_content`\n column containing the reasoning content from the final assistant response.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemFiveDropDefault - ), - allow_resize: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemFiveAllowResizeDefault - ), - column_type: zod - .literal('llm-structured') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemFiveColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemFivePropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - prompt: zod - .string() - .describe( - 'Jinja2 template for the LLM prompt; can reference other columns via {{ column_name }}' - ), - model_alias: zod - .string() - .describe('Alias of the model configuration to use for generation'), - system_prompt: zod - .string() - .optional() - .describe('Optional system prompt to set model behavior and constraints'), - multi_modal_context: zod - .array( - zod - .object({ - modality: zod - .enum(['image']) - .describe('Supported modality types for multimodal model data.') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemFiveMultiModalContextItemModalityDefault - ), - column_name: zod.string(), - data_type: zod - .enum(['url', 'base64']) - .optional() - .describe('Data type formats for multimodal data.'), - image_format: zod - .enum(['png', 'jpg', 'jpeg', 'gif', 'webp']) - .optional() - .describe('Supported image formats for image modality.'), - }) - .describe( - 'Configuration for providing image context to multimodal models.\n\nAttributes:\n modality: The modality type (always \"image\").\n column_name: Name of the column containing image data.\n data_type: Format of the image data (\"url\", \"base64\", or None for auto-detection).\n When None, the format is auto-detected: URLs are passed through, file paths that\n exist under base_path are loaded as base64, and other values are assumed to be base64.\n image_format: Image format (required when data_type is explicitly \"base64\").' - ) - ) - .optional() - .describe('Optional list of ImageContext for vision model inputs'), - tool_alias: zod - .string() - .optional() - .describe( - 'Optional alias of the tool configuration to use for MCP tool calls' - ), - with_trace: zod - .enum(['none', 'last_message', 'all_messages']) - .describe( - 'Specifies the type of reasoning trace to capture for LLM columns.\n\nTraces capture the conversation history during LLM generation, which is\nuseful for debugging, analysis, and understanding model behavior.\n\nAttributes:\n NONE: No trace is captured. This is the default.\n LAST_MESSAGE: Only the final assistant message is captured.\n ALL_MESSAGES: The full conversation history (system\/user\/assistant\/tool)\n is captured.' - ) - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemFiveWithTraceDefault - ) - .describe('Trace capture mode: NONE, LAST_MESSAGE, or ALL_MESSAGES'), - extract_reasoning_content: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemFiveExtractReasoningContentDefault - ) - .describe( - 'If True, capture chain-of-thought in {name}__reasoning_content column' - ), - output_format: zod - .union([zod.record(zod.string(), zod.unknown()), zod.unknown()]) - .describe( - 'Pydantic model or JSON schema dict defining the expected structured output shape' - ), - }) - .describe( - 'Configuration for structured JSON generation columns using Large Language Models.\n\nExtends LLMTextColumnConfig to generate structured data conforming to a specified schema.\nUses JSON schema or Pydantic models to define the expected output structure, enabling\ntype-safe and validated structured output generation. Inherits prompt templating capabilities\nfrom LLMTextColumnConfig.\n\nAttributes:\n output_format (required): The schema defining the expected output structure. Can be either:\n - A Pydantic BaseModel class (recommended)\n - A JSON schema dictionary\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n prompt (required): Prompt template for structured generation (supports Jinja2).\n model_alias (required): Alias of the model configuration to use.\n system_prompt: Optional system prompt (supports Jinja2).\n multi_modal_context: Optional image contexts for multi-modal generation.\n tool_alias: Optional tool configuration alias for MCP tool calls.\n with_trace: Specifies what trace information to capture in a `{column_name}__trace`\n column. Options are `TraceType.NONE` (default), `TraceType.LAST_MESSAGE`, or\n `TraceType.ALL_MESSAGES`.\n extract_reasoning_content: If True, creates a `{column_name}__reasoning_content`\n column containing the reasoning content from the final assistant response.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSixDropDefault - ), - allow_resize: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSixAllowResizeDefault - ), - column_type: zod - .literal('llm-text') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSixColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSixPropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - prompt: zod - .string() - .describe( - 'Jinja2 template for the LLM prompt; can reference other columns via {{ column_name }}' - ), - model_alias: zod - .string() - .describe('Alias of the model configuration to use for generation'), - system_prompt: zod - .string() - .optional() - .describe('Optional system prompt to set model behavior and constraints'), - multi_modal_context: zod - .array( - zod - .object({ - modality: zod - .enum(['image']) - .describe('Supported modality types for multimodal model data.') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSixMultiModalContextItemModalityDefault - ), - column_name: zod.string(), - data_type: zod - .enum(['url', 'base64']) - .optional() - .describe('Data type formats for multimodal data.'), - image_format: zod - .enum(['png', 'jpg', 'jpeg', 'gif', 'webp']) - .optional() - .describe('Supported image formats for image modality.'), - }) - .describe( - 'Configuration for providing image context to multimodal models.\n\nAttributes:\n modality: The modality type (always \"image\").\n column_name: Name of the column containing image data.\n data_type: Format of the image data (\"url\", \"base64\", or None for auto-detection).\n When None, the format is auto-detected: URLs are passed through, file paths that\n exist under base_path are loaded as base64, and other values are assumed to be base64.\n image_format: Image format (required when data_type is explicitly \"base64\").' - ) - ) - .optional() - .describe('Optional list of ImageContext for vision model inputs'), - tool_alias: zod - .string() - .optional() - .describe( - 'Optional alias of the tool configuration to use for MCP tool calls' - ), - with_trace: zod - .enum(['none', 'last_message', 'all_messages']) - .describe( - 'Specifies the type of reasoning trace to capture for LLM columns.\n\nTraces capture the conversation history during LLM generation, which is\nuseful for debugging, analysis, and understanding model behavior.\n\nAttributes:\n NONE: No trace is captured. This is the default.\n LAST_MESSAGE: Only the final assistant message is captured.\n ALL_MESSAGES: The full conversation history (system\/user\/assistant\/tool)\n is captured.' - ) - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSixWithTraceDefault - ) - .describe('Trace capture mode: NONE, LAST_MESSAGE, or ALL_MESSAGES'), - extract_reasoning_content: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSixExtractReasoningContentDefault - ) - .describe( - 'If True, capture chain-of-thought in {name}__reasoning_content column' - ), - }) - .describe( - 'Configuration for text generation columns using Large Language Models.\n\nLLM text columns generate free-form text content using language models.\nPrompts support Jinja2 templating to reference values from other columns, enabling\ncontext-aware generation. The generated text can optionally include message traces\ncapturing the full conversation history.\n\nAttributes:\n prompt (required): Prompt template for text generation. Supports Jinja2 syntax to\n reference other columns (e.g., \"Write a story about {{ character_name }}\").\n Must be a valid Jinja2 template.\n model_alias (required): Alias of the model configuration to use for generation.\n Must match a model alias defined when initializing the DataDesignerConfigBuilder.\n system_prompt: Optional system prompt to set model behavior and constraints.\n Also supports Jinja2 templating. If provided, must be a valid Jinja2 template.\n Do not put any output parsing instructions in the system prompt. Instead,\n use the appropriate column type for the output you want to generate - e.g.,\n `LLMStructuredColumnConfig` for structured output, `LLMCodeColumnConfig` for code.\n multi_modal_context: Optional list of image contexts for multi-modal generation.\n Enables vision-capable models to generate text based on image inputs.\n tool_alias: Optional alias of the tool configuration to use for MCP tool calls.\n Must match a tool alias defined when initializing the DataDesignerConfigBuilder.\n When provided, the model may call permitted tools during generation.\n with_trace: Specifies what trace information to capture in a `{column_name}__trace`\n column. Options are:\n - `TraceType.NONE` (default): No trace is captured.\n - `TraceType.LAST_MESSAGE`: Only the final assistant message is captured.\n - `TraceType.ALL_MESSAGES`: Full conversation history (system\/user\/assistant\/tool).\n extract_reasoning_content: If True, creates a `{column_name}__reasoning_content` column\n containing only the reasoning_content from the final assistant response. This is\n useful for models that expose chain-of-thought reasoning separately from the main\n response. Defaults to False.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenDropDefault - ), - allow_resize: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenAllowResizeDefault - ), - column_type: zod - .literal('sampler') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenPropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - sampler_type: zod - .enum([ - 'bernoulli', - 'bernoulli_mixture', - 'binomial', - 'category', - 'datetime', - 'gaussian', - 'person', - 'person_from_faker', - 'poisson', - 'scipy', - 'subcategory', - 'timedelta', - 'uniform', - 'uuid', - ]) - .describe( - 'Type of sampler to use (e.g., uuid, category, uniform, gaussian, person, datetime)' - ), - params: zod - .union([ - zod - .object({ - category: zod - .string() - .describe('Name of parent category to this subcategory.'), - values: zod - .record( - zod.string(), - zod.array(zod.union([zod.string(), zod.number(), zod.number()])) - ) - .describe( - 'Mapping from each value of parent category to a list of subcategory values.' - ), - sampler_type: zod - .literal('subcategory') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsOneSamplerTypeDefault - ), - }) - .describe( - 'Parameters for subcategory sampling conditioned on a parent category column.\n\nSamples subcategory values based on the value of a parent category column. Each parent\ncategory value maps to its own list of possible subcategory values, enabling hierarchical\nor conditional sampling patterns.\n\nAttributes:\n category (required): Name of the parent category column that this subcategory depends on.\n The parent column must be generated before this subcategory column.\n values (required): Mapping from each parent category value to a list of possible subcategory values.\n Each key must correspond to a value that appears in the parent category column.' - ), - zod - .object({ - values: zod - .array(zod.union([zod.string(), zod.number(), zod.number()])) - .min(1) - .describe( - 'List of possible categorical values that can be sampled from.' - ), - weights: zod - .array(zod.number()) - .optional() - .describe( - 'List of unnormalized probability weights to assigned to each value, in order. Larger values will be sampled with higher probability.' - ), - sampler_type: zod - .literal('category') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsTwoSamplerTypeDefault - ), - }) - .describe( - 'Parameters for categorical sampling with optional probability weighting.\n\nSamples values from a discrete set of categories. When weights are provided, values are\nsampled according to their assigned probabilities. Without weights, uniform sampling is used.\n\nAttributes:\n values (required): List of possible categorical values to sample from. Can contain strings, integers,\n or floats. Must contain at least one value.\n weights: Optional unnormalized probability weights for each value. If provided, must be\n the same length as `values`. Weights are automatically normalized to sum to 1.0.\n Larger weights result in higher sampling probability for the corresponding value.' - ), - zod - .object({ - start: zod - .string() - .describe( - 'Earliest possible datetime for sampling range, inclusive.' - ), - end: zod - .string() - .describe('Exclusive upper bound for datetime sampling range.'), - unit: zod - .enum(['Y', 'M', 'D', 'h', 'm', 's']) - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsThreeUnitDefault - ) - .describe( - 'Sampling units, e.g. the smallest possible time interval between samples.' - ), - sampler_type: zod - .literal('datetime') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsThreeSamplerTypeDefault - ), - }) - .describe( - 'Parameters for uniform datetime sampling within a specified range.\n\nSamples datetime values uniformly between a start and end date with a specified granularity.\nThe sampling unit determines the smallest possible time interval between consecutive samples.\n\nAttributes:\n start (required): Earliest possible datetime for the sampling range (inclusive). Must be a valid\n datetime string parseable by pandas.to_datetime().\n end (required): Exclusive upper bound for the sampling range. Must be a valid\n datetime string parseable by pandas.to_datetime().\n unit: Time unit for sampling granularity. Options:\n - \"Y\": Years\n - \"M\": Months\n - \"D\": Days (default)\n - \"h\": Hours\n - \"m\": Minutes\n - \"s\": Seconds' - ), - zod - .object({ - locale: zod - .string() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsFourLocaleDefault - ) - .describe( - 'Locale that determines the language and geographic location that a synthetic person will be sampled from. Must be a locale supported by a managed Nemotron Personas dataset. Managed datasets exist for the following locales: en_US, en_IN, en_SG, fr_FR, hi_Deva_IN, hi_Latn_IN, ja_JP, ko_KR, pt_BR.' - ), - sex: zod - .enum(['Male', 'Female']) - .optional() - .describe( - 'If specified, then only synthetic people of the specified sex will be sampled.' - ), - city: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe( - 'If specified, then only synthetic people from these cities will be sampled.' - ), - age_range: zod - .array(zod.number()) - .min( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsFourAgeRangeMin - ) - .max( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsFourAgeRangeMax - ) - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsFourAgeRangeDefault - ) - .describe( - 'If specified, then only synthetic people within this age range will be sampled.' - ), - select_field_values: zod - .record(zod.string(), zod.array(zod.string())) - .optional() - .describe( - 'Sample synthetic people with the specified field values. This is meant to be a flexible argument for selecting a subset of the population from the managed dataset. Note that this sampler does not support rare combinations of field values and will likely fail if your desired subset is not well-represented in the managed Nemotron Personas dataset. We generally recommend using the `sex`, `city`, and `age_range` arguments to filter the population when possible.' - ), - with_synthetic_personas: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsFourWithSyntheticPersonasDefault - ) - .describe( - 'If True, then append synthetic persona columns to each generated person.' - ), - sampler_type: zod - .literal('person') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsFourSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling synthetic person data with demographic attributes.\n\nGenerates realistic synthetic person data including names, addresses, phone numbers, and other\ndemographic information from managed datasets. The sampler supports filtering by locale, sex, age,\ngeographic location, and selected managed-dataset fields, and can optionally include synthetic\npersona descriptions. For Faker-generated person data, use PersonFromFakerSamplerParams.\n\nAttributes:\n locale: Locale string determining the language and geographic region for synthetic people.\n Must be a locale supported by a managed Nemotron Personas dataset. The dataset must\n be downloaded and available in the managed assets directory.\n sex: If specified, filters to only sample people of the specified sex. Options: \"Male\" or\n \"Female\". If None, samples both sexes.\n city: If specified, filters to only sample people from the specified city or cities. Can be\n a single city name (string) or a list of city names.\n age_range: Two-element list [min_age, max_age] specifying the age range to sample from\n (inclusive). Defaults to a standard age range. Both values must be between minimum and\n maximum allowed ages.\n with_synthetic_personas: If True, appends additional synthetic persona columns including\n personality traits, interests, and background descriptions. Only supported for certain\n locales with managed datasets.\n select_field_values: Optional field-value filters for managed datasets. Supported field\n names are checked against the managed person data fields.' - ), - zod - .object({ - locale: zod - .string() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsFiveLocaleDefault - ) - .describe( - 'Locale string, determines the language and geographic locale that a synthetic person will be sampled from. E.g, en_US, en_GB, fr_FR, ...' - ), - sex: zod - .enum(['Male', 'Female']) - .optional() - .describe( - 'If specified, then only synthetic people of the specified sex will be sampled.' - ), - city: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe( - 'If specified, then only synthetic people from these cities will be sampled.' - ), - age_range: zod - .array(zod.number()) - .min( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsFiveAgeRangeMin - ) - .max( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsFiveAgeRangeMax - ) - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsFiveAgeRangeDefault - ) - .describe( - 'If specified, then only synthetic people within this age range will be sampled.' - ), - sampler_type: zod - .literal('person_from_faker') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsFiveSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling synthetic person data with demographic attributes from Faker.\n\nUses the Faker library to generate random personal information. The data is basic and not demographically\naccurate, but is useful for quick testing, prototyping, or when realistic demographic distributions are not\nrelevant for your use case. For demographically accurate person data, use the `PersonSamplerParams` sampler.\n\nAttributes:\n locale: Locale string determining the language and geographic region for synthetic people.\n Can be any locale supported by Faker.\n sex: If specified, filters to only sample people of the specified sex. Options: \"Male\" or\n \"Female\". If None, samples both sexes.\n city: If specified, filters to only sample people from the specified city or cities. Can be\n a single city name (string) or a list of city names.\n age_range: Two-element list [min_age, max_age] specifying the age range to sample from\n (inclusive). Defaults to a standard age range. Both values must be between the minimum and\n maximum allowed ages.\n sampler_type: Discriminator for the sampler type. Must be `SamplerType.PERSON_FROM_FAKER`.' - ), - zod - .object({ - dt_min: zod - .number() - .min( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsSixDtMinMin - ) - .describe( - 'Minimum possible time-delta for sampling range, inclusive. Must be less than `dt_max`.' - ), - dt_max: zod - .number() - .gt( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsSixDtMaxExclusiveMin - ) - .describe( - 'Maximum possible time-delta for sampling range, exclusive. Must be greater than `dt_min`.' - ), - reference_column_name: zod - .string() - .describe( - 'Name of an existing datetime column to condition time-delta sampling on.' - ), - unit: zod - .enum(['D', 'h', 'm', 's']) - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsSixUnitDefault - ) - .describe( - 'Sampling units, e.g. the smallest possible time interval between samples.' - ), - sampler_type: zod - .literal('timedelta') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsSixSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling time deltas relative to a reference datetime column.\n\nSamples time offsets within a specified range and adds them to values from a reference\ndatetime column. This is useful for generating related datetime columns like order dates\nand delivery dates, or event start times and end times.\n\nNote:\n Years and months are not supported as timedelta units because they have variable lengths.\n See: [pandas timedelta documentation](https:\/\/pandas.pydata.org\/docs\/user_guide\/timedeltas.html)\n\nAttributes:\n dt_min (required): Minimum time-delta value (inclusive). Must be non-negative and less than `dt_max`.\n Specified in units defined by the `unit` parameter.\n dt_max (required): Maximum time-delta value (exclusive). Must be positive and greater than `dt_min`.\n Specified in units defined by the `unit` parameter.\n reference_column_name (required): Name of an existing datetime column to add the time-delta to.\n This column must be generated before the timedelta column.\n unit: Time unit for the delta values. Options:\n - \"D\": Days (default)\n - \"h\": Hours\n - \"m\": Minutes\n - \"s\": Seconds' - ), - zod - .object({ - prefix: zod - .string() - .optional() - .describe('String prepended to the front of the UUID.'), - short_form: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsSevenShortFormDefault - ) - .describe( - 'If true, all UUIDs sampled will be truncated at 8 characters.' - ), - uppercase: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsSevenUppercaseDefault - ) - .describe('If true, all letters in the UUID will be capitalized.'), - sampler_type: zod - .literal('uuid') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsSevenSamplerTypeDefault - ), - }) - .describe( - 'Parameters for generating UUID (Universally Unique Identifier) values.\n\nGenerates UUID4 (random) identifiers with optional formatting options. UUIDs are useful\nfor creating unique identifiers for records, entities, or transactions.\n\nAttributes:\n prefix: Optional string to prepend to each UUID. Useful for creating namespaced or\n typed identifiers (e.g., \"user-\", \"order-\", \"txn-\").\n short_form: If True, truncates UUIDs to 8 characters (first segment only). Default is False\n for full 32-character UUIDs (excluding hyphens).\n uppercase: If True, converts all hexadecimal letters to uppercase. Default is False for\n lowercase UUIDs.' - ), - zod - .object({ - p: zod - .number() - .min( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsEightPMin - ) - .max( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsEightPMax - ) - .describe('Probability of success.'), - sampler_type: zod - .literal('bernoulli') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsEightSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Bernoulli distribution.\n\nSamples binary values (0 or 1) representing the outcome of a single trial with a fixed\nprobability of success. This is the simplest discrete probability distribution, useful for\nmodeling binary outcomes like success\/failure, yes\/no, or true\/false.\n\nAttributes:\n p (required): Probability of success (sampling 1). Must be between 0.0 and 1.0 (inclusive).\n The probability of failure (sampling 0) is automatically 1 - p.' - ), - zod - .object({ - p: zod - .number() - .min( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsNinePMin - ) - .max( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsNinePMax - ) - .describe('Bernoulli distribution probability of success.'), - dist_name: zod - .string() - .describe( - 'Mixture distribution name. Samples will be equal to the distribution sample with probability `p`, otherwise equal to 0. Must be a valid scipy.stats distribution name.' - ), - dist_params: zod - .record(zod.string(), zod.unknown()) - .describe( - 'Parameters of the scipy.stats distribution given in `dist_name`.' - ), - sampler_type: zod - .literal('bernoulli_mixture') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsNineSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Bernoulli mixture distribution.\n\nCombines a Bernoulli distribution with another continuous distribution, creating a mixture\nwhere values are either 0 (with probability 1-p) or sampled from the specified distribution\n(with probability p). This is useful for modeling scenarios with many zero values mixed with\na continuous distribution of non-zero values.\n\nCommon use cases include modeling sparse events, zero-inflated data, or situations where\nan outcome either doesn\'t occur (0) or follows a specific distribution when it does occur.\n\nAttributes:\n p (required): Probability of sampling from the mixture distribution (non-zero outcome).\n Must be between 0.0 and 1.0 (inclusive). With probability 1-p, the sample is 0.\n dist_name (required): Name of the scipy.stats distribution to sample from when outcome is non-zero.\n Must be a valid scipy.stats distribution name (e.g., \"norm\", \"gamma\", \"expon\").\n dist_params (required): Parameters for the specified scipy.stats distribution.' - ), - zod - .object({ - n: zod.number().describe('Number of trials.'), - p: zod - .number() - .min( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsOnezeroPMin - ) - .max( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsOnezeroPMax - ) - .describe('Probability of success on each trial.'), - sampler_type: zod - .literal('binomial') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsOnezeroSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Binomial distribution.\n\nSamples integer values representing the number of successes in a fixed number of independent\nBernoulli trials, each with the same probability of success. Commonly used to model the number\nof successful outcomes in repeated experiments.\n\nAttributes:\n n (required): Number of independent trials. Must be a positive integer.\n p (required): Probability of success on each trial. Must be between 0.0 and 1.0 (inclusive).' - ), - zod - .object({ - mean: zod.number().describe('Mean of the Gaussian distribution'), - stddev: zod - .number() - .describe('Standard deviation of the Gaussian distribution'), - decimal_places: zod - .number() - .optional() - .describe('Number of decimal places to round the sampled values to.'), - sampler_type: zod - .literal('gaussian') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsOneoneSamplerTypeDefault - ), - }) - .describe( - "Parameters for sampling from a Gaussian (Normal) distribution.\n\nSamples continuous values from a normal distribution characterized by its mean and standard\ndeviation. The Gaussian distribution is one of the most commonly used probability distributions,\nappearing naturally in many real-world phenomena due to the Central Limit Theorem.\n\nAttributes:\n mean (required): Mean (center) of the Gaussian distribution. This is the expected value and the\n location of the distribution's peak.\n stddev (required): Standard deviation of the Gaussian distribution. Controls the spread or width\n of the distribution. Must be positive.\n decimal_places: Optional number of decimal places to round sampled values to. If None,\n values are not rounded." - ), - zod - .object({ - mean: zod - .number() - .describe('Mean number of events in a fixed interval.'), - sampler_type: zod - .literal('poisson') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsOnetwoSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Poisson distribution.\n\nSamples non-negative integer values representing the number of events occurring in a fixed\ninterval of time or space. The Poisson distribution is commonly used to model count data\nlike the number of arrivals, occurrences, or events per time period.\n\nThe distribution is characterized by a single parameter (mean\/rate), and both the mean and\nvariance equal this parameter value.\n\nAttributes:\n mean (required): Mean number of events in the fixed interval (also called rate parameter Ī»).\n Must be positive. This represents both the expected value and the variance of the\n distribution.' - ), - zod - .object({ - low: zod - .number() - .describe('Lower bound of the uniform distribution, inclusive.'), - high: zod.number().describe('Upper bound of the uniform distribution.'), - decimal_places: zod - .number() - .optional() - .describe('Number of decimal places to round the sampled values to.'), - sampler_type: zod - .literal('uniform') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsOnethreeSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a continuous Uniform distribution.\n\nSamples continuous values uniformly from a specified range, where every value in the range\nhas equal probability of being sampled. This is useful when all values within a range are\nequally likely, such as random percentages, proportions, or unbiased measurements.\n\nAttributes:\n low (required): Lower bound of the uniform distribution (inclusive). Can be any real number.\n high (required): Upper bound of the uniform distribution. Must be greater than `low`.\n decimal_places: Optional number of decimal places to round sampled values to. If None,\n values are not rounded and may have many decimal places.' - ), - zod - .object({ - dist_name: zod.string().describe('Name of a scipy.stats distribution.'), - dist_params: zod - .record(zod.string(), zod.unknown()) - .describe( - 'Parameters of the scipy.stats distribution given in `dist_name`.' - ), - decimal_places: zod - .number() - .optional() - .describe('Number of decimal places to round the sampled values to.'), - sampler_type: zod - .literal('scipy') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenParamsOnefourSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from any scipy.stats continuous or discrete distribution.\n\nProvides a flexible interface to sample from the wide range of probability distributions\navailable in scipy.stats. This enables advanced statistical sampling beyond the built-in\ndistribution types (Gaussian, Uniform, etc.).\n\nSee: [scipy.stats documentation](https:\/\/docs.scipy.org\/doc\/scipy\/reference\/stats.html)\n\nAttributes:\n dist_name (required): Name of the scipy.stats distribution to sample from (e.g., \"beta\", \"gamma\",\n \"lognorm\", \"expon\"). Must be a valid distribution name from scipy.stats.\n dist_params (required): Dictionary of parameters for the specified distribution. Parameter names\n and values must match the scipy.stats distribution specification (e.g., {\"a\": 2, \"b\": 5}\n for beta distribution, {\"scale\": 1.5} for exponential).\n decimal_places: Optional number of decimal places to round sampled values to. If None,\n values are not rounded.' - ), - ]) - .describe('Parameters specific to the chosen sampler type'), - conditional_params: zod - .record( - zod.string(), - zod.union([ - zod - .object({ - category: zod - .string() - .describe('Name of parent category to this subcategory.'), - values: zod - .record( - zod.string(), - zod.array(zod.union([zod.string(), zod.number(), zod.number()])) - ) - .describe( - 'Mapping from each value of parent category to a list of subcategory values.' - ), - sampler_type: zod - .literal('subcategory') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsOneSamplerTypeDefault - ), - }) - .describe( - 'Parameters for subcategory sampling conditioned on a parent category column.\n\nSamples subcategory values based on the value of a parent category column. Each parent\ncategory value maps to its own list of possible subcategory values, enabling hierarchical\nor conditional sampling patterns.\n\nAttributes:\n category (required): Name of the parent category column that this subcategory depends on.\n The parent column must be generated before this subcategory column.\n values (required): Mapping from each parent category value to a list of possible subcategory values.\n Each key must correspond to a value that appears in the parent category column.' - ), - zod - .object({ - values: zod - .array(zod.union([zod.string(), zod.number(), zod.number()])) - .min(1) - .describe( - 'List of possible categorical values that can be sampled from.' - ), - weights: zod - .array(zod.number()) - .optional() - .describe( - 'List of unnormalized probability weights to assigned to each value, in order. Larger values will be sampled with higher probability.' - ), - sampler_type: zod - .literal('category') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsTwoSamplerTypeDefault - ), - }) - .describe( - 'Parameters for categorical sampling with optional probability weighting.\n\nSamples values from a discrete set of categories. When weights are provided, values are\nsampled according to their assigned probabilities. Without weights, uniform sampling is used.\n\nAttributes:\n values (required): List of possible categorical values to sample from. Can contain strings, integers,\n or floats. Must contain at least one value.\n weights: Optional unnormalized probability weights for each value. If provided, must be\n the same length as `values`. Weights are automatically normalized to sum to 1.0.\n Larger weights result in higher sampling probability for the corresponding value.' - ), - zod - .object({ - start: zod - .string() - .describe( - 'Earliest possible datetime for sampling range, inclusive.' - ), - end: zod - .string() - .describe('Exclusive upper bound for datetime sampling range.'), - unit: zod - .enum(['Y', 'M', 'D', 'h', 'm', 's']) - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsThreeUnitDefault - ) - .describe( - 'Sampling units, e.g. the smallest possible time interval between samples.' - ), - sampler_type: zod - .literal('datetime') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsThreeSamplerTypeDefault - ), - }) - .describe( - 'Parameters for uniform datetime sampling within a specified range.\n\nSamples datetime values uniformly between a start and end date with a specified granularity.\nThe sampling unit determines the smallest possible time interval between consecutive samples.\n\nAttributes:\n start (required): Earliest possible datetime for the sampling range (inclusive). Must be a valid\n datetime string parseable by pandas.to_datetime().\n end (required): Exclusive upper bound for the sampling range. Must be a valid\n datetime string parseable by pandas.to_datetime().\n unit: Time unit for sampling granularity. Options:\n - \"Y\": Years\n - \"M\": Months\n - \"D\": Days (default)\n - \"h\": Hours\n - \"m\": Minutes\n - \"s\": Seconds' - ), - zod - .object({ - locale: zod - .string() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFourLocaleDefault - ) - .describe( - 'Locale that determines the language and geographic location that a synthetic person will be sampled from. Must be a locale supported by a managed Nemotron Personas dataset. Managed datasets exist for the following locales: en_US, en_IN, en_SG, fr_FR, hi_Deva_IN, hi_Latn_IN, ja_JP, ko_KR, pt_BR.' - ), - sex: zod - .enum(['Male', 'Female']) - .optional() - .describe( - 'If specified, then only synthetic people of the specified sex will be sampled.' - ), - city: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe( - 'If specified, then only synthetic people from these cities will be sampled.' - ), - age_range: zod - .array(zod.number()) - .min( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFourAgeRangeMin - ) - .max( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFourAgeRangeMax - ) - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFourAgeRangeDefault - ) - .describe( - 'If specified, then only synthetic people within this age range will be sampled.' - ), - select_field_values: zod - .record(zod.string(), zod.array(zod.string())) - .optional() - .describe( - 'Sample synthetic people with the specified field values. This is meant to be a flexible argument for selecting a subset of the population from the managed dataset. Note that this sampler does not support rare combinations of field values and will likely fail if your desired subset is not well-represented in the managed Nemotron Personas dataset. We generally recommend using the `sex`, `city`, and `age_range` arguments to filter the population when possible.' - ), - with_synthetic_personas: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFourWithSyntheticPersonasDefault - ) - .describe( - 'If True, then append synthetic persona columns to each generated person.' - ), - sampler_type: zod - .literal('person') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFourSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling synthetic person data with demographic attributes.\n\nGenerates realistic synthetic person data including names, addresses, phone numbers, and other\ndemographic information from managed datasets. The sampler supports filtering by locale, sex, age,\ngeographic location, and selected managed-dataset fields, and can optionally include synthetic\npersona descriptions. For Faker-generated person data, use PersonFromFakerSamplerParams.\n\nAttributes:\n locale: Locale string determining the language and geographic region for synthetic people.\n Must be a locale supported by a managed Nemotron Personas dataset. The dataset must\n be downloaded and available in the managed assets directory.\n sex: If specified, filters to only sample people of the specified sex. Options: \"Male\" or\n \"Female\". If None, samples both sexes.\n city: If specified, filters to only sample people from the specified city or cities. Can be\n a single city name (string) or a list of city names.\n age_range: Two-element list [min_age, max_age] specifying the age range to sample from\n (inclusive). Defaults to a standard age range. Both values must be between minimum and\n maximum allowed ages.\n with_synthetic_personas: If True, appends additional synthetic persona columns including\n personality traits, interests, and background descriptions. Only supported for certain\n locales with managed datasets.\n select_field_values: Optional field-value filters for managed datasets. Supported field\n names are checked against the managed person data fields.' - ), - zod - .object({ - locale: zod - .string() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFiveLocaleDefault - ) - .describe( - 'Locale string, determines the language and geographic locale that a synthetic person will be sampled from. E.g, en_US, en_GB, fr_FR, ...' - ), - sex: zod - .enum(['Male', 'Female']) - .optional() - .describe( - 'If specified, then only synthetic people of the specified sex will be sampled.' - ), - city: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe( - 'If specified, then only synthetic people from these cities will be sampled.' - ), - age_range: zod - .array(zod.number()) - .min( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFiveAgeRangeMin - ) - .max( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFiveAgeRangeMax - ) - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFiveAgeRangeDefault - ) - .describe( - 'If specified, then only synthetic people within this age range will be sampled.' - ), - sampler_type: zod - .literal('person_from_faker') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsFiveSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling synthetic person data with demographic attributes from Faker.\n\nUses the Faker library to generate random personal information. The data is basic and not demographically\naccurate, but is useful for quick testing, prototyping, or when realistic demographic distributions are not\nrelevant for your use case. For demographically accurate person data, use the `PersonSamplerParams` sampler.\n\nAttributes:\n locale: Locale string determining the language and geographic region for synthetic people.\n Can be any locale supported by Faker.\n sex: If specified, filters to only sample people of the specified sex. Options: \"Male\" or\n \"Female\". If None, samples both sexes.\n city: If specified, filters to only sample people from the specified city or cities. Can be\n a single city name (string) or a list of city names.\n age_range: Two-element list [min_age, max_age] specifying the age range to sample from\n (inclusive). Defaults to a standard age range. Both values must be between the minimum and\n maximum allowed ages.\n sampler_type: Discriminator for the sampler type. Must be `SamplerType.PERSON_FROM_FAKER`.' - ), - zod - .object({ - dt_min: zod - .number() - .min( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsSixDtMinMin - ) - .describe( - 'Minimum possible time-delta for sampling range, inclusive. Must be less than `dt_max`.' - ), - dt_max: zod - .number() - .gt( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsSixDtMaxExclusiveMin - ) - .describe( - 'Maximum possible time-delta for sampling range, exclusive. Must be greater than `dt_min`.' - ), - reference_column_name: zod - .string() - .describe( - 'Name of an existing datetime column to condition time-delta sampling on.' - ), - unit: zod - .enum(['D', 'h', 'm', 's']) - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsSixUnitDefault - ) - .describe( - 'Sampling units, e.g. the smallest possible time interval between samples.' - ), - sampler_type: zod - .literal('timedelta') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsSixSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling time deltas relative to a reference datetime column.\n\nSamples time offsets within a specified range and adds them to values from a reference\ndatetime column. This is useful for generating related datetime columns like order dates\nand delivery dates, or event start times and end times.\n\nNote:\n Years and months are not supported as timedelta units because they have variable lengths.\n See: [pandas timedelta documentation](https:\/\/pandas.pydata.org\/docs\/user_guide\/timedeltas.html)\n\nAttributes:\n dt_min (required): Minimum time-delta value (inclusive). Must be non-negative and less than `dt_max`.\n Specified in units defined by the `unit` parameter.\n dt_max (required): Maximum time-delta value (exclusive). Must be positive and greater than `dt_min`.\n Specified in units defined by the `unit` parameter.\n reference_column_name (required): Name of an existing datetime column to add the time-delta to.\n This column must be generated before the timedelta column.\n unit: Time unit for the delta values. Options:\n - \"D\": Days (default)\n - \"h\": Hours\n - \"m\": Minutes\n - \"s\": Seconds' - ), - zod - .object({ - prefix: zod - .string() - .optional() - .describe('String prepended to the front of the UUID.'), - short_form: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsSevenShortFormDefault - ) - .describe( - 'If true, all UUIDs sampled will be truncated at 8 characters.' - ), - uppercase: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsSevenUppercaseDefault - ) - .describe('If true, all letters in the UUID will be capitalized.'), - sampler_type: zod - .literal('uuid') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsSevenSamplerTypeDefault - ), - }) - .describe( - 'Parameters for generating UUID (Universally Unique Identifier) values.\n\nGenerates UUID4 (random) identifiers with optional formatting options. UUIDs are useful\nfor creating unique identifiers for records, entities, or transactions.\n\nAttributes:\n prefix: Optional string to prepend to each UUID. Useful for creating namespaced or\n typed identifiers (e.g., \"user-\", \"order-\", \"txn-\").\n short_form: If True, truncates UUIDs to 8 characters (first segment only). Default is False\n for full 32-character UUIDs (excluding hyphens).\n uppercase: If True, converts all hexadecimal letters to uppercase. Default is False for\n lowercase UUIDs.' - ), - zod - .object({ - p: zod - .number() - .min( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsEightPMin - ) - .max( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsEightPMax - ) - .describe('Probability of success.'), - sampler_type: zod - .literal('bernoulli') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsEightSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Bernoulli distribution.\n\nSamples binary values (0 or 1) representing the outcome of a single trial with a fixed\nprobability of success. This is the simplest discrete probability distribution, useful for\nmodeling binary outcomes like success\/failure, yes\/no, or true\/false.\n\nAttributes:\n p (required): Probability of success (sampling 1). Must be between 0.0 and 1.0 (inclusive).\n The probability of failure (sampling 0) is automatically 1 - p.' - ), - zod - .object({ - p: zod - .number() - .min( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsNinePMin - ) - .max( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsNinePMax - ) - .describe('Bernoulli distribution probability of success.'), - dist_name: zod - .string() - .describe( - 'Mixture distribution name. Samples will be equal to the distribution sample with probability `p`, otherwise equal to 0. Must be a valid scipy.stats distribution name.' - ), - dist_params: zod - .record(zod.string(), zod.unknown()) - .describe( - 'Parameters of the scipy.stats distribution given in `dist_name`.' - ), - sampler_type: zod - .literal('bernoulli_mixture') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsNineSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Bernoulli mixture distribution.\n\nCombines a Bernoulli distribution with another continuous distribution, creating a mixture\nwhere values are either 0 (with probability 1-p) or sampled from the specified distribution\n(with probability p). This is useful for modeling scenarios with many zero values mixed with\na continuous distribution of non-zero values.\n\nCommon use cases include modeling sparse events, zero-inflated data, or situations where\nan outcome either doesn\'t occur (0) or follows a specific distribution when it does occur.\n\nAttributes:\n p (required): Probability of sampling from the mixture distribution (non-zero outcome).\n Must be between 0.0 and 1.0 (inclusive). With probability 1-p, the sample is 0.\n dist_name (required): Name of the scipy.stats distribution to sample from when outcome is non-zero.\n Must be a valid scipy.stats distribution name (e.g., \"norm\", \"gamma\", \"expon\").\n dist_params (required): Parameters for the specified scipy.stats distribution.' - ), - zod - .object({ - n: zod.number().describe('Number of trials.'), - p: zod - .number() - .min( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsOnezeroPMin - ) - .max( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsOnezeroPMax - ) - .describe('Probability of success on each trial.'), - sampler_type: zod - .literal('binomial') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsOnezeroSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Binomial distribution.\n\nSamples integer values representing the number of successes in a fixed number of independent\nBernoulli trials, each with the same probability of success. Commonly used to model the number\nof successful outcomes in repeated experiments.\n\nAttributes:\n n (required): Number of independent trials. Must be a positive integer.\n p (required): Probability of success on each trial. Must be between 0.0 and 1.0 (inclusive).' - ), - zod - .object({ - mean: zod.number().describe('Mean of the Gaussian distribution'), - stddev: zod - .number() - .describe('Standard deviation of the Gaussian distribution'), - decimal_places: zod - .number() - .optional() - .describe( - 'Number of decimal places to round the sampled values to.' - ), - sampler_type: zod - .literal('gaussian') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsOneoneSamplerTypeDefault - ), - }) - .describe( - "Parameters for sampling from a Gaussian (Normal) distribution.\n\nSamples continuous values from a normal distribution characterized by its mean and standard\ndeviation. The Gaussian distribution is one of the most commonly used probability distributions,\nappearing naturally in many real-world phenomena due to the Central Limit Theorem.\n\nAttributes:\n mean (required): Mean (center) of the Gaussian distribution. This is the expected value and the\n location of the distribution's peak.\n stddev (required): Standard deviation of the Gaussian distribution. Controls the spread or width\n of the distribution. Must be positive.\n decimal_places: Optional number of decimal places to round sampled values to. If None,\n values are not rounded." - ), - zod - .object({ - mean: zod - .number() - .describe('Mean number of events in a fixed interval.'), - sampler_type: zod - .literal('poisson') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsOnetwoSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Poisson distribution.\n\nSamples non-negative integer values representing the number of events occurring in a fixed\ninterval of time or space. The Poisson distribution is commonly used to model count data\nlike the number of arrivals, occurrences, or events per time period.\n\nThe distribution is characterized by a single parameter (mean\/rate), and both the mean and\nvariance equal this parameter value.\n\nAttributes:\n mean (required): Mean number of events in the fixed interval (also called rate parameter Ī»).\n Must be positive. This represents both the expected value and the variance of the\n distribution.' - ), - zod - .object({ - low: zod - .number() - .describe('Lower bound of the uniform distribution, inclusive.'), - high: zod - .number() - .describe('Upper bound of the uniform distribution.'), - decimal_places: zod - .number() - .optional() - .describe( - 'Number of decimal places to round the sampled values to.' - ), - sampler_type: zod - .literal('uniform') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsOnethreeSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a continuous Uniform distribution.\n\nSamples continuous values uniformly from a specified range, where every value in the range\nhas equal probability of being sampled. This is useful when all values within a range are\nequally likely, such as random percentages, proportions, or unbiased measurements.\n\nAttributes:\n low (required): Lower bound of the uniform distribution (inclusive). Can be any real number.\n high (required): Upper bound of the uniform distribution. Must be greater than `low`.\n decimal_places: Optional number of decimal places to round sampled values to. If None,\n values are not rounded and may have many decimal places.' - ), - zod - .object({ - dist_name: zod - .string() - .describe('Name of a scipy.stats distribution.'), - dist_params: zod - .record(zod.string(), zod.unknown()) - .describe( - 'Parameters of the scipy.stats distribution given in `dist_name`.' - ), - decimal_places: zod - .number() - .optional() - .describe( - 'Number of decimal places to round the sampled values to.' - ), - sampler_type: zod - .literal('scipy') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemSevenConditionalParamsOnefourSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from any scipy.stats continuous or discrete distribution.\n\nProvides a flexible interface to sample from the wide range of probability distributions\navailable in scipy.stats. This enables advanced statistical sampling beyond the built-in\ndistribution types (Gaussian, Uniform, etc.).\n\nSee: [scipy.stats documentation](https:\/\/docs.scipy.org\/doc\/scipy\/reference\/stats.html)\n\nAttributes:\n dist_name (required): Name of the scipy.stats distribution to sample from (e.g., \"beta\", \"gamma\",\n \"lognorm\", \"expon\"). Must be a valid distribution name from scipy.stats.\n dist_params (required): Dictionary of parameters for the specified distribution. Parameter names\n and values must match the scipy.stats distribution specification (e.g., {\"a\": 2, \"b\": 5}\n for beta distribution, {\"scale\": 1.5} for exponential).\n decimal_places: Optional number of decimal places to round sampled values to. If None,\n values are not rounded.' - ), - ]) - ) - .optional() - .describe( - 'Optional dictionary for conditional parameters; keys are conditions, values are params to use when met' - ), - convert_to: zod - .string() - .optional() - .describe( - "Optional type conversion after sampling: 'float', 'int', or 'str' for numerical samplers; a strftime format string (e.g., '%Y-%m-%d') for datetime\/timedelta samplers. Datetime\/timedelta columns default to ISO-8601 (e.g., 2024-01-15T09:30:00) when omitted." - ), - }) - .describe( - 'Configuration for columns generated using built-in samplers.\n\nSampler columns provide efficient data generation for common data types and\ndistributions. Supported samplers include UUID generation,\ndatetime\/timedelta sampling, person generation, category \/ subcategory sampling,\nand various statistical distributions (uniform, gaussian, binomial, poisson, scipy).\n\nAttributes:\n sampler_type (required): Type of sampler to use. Available types include:\n \"uuid\", \"category\", \"subcategory\", \"uniform\", \"gaussian\", \"bernoulli\",\n \"bernoulli_mixture\", \"binomial\", \"poisson\", \"scipy\", \"person\",\n \"person_from_faker\", \"datetime\", \"timedelta\".\n params (required): Parameters specific to the chosen sampler type. Type varies based on the `sampler_type`\n (e.g., `CategorySamplerParams`, `UniformSamplerParams`, `PersonSamplerParams`).\n conditional_params: Optional dictionary for conditional parameters. The dict keys\n are the conditions that must be met (e.g., \"age > 21\") for the conditional parameters\n to be used. The values of dict are the parameters to use when the condition is met.\n convert_to: Optional type conversion to apply after sampling. For numerical samplers,\n must be one of \"float\", \"int\", or \"str\". For datetime and timedelta samplers, accepts\n a strftime format string (e.g., ``\"%Y-%m-%d\"``, ``\"%m\/%d\/%Y %H:%M\"``). When omitted,\n datetime\/timedelta columns default to ISO-8601 format (e.g., ``2024-01-15T09:30:00``).\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.\n\n!!! tip \"Displaying available samplers and their parameters\"\n The config builder has an `info` attribute that can be used to display the\n available samplers and their parameters:\n ```python\n config_builder.info.display(\"samplers\")\n ```' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemEightDropDefault - ), - allow_resize: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemEightAllowResizeDefault - ), - column_type: zod - .literal('seed-dataset') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemEightColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemEightPropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - }) - .describe( - 'Configuration for columns sourced from seed datasets.\n\nThis config marks columns that come from seed data. It is typically created\nautomatically when calling `with_seed_dataset()` on the builder, rather than\nbeing instantiated directly by users.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemNineDropDefault - ), - allow_resize: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemNineAllowResizeDefault - ), - column_type: zod - .literal('validation') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemNineColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemNinePropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - target_columns: zod - .array(zod.string()) - .describe('List of column names to validate'), - validator_type: zod - .enum(['code', 'local_callable', 'remote']) - .describe("Validation method: 'code', 'local_callable', or 'remote'"), - validator_params: zod - .union([ - zod - .object({ - validator_type: zod - .literal('code') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsOneValidatorTypeDefault - ) - .describe( - "Validator type discriminator, always 'code' for this validator" - ), - code_lang: zod - .enum([ - 'bash', - 'c', - 'cobol', - 'cpp', - 'csharp', - 'go', - 'java', - 'javascript', - 'kotlin', - 'python', - 'ruby', - 'rust', - 'scala', - 'swift', - 'typescript', - 'sql:sqlite', - 'sql:tsql', - 'sql:bigquery', - 'sql:mysql', - 'sql:postgres', - 'sql:ansi', - ]) - .describe('The language of the code to validate'), - }) - .describe( - 'Configuration for code validation. Supports Python and SQL code validation.\n\nAttributes:\n code_lang (required): The language of the code to validate. Supported values include: `python`,\n `sql:sqlite`, `sql:postgres`, `sql:mysql`, `sql:tsql`, `sql:bigquery`, `sql:ansi`.' - ), - zod - .object({ - validator_type: zod - .literal('local_callable') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsTwoValidatorTypeDefault - ) - .describe( - "Validator type discriminator, always 'local_callable' for this validator" - ), - validation_function: zod - .unknown() - .describe( - 'Function (Callable[[pd.DataFrame], pd.DataFrame]) to validate the data' - ), - output_schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe("Expected schema for local callable validator's output"), - }) - .describe( - "Configuration for local callable validation. Expects a function to be passed that validates the data.\n\nAttributes:\n validation_function (required): Function (`Callable[[pd.DataFrame], pd.DataFrame]`) to validate the\n data. Output must contain a column `is_valid` of type `bool`.\n output_schema: The JSON schema for the local callable validator's output. If not provided,\n the output will not be validated." - ), - zod - .object({ - validator_type: zod - .literal('remote') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsThreeValidatorTypeDefault - ) - .describe( - "Validator type discriminator, always 'remote' for this validator" - ), - endpoint_url: zod.string().describe('URL of the remote endpoint'), - output_schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe("Expected schema for remote validator's output"), - timeout: zod - .number() - .gt( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsThreeTimeoutExclusiveMin - ) - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsThreeTimeoutDefault - ) - .describe('The timeout for the HTTP request'), - max_retries: zod - .number() - .min( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsThreeMaxRetriesMin - ) - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsThreeMaxRetriesDefault - ) - .describe('The maximum number of retry attempts'), - retry_backoff: zod - .number() - .gt( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsThreeRetryBackoffExclusiveMin - ) - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsThreeRetryBackoffDefault - ) - .describe('The backoff factor for the retry delay'), - max_parallel_requests: zod - .number() - .min(1) - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemNineValidatorParamsThreeMaxParallelRequestsDefault - ) - .describe('The maximum number of parallel requests to make'), - }) - .describe( - "Configuration for remote validation. Sends data to a remote endpoint for validation.\n\nAttributes:\n endpoint_url (required): The URL of the remote endpoint.\n output_schema: The JSON schema for the remote validator's output. If not provided,\n the output will not be validated.\n timeout: The timeout for the HTTP request in seconds. Defaults to 30.0.\n max_retries: The maximum number of retry attempts. Defaults to 3.\n retry_backoff: The backoff factor for the retry delay in seconds. Defaults to 2.0.\n max_parallel_requests: The maximum number of parallel requests to make. Defaults to 4." - ), - ]) - .describe('Validator-specific parameters (e.g., CodeValidatorParams)'), - batch_size: zod - .number() - .min(1) - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemNineBatchSizeDefault - ) - .describe('Number of records to process in each batch'), - }) - .describe( - 'Configuration for validation columns that validate existing columns.\n\nValidation columns execute validation logic against specified target columns and return\nstructured results indicating pass\/fail status with validation details. Supports multiple\nvalidation strategies: code execution (Python\/SQL), local callable functions (library only),\nand remote HTTP endpoints.\n\nAttributes:\n target_columns (required): List of column names to validate. These columns are passed to the\n validator for validation. All target columns must exist in the dataset\n before validation runs.\n validator_type (required): The type of validator to use. Options:\n - \"code\": Execute code (Python or SQL) for validation. The code receives a\n DataFrame with target columns and must return a DataFrame with validation results.\n - \"local_callable\": Call a local Python function with the data. Only supported\n when running DataDesigner locally.\n - \"remote\": Send data to a remote HTTP endpoint for validation.\n validator_params (required): Parameters specific to the validator type. Type varies by validator:\n - CodeValidatorParams: Specifies code language (python or SQL dialect like\n \"sql:postgres\", \"sql:mysql\").\n - LocalCallableValidatorParams: Provides validation function (Callable[[pd.DataFrame],\n pd.DataFrame]) and optional output schema for validation results.\n - RemoteValidatorParams: Configures endpoint URL, HTTP timeout, retry behavior\n (max_retries, retry_backoff), and parallel request limits (max_parallel_requests).\n batch_size: Number of records to process in each validation batch. Defaults to 10.\n Larger batches are more efficient but use more memory. Adjust based on validator\n complexity and available resources.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemOnezeroDropDefault - ), - allow_resize: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemOnezeroAllowResizeDefault - ), - column_type: zod - .literal('embedding') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemOnezeroColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemOnezeroPropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - target_column: zod - .string() - .describe('Name of the text column to generate embeddings for'), - model_alias: zod - .string() - .describe('Alias of the model to use for embedding generation'), - }) - .describe( - 'Configuration for embedding generation columns.\n\nEmbedding columns generate embeddings for text input using a specified model.\n\nAttributes:\n target_column (required): The column to generate embeddings for. The column could be a single text string or a list of text strings in stringified JSON format.\n If it is a list of text strings in stringified JSON format, the embeddings will be generated for each text string.\n model_alias (required): The model to use for embedding generation.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemOneoneDropDefault - ), - allow_resize: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemOneoneAllowResizeDefault - ), - column_type: zod - .literal('image') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemOneoneColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemOneonePropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - prompt: zod - .string() - .describe( - 'Jinja2 template for the image generation prompt; can reference other columns via {{ column_name }}' - ), - model_alias: zod - .string() - .describe('Alias of the model to use for image generation'), - multi_modal_context: zod - .array( - zod - .object({ - modality: zod - .enum(['image']) - .describe('Supported modality types for multimodal model data.') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigColumnsItemOneoneMultiModalContextItemModalityDefault - ), - column_name: zod.string(), - data_type: zod - .enum(['url', 'base64']) - .optional() - .describe('Data type formats for multimodal data.'), - image_format: zod - .enum(['png', 'jpg', 'jpeg', 'gif', 'webp']) - .optional() - .describe('Supported image formats for image modality.'), - }) - .describe( - 'Configuration for providing image context to multimodal models.\n\nAttributes:\n modality: The modality type (always \"image\").\n column_name: Name of the column containing image data.\n data_type: Format of the image data (\"url\", \"base64\", or None for auto-detection).\n When None, the format is auto-detected: URLs are passed through, file paths that\n exist under base_path are loaded as base64, and other values are assumed to be base64.\n image_format: Image format (required when data_type is explicitly \"base64\").' - ) - ) - .optional() - .describe( - 'Optional list of ImageContext for multi-modal image-to-image generation' - ), - }) - .describe( - 'Configuration for image generation columns.\n\nImage columns generate images using either autoregressive or diffusion models.\nThe API used is automatically determined based on the model name:\n\nAttributes:\n prompt (required): Prompt template for image generation. Supports Jinja2 templating to\n reference other columns (e.g., \"Generate an image of a {{ character_name }}\").\n Must be a valid Jinja2 template.\n model_alias (required): The model to use for image generation.\n multi_modal_context: Optional list of image contexts for multi-modal generation.\n Enables autoregressive multi-modal models to generate images based on image inputs.\n Only works with autoregressive models that support image-to-image generation.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - ]) - ) - .min(1), - model_configs: zod - .array( - zod - .object({ - alias: zod.string(), - model: zod.string(), - inference_parameters: zod - .union([ - zod - .object({ - generation_type: zod - .literal('chat-completion') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersOneGenerationTypeDefault - ), - max_parallel_requests: zod - .number() - .min(1) - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersOneMaxParallelRequestsDefault - ), - timeout: zod.number().min(1).optional(), - extra_body: zod.record(zod.string(), zod.unknown()).optional(), - temperature: zod - .union([ - zod.number(), - zod - .object({ - distribution_type: zod - .enum(['uniform', 'manual']) - .describe( - 'Types of distributions for sampling inference parameters.' - ) - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersOneTemperatureTwoDistributionTypeDefault - ), - params: zod - .object({ - low: zod.number(), - high: zod.number(), - }) - .describe( - 'Parameters for uniform distribution sampling.\n\nAttributes:\n low: Lower bound (inclusive).\n high: Upper bound (exclusive).' - ), - }) - .describe( - 'Uniform distribution for sampling inference parameters.\n\nSamples values uniformly between low and high bounds. Useful for exploring\na continuous range of values for temperature or top_p.\n\nAttributes:\n distribution_type: Type of distribution (\"uniform\").\n params: Distribution parameters (low, high).' - ), - zod - .object({ - distribution_type: zod - .enum(['uniform', 'manual']) - .describe( - 'Types of distributions for sampling inference parameters.' - ) - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersOneTemperatureThreeDistributionTypeDefault - ), - params: zod - .object({ - values: zod.array(zod.number()).min(1), - weights: zod.array(zod.number()).optional(), - }) - .describe( - 'Parameters for manual distribution sampling.\n\nAttributes:\n values: List of possible values to sample from.\n weights: Optional list of weights for each value. If not provided, all values have equal probability.' - ), - }) - .describe( - 'Manual (discrete) distribution for sampling inference parameters.\n\nSamples from a discrete set of values with optional weights. Useful for testing\nspecific values or creating custom probability distributions for temperature or top_p.\n\nAttributes:\n distribution_type: Type of distribution (\"manual\").\n params: Distribution parameters (values, weights).' - ), - ]) - .optional(), - top_p: zod - .union([ - zod.number(), - zod - .object({ - distribution_type: zod - .enum(['uniform', 'manual']) - .describe( - 'Types of distributions for sampling inference parameters.' - ) - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersOneTopPTwoDistributionTypeDefault - ), - params: zod - .object({ - low: zod.number(), - high: zod.number(), - }) - .describe( - 'Parameters for uniform distribution sampling.\n\nAttributes:\n low: Lower bound (inclusive).\n high: Upper bound (exclusive).' - ), - }) - .describe( - 'Uniform distribution for sampling inference parameters.\n\nSamples values uniformly between low and high bounds. Useful for exploring\na continuous range of values for temperature or top_p.\n\nAttributes:\n distribution_type: Type of distribution (\"uniform\").\n params: Distribution parameters (low, high).' - ), - zod - .object({ - distribution_type: zod - .enum(['uniform', 'manual']) - .describe( - 'Types of distributions for sampling inference parameters.' - ) - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersOneTopPThreeDistributionTypeDefault - ), - params: zod - .object({ - values: zod.array(zod.number()).min(1), - weights: zod.array(zod.number()).optional(), - }) - .describe( - 'Parameters for manual distribution sampling.\n\nAttributes:\n values: List of possible values to sample from.\n weights: Optional list of weights for each value. If not provided, all values have equal probability.' - ), - }) - .describe( - 'Manual (discrete) distribution for sampling inference parameters.\n\nSamples from a discrete set of values with optional weights. Useful for testing\nspecific values or creating custom probability distributions for temperature or top_p.\n\nAttributes:\n distribution_type: Type of distribution (\"manual\").\n params: Distribution parameters (values, weights).' - ), - ]) - .optional(), - max_tokens: zod.number().min(1).optional(), - }) - .describe( - 'Configuration for LLM inference parameters.\n\nAttributes:\n generation_type: Type of generation, always \"chat-completion\" for this class.\n temperature: Sampling temperature (0.0-2.0). Can be a fixed value or a distribution for dynamic sampling.\n top_p: Nucleus sampling probability (0.0-1.0). Can be a fixed value or a distribution for dynamic sampling.\n max_tokens: Maximum number of tokens to generate in the response.' - ), - zod - .object({ - generation_type: zod - .literal('embedding') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersTwoGenerationTypeDefault - ), - max_parallel_requests: zod - .number() - .min(1) - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersTwoMaxParallelRequestsDefault - ), - timeout: zod.number().min(1).optional(), - extra_body: zod.record(zod.string(), zod.unknown()).optional(), - encoding_format: zod - .enum(['float', 'base64']) - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersTwoEncodingFormatDefault - ), - dimensions: zod.number().optional(), - }) - .describe( - 'Configuration for embedding generation parameters.\n\nAttributes:\n generation_type: Type of generation, always \"embedding\" for this class.\n encoding_format: Format of the embedding encoding (\"float\" or \"base64\").\n dimensions: Number of dimensions for the embedding.' - ), - zod - .object({ - generation_type: zod - .literal('image') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersThreeGenerationTypeDefault - ), - max_parallel_requests: zod - .number() - .min(1) - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigModelConfigsItemInferenceParametersThreeMaxParallelRequestsDefault - ), - timeout: zod.number().min(1).optional(), - extra_body: zod.record(zod.string(), zod.unknown()).optional(), - }) - .describe( - 'Configuration for image generation models.\n\nWorks for both diffusion and autoregressive image generation models. Pass all model-specific image options via `extra_body`.\n\nAttributes:\n generation_type: Type of generation, always \"image\" for this class.\n\nExample:\n ```python\n # OpenAI-style (DALLĀ·E): quality and size in extra_body or as top-level kwargs\n dd.ImageInferenceParams(\n extra_body={\"size\": \"1024x1024\", \"quality\": \"hd\"}\n )\n\n # Gemini-style: generationConfig.imageConfig\n dd.ImageInferenceParams(\n extra_body={\n \"generationConfig\": {\n \"imageConfig\": {\n \"aspectRatio\": \"1:1\",\n \"imageSize\": \"1024\"\n }\n }\n }\n )\n ```' - ), - ]) - .optional(), - provider: zod.string().optional(), - skip_health_check: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigModelConfigsItemSkipHealthCheckDefault - ), - }) - .describe( - "Configuration for a model used for generation.\n\nAttributes:\n alias: User-defined alias to reference in column configurations.\n model: Model identifier (e.g., from build.nvidia.com or other providers).\n inference_parameters: Inference parameters for the model (temperature, top_p, max_tokens, etc.).\n The generation_type is determined by the type of inference_parameters.\n provider: Name of the model provider. Required in a future release. Leaving\n ``provider`` unset (or ``None``) currently routes through the registry's\n implicit default and is \*\*deprecated\*\*; specify ``provider=`` explicitly.\n See issue #589.\n skip_health_check: Whether to skip the health check for this model. Defaults to False." - ) - ) - .optional(), - tool_configs: zod - .array( - zod - .object({ - tool_alias: zod.string(), - providers: zod.array(zod.string()), - allow_tools: zod.array(zod.string()).optional(), - max_tool_call_turns: zod - .number() - .min(1) - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigToolConfigsItemMaxToolCallTurnsDefault - ), - timeout_sec: zod - .number() - .gt( - dataDesignerCancelJobResponseSpecJobConfigConfigToolConfigsItemTimeoutSecExclusiveMin - ) - .optional(), - }) - .describe( - 'Configuration for permitting MCP tools on an LLM column.\n\nToolConfig defines which tools are available for use during LLM generation.\nIt references one or more MCP providers by name and can optionally restrict\nwhich tools from those providers are permitted.\n\nAttributes:\n tool_alias (str): User-defined alias to reference this tool configuration in column configs.\n providers (list[str]): Names of the MCP providers to use for tool calls. Tools can be\n drawn from multiple providers.\n allow_tools (list[str] | None): Optional allowlist of tool names that restricts which\n tools are permitted. If None, all tools from the specified providers are allowed.\n Defaults to None.\n max_tool_call_turns (int): Maximum number of tool-calling turns permitted in a single\n generation. A turn is one iteration where the LLM requests tool calls. With parallel\n tool calling, a single turn may execute multiple tools simultaneously. Defaults to 5.\n timeout_sec (float | None): Timeout in seconds for MCP tool calls. Defaults to None (no timeout).\n\nExamples:\n >>> ToolConfig(\n ... tool_alias=\"search-tools\",\n ... providers=[\"doc-search-mcp\", \"web-search-mcp\"],\n ... allow_tools=[\"search_docs\", \"list_docs\"],\n ... max_tool_call_turns=10,\n ... timeout_sec=30.0,\n ... )' - ) - ) - .optional(), - seed_config: zod - .object({ - source: zod.union([ - zod.object({ - seed_type: zod - .literal('local') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSourceOneSeedTypeDefault - ), - path: zod - .string() - .describe( - 'Path to a local seed dataset file or wildcard pattern. Relative paths are resolved from the current working directory when the config is loaded, not from the config file location.' - ), - }), - zod.object({ - seed_type: zod - .literal('hf') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSourceTwoSeedTypeDefault - ), - path: zod - .string() - .describe( - "Path to the seed data in HuggingFace. Wildcards are allowed. Examples include 'datasets\/my-username\/my-dataset\/data\/000_00000.parquet', 'datasets\/my-username\/my-dataset\/data\/\*.parquet', and 'datasets\/my-username\/my-dataset\/\*\*\/\*.parquet'" - ), - token: zod.string().optional(), - endpoint: zod - .string() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSourceTwoEndpointDefault - ), - }), - zod.object({ - seed_type: zod - .literal('df') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSourceThreeSeedTypeDefault - ), - }), - zod.object({ - seed_type: zod - .literal('directory') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSourceFourSeedTypeDefault - ), - path: zod - .string() - .describe( - 'Directory containing seed artifacts. Relative paths are resolved from the current working directory when the config is loaded, not from the config file location.' - ), - file_pattern: zod - .string() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSourceFourFilePatternDefault - ) - .describe( - 'Case-sensitive filename pattern used to match files under the provided directory. Patterns match basenames only, not relative paths.' - ), - recursive: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSourceFourRecursiveDefault - ) - .describe( - 'Whether to search nested subdirectories under the provided directory for matching files.' - ), - }), - zod.object({ - seed_type: zod - .literal('file_contents') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSourceFiveSeedTypeDefault - ), - path: zod - .string() - .describe( - 'Directory containing seed artifacts. Relative paths are resolved from the current working directory when the config is loaded, not from the config file location.' - ), - file_pattern: zod - .string() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSourceFiveFilePatternDefault - ) - .describe( - 'Case-sensitive filename pattern used to match files under the provided directory. Patterns match basenames only, not relative paths.' - ), - recursive: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSourceFiveRecursiveDefault - ) - .describe( - 'Whether to search nested subdirectories under the provided directory for matching files.' - ), - encoding: zod - .string() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSourceFiveEncodingDefault - ) - .describe( - 'Text encoding used when reading matching files into the `content` column.' - ), - }), - zod.object({ - seed_type: zod - .literal('agent_rollout') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSourceSixSeedTypeDefault - ), - path: zod - .string() - .optional() - .describe( - 'Directory containing agent rollout artifacts. This field is required for ATIF trajectories. When omitted, built-in defaults are used for formats that define one. Claude Code defaults to ~\/.claude\/projects, Codex defaults to ~\/.codex\/sessions, Hermes Agent defaults to ~\/.hermes\/sessions, and Pi Coding Agent defaults to ~\/.pi\/agent\/sessions. Relative paths are resolved from the current working directory when the config is loaded, not from the config file location.' - ), - file_pattern: zod - .string() - .optional() - .describe( - "Case-sensitive filename pattern used to match agent rollout files. When omitted, ATIF defaults to '\*.json', Claude Code, Codex, and Pi Coding Agent default to '\*.jsonl', and Hermes Agent defaults to '\*.json\*'." - ), - recursive: zod - .boolean() - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSourceSixRecursiveDefault - ) - .describe( - 'Whether to search nested subdirectories under the provided directory for matching files.' - ), - format: zod - .enum(['atif', 'claude_code', 'codex', 'hermes_agent', 'pi_coding_agent']) - .describe('Built-in agent rollout format to use for parsing trace files.'), - }), - zod.object({ - seed_type: zod - .literal('nmp') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSourceSevenSeedTypeDefault - ), - path: zod.string(), - }), - ]), - sampling_strategy: zod - .enum(['ordered', 'shuffle']) - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSamplingStrategyDefault - ), - selection_strategy: zod - .union([ - zod.object({ - start: zod - .number() - .min( - dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSelectionStrategyOneStartMin - ) - .describe('The start index of the index range (inclusive)'), - end: zod - .number() - .min( - dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSelectionStrategyOneEndMin - ) - .describe('The end index of the index range (inclusive)'), - }), - zod.object({ - index: zod - .number() - .min( - dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSelectionStrategyTwoIndexMin - ) - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSelectionStrategyTwoIndexDefault - ) - .describe('The index of the partition to sample from'), - num_partitions: zod - .number() - .min(1) - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigSeedConfigSelectionStrategyTwoNumPartitionsDefault - ) - .describe('The total number of partitions in the dataset'), - }), - ]) - .optional(), - }) - .optional() - .describe( - 'Configuration for sampling data from a seed dataset.\n\nAttributes:\n source: A SeedSource defining where the seed data exists\n sampling_strategy: Strategy for how to sample rows from the dataset.\n - ORDERED: Read rows sequentially in their original order.\n - SHUFFLE: Randomly shuffle rows before sampling. When used with\n selection_strategy, shuffling occurs within the selected range\/partition.\n selection_strategy: Optional strategy to select a subset of the dataset.\n - IndexRange: Select a specific range of indices (e.g., rows 100-200).\n - PartitionBlock: Select a partition by splitting the dataset into N equal parts.\n Partition indices are zero-based (index=0 is the first partition, index=1 is\n the second, etc.).\n\nExamples:\n Read rows sequentially from start to end:\n SeedConfig(\n source=LocalFileSeedSource(path=\"my_data.parquet\"),\n sampling_strategy=SamplingStrategy.ORDERED\n )\n\n Read rows in random order:\n SeedConfig(\n source=LocalFileSeedSource(path=\"my_data.parquet\"),\n sampling_strategy=SamplingStrategy.SHUFFLE\n )\n\n Read specific index range (rows 100-199):\n SeedConfig(\n source=LocalFileSeedSource(path=\"my_data.parquet\"),\n sampling_strategy=SamplingStrategy.ORDERED,\n selection_strategy=IndexRange(start=100, end=199)\n )\n\n Read random rows from a specific index range (shuffles within rows 100-199):\n SeedConfig(\n source=LocalFileSeedSource(path=\"my_data.parquet\"),\n sampling_strategy=SamplingStrategy.SHUFFLE,\n selection_strategy=IndexRange(start=100, end=199)\n )\n\n Read from partition 2 (3rd partition, zero-based) of 5 partitions (20% of dataset):\n SeedConfig(\n source=LocalFileSeedSource(path=\"my_data.parquet\"),\n sampling_strategy=SamplingStrategy.ORDERED,\n selection_strategy=PartitionBlock(index=2, num_partitions=5)\n )\n\n Read shuffled rows from partition 0 of 10 partitions (shuffles within the partition):\n SeedConfig(\n source=LocalFileSeedSource(path=\"my_data.parquet\"),\n sampling_strategy=SamplingStrategy.SHUFFLE,\n selection_strategy=PartitionBlock(index=0, num_partitions=10)\n )' - ), - constraints: zod - .array( - zod.union([ - zod - .object({ - target_column: zod - .string() - .describe('Name of the sampler column this constraint applies to'), - constraint_type: zod - .literal('scalar_inequality') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigConstraintsItemOneConstraintTypeDefault - ) - .describe( - "Constraint type discriminator, always 'scalar_inequality' for this constraint" - ), - rhs: zod.number().describe('Scalar value to compare against'), - operator: zod.enum(['lt', 'le', 'gt', 'ge']).describe('Comparison operator'), - }) - .describe( - 'Constrain a sampler column to be less\/greater than a scalar value.\n\nOnly applies to sampler columns.\n\nAttributes:\n rhs (required): Scalar value to compare against.\n operator (required): Comparison operator (lt, le, gt, ge).\n\nInherited Attributes:\n target_column (required): Name of the sampler column this constraint applies to.' - ), - zod - .object({ - target_column: zod - .string() - .describe('Name of the sampler column this constraint applies to'), - constraint_type: zod - .literal('column_inequality') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigConstraintsItemTwoConstraintTypeDefault - ) - .describe( - "Constraint type discriminator, always 'column_inequality' for this constraint" - ), - rhs: zod - .string() - .describe('Name of the other sampler column to compare against'), - operator: zod.enum(['lt', 'le', 'gt', 'ge']).describe('Comparison operator'), - }) - .describe( - 'Constrain a sampler column to be less\/greater than another sampler column.\n\nOnly applies to sampler columns.\n\nAttributes:\n rhs (required): Name of the other sampler column to compare against.\n operator (required): Comparison operator (lt, le, gt, ge).\n\nInherited Attributes:\n target_column (required): Name of the sampler column this constraint applies to.' - ), - ]) - ) - .optional(), - profilers: zod - .array( - zod - .object({ - model_alias: zod.string(), - summary_score_sample_size: zod - .number() - .min(1) - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigProfilersItemSummaryScoreSampleSizeDefault - ), - }) - .describe( - 'Configuration for the LLM-as-a-judge score profiler.\n\nAttributes:\n model_alias: Alias of the LLM model to use for generating score distribution summaries.\n Must match a model alias defined in the Data Designer configuration.\n summary_score_sample_size: Number of score samples to include when prompting the LLM\n to generate summaries. Larger sample sizes provide more context but increase\n token usage. Must be at least 1 when provided. Set to None to skip LLM-generated\n summaries. Defaults to 20.' - ) - ) - .optional(), - processors: zod - .array( - zod.union([ - zod - .object({ - name: zod - .string() - .describe( - 'The name of the processor, used to identify the processor in the results and to write the artifacts to disk.' - ), - processor_type: zod - .literal('drop_columns') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigProcessorsItemOneProcessorTypeDefault - ), - column_names: zod - .array(zod.string()) - .describe('List of column names to drop from the output dataset.'), - }) - .describe( - 'Drop columns from the output dataset (prefer ``drop=True`` in the column config).\n\nThis processor removes specified columns from the generated dataset. The dropped\ncolumns are saved separately in the `dropped-columns-parquet-files` directory for reference.\nWhen this processor is added via the config builder, the corresponding column\nconfigs are automatically marked with `drop = True`.\n\nAttributes:\n column_names (required): List of column names to remove from the output dataset.\n\nInherited Attributes:\n name (required): Name of the processor.' - ), - zod - .object({ - name: zod - .string() - .describe( - 'The name of the processor, used to identify the processor in the results and to write the artifacts to disk.' - ), - processor_type: zod - .literal('schema_transform') - .default( - dataDesignerCancelJobResponseSpecJobConfigConfigProcessorsItemTwoProcessorTypeDefault - ), - template: zod - .record(zod.string(), zod.unknown()) - .describe( - '\n Dictionary specifying columns and templates to use in the new dataset with transformed schema.\n\n Each key is a new column name, and each value is an object containing Jinja2 templates - for instance, a string or a list of strings.\n Values must be JSON-serializable.\n\n Example:\n\n ```python\n template = {\n \"list_of_strings\": [\"{{ col1 }}\", \"{{ col2 }}\"],\n \"uppercase_string\": \"{{ col1 | upper }}\",\n \"lowercase_string\": \"{{ col2 | lower }}\",\n }\n ```\n\n The above templates will create an new dataset with three columns: \"list_of_strings\", \"uppercase_string\", and \"lowercase_string\".\n References to columns \"col1\" and \"col2\" in the templates will be replaced with the actual values of the columns in the dataset.\n ' - ), - }) - .describe( - 'Configuration for transforming the dataset schema using Jinja2 templates.\n\nThis processor creates a new dataset with a transformed schema. Each key in the\ntemplate becomes a column in the output, and values are Jinja2 templates that\ncan reference any column in the batch. The transformed dataset is written to\na `processors-files\/{processor_name}\/` directory alongside the main dataset.\n\nAttributes:\n template (required): Dictionary defining the output schema. Keys are new column names,\n values are Jinja2 templates (strings, lists, or nested structures).\n Must be JSON-serializable.\n\nInherited Attributes:\n name (required): Name of the processor.' - ), - ]) - ) - .optional(), - }) - .describe( - 'Configuration for NeMo Data Designer.\n\nThis class defines the main configuration structure for NeMo Data Designer,\nwhich the engine consumes when generating synthetic data.\n\nAttributes:\n columns: Required list of column configurations defining how each column\n should be generated. Must contain at least one column.\n model_configs: Optional list of model configurations for LLM-based generation.\n Each model config defines the model, provider, and inference parameters.\n tool_configs: Optional list of tool configurations for MCP tool calling.\n Each tool config defines the provider, allowed tools, and execution limits.\n seed_config: Optional seed dataset settings to use for generation.\n constraints: Optional list of column constraints.\n profilers: Optional list of column profilers for analyzing generated data characteristics.\n processors: Optional list of processor configurations for post-generation transformations.' - ), - }), - model_providers: zod.array( - zod - .object({ - name: zod.string(), - endpoint: zod.string(), - provider_type: zod - .string() - .default(dataDesignerCancelJobResponseSpecModelProvidersItemProviderTypeDefault), - api_key: zod.string().optional(), - extra_body: zod.record(zod.string(), zod.unknown()).optional(), - extra_headers: zod.record(zod.string(), zod.string()).optional(), - }) - .describe( - 'Configuration for a custom model provider.\n\nAttributes:\n name: Name of the model provider.\n endpoint: API endpoint URL for the provider.\n provider_type: Provider type (default: \"openai\"). Determines the API format to use.\n api_key: Optional API key for authentication.\n extra_body: Additional parameters to pass in API requests.\n extra_headers: Additional headers to pass in API requests.' - ) - ), - model_configs: zod.array( - zod - .object({ - alias: zod.string(), - model: zod.string(), - inference_parameters: zod - .union([ - zod - .object({ - generation_type: zod - .literal('chat-completion') - .default( - dataDesignerCancelJobResponseSpecModelConfigsItemInferenceParametersOneGenerationTypeDefault - ), - max_parallel_requests: zod - .number() - .min(1) - .default( - dataDesignerCancelJobResponseSpecModelConfigsItemInferenceParametersOneMaxParallelRequestsDefault - ), - timeout: zod.number().min(1).optional(), - extra_body: zod.record(zod.string(), zod.unknown()).optional(), - temperature: zod - .union([ - zod.number(), - zod - .object({ - distribution_type: zod - .enum(['uniform', 'manual']) - .describe('Types of distributions for sampling inference parameters.') - .default( - dataDesignerCancelJobResponseSpecModelConfigsItemInferenceParametersOneTemperatureTwoDistributionTypeDefault - ), - params: zod - .object({ - low: zod.number(), - high: zod.number(), - }) - .describe( - 'Parameters for uniform distribution sampling.\n\nAttributes:\n low: Lower bound (inclusive).\n high: Upper bound (exclusive).' - ), - }) - .describe( - 'Uniform distribution for sampling inference parameters.\n\nSamples values uniformly between low and high bounds. Useful for exploring\na continuous range of values for temperature or top_p.\n\nAttributes:\n distribution_type: Type of distribution (\"uniform\").\n params: Distribution parameters (low, high).' - ), - zod - .object({ - distribution_type: zod - .enum(['uniform', 'manual']) - .describe('Types of distributions for sampling inference parameters.') - .default( - dataDesignerCancelJobResponseSpecModelConfigsItemInferenceParametersOneTemperatureThreeDistributionTypeDefault - ), - params: zod - .object({ - values: zod.array(zod.number()).min(1), - weights: zod.array(zod.number()).optional(), - }) - .describe( - 'Parameters for manual distribution sampling.\n\nAttributes:\n values: List of possible values to sample from.\n weights: Optional list of weights for each value. If not provided, all values have equal probability.' - ), - }) - .describe( - 'Manual (discrete) distribution for sampling inference parameters.\n\nSamples from a discrete set of values with optional weights. Useful for testing\nspecific values or creating custom probability distributions for temperature or top_p.\n\nAttributes:\n distribution_type: Type of distribution (\"manual\").\n params: Distribution parameters (values, weights).' - ), - ]) - .optional(), - top_p: zod - .union([ - zod.number(), - zod - .object({ - distribution_type: zod - .enum(['uniform', 'manual']) - .describe('Types of distributions for sampling inference parameters.') - .default( - dataDesignerCancelJobResponseSpecModelConfigsItemInferenceParametersOneTopPTwoDistributionTypeDefault - ), - params: zod - .object({ - low: zod.number(), - high: zod.number(), - }) - .describe( - 'Parameters for uniform distribution sampling.\n\nAttributes:\n low: Lower bound (inclusive).\n high: Upper bound (exclusive).' - ), - }) - .describe( - 'Uniform distribution for sampling inference parameters.\n\nSamples values uniformly between low and high bounds. Useful for exploring\na continuous range of values for temperature or top_p.\n\nAttributes:\n distribution_type: Type of distribution (\"uniform\").\n params: Distribution parameters (low, high).' - ), - zod - .object({ - distribution_type: zod - .enum(['uniform', 'manual']) - .describe('Types of distributions for sampling inference parameters.') - .default( - dataDesignerCancelJobResponseSpecModelConfigsItemInferenceParametersOneTopPThreeDistributionTypeDefault - ), - params: zod - .object({ - values: zod.array(zod.number()).min(1), - weights: zod.array(zod.number()).optional(), - }) - .describe( - 'Parameters for manual distribution sampling.\n\nAttributes:\n values: List of possible values to sample from.\n weights: Optional list of weights for each value. If not provided, all values have equal probability.' - ), - }) - .describe( - 'Manual (discrete) distribution for sampling inference parameters.\n\nSamples from a discrete set of values with optional weights. Useful for testing\nspecific values or creating custom probability distributions for temperature or top_p.\n\nAttributes:\n distribution_type: Type of distribution (\"manual\").\n params: Distribution parameters (values, weights).' - ), - ]) - .optional(), - max_tokens: zod.number().min(1).optional(), - }) - .describe( - 'Configuration for LLM inference parameters.\n\nAttributes:\n generation_type: Type of generation, always \"chat-completion\" for this class.\n temperature: Sampling temperature (0.0-2.0). Can be a fixed value or a distribution for dynamic sampling.\n top_p: Nucleus sampling probability (0.0-1.0). Can be a fixed value or a distribution for dynamic sampling.\n max_tokens: Maximum number of tokens to generate in the response.' - ), - zod - .object({ - generation_type: zod - .literal('embedding') - .default( - dataDesignerCancelJobResponseSpecModelConfigsItemInferenceParametersTwoGenerationTypeDefault - ), - max_parallel_requests: zod - .number() - .min(1) - .default( - dataDesignerCancelJobResponseSpecModelConfigsItemInferenceParametersTwoMaxParallelRequestsDefault - ), - timeout: zod.number().min(1).optional(), - extra_body: zod.record(zod.string(), zod.unknown()).optional(), - encoding_format: zod - .enum(['float', 'base64']) - .default( - dataDesignerCancelJobResponseSpecModelConfigsItemInferenceParametersTwoEncodingFormatDefault - ), - dimensions: zod.number().optional(), - }) - .describe( - 'Configuration for embedding generation parameters.\n\nAttributes:\n generation_type: Type of generation, always \"embedding\" for this class.\n encoding_format: Format of the embedding encoding (\"float\" or \"base64\").\n dimensions: Number of dimensions for the embedding.' - ), - zod - .object({ - generation_type: zod - .literal('image') - .default( - dataDesignerCancelJobResponseSpecModelConfigsItemInferenceParametersThreeGenerationTypeDefault - ), - max_parallel_requests: zod - .number() - .min(1) - .default( - dataDesignerCancelJobResponseSpecModelConfigsItemInferenceParametersThreeMaxParallelRequestsDefault - ), - timeout: zod.number().min(1).optional(), - extra_body: zod.record(zod.string(), zod.unknown()).optional(), - }) - .describe( - 'Configuration for image generation models.\n\nWorks for both diffusion and autoregressive image generation models. Pass all model-specific image options via `extra_body`.\n\nAttributes:\n generation_type: Type of generation, always \"image\" for this class.\n\nExample:\n ```python\n # OpenAI-style (DALLĀ·E): quality and size in extra_body or as top-level kwargs\n dd.ImageInferenceParams(\n extra_body={\"size\": \"1024x1024\", \"quality\": \"hd\"}\n )\n\n # Gemini-style: generationConfig.imageConfig\n dd.ImageInferenceParams(\n extra_body={\n \"generationConfig\": {\n \"imageConfig\": {\n \"aspectRatio\": \"1:1\",\n \"imageSize\": \"1024\"\n }\n }\n }\n )\n ```' - ), - ]) - .optional(), - provider: zod.string().optional(), - skip_health_check: zod - .boolean() - .default(dataDesignerCancelJobResponseSpecModelConfigsItemSkipHealthCheckDefault), - }) - .describe( - "Configuration for a model used for generation.\n\nAttributes:\n alias: User-defined alias to reference in column configurations.\n model: Model identifier (e.g., from build.nvidia.com or other providers).\n inference_parameters: Inference parameters for the model (temperature, top_p, max_tokens, etc.).\n The generation_type is determined by the type of inference_parameters.\n provider: Name of the model provider. Required in a future release. Leaving\n ``provider`` unset (or ``None``) currently routes through the registry's\n implicit default and is \*\*deprecated\*\*; specify ``provider=`` explicitly.\n See issue #589.\n skip_health_check: Whether to skip the health check for this model. Defaults to False." - ) - ), - }), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .optional() - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ), - status_details: zod.record(zod.string(), zod.unknown()).optional(), - error_details: zod.record(zod.string(), zod.unknown()).optional(), - ownership: zod.record(zod.string(), zod.unknown()).optional(), - custom_fields: zod.record(zod.string(), zod.unknown()).optional(), -}); - -/** - * @summary Get Job Logs - */ -export const DataDesignerGetJobLogsParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const DataDesignerGetJobLogsQueryParams = zod.object({ - limit: zod.number().optional(), - page_cursor: zod.string().optional(), -}); - -export const DataDesignerGetJobLogsResponse = zod.object({ - data: zod.array( - zod.object({ - timestamp: zod.string().datetime({}), - job: zod.string(), - job_step: zod.string(), - job_task: zod.string(), - message: zod.string(), - }) - ), - total: zod.number(), - next_page: zod.string(), - prev_page: zod.string(), -}); - -/** - * @summary List Job Results - */ -export const DataDesignerListJobResultsParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const DataDesignerListJobResultsResponse = zod.object({ - data: zod.array( - zod.object({ - name: zod.string(), - job: zod.string(), - workspace: zod.string(), - project: zod.string().optional(), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - artifact_url: zod.string(), - artifact_storage_type: zod.enum(['fileset']), - download_url: zod.string().optional(), - }) - ), -}); - -/** - * @summary Get Job Status - */ -export const DataDesignerGetJobStatusParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const DataDesignerGetJobStatusResponse = zod.object({ - id: zod.string(), - name: zod.string(), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ), - status_details: zod.record(zod.string(), zod.unknown()), - error_details: zod.record(zod.string(), zod.unknown()), - steps: zod.array( - zod.object({ - id: zod.string(), - name: zod.string(), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ), - status_details: zod.record(zod.string(), zod.unknown()), - error_details: zod.record(zod.string(), zod.unknown()), - tasks: zod.array( - zod.object({ - id: zod.string(), - name: zod.string(), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ), - status_details: zod.record(zod.string(), zod.unknown()), - error_details: zod.record(zod.string(), zod.unknown()), - error_stack: zod.string(), - created_at: zod.string().datetime({}), - updated_at: zod.string().datetime({}), - }) - ), - created_at: zod.string().datetime({}), - updated_at: zod.string().datetime({}), - }) - ), - created_at: zod.string().datetime({}), - updated_at: zod.string().datetime({}), -}); - -/** - * Generate a small preview dataset by streaming NDJSON frames. - * @summary Generate a small preview dataset by streaming NDJSON frames. - */ -export const DataDesignerPreviewfunctionRouteParams = zod.object({ - workspace: zod.string(), -}); - -export const DataDesignerPreviewfunctionRouteHeader = zod.object({ - 'X-Request-ID': zod.string().optional(), -}); - -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemOneDropDefault = false; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemOneAllowResizeDefault = false; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemOneColumnTypeDefault = `custom`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemOnePropagateSkipDefault = true; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemOneGenerationStrategyDefault = `cell_by_cell`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemTwoDropDefault = false; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemTwoAllowResizeDefault = false; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemTwoColumnTypeDefault = `expression`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemTwoPropagateSkipDefault = true; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemTwoDtypeDefault = `str`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemThreeDropDefault = false; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemThreeAllowResizeDefault = false; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemThreeColumnTypeDefault = `llm-code`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemThreePropagateSkipDefault = true; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemThreeMultiModalContextItemModalityDefault = `image`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemThreeWithTraceDefault = `none`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemThreeExtractReasoningContentDefault = false; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemFourDropDefault = false; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemFourAllowResizeDefault = false; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemFourColumnTypeDefault = `llm-judge`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemFourPropagateSkipDefault = true; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemFourMultiModalContextItemModalityDefault = `image`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemFourWithTraceDefault = `none`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemFourExtractReasoningContentDefault = false; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemFiveDropDefault = false; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemFiveAllowResizeDefault = false; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemFiveColumnTypeDefault = `llm-structured`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemFivePropagateSkipDefault = true; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemFiveMultiModalContextItemModalityDefault = `image`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemFiveWithTraceDefault = `none`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemFiveExtractReasoningContentDefault = false; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSixDropDefault = false; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSixAllowResizeDefault = false; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSixColumnTypeDefault = `llm-text`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSixPropagateSkipDefault = true; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSixMultiModalContextItemModalityDefault = `image`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSixWithTraceDefault = `none`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSixExtractReasoningContentDefault = false; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenDropDefault = false; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenAllowResizeDefault = false; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenColumnTypeDefault = `sampler`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenPropagateSkipDefault = true; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsOneSamplerTypeDefault = `subcategory`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsTwoSamplerTypeDefault = `category`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsThreeUnitDefault = `D`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsThreeSamplerTypeDefault = `datetime`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsFourLocaleDefault = `en_US`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsFourAgeRangeDefault = [ - 18, 114, -]; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsFourAgeRangeMin = 2; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsFourAgeRangeMax = 2; - -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsFourWithSyntheticPersonasDefault = false; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsFourSamplerTypeDefault = `person`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsFiveLocaleDefault = `en_US`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsFiveAgeRangeDefault = [ - 18, 114, -]; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsFiveAgeRangeMin = 2; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsFiveAgeRangeMax = 2; - -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsFiveSamplerTypeDefault = `person_from_faker`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsSixDtMinMin = 0; - -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsSixDtMaxExclusiveMin = 0; - -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsSixUnitDefault = `D`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsSixSamplerTypeDefault = `timedelta`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsSevenShortFormDefault = false; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsSevenUppercaseDefault = false; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsSevenSamplerTypeDefault = `uuid`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsEightPMin = 0; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsEightPMax = 1; - -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsEightSamplerTypeDefault = `bernoulli`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsNinePMin = 0; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsNinePMax = 1; - -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsNineSamplerTypeDefault = `bernoulli_mixture`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsOnezeroPMin = 0; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsOnezeroPMax = 1; - -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsOnezeroSamplerTypeDefault = `binomial`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsOneoneSamplerTypeDefault = `gaussian`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsOnetwoSamplerTypeDefault = `poisson`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsOnethreeSamplerTypeDefault = `uniform`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsOnefourSamplerTypeDefault = `scipy`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsOneSamplerTypeDefault = `subcategory`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsTwoSamplerTypeDefault = `category`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsThreeUnitDefault = `D`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsThreeSamplerTypeDefault = `datetime`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsFourLocaleDefault = `en_US`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsFourAgeRangeDefault = - [18, 114]; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsFourAgeRangeMin = 2; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsFourAgeRangeMax = 2; - -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsFourWithSyntheticPersonasDefault = false; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsFourSamplerTypeDefault = `person`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsFiveLocaleDefault = `en_US`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsFiveAgeRangeDefault = - [18, 114]; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsFiveAgeRangeMin = 2; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsFiveAgeRangeMax = 2; - -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsFiveSamplerTypeDefault = `person_from_faker`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsSixDtMinMin = 0; - -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsSixDtMaxExclusiveMin = 0; - -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsSixUnitDefault = `D`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsSixSamplerTypeDefault = `timedelta`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsSevenShortFormDefault = false; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsSevenUppercaseDefault = false; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsSevenSamplerTypeDefault = `uuid`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsEightPMin = 0; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsEightPMax = 1; - -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsEightSamplerTypeDefault = `bernoulli`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsNinePMin = 0; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsNinePMax = 1; - -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsNineSamplerTypeDefault = `bernoulli_mixture`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsOnezeroPMin = 0; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsOnezeroPMax = 1; - -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsOnezeroSamplerTypeDefault = `binomial`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsOneoneSamplerTypeDefault = `gaussian`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsOnetwoSamplerTypeDefault = `poisson`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsOnethreeSamplerTypeDefault = `uniform`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsOnefourSamplerTypeDefault = `scipy`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemEightDropDefault = false; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemEightAllowResizeDefault = false; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemEightColumnTypeDefault = `seed-dataset`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemEightPropagateSkipDefault = true; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemNineDropDefault = false; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemNineAllowResizeDefault = false; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemNineColumnTypeDefault = `validation`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemNinePropagateSkipDefault = true; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemNineValidatorParamsOneValidatorTypeDefault = `code`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemNineValidatorParamsTwoValidatorTypeDefault = `local_callable`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemNineValidatorParamsThreeValidatorTypeDefault = `remote`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemNineValidatorParamsThreeTimeoutDefault = 30; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemNineValidatorParamsThreeTimeoutExclusiveMin = 0; - -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemNineValidatorParamsThreeMaxRetriesDefault = 3; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemNineValidatorParamsThreeMaxRetriesMin = 0; - -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemNineValidatorParamsThreeRetryBackoffDefault = 2; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemNineValidatorParamsThreeRetryBackoffExclusiveMin = 1; - -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemNineValidatorParamsThreeMaxParallelRequestsDefault = 4; - -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemNineBatchSizeDefault = 10; - -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemOnezeroDropDefault = false; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemOnezeroAllowResizeDefault = false; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemOnezeroColumnTypeDefault = `embedding`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemOnezeroPropagateSkipDefault = true; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemOneoneDropDefault = false; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemOneoneAllowResizeDefault = false; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemOneoneColumnTypeDefault = `image`; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemOneonePropagateSkipDefault = true; -export const dataDesignerPreviewfunctionRouteBodyConfigColumnsItemOneoneMultiModalContextItemModalityDefault = `image`; -export const dataDesignerPreviewfunctionRouteBodyConfigModelConfigsItemInferenceParametersOneGenerationTypeDefault = `chat-completion`; -export const dataDesignerPreviewfunctionRouteBodyConfigModelConfigsItemInferenceParametersOneMaxParallelRequestsDefault = 4; - -export const dataDesignerPreviewfunctionRouteBodyConfigModelConfigsItemInferenceParametersOneTemperatureTwoDistributionTypeDefault = `uniform`; -export const dataDesignerPreviewfunctionRouteBodyConfigModelConfigsItemInferenceParametersOneTemperatureThreeDistributionTypeDefault = `manual`; -export const dataDesignerPreviewfunctionRouteBodyConfigModelConfigsItemInferenceParametersOneTopPTwoDistributionTypeDefault = `uniform`; -export const dataDesignerPreviewfunctionRouteBodyConfigModelConfigsItemInferenceParametersOneTopPThreeDistributionTypeDefault = `manual`; - -export const dataDesignerPreviewfunctionRouteBodyConfigModelConfigsItemInferenceParametersTwoGenerationTypeDefault = `embedding`; -export const dataDesignerPreviewfunctionRouteBodyConfigModelConfigsItemInferenceParametersTwoMaxParallelRequestsDefault = 4; - -export const dataDesignerPreviewfunctionRouteBodyConfigModelConfigsItemInferenceParametersTwoEncodingFormatDefault = `float`; -export const dataDesignerPreviewfunctionRouteBodyConfigModelConfigsItemInferenceParametersThreeGenerationTypeDefault = `image`; -export const dataDesignerPreviewfunctionRouteBodyConfigModelConfigsItemInferenceParametersThreeMaxParallelRequestsDefault = 4; - -export const dataDesignerPreviewfunctionRouteBodyConfigModelConfigsItemSkipHealthCheckDefault = false; -export const dataDesignerPreviewfunctionRouteBodyConfigToolConfigsItemMaxToolCallTurnsDefault = 5; - -export const dataDesignerPreviewfunctionRouteBodyConfigToolConfigsItemTimeoutSecExclusiveMin = 0; - -export const dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSourceOneSeedTypeDefault = `local`; -export const dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSourceTwoSeedTypeDefault = `hf`; -export const dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSourceTwoEndpointDefault = `https://huggingface.co`; -export const dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSourceThreeSeedTypeDefault = `df`; -export const dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSourceFourSeedTypeDefault = `directory`; -export const dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSourceFourFilePatternDefault = `*`; -export const dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSourceFourRecursiveDefault = true; -export const dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSourceFiveSeedTypeDefault = `file_contents`; -export const dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSourceFiveFilePatternDefault = `*`; -export const dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSourceFiveRecursiveDefault = true; -export const dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSourceFiveEncodingDefault = `utf-8`; -export const dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSourceSixSeedTypeDefault = `agent_rollout`; -export const dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSourceSixRecursiveDefault = true; -export const dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSourceSevenSeedTypeDefault = `nmp`; -export const dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSamplingStrategyDefault = `ordered`; -export const dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSelectionStrategyOneStartMin = 0; - -export const dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSelectionStrategyOneEndMin = 0; - -export const dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSelectionStrategyTwoIndexDefault = 0; -export const dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSelectionStrategyTwoIndexMin = 0; - -export const dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSelectionStrategyTwoNumPartitionsDefault = 1; - -export const dataDesignerPreviewfunctionRouteBodyConfigConstraintsItemOneConstraintTypeDefault = `scalar_inequality`; -export const dataDesignerPreviewfunctionRouteBodyConfigConstraintsItemTwoConstraintTypeDefault = `column_inequality`; -export const dataDesignerPreviewfunctionRouteBodyConfigProfilersItemSummaryScoreSampleSizeDefault = 20; - -export const dataDesignerPreviewfunctionRouteBodyConfigProcessorsItemOneProcessorTypeDefault = `drop_columns`; -export const dataDesignerPreviewfunctionRouteBodyConfigProcessorsItemTwoProcessorTypeDefault = `schema_transform`; - -export const DataDesignerPreviewfunctionRouteBody = zod.object({ - config: zod - .object({ - columns: zod - .array( - zod.union([ - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default(dataDesignerPreviewfunctionRouteBodyConfigColumnsItemOneDropDefault), - allow_resize: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemOneAllowResizeDefault - ), - column_type: zod - .literal('custom') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemOneColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemOnePropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - generator_function: zod - .unknown() - .describe('Function decorated with @custom_column_generator'), - generation_strategy: zod - .enum(['cell_by_cell', 'full_column']) - .describe('Strategy for custom column generation.') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemOneGenerationStrategyDefault - ) - .describe( - "Generation strategy: 'cell_by_cell' for row-based or 'full_column' for batch-based" - ), - generator_params: zod - .object({}) - .passthrough() - .optional() - .describe( - 'Optional typed configuration object passed as second argument to generator function' - ), - }) - .describe( - 'Configuration for custom user-defined column generators.\n\nCustom columns allow users to provide their own generation logic via a callable function\ndecorated with `@custom_column_generator`. Two strategies are supported: cell_by_cell\n(default, row-based) and full_column (batch-based with DataFrame access).\n\nAttributes:\n generator_function (required): A callable decorated with @custom_column_generator.\n generation_strategy: \"cell_by_cell\" (row-based) or \"full_column\" (batch-based).\n generator_params: Optional typed configuration object (Pydantic BaseModel) passed\n as the second argument to the generator function.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default(dataDesignerPreviewfunctionRouteBodyConfigColumnsItemTwoDropDefault), - allow_resize: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemTwoAllowResizeDefault - ), - column_type: zod - .literal('expression') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemTwoColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemTwoPropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - expr: zod - .string() - .describe('Jinja2 expression to compute the column value from other columns'), - dtype: zod - .enum(['int', 'float', 'str', 'bool']) - .default(dataDesignerPreviewfunctionRouteBodyConfigColumnsItemTwoDtypeDefault) - .describe("Data type for expression result: 'int', 'float', 'str', or 'bool'"), - }) - .describe( - 'Configuration for derived columns using Jinja2 expressions.\n\nExpression columns compute values by evaluating Jinja2 templates that reference other\ncolumns. Useful for transformations, concatenations, conditional logic, and derived\nfeatures without requiring LLM generation. The expression is evaluated row-by-row.\n\nAttributes:\n expr (required): Jinja2 expression to evaluate. Can reference other column values using\n {{ column_name }} syntax. Supports filters, conditionals, and arithmetic.\n Must be a valid, non-empty Jinja2 template.\n dtype: Data type to cast the result to. Must be one of \"int\", \"float\", \"str\", or \"bool\".\n Defaults to \"str\". Type conversion is applied after expression evaluation.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default(dataDesignerPreviewfunctionRouteBodyConfigColumnsItemThreeDropDefault), - allow_resize: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemThreeAllowResizeDefault - ), - column_type: zod - .literal('llm-code') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemThreeColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemThreePropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - prompt: zod - .string() - .describe( - 'Jinja2 template for the LLM prompt; can reference other columns via {{ column_name }}' - ), - model_alias: zod - .string() - .describe('Alias of the model configuration to use for generation'), - system_prompt: zod - .string() - .optional() - .describe('Optional system prompt to set model behavior and constraints'), - multi_modal_context: zod - .array( - zod - .object({ - modality: zod - .enum(['image']) - .describe('Supported modality types for multimodal model data.') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemThreeMultiModalContextItemModalityDefault - ), - column_name: zod.string(), - data_type: zod - .enum(['url', 'base64']) - .optional() - .describe('Data type formats for multimodal data.'), - image_format: zod - .enum(['png', 'jpg', 'jpeg', 'gif', 'webp']) - .optional() - .describe('Supported image formats for image modality.'), - }) - .describe( - 'Configuration for providing image context to multimodal models.\n\nAttributes:\n modality: The modality type (always \"image\").\n column_name: Name of the column containing image data.\n data_type: Format of the image data (\"url\", \"base64\", or None for auto-detection).\n When None, the format is auto-detected: URLs are passed through, file paths that\n exist under base_path are loaded as base64, and other values are assumed to be base64.\n image_format: Image format (required when data_type is explicitly \"base64\").' - ) - ) - .optional() - .describe('Optional list of ImageContext for vision model inputs'), - tool_alias: zod - .string() - .optional() - .describe('Optional alias of the tool configuration to use for MCP tool calls'), - with_trace: zod - .enum(['none', 'last_message', 'all_messages']) - .describe( - 'Specifies the type of reasoning trace to capture for LLM columns.\n\nTraces capture the conversation history during LLM generation, which is\nuseful for debugging, analysis, and understanding model behavior.\n\nAttributes:\n NONE: No trace is captured. This is the default.\n LAST_MESSAGE: Only the final assistant message is captured.\n ALL_MESSAGES: The full conversation history (system\/user\/assistant\/tool)\n is captured.' - ) - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemThreeWithTraceDefault - ) - .describe('Trace capture mode: NONE, LAST_MESSAGE, or ALL_MESSAGES'), - extract_reasoning_content: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemThreeExtractReasoningContentDefault - ) - .describe( - 'If True, capture chain-of-thought in {name}__reasoning_content column' - ), - code_lang: zod - .enum([ - 'bash', - 'c', - 'cobol', - 'cpp', - 'csharp', - 'go', - 'java', - 'javascript', - 'kotlin', - 'python', - 'ruby', - 'rust', - 'scala', - 'swift', - 'typescript', - 'sql:sqlite', - 'sql:tsql', - 'sql:bigquery', - 'sql:mysql', - 'sql:postgres', - 'sql:ansi', - ]) - .describe( - 'Target programming language or SQL dialect for code extraction from LLM response' - ), - }) - .describe( - 'Configuration for code generation columns using Large Language Models.\n\nExtends LLMTextColumnConfig to generate code snippets in specific programming languages\nor SQL dialects. The generated code is automatically extracted from markdown code blocks\nfor the specified language. Inherits all prompt templating capabilities from LLMTextColumnConfig.\n\nAttributes:\n code_lang (required): Programming language or SQL dialect for code generation. Supported\n values include: \"python\", \"javascript\", \"typescript\", \"java\", \"kotlin\", \"go\",\n \"rust\", \"ruby\", \"scala\", \"swift\", \"sql:sqlite\", \"sql:postgres\", \"sql:mysql\",\n \"sql:tsql\", \"sql:bigquery\", \"sql:ansi\". See CodeLang enum for complete list.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n prompt (required): Prompt template for code generation (supports Jinja2).\n model_alias (required): Alias of the model configuration to use.\n system_prompt: Optional system prompt (supports Jinja2).\n multi_modal_context: Optional image contexts for multi-modal generation.\n tool_alias: Optional tool configuration alias for MCP tool calls.\n with_trace: Specifies what trace information to capture in a `{column_name}__trace`\n column. Options are `TraceType.NONE` (default), `TraceType.LAST_MESSAGE`, or\n `TraceType.ALL_MESSAGES`.\n extract_reasoning_content: If True, creates a `{column_name}__reasoning_content`\n column containing the reasoning content from the final assistant response.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default(dataDesignerPreviewfunctionRouteBodyConfigColumnsItemFourDropDefault), - allow_resize: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemFourAllowResizeDefault - ), - column_type: zod - .literal('llm-judge') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemFourColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemFourPropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - prompt: zod - .string() - .describe( - 'Jinja2 template for the LLM prompt; can reference other columns via {{ column_name }}' - ), - model_alias: zod - .string() - .describe('Alias of the model configuration to use for generation'), - system_prompt: zod - .string() - .optional() - .describe('Optional system prompt to set model behavior and constraints'), - multi_modal_context: zod - .array( - zod - .object({ - modality: zod - .enum(['image']) - .describe('Supported modality types for multimodal model data.') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemFourMultiModalContextItemModalityDefault - ), - column_name: zod.string(), - data_type: zod - .enum(['url', 'base64']) - .optional() - .describe('Data type formats for multimodal data.'), - image_format: zod - .enum(['png', 'jpg', 'jpeg', 'gif', 'webp']) - .optional() - .describe('Supported image formats for image modality.'), - }) - .describe( - 'Configuration for providing image context to multimodal models.\n\nAttributes:\n modality: The modality type (always \"image\").\n column_name: Name of the column containing image data.\n data_type: Format of the image data (\"url\", \"base64\", or None for auto-detection).\n When None, the format is auto-detected: URLs are passed through, file paths that\n exist under base_path are loaded as base64, and other values are assumed to be base64.\n image_format: Image format (required when data_type is explicitly \"base64\").' - ) - ) - .optional() - .describe('Optional list of ImageContext for vision model inputs'), - tool_alias: zod - .string() - .optional() - .describe('Optional alias of the tool configuration to use for MCP tool calls'), - with_trace: zod - .enum(['none', 'last_message', 'all_messages']) - .describe( - 'Specifies the type of reasoning trace to capture for LLM columns.\n\nTraces capture the conversation history during LLM generation, which is\nuseful for debugging, analysis, and understanding model behavior.\n\nAttributes:\n NONE: No trace is captured. This is the default.\n LAST_MESSAGE: Only the final assistant message is captured.\n ALL_MESSAGES: The full conversation history (system\/user\/assistant\/tool)\n is captured.' - ) - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemFourWithTraceDefault - ) - .describe('Trace capture mode: NONE, LAST_MESSAGE, or ALL_MESSAGES'), - extract_reasoning_content: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemFourExtractReasoningContentDefault - ) - .describe( - 'If True, capture chain-of-thought in {name}__reasoning_content column' - ), - scores: zod - .array( - zod - .object({ - name: zod.string().describe('A clear name for this score.'), - description: zod - .string() - .describe( - 'An informative and detailed assessment guide for using this score.' - ), - options: zod - .record(zod.string(), zod.string()) - .describe('Score options in the format of {score: description}.'), - }) - .describe( - 'Configuration for a \"score\" in an LLM judge evaluation.\n\nDefines a single scoring criterion with its possible values and descriptions. Multiple\nScore objects can be combined in an LLMJudgeColumnConfig to create multi-dimensional\nquality assessments.\n\nAttributes:\n name (required): A clear, concise name for this scoring dimension (e.g., \"Relevance\", \"Fluency\").\n description (required): An informative and detailed assessment guide explaining how to evaluate\n this dimension. Should provide clear criteria for scoring.\n options (required): Dictionary mapping score values to their descriptions. Keys can be integers\n (e.g., 1-5 scale) or strings (e.g., \"Poor\", \"Good\", \"Excellent\"). Values are\n descriptions explaining what each score level means.' - ) - ) - .min(1) - .describe( - 'List of Score objects defining rubric criteria for LLM judge evaluation' - ), - }) - .describe( - 'Configuration for LLM-as-a-judge quality assessment and scoring columns.\n\nExtends LLMTextColumnConfig to create judge columns that evaluate and score other\ngenerated content based on the defined criteria. Useful for quality assessment, preference\nranking, and multi-dimensional evaluation of generated data. Inherits prompt templating\ncapabilities from LLMTextColumnConfig.\n\nAttributes:\n scores (required): List of Score objects defining the evaluation dimensions. Each score\n represents a different aspect to evaluate (e.g., accuracy, relevance, fluency).\n Must contain at least one score.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n prompt (required): Prompt template for the judge evaluation (supports Jinja2).\n model_alias (required): Alias of the model configuration to use.\n system_prompt: Optional system prompt (supports Jinja2).\n multi_modal_context: Optional image contexts for multi-modal generation.\n tool_alias: Optional tool configuration alias for MCP tool calls.\n with_trace: Specifies what trace information to capture in a `{column_name}__trace`\n column. Options are `TraceType.NONE` (default), `TraceType.LAST_MESSAGE`, or\n `TraceType.ALL_MESSAGES`.\n extract_reasoning_content: If True, creates a `{column_name}__reasoning_content`\n column containing the reasoning content from the final assistant response.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default(dataDesignerPreviewfunctionRouteBodyConfigColumnsItemFiveDropDefault), - allow_resize: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemFiveAllowResizeDefault - ), - column_type: zod - .literal('llm-structured') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemFiveColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemFivePropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - prompt: zod - .string() - .describe( - 'Jinja2 template for the LLM prompt; can reference other columns via {{ column_name }}' - ), - model_alias: zod - .string() - .describe('Alias of the model configuration to use for generation'), - system_prompt: zod - .string() - .optional() - .describe('Optional system prompt to set model behavior and constraints'), - multi_modal_context: zod - .array( - zod - .object({ - modality: zod - .enum(['image']) - .describe('Supported modality types for multimodal model data.') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemFiveMultiModalContextItemModalityDefault - ), - column_name: zod.string(), - data_type: zod - .enum(['url', 'base64']) - .optional() - .describe('Data type formats for multimodal data.'), - image_format: zod - .enum(['png', 'jpg', 'jpeg', 'gif', 'webp']) - .optional() - .describe('Supported image formats for image modality.'), - }) - .describe( - 'Configuration for providing image context to multimodal models.\n\nAttributes:\n modality: The modality type (always \"image\").\n column_name: Name of the column containing image data.\n data_type: Format of the image data (\"url\", \"base64\", or None for auto-detection).\n When None, the format is auto-detected: URLs are passed through, file paths that\n exist under base_path are loaded as base64, and other values are assumed to be base64.\n image_format: Image format (required when data_type is explicitly \"base64\").' - ) - ) - .optional() - .describe('Optional list of ImageContext for vision model inputs'), - tool_alias: zod - .string() - .optional() - .describe('Optional alias of the tool configuration to use for MCP tool calls'), - with_trace: zod - .enum(['none', 'last_message', 'all_messages']) - .describe( - 'Specifies the type of reasoning trace to capture for LLM columns.\n\nTraces capture the conversation history during LLM generation, which is\nuseful for debugging, analysis, and understanding model behavior.\n\nAttributes:\n NONE: No trace is captured. This is the default.\n LAST_MESSAGE: Only the final assistant message is captured.\n ALL_MESSAGES: The full conversation history (system\/user\/assistant\/tool)\n is captured.' - ) - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemFiveWithTraceDefault - ) - .describe('Trace capture mode: NONE, LAST_MESSAGE, or ALL_MESSAGES'), - extract_reasoning_content: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemFiveExtractReasoningContentDefault - ) - .describe( - 'If True, capture chain-of-thought in {name}__reasoning_content column' - ), - output_format: zod - .union([zod.record(zod.string(), zod.unknown()), zod.unknown()]) - .describe( - 'Pydantic model or JSON schema dict defining the expected structured output shape' - ), - }) - .describe( - 'Configuration for structured JSON generation columns using Large Language Models.\n\nExtends LLMTextColumnConfig to generate structured data conforming to a specified schema.\nUses JSON schema or Pydantic models to define the expected output structure, enabling\ntype-safe and validated structured output generation. Inherits prompt templating capabilities\nfrom LLMTextColumnConfig.\n\nAttributes:\n output_format (required): The schema defining the expected output structure. Can be either:\n - A Pydantic BaseModel class (recommended)\n - A JSON schema dictionary\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n prompt (required): Prompt template for structured generation (supports Jinja2).\n model_alias (required): Alias of the model configuration to use.\n system_prompt: Optional system prompt (supports Jinja2).\n multi_modal_context: Optional image contexts for multi-modal generation.\n tool_alias: Optional tool configuration alias for MCP tool calls.\n with_trace: Specifies what trace information to capture in a `{column_name}__trace`\n column. Options are `TraceType.NONE` (default), `TraceType.LAST_MESSAGE`, or\n `TraceType.ALL_MESSAGES`.\n extract_reasoning_content: If True, creates a `{column_name}__reasoning_content`\n column containing the reasoning content from the final assistant response.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default(dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSixDropDefault), - allow_resize: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSixAllowResizeDefault - ), - column_type: zod - .literal('llm-text') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSixColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSixPropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - prompt: zod - .string() - .describe( - 'Jinja2 template for the LLM prompt; can reference other columns via {{ column_name }}' - ), - model_alias: zod - .string() - .describe('Alias of the model configuration to use for generation'), - system_prompt: zod - .string() - .optional() - .describe('Optional system prompt to set model behavior and constraints'), - multi_modal_context: zod - .array( - zod - .object({ - modality: zod - .enum(['image']) - .describe('Supported modality types for multimodal model data.') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSixMultiModalContextItemModalityDefault - ), - column_name: zod.string(), - data_type: zod - .enum(['url', 'base64']) - .optional() - .describe('Data type formats for multimodal data.'), - image_format: zod - .enum(['png', 'jpg', 'jpeg', 'gif', 'webp']) - .optional() - .describe('Supported image formats for image modality.'), - }) - .describe( - 'Configuration for providing image context to multimodal models.\n\nAttributes:\n modality: The modality type (always \"image\").\n column_name: Name of the column containing image data.\n data_type: Format of the image data (\"url\", \"base64\", or None for auto-detection).\n When None, the format is auto-detected: URLs are passed through, file paths that\n exist under base_path are loaded as base64, and other values are assumed to be base64.\n image_format: Image format (required when data_type is explicitly \"base64\").' - ) - ) - .optional() - .describe('Optional list of ImageContext for vision model inputs'), - tool_alias: zod - .string() - .optional() - .describe('Optional alias of the tool configuration to use for MCP tool calls'), - with_trace: zod - .enum(['none', 'last_message', 'all_messages']) - .describe( - 'Specifies the type of reasoning trace to capture for LLM columns.\n\nTraces capture the conversation history during LLM generation, which is\nuseful for debugging, analysis, and understanding model behavior.\n\nAttributes:\n NONE: No trace is captured. This is the default.\n LAST_MESSAGE: Only the final assistant message is captured.\n ALL_MESSAGES: The full conversation history (system\/user\/assistant\/tool)\n is captured.' - ) - .default(dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSixWithTraceDefault) - .describe('Trace capture mode: NONE, LAST_MESSAGE, or ALL_MESSAGES'), - extract_reasoning_content: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSixExtractReasoningContentDefault - ) - .describe( - 'If True, capture chain-of-thought in {name}__reasoning_content column' - ), - }) - .describe( - 'Configuration for text generation columns using Large Language Models.\n\nLLM text columns generate free-form text content using language models.\nPrompts support Jinja2 templating to reference values from other columns, enabling\ncontext-aware generation. The generated text can optionally include message traces\ncapturing the full conversation history.\n\nAttributes:\n prompt (required): Prompt template for text generation. Supports Jinja2 syntax to\n reference other columns (e.g., \"Write a story about {{ character_name }}\").\n Must be a valid Jinja2 template.\n model_alias (required): Alias of the model configuration to use for generation.\n Must match a model alias defined when initializing the DataDesignerConfigBuilder.\n system_prompt: Optional system prompt to set model behavior and constraints.\n Also supports Jinja2 templating. If provided, must be a valid Jinja2 template.\n Do not put any output parsing instructions in the system prompt. Instead,\n use the appropriate column type for the output you want to generate - e.g.,\n `LLMStructuredColumnConfig` for structured output, `LLMCodeColumnConfig` for code.\n multi_modal_context: Optional list of image contexts for multi-modal generation.\n Enables vision-capable models to generate text based on image inputs.\n tool_alias: Optional alias of the tool configuration to use for MCP tool calls.\n Must match a tool alias defined when initializing the DataDesignerConfigBuilder.\n When provided, the model may call permitted tools during generation.\n with_trace: Specifies what trace information to capture in a `{column_name}__trace`\n column. Options are:\n - `TraceType.NONE` (default): No trace is captured.\n - `TraceType.LAST_MESSAGE`: Only the final assistant message is captured.\n - `TraceType.ALL_MESSAGES`: Full conversation history (system\/user\/assistant\/tool).\n extract_reasoning_content: If True, creates a `{column_name}__reasoning_content` column\n containing only the reasoning_content from the final assistant response. This is\n useful for models that expose chain-of-thought reasoning separately from the main\n response. Defaults to False.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default(dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenDropDefault), - allow_resize: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenAllowResizeDefault - ), - column_type: zod - .literal('sampler') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenPropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - sampler_type: zod - .enum([ - 'bernoulli', - 'bernoulli_mixture', - 'binomial', - 'category', - 'datetime', - 'gaussian', - 'person', - 'person_from_faker', - 'poisson', - 'scipy', - 'subcategory', - 'timedelta', - 'uniform', - 'uuid', - ]) - .describe( - 'Type of sampler to use (e.g., uuid, category, uniform, gaussian, person, datetime)' - ), - params: zod - .union([ - zod - .object({ - category: zod - .string() - .describe('Name of parent category to this subcategory.'), - values: zod - .record( - zod.string(), - zod.array(zod.union([zod.string(), zod.number(), zod.number()])) - ) - .describe( - 'Mapping from each value of parent category to a list of subcategory values.' - ), - sampler_type: zod - .literal('subcategory') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsOneSamplerTypeDefault - ), - }) - .describe( - 'Parameters for subcategory sampling conditioned on a parent category column.\n\nSamples subcategory values based on the value of a parent category column. Each parent\ncategory value maps to its own list of possible subcategory values, enabling hierarchical\nor conditional sampling patterns.\n\nAttributes:\n category (required): Name of the parent category column that this subcategory depends on.\n The parent column must be generated before this subcategory column.\n values (required): Mapping from each parent category value to a list of possible subcategory values.\n Each key must correspond to a value that appears in the parent category column.' - ), - zod - .object({ - values: zod - .array(zod.union([zod.string(), zod.number(), zod.number()])) - .min(1) - .describe( - 'List of possible categorical values that can be sampled from.' - ), - weights: zod - .array(zod.number()) - .optional() - .describe( - 'List of unnormalized probability weights to assigned to each value, in order. Larger values will be sampled with higher probability.' - ), - sampler_type: zod - .literal('category') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsTwoSamplerTypeDefault - ), - }) - .describe( - 'Parameters for categorical sampling with optional probability weighting.\n\nSamples values from a discrete set of categories. When weights are provided, values are\nsampled according to their assigned probabilities. Without weights, uniform sampling is used.\n\nAttributes:\n values (required): List of possible categorical values to sample from. Can contain strings, integers,\n or floats. Must contain at least one value.\n weights: Optional unnormalized probability weights for each value. If provided, must be\n the same length as `values`. Weights are automatically normalized to sum to 1.0.\n Larger weights result in higher sampling probability for the corresponding value.' - ), - zod - .object({ - start: zod - .string() - .describe('Earliest possible datetime for sampling range, inclusive.'), - end: zod - .string() - .describe('Exclusive upper bound for datetime sampling range.'), - unit: zod - .enum(['Y', 'M', 'D', 'h', 'm', 's']) - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsThreeUnitDefault - ) - .describe( - 'Sampling units, e.g. the smallest possible time interval between samples.' - ), - sampler_type: zod - .literal('datetime') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsThreeSamplerTypeDefault - ), - }) - .describe( - 'Parameters for uniform datetime sampling within a specified range.\n\nSamples datetime values uniformly between a start and end date with a specified granularity.\nThe sampling unit determines the smallest possible time interval between consecutive samples.\n\nAttributes:\n start (required): Earliest possible datetime for the sampling range (inclusive). Must be a valid\n datetime string parseable by pandas.to_datetime().\n end (required): Exclusive upper bound for the sampling range. Must be a valid\n datetime string parseable by pandas.to_datetime().\n unit: Time unit for sampling granularity. Options:\n - \"Y\": Years\n - \"M\": Months\n - \"D\": Days (default)\n - \"h\": Hours\n - \"m\": Minutes\n - \"s\": Seconds' - ), - zod - .object({ - locale: zod - .string() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsFourLocaleDefault - ) - .describe( - 'Locale that determines the language and geographic location that a synthetic person will be sampled from. Must be a locale supported by a managed Nemotron Personas dataset. Managed datasets exist for the following locales: en_US, en_IN, en_SG, fr_FR, hi_Deva_IN, hi_Latn_IN, ja_JP, ko_KR, pt_BR.' - ), - sex: zod - .enum(['Male', 'Female']) - .optional() - .describe( - 'If specified, then only synthetic people of the specified sex will be sampled.' - ), - city: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe( - 'If specified, then only synthetic people from these cities will be sampled.' - ), - age_range: zod - .array(zod.number()) - .min( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsFourAgeRangeMin - ) - .max( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsFourAgeRangeMax - ) - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsFourAgeRangeDefault - ) - .describe( - 'If specified, then only synthetic people within this age range will be sampled.' - ), - select_field_values: zod - .record(zod.string(), zod.array(zod.string())) - .optional() - .describe( - 'Sample synthetic people with the specified field values. This is meant to be a flexible argument for selecting a subset of the population from the managed dataset. Note that this sampler does not support rare combinations of field values and will likely fail if your desired subset is not well-represented in the managed Nemotron Personas dataset. We generally recommend using the `sex`, `city`, and `age_range` arguments to filter the population when possible.' - ), - with_synthetic_personas: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsFourWithSyntheticPersonasDefault - ) - .describe( - 'If True, then append synthetic persona columns to each generated person.' - ), - sampler_type: zod - .literal('person') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsFourSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling synthetic person data with demographic attributes.\n\nGenerates realistic synthetic person data including names, addresses, phone numbers, and other\ndemographic information from managed datasets. The sampler supports filtering by locale, sex, age,\ngeographic location, and selected managed-dataset fields, and can optionally include synthetic\npersona descriptions. For Faker-generated person data, use PersonFromFakerSamplerParams.\n\nAttributes:\n locale: Locale string determining the language and geographic region for synthetic people.\n Must be a locale supported by a managed Nemotron Personas dataset. The dataset must\n be downloaded and available in the managed assets directory.\n sex: If specified, filters to only sample people of the specified sex. Options: \"Male\" or\n \"Female\". If None, samples both sexes.\n city: If specified, filters to only sample people from the specified city or cities. Can be\n a single city name (string) or a list of city names.\n age_range: Two-element list [min_age, max_age] specifying the age range to sample from\n (inclusive). Defaults to a standard age range. Both values must be between minimum and\n maximum allowed ages.\n with_synthetic_personas: If True, appends additional synthetic persona columns including\n personality traits, interests, and background descriptions. Only supported for certain\n locales with managed datasets.\n select_field_values: Optional field-value filters for managed datasets. Supported field\n names are checked against the managed person data fields.' - ), - zod - .object({ - locale: zod - .string() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsFiveLocaleDefault - ) - .describe( - 'Locale string, determines the language and geographic locale that a synthetic person will be sampled from. E.g, en_US, en_GB, fr_FR, ...' - ), - sex: zod - .enum(['Male', 'Female']) - .optional() - .describe( - 'If specified, then only synthetic people of the specified sex will be sampled.' - ), - city: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe( - 'If specified, then only synthetic people from these cities will be sampled.' - ), - age_range: zod - .array(zod.number()) - .min( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsFiveAgeRangeMin - ) - .max( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsFiveAgeRangeMax - ) - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsFiveAgeRangeDefault - ) - .describe( - 'If specified, then only synthetic people within this age range will be sampled.' - ), - sampler_type: zod - .literal('person_from_faker') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsFiveSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling synthetic person data with demographic attributes from Faker.\n\nUses the Faker library to generate random personal information. The data is basic and not demographically\naccurate, but is useful for quick testing, prototyping, or when realistic demographic distributions are not\nrelevant for your use case. For demographically accurate person data, use the `PersonSamplerParams` sampler.\n\nAttributes:\n locale: Locale string determining the language and geographic region for synthetic people.\n Can be any locale supported by Faker.\n sex: If specified, filters to only sample people of the specified sex. Options: \"Male\" or\n \"Female\". If None, samples both sexes.\n city: If specified, filters to only sample people from the specified city or cities. Can be\n a single city name (string) or a list of city names.\n age_range: Two-element list [min_age, max_age] specifying the age range to sample from\n (inclusive). Defaults to a standard age range. Both values must be between the minimum and\n maximum allowed ages.\n sampler_type: Discriminator for the sampler type. Must be `SamplerType.PERSON_FROM_FAKER`.' - ), - zod - .object({ - dt_min: zod - .number() - .min( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsSixDtMinMin - ) - .describe( - 'Minimum possible time-delta for sampling range, inclusive. Must be less than `dt_max`.' - ), - dt_max: zod - .number() - .gt( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsSixDtMaxExclusiveMin - ) - .describe( - 'Maximum possible time-delta for sampling range, exclusive. Must be greater than `dt_min`.' - ), - reference_column_name: zod - .string() - .describe( - 'Name of an existing datetime column to condition time-delta sampling on.' - ), - unit: zod - .enum(['D', 'h', 'm', 's']) - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsSixUnitDefault - ) - .describe( - 'Sampling units, e.g. the smallest possible time interval between samples.' - ), - sampler_type: zod - .literal('timedelta') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsSixSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling time deltas relative to a reference datetime column.\n\nSamples time offsets within a specified range and adds them to values from a reference\ndatetime column. This is useful for generating related datetime columns like order dates\nand delivery dates, or event start times and end times.\n\nNote:\n Years and months are not supported as timedelta units because they have variable lengths.\n See: [pandas timedelta documentation](https:\/\/pandas.pydata.org\/docs\/user_guide\/timedeltas.html)\n\nAttributes:\n dt_min (required): Minimum time-delta value (inclusive). Must be non-negative and less than `dt_max`.\n Specified in units defined by the `unit` parameter.\n dt_max (required): Maximum time-delta value (exclusive). Must be positive and greater than `dt_min`.\n Specified in units defined by the `unit` parameter.\n reference_column_name (required): Name of an existing datetime column to add the time-delta to.\n This column must be generated before the timedelta column.\n unit: Time unit for the delta values. Options:\n - \"D\": Days (default)\n - \"h\": Hours\n - \"m\": Minutes\n - \"s\": Seconds' - ), - zod - .object({ - prefix: zod - .string() - .optional() - .describe('String prepended to the front of the UUID.'), - short_form: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsSevenShortFormDefault - ) - .describe( - 'If true, all UUIDs sampled will be truncated at 8 characters.' - ), - uppercase: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsSevenUppercaseDefault - ) - .describe('If true, all letters in the UUID will be capitalized.'), - sampler_type: zod - .literal('uuid') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsSevenSamplerTypeDefault - ), - }) - .describe( - 'Parameters for generating UUID (Universally Unique Identifier) values.\n\nGenerates UUID4 (random) identifiers with optional formatting options. UUIDs are useful\nfor creating unique identifiers for records, entities, or transactions.\n\nAttributes:\n prefix: Optional string to prepend to each UUID. Useful for creating namespaced or\n typed identifiers (e.g., \"user-\", \"order-\", \"txn-\").\n short_form: If True, truncates UUIDs to 8 characters (first segment only). Default is False\n for full 32-character UUIDs (excluding hyphens).\n uppercase: If True, converts all hexadecimal letters to uppercase. Default is False for\n lowercase UUIDs.' - ), - zod - .object({ - p: zod - .number() - .min( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsEightPMin - ) - .max( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsEightPMax - ) - .describe('Probability of success.'), - sampler_type: zod - .literal('bernoulli') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsEightSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Bernoulli distribution.\n\nSamples binary values (0 or 1) representing the outcome of a single trial with a fixed\nprobability of success. This is the simplest discrete probability distribution, useful for\nmodeling binary outcomes like success\/failure, yes\/no, or true\/false.\n\nAttributes:\n p (required): Probability of success (sampling 1). Must be between 0.0 and 1.0 (inclusive).\n The probability of failure (sampling 0) is automatically 1 - p.' - ), - zod - .object({ - p: zod - .number() - .min( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsNinePMin - ) - .max( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsNinePMax - ) - .describe('Bernoulli distribution probability of success.'), - dist_name: zod - .string() - .describe( - 'Mixture distribution name. Samples will be equal to the distribution sample with probability `p`, otherwise equal to 0. Must be a valid scipy.stats distribution name.' - ), - dist_params: zod - .record(zod.string(), zod.unknown()) - .describe( - 'Parameters of the scipy.stats distribution given in `dist_name`.' - ), - sampler_type: zod - .literal('bernoulli_mixture') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsNineSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Bernoulli mixture distribution.\n\nCombines a Bernoulli distribution with another continuous distribution, creating a mixture\nwhere values are either 0 (with probability 1-p) or sampled from the specified distribution\n(with probability p). This is useful for modeling scenarios with many zero values mixed with\na continuous distribution of non-zero values.\n\nCommon use cases include modeling sparse events, zero-inflated data, or situations where\nan outcome either doesn\'t occur (0) or follows a specific distribution when it does occur.\n\nAttributes:\n p (required): Probability of sampling from the mixture distribution (non-zero outcome).\n Must be between 0.0 and 1.0 (inclusive). With probability 1-p, the sample is 0.\n dist_name (required): Name of the scipy.stats distribution to sample from when outcome is non-zero.\n Must be a valid scipy.stats distribution name (e.g., \"norm\", \"gamma\", \"expon\").\n dist_params (required): Parameters for the specified scipy.stats distribution.' - ), - zod - .object({ - n: zod.number().describe('Number of trials.'), - p: zod - .number() - .min( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsOnezeroPMin - ) - .max( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsOnezeroPMax - ) - .describe('Probability of success on each trial.'), - sampler_type: zod - .literal('binomial') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsOnezeroSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Binomial distribution.\n\nSamples integer values representing the number of successes in a fixed number of independent\nBernoulli trials, each with the same probability of success. Commonly used to model the number\nof successful outcomes in repeated experiments.\n\nAttributes:\n n (required): Number of independent trials. Must be a positive integer.\n p (required): Probability of success on each trial. Must be between 0.0 and 1.0 (inclusive).' - ), - zod - .object({ - mean: zod.number().describe('Mean of the Gaussian distribution'), - stddev: zod - .number() - .describe('Standard deviation of the Gaussian distribution'), - decimal_places: zod - .number() - .optional() - .describe('Number of decimal places to round the sampled values to.'), - sampler_type: zod - .literal('gaussian') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsOneoneSamplerTypeDefault - ), - }) - .describe( - "Parameters for sampling from a Gaussian (Normal) distribution.\n\nSamples continuous values from a normal distribution characterized by its mean and standard\ndeviation. The Gaussian distribution is one of the most commonly used probability distributions,\nappearing naturally in many real-world phenomena due to the Central Limit Theorem.\n\nAttributes:\n mean (required): Mean (center) of the Gaussian distribution. This is the expected value and the\n location of the distribution's peak.\n stddev (required): Standard deviation of the Gaussian distribution. Controls the spread or width\n of the distribution. Must be positive.\n decimal_places: Optional number of decimal places to round sampled values to. If None,\n values are not rounded." - ), - zod - .object({ - mean: zod.number().describe('Mean number of events in a fixed interval.'), - sampler_type: zod - .literal('poisson') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsOnetwoSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Poisson distribution.\n\nSamples non-negative integer values representing the number of events occurring in a fixed\ninterval of time or space. The Poisson distribution is commonly used to model count data\nlike the number of arrivals, occurrences, or events per time period.\n\nThe distribution is characterized by a single parameter (mean\/rate), and both the mean and\nvariance equal this parameter value.\n\nAttributes:\n mean (required): Mean number of events in the fixed interval (also called rate parameter Ī»).\n Must be positive. This represents both the expected value and the variance of the\n distribution.' - ), - zod - .object({ - low: zod - .number() - .describe('Lower bound of the uniform distribution, inclusive.'), - high: zod.number().describe('Upper bound of the uniform distribution.'), - decimal_places: zod - .number() - .optional() - .describe('Number of decimal places to round the sampled values to.'), - sampler_type: zod - .literal('uniform') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsOnethreeSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a continuous Uniform distribution.\n\nSamples continuous values uniformly from a specified range, where every value in the range\nhas equal probability of being sampled. This is useful when all values within a range are\nequally likely, such as random percentages, proportions, or unbiased measurements.\n\nAttributes:\n low (required): Lower bound of the uniform distribution (inclusive). Can be any real number.\n high (required): Upper bound of the uniform distribution. Must be greater than `low`.\n decimal_places: Optional number of decimal places to round sampled values to. If None,\n values are not rounded and may have many decimal places.' - ), - zod - .object({ - dist_name: zod.string().describe('Name of a scipy.stats distribution.'), - dist_params: zod - .record(zod.string(), zod.unknown()) - .describe( - 'Parameters of the scipy.stats distribution given in `dist_name`.' - ), - decimal_places: zod - .number() - .optional() - .describe('Number of decimal places to round the sampled values to.'), - sampler_type: zod - .literal('scipy') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenParamsOnefourSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from any scipy.stats continuous or discrete distribution.\n\nProvides a flexible interface to sample from the wide range of probability distributions\navailable in scipy.stats. This enables advanced statistical sampling beyond the built-in\ndistribution types (Gaussian, Uniform, etc.).\n\nSee: [scipy.stats documentation](https:\/\/docs.scipy.org\/doc\/scipy\/reference\/stats.html)\n\nAttributes:\n dist_name (required): Name of the scipy.stats distribution to sample from (e.g., \"beta\", \"gamma\",\n \"lognorm\", \"expon\"). Must be a valid distribution name from scipy.stats.\n dist_params (required): Dictionary of parameters for the specified distribution. Parameter names\n and values must match the scipy.stats distribution specification (e.g., {\"a\": 2, \"b\": 5}\n for beta distribution, {\"scale\": 1.5} for exponential).\n decimal_places: Optional number of decimal places to round sampled values to. If None,\n values are not rounded.' - ), - ]) - .describe('Parameters specific to the chosen sampler type'), - conditional_params: zod - .record( - zod.string(), - zod.union([ - zod - .object({ - category: zod - .string() - .describe('Name of parent category to this subcategory.'), - values: zod - .record( - zod.string(), - zod.array(zod.union([zod.string(), zod.number(), zod.number()])) - ) - .describe( - 'Mapping from each value of parent category to a list of subcategory values.' - ), - sampler_type: zod - .literal('subcategory') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsOneSamplerTypeDefault - ), - }) - .describe( - 'Parameters for subcategory sampling conditioned on a parent category column.\n\nSamples subcategory values based on the value of a parent category column. Each parent\ncategory value maps to its own list of possible subcategory values, enabling hierarchical\nor conditional sampling patterns.\n\nAttributes:\n category (required): Name of the parent category column that this subcategory depends on.\n The parent column must be generated before this subcategory column.\n values (required): Mapping from each parent category value to a list of possible subcategory values.\n Each key must correspond to a value that appears in the parent category column.' - ), - zod - .object({ - values: zod - .array(zod.union([zod.string(), zod.number(), zod.number()])) - .min(1) - .describe( - 'List of possible categorical values that can be sampled from.' - ), - weights: zod - .array(zod.number()) - .optional() - .describe( - 'List of unnormalized probability weights to assigned to each value, in order. Larger values will be sampled with higher probability.' - ), - sampler_type: zod - .literal('category') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsTwoSamplerTypeDefault - ), - }) - .describe( - 'Parameters for categorical sampling with optional probability weighting.\n\nSamples values from a discrete set of categories. When weights are provided, values are\nsampled according to their assigned probabilities. Without weights, uniform sampling is used.\n\nAttributes:\n values (required): List of possible categorical values to sample from. Can contain strings, integers,\n or floats. Must contain at least one value.\n weights: Optional unnormalized probability weights for each value. If provided, must be\n the same length as `values`. Weights are automatically normalized to sum to 1.0.\n Larger weights result in higher sampling probability for the corresponding value.' - ), - zod - .object({ - start: zod - .string() - .describe('Earliest possible datetime for sampling range, inclusive.'), - end: zod - .string() - .describe('Exclusive upper bound for datetime sampling range.'), - unit: zod - .enum(['Y', 'M', 'D', 'h', 'm', 's']) - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsThreeUnitDefault - ) - .describe( - 'Sampling units, e.g. the smallest possible time interval between samples.' - ), - sampler_type: zod - .literal('datetime') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsThreeSamplerTypeDefault - ), - }) - .describe( - 'Parameters for uniform datetime sampling within a specified range.\n\nSamples datetime values uniformly between a start and end date with a specified granularity.\nThe sampling unit determines the smallest possible time interval between consecutive samples.\n\nAttributes:\n start (required): Earliest possible datetime for the sampling range (inclusive). Must be a valid\n datetime string parseable by pandas.to_datetime().\n end (required): Exclusive upper bound for the sampling range. Must be a valid\n datetime string parseable by pandas.to_datetime().\n unit: Time unit for sampling granularity. Options:\n - \"Y\": Years\n - \"M\": Months\n - \"D\": Days (default)\n - \"h\": Hours\n - \"m\": Minutes\n - \"s\": Seconds' - ), - zod - .object({ - locale: zod - .string() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsFourLocaleDefault - ) - .describe( - 'Locale that determines the language and geographic location that a synthetic person will be sampled from. Must be a locale supported by a managed Nemotron Personas dataset. Managed datasets exist for the following locales: en_US, en_IN, en_SG, fr_FR, hi_Deva_IN, hi_Latn_IN, ja_JP, ko_KR, pt_BR.' - ), - sex: zod - .enum(['Male', 'Female']) - .optional() - .describe( - 'If specified, then only synthetic people of the specified sex will be sampled.' - ), - city: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe( - 'If specified, then only synthetic people from these cities will be sampled.' - ), - age_range: zod - .array(zod.number()) - .min( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsFourAgeRangeMin - ) - .max( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsFourAgeRangeMax - ) - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsFourAgeRangeDefault - ) - .describe( - 'If specified, then only synthetic people within this age range will be sampled.' - ), - select_field_values: zod - .record(zod.string(), zod.array(zod.string())) - .optional() - .describe( - 'Sample synthetic people with the specified field values. This is meant to be a flexible argument for selecting a subset of the population from the managed dataset. Note that this sampler does not support rare combinations of field values and will likely fail if your desired subset is not well-represented in the managed Nemotron Personas dataset. We generally recommend using the `sex`, `city`, and `age_range` arguments to filter the population when possible.' - ), - with_synthetic_personas: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsFourWithSyntheticPersonasDefault - ) - .describe( - 'If True, then append synthetic persona columns to each generated person.' - ), - sampler_type: zod - .literal('person') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsFourSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling synthetic person data with demographic attributes.\n\nGenerates realistic synthetic person data including names, addresses, phone numbers, and other\ndemographic information from managed datasets. The sampler supports filtering by locale, sex, age,\ngeographic location, and selected managed-dataset fields, and can optionally include synthetic\npersona descriptions. For Faker-generated person data, use PersonFromFakerSamplerParams.\n\nAttributes:\n locale: Locale string determining the language and geographic region for synthetic people.\n Must be a locale supported by a managed Nemotron Personas dataset. The dataset must\n be downloaded and available in the managed assets directory.\n sex: If specified, filters to only sample people of the specified sex. Options: \"Male\" or\n \"Female\". If None, samples both sexes.\n city: If specified, filters to only sample people from the specified city or cities. Can be\n a single city name (string) or a list of city names.\n age_range: Two-element list [min_age, max_age] specifying the age range to sample from\n (inclusive). Defaults to a standard age range. Both values must be between minimum and\n maximum allowed ages.\n with_synthetic_personas: If True, appends additional synthetic persona columns including\n personality traits, interests, and background descriptions. Only supported for certain\n locales with managed datasets.\n select_field_values: Optional field-value filters for managed datasets. Supported field\n names are checked against the managed person data fields.' - ), - zod - .object({ - locale: zod - .string() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsFiveLocaleDefault - ) - .describe( - 'Locale string, determines the language and geographic locale that a synthetic person will be sampled from. E.g, en_US, en_GB, fr_FR, ...' - ), - sex: zod - .enum(['Male', 'Female']) - .optional() - .describe( - 'If specified, then only synthetic people of the specified sex will be sampled.' - ), - city: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe( - 'If specified, then only synthetic people from these cities will be sampled.' - ), - age_range: zod - .array(zod.number()) - .min( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsFiveAgeRangeMin - ) - .max( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsFiveAgeRangeMax - ) - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsFiveAgeRangeDefault - ) - .describe( - 'If specified, then only synthetic people within this age range will be sampled.' - ), - sampler_type: zod - .literal('person_from_faker') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsFiveSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling synthetic person data with demographic attributes from Faker.\n\nUses the Faker library to generate random personal information. The data is basic and not demographically\naccurate, but is useful for quick testing, prototyping, or when realistic demographic distributions are not\nrelevant for your use case. For demographically accurate person data, use the `PersonSamplerParams` sampler.\n\nAttributes:\n locale: Locale string determining the language and geographic region for synthetic people.\n Can be any locale supported by Faker.\n sex: If specified, filters to only sample people of the specified sex. Options: \"Male\" or\n \"Female\". If None, samples both sexes.\n city: If specified, filters to only sample people from the specified city or cities. Can be\n a single city name (string) or a list of city names.\n age_range: Two-element list [min_age, max_age] specifying the age range to sample from\n (inclusive). Defaults to a standard age range. Both values must be between the minimum and\n maximum allowed ages.\n sampler_type: Discriminator for the sampler type. Must be `SamplerType.PERSON_FROM_FAKER`.' - ), - zod - .object({ - dt_min: zod - .number() - .min( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsSixDtMinMin - ) - .describe( - 'Minimum possible time-delta for sampling range, inclusive. Must be less than `dt_max`.' - ), - dt_max: zod - .number() - .gt( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsSixDtMaxExclusiveMin - ) - .describe( - 'Maximum possible time-delta for sampling range, exclusive. Must be greater than `dt_min`.' - ), - reference_column_name: zod - .string() - .describe( - 'Name of an existing datetime column to condition time-delta sampling on.' - ), - unit: zod - .enum(['D', 'h', 'm', 's']) - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsSixUnitDefault - ) - .describe( - 'Sampling units, e.g. the smallest possible time interval between samples.' - ), - sampler_type: zod - .literal('timedelta') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsSixSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling time deltas relative to a reference datetime column.\n\nSamples time offsets within a specified range and adds them to values from a reference\ndatetime column. This is useful for generating related datetime columns like order dates\nand delivery dates, or event start times and end times.\n\nNote:\n Years and months are not supported as timedelta units because they have variable lengths.\n See: [pandas timedelta documentation](https:\/\/pandas.pydata.org\/docs\/user_guide\/timedeltas.html)\n\nAttributes:\n dt_min (required): Minimum time-delta value (inclusive). Must be non-negative and less than `dt_max`.\n Specified in units defined by the `unit` parameter.\n dt_max (required): Maximum time-delta value (exclusive). Must be positive and greater than `dt_min`.\n Specified in units defined by the `unit` parameter.\n reference_column_name (required): Name of an existing datetime column to add the time-delta to.\n This column must be generated before the timedelta column.\n unit: Time unit for the delta values. Options:\n - \"D\": Days (default)\n - \"h\": Hours\n - \"m\": Minutes\n - \"s\": Seconds' - ), - zod - .object({ - prefix: zod - .string() - .optional() - .describe('String prepended to the front of the UUID.'), - short_form: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsSevenShortFormDefault - ) - .describe( - 'If true, all UUIDs sampled will be truncated at 8 characters.' - ), - uppercase: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsSevenUppercaseDefault - ) - .describe('If true, all letters in the UUID will be capitalized.'), - sampler_type: zod - .literal('uuid') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsSevenSamplerTypeDefault - ), - }) - .describe( - 'Parameters for generating UUID (Universally Unique Identifier) values.\n\nGenerates UUID4 (random) identifiers with optional formatting options. UUIDs are useful\nfor creating unique identifiers for records, entities, or transactions.\n\nAttributes:\n prefix: Optional string to prepend to each UUID. Useful for creating namespaced or\n typed identifiers (e.g., \"user-\", \"order-\", \"txn-\").\n short_form: If True, truncates UUIDs to 8 characters (first segment only). Default is False\n for full 32-character UUIDs (excluding hyphens).\n uppercase: If True, converts all hexadecimal letters to uppercase. Default is False for\n lowercase UUIDs.' - ), - zod - .object({ - p: zod - .number() - .min( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsEightPMin - ) - .max( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsEightPMax - ) - .describe('Probability of success.'), - sampler_type: zod - .literal('bernoulli') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsEightSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Bernoulli distribution.\n\nSamples binary values (0 or 1) representing the outcome of a single trial with a fixed\nprobability of success. This is the simplest discrete probability distribution, useful for\nmodeling binary outcomes like success\/failure, yes\/no, or true\/false.\n\nAttributes:\n p (required): Probability of success (sampling 1). Must be between 0.0 and 1.0 (inclusive).\n The probability of failure (sampling 0) is automatically 1 - p.' - ), - zod - .object({ - p: zod - .number() - .min( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsNinePMin - ) - .max( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsNinePMax - ) - .describe('Bernoulli distribution probability of success.'), - dist_name: zod - .string() - .describe( - 'Mixture distribution name. Samples will be equal to the distribution sample with probability `p`, otherwise equal to 0. Must be a valid scipy.stats distribution name.' - ), - dist_params: zod - .record(zod.string(), zod.unknown()) - .describe( - 'Parameters of the scipy.stats distribution given in `dist_name`.' - ), - sampler_type: zod - .literal('bernoulli_mixture') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsNineSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Bernoulli mixture distribution.\n\nCombines a Bernoulli distribution with another continuous distribution, creating a mixture\nwhere values are either 0 (with probability 1-p) or sampled from the specified distribution\n(with probability p). This is useful for modeling scenarios with many zero values mixed with\na continuous distribution of non-zero values.\n\nCommon use cases include modeling sparse events, zero-inflated data, or situations where\nan outcome either doesn\'t occur (0) or follows a specific distribution when it does occur.\n\nAttributes:\n p (required): Probability of sampling from the mixture distribution (non-zero outcome).\n Must be between 0.0 and 1.0 (inclusive). With probability 1-p, the sample is 0.\n dist_name (required): Name of the scipy.stats distribution to sample from when outcome is non-zero.\n Must be a valid scipy.stats distribution name (e.g., \"norm\", \"gamma\", \"expon\").\n dist_params (required): Parameters for the specified scipy.stats distribution.' - ), - zod - .object({ - n: zod.number().describe('Number of trials.'), - p: zod - .number() - .min( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsOnezeroPMin - ) - .max( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsOnezeroPMax - ) - .describe('Probability of success on each trial.'), - sampler_type: zod - .literal('binomial') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsOnezeroSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Binomial distribution.\n\nSamples integer values representing the number of successes in a fixed number of independent\nBernoulli trials, each with the same probability of success. Commonly used to model the number\nof successful outcomes in repeated experiments.\n\nAttributes:\n n (required): Number of independent trials. Must be a positive integer.\n p (required): Probability of success on each trial. Must be between 0.0 and 1.0 (inclusive).' - ), - zod - .object({ - mean: zod.number().describe('Mean of the Gaussian distribution'), - stddev: zod - .number() - .describe('Standard deviation of the Gaussian distribution'), - decimal_places: zod - .number() - .optional() - .describe('Number of decimal places to round the sampled values to.'), - sampler_type: zod - .literal('gaussian') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsOneoneSamplerTypeDefault - ), - }) - .describe( - "Parameters for sampling from a Gaussian (Normal) distribution.\n\nSamples continuous values from a normal distribution characterized by its mean and standard\ndeviation. The Gaussian distribution is one of the most commonly used probability distributions,\nappearing naturally in many real-world phenomena due to the Central Limit Theorem.\n\nAttributes:\n mean (required): Mean (center) of the Gaussian distribution. This is the expected value and the\n location of the distribution's peak.\n stddev (required): Standard deviation of the Gaussian distribution. Controls the spread or width\n of the distribution. Must be positive.\n decimal_places: Optional number of decimal places to round sampled values to. If None,\n values are not rounded." - ), - zod - .object({ - mean: zod.number().describe('Mean number of events in a fixed interval.'), - sampler_type: zod - .literal('poisson') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsOnetwoSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a Poisson distribution.\n\nSamples non-negative integer values representing the number of events occurring in a fixed\ninterval of time or space. The Poisson distribution is commonly used to model count data\nlike the number of arrivals, occurrences, or events per time period.\n\nThe distribution is characterized by a single parameter (mean\/rate), and both the mean and\nvariance equal this parameter value.\n\nAttributes:\n mean (required): Mean number of events in the fixed interval (also called rate parameter Ī»).\n Must be positive. This represents both the expected value and the variance of the\n distribution.' - ), - zod - .object({ - low: zod - .number() - .describe('Lower bound of the uniform distribution, inclusive.'), - high: zod.number().describe('Upper bound of the uniform distribution.'), - decimal_places: zod - .number() - .optional() - .describe('Number of decimal places to round the sampled values to.'), - sampler_type: zod - .literal('uniform') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsOnethreeSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from a continuous Uniform distribution.\n\nSamples continuous values uniformly from a specified range, where every value in the range\nhas equal probability of being sampled. This is useful when all values within a range are\nequally likely, such as random percentages, proportions, or unbiased measurements.\n\nAttributes:\n low (required): Lower bound of the uniform distribution (inclusive). Can be any real number.\n high (required): Upper bound of the uniform distribution. Must be greater than `low`.\n decimal_places: Optional number of decimal places to round sampled values to. If None,\n values are not rounded and may have many decimal places.' - ), - zod - .object({ - dist_name: zod.string().describe('Name of a scipy.stats distribution.'), - dist_params: zod - .record(zod.string(), zod.unknown()) - .describe( - 'Parameters of the scipy.stats distribution given in `dist_name`.' - ), - decimal_places: zod - .number() - .optional() - .describe('Number of decimal places to round the sampled values to.'), - sampler_type: zod - .literal('scipy') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemSevenConditionalParamsOnefourSamplerTypeDefault - ), - }) - .describe( - 'Parameters for sampling from any scipy.stats continuous or discrete distribution.\n\nProvides a flexible interface to sample from the wide range of probability distributions\navailable in scipy.stats. This enables advanced statistical sampling beyond the built-in\ndistribution types (Gaussian, Uniform, etc.).\n\nSee: [scipy.stats documentation](https:\/\/docs.scipy.org\/doc\/scipy\/reference\/stats.html)\n\nAttributes:\n dist_name (required): Name of the scipy.stats distribution to sample from (e.g., \"beta\", \"gamma\",\n \"lognorm\", \"expon\"). Must be a valid distribution name from scipy.stats.\n dist_params (required): Dictionary of parameters for the specified distribution. Parameter names\n and values must match the scipy.stats distribution specification (e.g., {\"a\": 2, \"b\": 5}\n for beta distribution, {\"scale\": 1.5} for exponential).\n decimal_places: Optional number of decimal places to round sampled values to. If None,\n values are not rounded.' - ), - ]) - ) - .optional() - .describe( - 'Optional dictionary for conditional parameters; keys are conditions, values are params to use when met' - ), - convert_to: zod - .string() - .optional() - .describe( - "Optional type conversion after sampling: 'float', 'int', or 'str' for numerical samplers; a strftime format string (e.g., '%Y-%m-%d') for datetime\/timedelta samplers. Datetime\/timedelta columns default to ISO-8601 (e.g., 2024-01-15T09:30:00) when omitted." - ), - }) - .describe( - 'Configuration for columns generated using built-in samplers.\n\nSampler columns provide efficient data generation for common data types and\ndistributions. Supported samplers include UUID generation,\ndatetime\/timedelta sampling, person generation, category \/ subcategory sampling,\nand various statistical distributions (uniform, gaussian, binomial, poisson, scipy).\n\nAttributes:\n sampler_type (required): Type of sampler to use. Available types include:\n \"uuid\", \"category\", \"subcategory\", \"uniform\", \"gaussian\", \"bernoulli\",\n \"bernoulli_mixture\", \"binomial\", \"poisson\", \"scipy\", \"person\",\n \"person_from_faker\", \"datetime\", \"timedelta\".\n params (required): Parameters specific to the chosen sampler type. Type varies based on the `sampler_type`\n (e.g., `CategorySamplerParams`, `UniformSamplerParams`, `PersonSamplerParams`).\n conditional_params: Optional dictionary for conditional parameters. The dict keys\n are the conditions that must be met (e.g., \"age > 21\") for the conditional parameters\n to be used. The values of dict are the parameters to use when the condition is met.\n convert_to: Optional type conversion to apply after sampling. For numerical samplers,\n must be one of \"float\", \"int\", or \"str\". For datetime and timedelta samplers, accepts\n a strftime format string (e.g., ``\"%Y-%m-%d\"``, ``\"%m\/%d\/%Y %H:%M\"``). When omitted,\n datetime\/timedelta columns default to ISO-8601 format (e.g., ``2024-01-15T09:30:00``).\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.\n\n!!! tip \"Displaying available samplers and their parameters\"\n The config builder has an `info` attribute that can be used to display the\n available samplers and their parameters:\n ```python\n config_builder.info.display(\"samplers\")\n ```' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default(dataDesignerPreviewfunctionRouteBodyConfigColumnsItemEightDropDefault), - allow_resize: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemEightAllowResizeDefault - ), - column_type: zod - .literal('seed-dataset') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemEightColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemEightPropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - }) - .describe( - 'Configuration for columns sourced from seed datasets.\n\nThis config marks columns that come from seed data. It is typically created\nautomatically when calling `with_seed_dataset()` on the builder, rather than\nbeing instantiated directly by users.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default(dataDesignerPreviewfunctionRouteBodyConfigColumnsItemNineDropDefault), - allow_resize: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemNineAllowResizeDefault - ), - column_type: zod - .literal('validation') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemNineColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemNinePropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - target_columns: zod - .array(zod.string()) - .describe('List of column names to validate'), - validator_type: zod - .enum(['code', 'local_callable', 'remote']) - .describe("Validation method: 'code', 'local_callable', or 'remote'"), - validator_params: zod - .union([ - zod - .object({ - validator_type: zod - .literal('code') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemNineValidatorParamsOneValidatorTypeDefault - ) - .describe( - "Validator type discriminator, always 'code' for this validator" - ), - code_lang: zod - .enum([ - 'bash', - 'c', - 'cobol', - 'cpp', - 'csharp', - 'go', - 'java', - 'javascript', - 'kotlin', - 'python', - 'ruby', - 'rust', - 'scala', - 'swift', - 'typescript', - 'sql:sqlite', - 'sql:tsql', - 'sql:bigquery', - 'sql:mysql', - 'sql:postgres', - 'sql:ansi', - ]) - .describe('The language of the code to validate'), - }) - .describe( - 'Configuration for code validation. Supports Python and SQL code validation.\n\nAttributes:\n code_lang (required): The language of the code to validate. Supported values include: `python`,\n `sql:sqlite`, `sql:postgres`, `sql:mysql`, `sql:tsql`, `sql:bigquery`, `sql:ansi`.' - ), - zod - .object({ - validator_type: zod - .literal('local_callable') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemNineValidatorParamsTwoValidatorTypeDefault - ) - .describe( - "Validator type discriminator, always 'local_callable' for this validator" - ), - validation_function: zod - .unknown() - .describe( - 'Function (Callable[[pd.DataFrame], pd.DataFrame]) to validate the data' - ), - output_schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe("Expected schema for local callable validator's output"), - }) - .describe( - "Configuration for local callable validation. Expects a function to be passed that validates the data.\n\nAttributes:\n validation_function (required): Function (`Callable[[pd.DataFrame], pd.DataFrame]`) to validate the\n data. Output must contain a column `is_valid` of type `bool`.\n output_schema: The JSON schema for the local callable validator's output. If not provided,\n the output will not be validated." - ), - zod - .object({ - validator_type: zod - .literal('remote') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemNineValidatorParamsThreeValidatorTypeDefault - ) - .describe( - "Validator type discriminator, always 'remote' for this validator" - ), - endpoint_url: zod.string().describe('URL of the remote endpoint'), - output_schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe("Expected schema for remote validator's output"), - timeout: zod - .number() - .gt( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemNineValidatorParamsThreeTimeoutExclusiveMin - ) - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemNineValidatorParamsThreeTimeoutDefault - ) - .describe('The timeout for the HTTP request'), - max_retries: zod - .number() - .min( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemNineValidatorParamsThreeMaxRetriesMin - ) - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemNineValidatorParamsThreeMaxRetriesDefault - ) - .describe('The maximum number of retry attempts'), - retry_backoff: zod - .number() - .gt( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemNineValidatorParamsThreeRetryBackoffExclusiveMin - ) - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemNineValidatorParamsThreeRetryBackoffDefault - ) - .describe('The backoff factor for the retry delay'), - max_parallel_requests: zod - .number() - .min(1) - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemNineValidatorParamsThreeMaxParallelRequestsDefault - ) - .describe('The maximum number of parallel requests to make'), - }) - .describe( - "Configuration for remote validation. Sends data to a remote endpoint for validation.\n\nAttributes:\n endpoint_url (required): The URL of the remote endpoint.\n output_schema: The JSON schema for the remote validator's output. If not provided,\n the output will not be validated.\n timeout: The timeout for the HTTP request in seconds. Defaults to 30.0.\n max_retries: The maximum number of retry attempts. Defaults to 3.\n retry_backoff: The backoff factor for the retry delay in seconds. Defaults to 2.0.\n max_parallel_requests: The maximum number of parallel requests to make. Defaults to 4." - ), - ]) - .describe('Validator-specific parameters (e.g., CodeValidatorParams)'), - batch_size: zod - .number() - .min(1) - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemNineBatchSizeDefault - ) - .describe('Number of records to process in each batch'), - }) - .describe( - 'Configuration for validation columns that validate existing columns.\n\nValidation columns execute validation logic against specified target columns and return\nstructured results indicating pass\/fail status with validation details. Supports multiple\nvalidation strategies: code execution (Python\/SQL), local callable functions (library only),\nand remote HTTP endpoints.\n\nAttributes:\n target_columns (required): List of column names to validate. These columns are passed to the\n validator for validation. All target columns must exist in the dataset\n before validation runs.\n validator_type (required): The type of validator to use. Options:\n - \"code\": Execute code (Python or SQL) for validation. The code receives a\n DataFrame with target columns and must return a DataFrame with validation results.\n - \"local_callable\": Call a local Python function with the data. Only supported\n when running DataDesigner locally.\n - \"remote\": Send data to a remote HTTP endpoint for validation.\n validator_params (required): Parameters specific to the validator type. Type varies by validator:\n - CodeValidatorParams: Specifies code language (python or SQL dialect like\n \"sql:postgres\", \"sql:mysql\").\n - LocalCallableValidatorParams: Provides validation function (Callable[[pd.DataFrame],\n pd.DataFrame]) and optional output schema for validation results.\n - RemoteValidatorParams: Configures endpoint URL, HTTP timeout, retry behavior\n (max_retries, retry_backoff), and parallel request limits (max_parallel_requests).\n batch_size: Number of records to process in each validation batch. Defaults to 10.\n Larger batches are more efficient but use more memory. Adjust based on validator\n complexity and available resources.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default(dataDesignerPreviewfunctionRouteBodyConfigColumnsItemOnezeroDropDefault), - allow_resize: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemOnezeroAllowResizeDefault - ), - column_type: zod - .literal('embedding') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemOnezeroColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemOnezeroPropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - target_column: zod - .string() - .describe('Name of the text column to generate embeddings for'), - model_alias: zod - .string() - .describe('Alias of the model to use for embedding generation'), - }) - .describe( - 'Configuration for embedding generation columns.\n\nEmbedding columns generate embeddings for text input using a specified model.\n\nAttributes:\n target_column (required): The column to generate embeddings for. The column could be a single text string or a list of text strings in stringified JSON format.\n If it is a list of text strings in stringified JSON format, the embeddings will be generated for each text string.\n model_alias (required): The model to use for embedding generation.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - zod - .object({ - name: zod.string(), - drop: zod - .boolean() - .default(dataDesignerPreviewfunctionRouteBodyConfigColumnsItemOneoneDropDefault), - allow_resize: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemOneoneAllowResizeDefault - ), - column_type: zod - .literal('image') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemOneoneColumnTypeDefault - ), - skip: zod - .object({ - when: zod - .string() - .describe( - 'Jinja2 expression (including {{ }} delimiters); when truthy, skip generation for this row.' - ), - value: zod - .union([zod.boolean(), zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - 'Value to write for skipped cells. Defaults to None (becomes NaN\/pd.NA in DataFrame).' - ), - }) - .optional() - .describe( - 'Expression gate for conditional column generation.\n\nAttach to a ``SingleColumnConfig`` via ``skip=SkipConfig(...)`` to gate\ngeneration on a Jinja2 expression. Controls \*when\* to skip; propagation\nof upstream skips is controlled separately by ``propagate_skip`` on\n``SingleColumnConfig``.\n\nAttributes:\n when: Jinja2 expression (including ``{{ }}`` delimiters); when truthy,\n skip generation for this row.\n value: Value to write for skipped cells. Defaults to ``None``\n (becomes ``NaN``\/``pd.NA`` in the DataFrame).' - ), - propagate_skip: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemOneonePropagateSkipDefault - ) - .describe( - 'If True (default), this column auto-skips when any of its required_columns was skipped. Independent of skip — a column with no SkipConfig still propagates upstream skips. Set to False for null-tolerant columns.' - ), - prompt: zod - .string() - .describe( - 'Jinja2 template for the image generation prompt; can reference other columns via {{ column_name }}' - ), - model_alias: zod - .string() - .describe('Alias of the model to use for image generation'), - multi_modal_context: zod - .array( - zod - .object({ - modality: zod - .enum(['image']) - .describe('Supported modality types for multimodal model data.') - .default( - dataDesignerPreviewfunctionRouteBodyConfigColumnsItemOneoneMultiModalContextItemModalityDefault - ), - column_name: zod.string(), - data_type: zod - .enum(['url', 'base64']) - .optional() - .describe('Data type formats for multimodal data.'), - image_format: zod - .enum(['png', 'jpg', 'jpeg', 'gif', 'webp']) - .optional() - .describe('Supported image formats for image modality.'), - }) - .describe( - 'Configuration for providing image context to multimodal models.\n\nAttributes:\n modality: The modality type (always \"image\").\n column_name: Name of the column containing image data.\n data_type: Format of the image data (\"url\", \"base64\", or None for auto-detection).\n When None, the format is auto-detected: URLs are passed through, file paths that\n exist under base_path are loaded as base64, and other values are assumed to be base64.\n image_format: Image format (required when data_type is explicitly \"base64\").' - ) - ) - .optional() - .describe( - 'Optional list of ImageContext for multi-modal image-to-image generation' - ), - }) - .describe( - 'Configuration for image generation columns.\n\nImage columns generate images using either autoregressive or diffusion models.\nThe API used is automatically determined based on the model name:\n\nAttributes:\n prompt (required): Prompt template for image generation. Supports Jinja2 templating to\n reference other columns (e.g., \"Generate an image of a {{ character_name }}\").\n Must be a valid Jinja2 template.\n model_alias (required): The model to use for image generation.\n multi_modal_context: Optional list of image contexts for multi-modal generation.\n Enables autoregressive multi-modal models to generate images based on image inputs.\n Only works with autoregressive models that support image-to-image generation.\n\nInherited Attributes:\n name (required): Unique name of the column to be generated.\n drop: If True, generate this column but remove it from the final dataset.' - ), - ]) - ) - .min(1), - model_configs: zod - .array( - zod - .object({ - alias: zod.string(), - model: zod.string(), - inference_parameters: zod - .union([ - zod - .object({ - generation_type: zod - .literal('chat-completion') - .default( - dataDesignerPreviewfunctionRouteBodyConfigModelConfigsItemInferenceParametersOneGenerationTypeDefault - ), - max_parallel_requests: zod - .number() - .min(1) - .default( - dataDesignerPreviewfunctionRouteBodyConfigModelConfigsItemInferenceParametersOneMaxParallelRequestsDefault - ), - timeout: zod.number().min(1).optional(), - extra_body: zod.record(zod.string(), zod.unknown()).optional(), - temperature: zod - .union([ - zod.number(), - zod - .object({ - distribution_type: zod - .enum(['uniform', 'manual']) - .describe( - 'Types of distributions for sampling inference parameters.' - ) - .default( - dataDesignerPreviewfunctionRouteBodyConfigModelConfigsItemInferenceParametersOneTemperatureTwoDistributionTypeDefault - ), - params: zod - .object({ - low: zod.number(), - high: zod.number(), - }) - .describe( - 'Parameters for uniform distribution sampling.\n\nAttributes:\n low: Lower bound (inclusive).\n high: Upper bound (exclusive).' - ), - }) - .describe( - 'Uniform distribution for sampling inference parameters.\n\nSamples values uniformly between low and high bounds. Useful for exploring\na continuous range of values for temperature or top_p.\n\nAttributes:\n distribution_type: Type of distribution (\"uniform\").\n params: Distribution parameters (low, high).' - ), - zod - .object({ - distribution_type: zod - .enum(['uniform', 'manual']) - .describe( - 'Types of distributions for sampling inference parameters.' - ) - .default( - dataDesignerPreviewfunctionRouteBodyConfigModelConfigsItemInferenceParametersOneTemperatureThreeDistributionTypeDefault - ), - params: zod - .object({ - values: zod.array(zod.number()).min(1), - weights: zod.array(zod.number()).optional(), - }) - .describe( - 'Parameters for manual distribution sampling.\n\nAttributes:\n values: List of possible values to sample from.\n weights: Optional list of weights for each value. If not provided, all values have equal probability.' - ), - }) - .describe( - 'Manual (discrete) distribution for sampling inference parameters.\n\nSamples from a discrete set of values with optional weights. Useful for testing\nspecific values or creating custom probability distributions for temperature or top_p.\n\nAttributes:\n distribution_type: Type of distribution (\"manual\").\n params: Distribution parameters (values, weights).' - ), - ]) - .optional(), - top_p: zod - .union([ - zod.number(), - zod - .object({ - distribution_type: zod - .enum(['uniform', 'manual']) - .describe( - 'Types of distributions for sampling inference parameters.' - ) - .default( - dataDesignerPreviewfunctionRouteBodyConfigModelConfigsItemInferenceParametersOneTopPTwoDistributionTypeDefault - ), - params: zod - .object({ - low: zod.number(), - high: zod.number(), - }) - .describe( - 'Parameters for uniform distribution sampling.\n\nAttributes:\n low: Lower bound (inclusive).\n high: Upper bound (exclusive).' - ), - }) - .describe( - 'Uniform distribution for sampling inference parameters.\n\nSamples values uniformly between low and high bounds. Useful for exploring\na continuous range of values for temperature or top_p.\n\nAttributes:\n distribution_type: Type of distribution (\"uniform\").\n params: Distribution parameters (low, high).' - ), - zod - .object({ - distribution_type: zod - .enum(['uniform', 'manual']) - .describe( - 'Types of distributions for sampling inference parameters.' - ) - .default( - dataDesignerPreviewfunctionRouteBodyConfigModelConfigsItemInferenceParametersOneTopPThreeDistributionTypeDefault - ), - params: zod - .object({ - values: zod.array(zod.number()).min(1), - weights: zod.array(zod.number()).optional(), - }) - .describe( - 'Parameters for manual distribution sampling.\n\nAttributes:\n values: List of possible values to sample from.\n weights: Optional list of weights for each value. If not provided, all values have equal probability.' - ), - }) - .describe( - 'Manual (discrete) distribution for sampling inference parameters.\n\nSamples from a discrete set of values with optional weights. Useful for testing\nspecific values or creating custom probability distributions for temperature or top_p.\n\nAttributes:\n distribution_type: Type of distribution (\"manual\").\n params: Distribution parameters (values, weights).' - ), - ]) - .optional(), - max_tokens: zod.number().min(1).optional(), - }) - .describe( - 'Configuration for LLM inference parameters.\n\nAttributes:\n generation_type: Type of generation, always \"chat-completion\" for this class.\n temperature: Sampling temperature (0.0-2.0). Can be a fixed value or a distribution for dynamic sampling.\n top_p: Nucleus sampling probability (0.0-1.0). Can be a fixed value or a distribution for dynamic sampling.\n max_tokens: Maximum number of tokens to generate in the response.' - ), - zod - .object({ - generation_type: zod - .literal('embedding') - .default( - dataDesignerPreviewfunctionRouteBodyConfigModelConfigsItemInferenceParametersTwoGenerationTypeDefault - ), - max_parallel_requests: zod - .number() - .min(1) - .default( - dataDesignerPreviewfunctionRouteBodyConfigModelConfigsItemInferenceParametersTwoMaxParallelRequestsDefault - ), - timeout: zod.number().min(1).optional(), - extra_body: zod.record(zod.string(), zod.unknown()).optional(), - encoding_format: zod - .enum(['float', 'base64']) - .default( - dataDesignerPreviewfunctionRouteBodyConfigModelConfigsItemInferenceParametersTwoEncodingFormatDefault - ), - dimensions: zod.number().optional(), - }) - .describe( - 'Configuration for embedding generation parameters.\n\nAttributes:\n generation_type: Type of generation, always \"embedding\" for this class.\n encoding_format: Format of the embedding encoding (\"float\" or \"base64\").\n dimensions: Number of dimensions for the embedding.' - ), - zod - .object({ - generation_type: zod - .literal('image') - .default( - dataDesignerPreviewfunctionRouteBodyConfigModelConfigsItemInferenceParametersThreeGenerationTypeDefault - ), - max_parallel_requests: zod - .number() - .min(1) - .default( - dataDesignerPreviewfunctionRouteBodyConfigModelConfigsItemInferenceParametersThreeMaxParallelRequestsDefault - ), - timeout: zod.number().min(1).optional(), - extra_body: zod.record(zod.string(), zod.unknown()).optional(), - }) - .describe( - 'Configuration for image generation models.\n\nWorks for both diffusion and autoregressive image generation models. Pass all model-specific image options via `extra_body`.\n\nAttributes:\n generation_type: Type of generation, always \"image\" for this class.\n\nExample:\n ```python\n # OpenAI-style (DALLĀ·E): quality and size in extra_body or as top-level kwargs\n dd.ImageInferenceParams(\n extra_body={\"size\": \"1024x1024\", \"quality\": \"hd\"}\n )\n\n # Gemini-style: generationConfig.imageConfig\n dd.ImageInferenceParams(\n extra_body={\n \"generationConfig\": {\n \"imageConfig\": {\n \"aspectRatio\": \"1:1\",\n \"imageSize\": \"1024\"\n }\n }\n }\n )\n ```' - ), - ]) - .optional(), - provider: zod.string().optional(), - skip_health_check: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigModelConfigsItemSkipHealthCheckDefault - ), - }) - .describe( - "Configuration for a model used for generation.\n\nAttributes:\n alias: User-defined alias to reference in column configurations.\n model: Model identifier (e.g., from build.nvidia.com or other providers).\n inference_parameters: Inference parameters for the model (temperature, top_p, max_tokens, etc.).\n The generation_type is determined by the type of inference_parameters.\n provider: Name of the model provider. Required in a future release. Leaving\n ``provider`` unset (or ``None``) currently routes through the registry's\n implicit default and is \*\*deprecated\*\*; specify ``provider=`` explicitly.\n See issue #589.\n skip_health_check: Whether to skip the health check for this model. Defaults to False." - ) - ) - .optional(), - tool_configs: zod - .array( - zod - .object({ - tool_alias: zod.string(), - providers: zod.array(zod.string()), - allow_tools: zod.array(zod.string()).optional(), - max_tool_call_turns: zod - .number() - .min(1) - .default( - dataDesignerPreviewfunctionRouteBodyConfigToolConfigsItemMaxToolCallTurnsDefault - ), - timeout_sec: zod - .number() - .gt(dataDesignerPreviewfunctionRouteBodyConfigToolConfigsItemTimeoutSecExclusiveMin) - .optional(), - }) - .describe( - 'Configuration for permitting MCP tools on an LLM column.\n\nToolConfig defines which tools are available for use during LLM generation.\nIt references one or more MCP providers by name and can optionally restrict\nwhich tools from those providers are permitted.\n\nAttributes:\n tool_alias (str): User-defined alias to reference this tool configuration in column configs.\n providers (list[str]): Names of the MCP providers to use for tool calls. Tools can be\n drawn from multiple providers.\n allow_tools (list[str] | None): Optional allowlist of tool names that restricts which\n tools are permitted. If None, all tools from the specified providers are allowed.\n Defaults to None.\n max_tool_call_turns (int): Maximum number of tool-calling turns permitted in a single\n generation. A turn is one iteration where the LLM requests tool calls. With parallel\n tool calling, a single turn may execute multiple tools simultaneously. Defaults to 5.\n timeout_sec (float | None): Timeout in seconds for MCP tool calls. Defaults to None (no timeout).\n\nExamples:\n >>> ToolConfig(\n ... tool_alias=\"search-tools\",\n ... providers=[\"doc-search-mcp\", \"web-search-mcp\"],\n ... allow_tools=[\"search_docs\", \"list_docs\"],\n ... max_tool_call_turns=10,\n ... timeout_sec=30.0,\n ... )' - ) - ) - .optional(), - seed_config: zod - .object({ - source: zod.union([ - zod.object({ - seed_type: zod - .literal('local') - .default( - dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSourceOneSeedTypeDefault - ), - path: zod - .string() - .describe( - 'Path to a local seed dataset file or wildcard pattern. Relative paths are resolved from the current working directory when the config is loaded, not from the config file location.' - ), - }), - zod.object({ - seed_type: zod - .literal('hf') - .default( - dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSourceTwoSeedTypeDefault - ), - path: zod - .string() - .describe( - "Path to the seed data in HuggingFace. Wildcards are allowed. Examples include 'datasets\/my-username\/my-dataset\/data\/000_00000.parquet', 'datasets\/my-username\/my-dataset\/data\/\*.parquet', and 'datasets\/my-username\/my-dataset\/\*\*\/\*.parquet'" - ), - token: zod.string().optional(), - endpoint: zod - .string() - .default( - dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSourceTwoEndpointDefault - ), - }), - zod.object({ - seed_type: zod - .literal('df') - .default( - dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSourceThreeSeedTypeDefault - ), - }), - zod.object({ - seed_type: zod - .literal('directory') - .default( - dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSourceFourSeedTypeDefault - ), - path: zod - .string() - .describe( - 'Directory containing seed artifacts. Relative paths are resolved from the current working directory when the config is loaded, not from the config file location.' - ), - file_pattern: zod - .string() - .default( - dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSourceFourFilePatternDefault - ) - .describe( - 'Case-sensitive filename pattern used to match files under the provided directory. Patterns match basenames only, not relative paths.' - ), - recursive: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSourceFourRecursiveDefault - ) - .describe( - 'Whether to search nested subdirectories under the provided directory for matching files.' - ), - }), - zod.object({ - seed_type: zod - .literal('file_contents') - .default( - dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSourceFiveSeedTypeDefault - ), - path: zod - .string() - .describe( - 'Directory containing seed artifacts. Relative paths are resolved from the current working directory when the config is loaded, not from the config file location.' - ), - file_pattern: zod - .string() - .default( - dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSourceFiveFilePatternDefault - ) - .describe( - 'Case-sensitive filename pattern used to match files under the provided directory. Patterns match basenames only, not relative paths.' - ), - recursive: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSourceFiveRecursiveDefault - ) - .describe( - 'Whether to search nested subdirectories under the provided directory for matching files.' - ), - encoding: zod - .string() - .default( - dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSourceFiveEncodingDefault - ) - .describe( - 'Text encoding used when reading matching files into the `content` column.' - ), - }), - zod.object({ - seed_type: zod - .literal('agent_rollout') - .default( - dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSourceSixSeedTypeDefault - ), - path: zod - .string() - .optional() - .describe( - 'Directory containing agent rollout artifacts. This field is required for ATIF trajectories. When omitted, built-in defaults are used for formats that define one. Claude Code defaults to ~\/.claude\/projects, Codex defaults to ~\/.codex\/sessions, Hermes Agent defaults to ~\/.hermes\/sessions, and Pi Coding Agent defaults to ~\/.pi\/agent\/sessions. Relative paths are resolved from the current working directory when the config is loaded, not from the config file location.' - ), - file_pattern: zod - .string() - .optional() - .describe( - "Case-sensitive filename pattern used to match agent rollout files. When omitted, ATIF defaults to '\*.json', Claude Code, Codex, and Pi Coding Agent default to '\*.jsonl', and Hermes Agent defaults to '\*.json\*'." - ), - recursive: zod - .boolean() - .default( - dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSourceSixRecursiveDefault - ) - .describe( - 'Whether to search nested subdirectories under the provided directory for matching files.' - ), - format: zod - .enum(['atif', 'claude_code', 'codex', 'hermes_agent', 'pi_coding_agent']) - .describe('Built-in agent rollout format to use for parsing trace files.'), - }), - zod.object({ - seed_type: zod - .literal('nmp') - .default( - dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSourceSevenSeedTypeDefault - ), - path: zod.string(), - }), - ]), - sampling_strategy: zod - .enum(['ordered', 'shuffle']) - .default(dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSamplingStrategyDefault), - selection_strategy: zod - .union([ - zod.object({ - start: zod - .number() - .min( - dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSelectionStrategyOneStartMin - ) - .describe('The start index of the index range (inclusive)'), - end: zod - .number() - .min( - dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSelectionStrategyOneEndMin - ) - .describe('The end index of the index range (inclusive)'), - }), - zod.object({ - index: zod - .number() - .min( - dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSelectionStrategyTwoIndexMin - ) - .default( - dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSelectionStrategyTwoIndexDefault - ) - .describe('The index of the partition to sample from'), - num_partitions: zod - .number() - .min(1) - .default( - dataDesignerPreviewfunctionRouteBodyConfigSeedConfigSelectionStrategyTwoNumPartitionsDefault - ) - .describe('The total number of partitions in the dataset'), - }), - ]) - .optional(), - }) - .optional() - .describe( - 'Configuration for sampling data from a seed dataset.\n\nAttributes:\n source: A SeedSource defining where the seed data exists\n sampling_strategy: Strategy for how to sample rows from the dataset.\n - ORDERED: Read rows sequentially in their original order.\n - SHUFFLE: Randomly shuffle rows before sampling. When used with\n selection_strategy, shuffling occurs within the selected range\/partition.\n selection_strategy: Optional strategy to select a subset of the dataset.\n - IndexRange: Select a specific range of indices (e.g., rows 100-200).\n - PartitionBlock: Select a partition by splitting the dataset into N equal parts.\n Partition indices are zero-based (index=0 is the first partition, index=1 is\n the second, etc.).\n\nExamples:\n Read rows sequentially from start to end:\n SeedConfig(\n source=LocalFileSeedSource(path=\"my_data.parquet\"),\n sampling_strategy=SamplingStrategy.ORDERED\n )\n\n Read rows in random order:\n SeedConfig(\n source=LocalFileSeedSource(path=\"my_data.parquet\"),\n sampling_strategy=SamplingStrategy.SHUFFLE\n )\n\n Read specific index range (rows 100-199):\n SeedConfig(\n source=LocalFileSeedSource(path=\"my_data.parquet\"),\n sampling_strategy=SamplingStrategy.ORDERED,\n selection_strategy=IndexRange(start=100, end=199)\n )\n\n Read random rows from a specific index range (shuffles within rows 100-199):\n SeedConfig(\n source=LocalFileSeedSource(path=\"my_data.parquet\"),\n sampling_strategy=SamplingStrategy.SHUFFLE,\n selection_strategy=IndexRange(start=100, end=199)\n )\n\n Read from partition 2 (3rd partition, zero-based) of 5 partitions (20% of dataset):\n SeedConfig(\n source=LocalFileSeedSource(path=\"my_data.parquet\"),\n sampling_strategy=SamplingStrategy.ORDERED,\n selection_strategy=PartitionBlock(index=2, num_partitions=5)\n )\n\n Read shuffled rows from partition 0 of 10 partitions (shuffles within the partition):\n SeedConfig(\n source=LocalFileSeedSource(path=\"my_data.parquet\"),\n sampling_strategy=SamplingStrategy.SHUFFLE,\n selection_strategy=PartitionBlock(index=0, num_partitions=10)\n )' - ), - constraints: zod - .array( - zod.union([ - zod - .object({ - target_column: zod - .string() - .describe('Name of the sampler column this constraint applies to'), - constraint_type: zod - .literal('scalar_inequality') - .default( - dataDesignerPreviewfunctionRouteBodyConfigConstraintsItemOneConstraintTypeDefault - ) - .describe( - "Constraint type discriminator, always 'scalar_inequality' for this constraint" - ), - rhs: zod.number().describe('Scalar value to compare against'), - operator: zod.enum(['lt', 'le', 'gt', 'ge']).describe('Comparison operator'), - }) - .describe( - 'Constrain a sampler column to be less\/greater than a scalar value.\n\nOnly applies to sampler columns.\n\nAttributes:\n rhs (required): Scalar value to compare against.\n operator (required): Comparison operator (lt, le, gt, ge).\n\nInherited Attributes:\n target_column (required): Name of the sampler column this constraint applies to.' - ), - zod - .object({ - target_column: zod - .string() - .describe('Name of the sampler column this constraint applies to'), - constraint_type: zod - .literal('column_inequality') - .default( - dataDesignerPreviewfunctionRouteBodyConfigConstraintsItemTwoConstraintTypeDefault - ) - .describe( - "Constraint type discriminator, always 'column_inequality' for this constraint" - ), - rhs: zod.string().describe('Name of the other sampler column to compare against'), - operator: zod.enum(['lt', 'le', 'gt', 'ge']).describe('Comparison operator'), - }) - .describe( - 'Constrain a sampler column to be less\/greater than another sampler column.\n\nOnly applies to sampler columns.\n\nAttributes:\n rhs (required): Name of the other sampler column to compare against.\n operator (required): Comparison operator (lt, le, gt, ge).\n\nInherited Attributes:\n target_column (required): Name of the sampler column this constraint applies to.' - ), - ]) - ) - .optional(), - profilers: zod - .array( - zod - .object({ - model_alias: zod.string(), - summary_score_sample_size: zod - .number() - .min(1) - .default( - dataDesignerPreviewfunctionRouteBodyConfigProfilersItemSummaryScoreSampleSizeDefault - ), - }) - .describe( - 'Configuration for the LLM-as-a-judge score profiler.\n\nAttributes:\n model_alias: Alias of the LLM model to use for generating score distribution summaries.\n Must match a model alias defined in the Data Designer configuration.\n summary_score_sample_size: Number of score samples to include when prompting the LLM\n to generate summaries. Larger sample sizes provide more context but increase\n token usage. Must be at least 1 when provided. Set to None to skip LLM-generated\n summaries. Defaults to 20.' - ) - ) - .optional(), - processors: zod - .array( - zod.union([ - zod - .object({ - name: zod - .string() - .describe( - 'The name of the processor, used to identify the processor in the results and to write the artifacts to disk.' - ), - processor_type: zod - .literal('drop_columns') - .default( - dataDesignerPreviewfunctionRouteBodyConfigProcessorsItemOneProcessorTypeDefault - ), - column_names: zod - .array(zod.string()) - .describe('List of column names to drop from the output dataset.'), - }) - .describe( - 'Drop columns from the output dataset (prefer ``drop=True`` in the column config).\n\nThis processor removes specified columns from the generated dataset. The dropped\ncolumns are saved separately in the `dropped-columns-parquet-files` directory for reference.\nWhen this processor is added via the config builder, the corresponding column\nconfigs are automatically marked with `drop = True`.\n\nAttributes:\n column_names (required): List of column names to remove from the output dataset.\n\nInherited Attributes:\n name (required): Name of the processor.' - ), - zod - .object({ - name: zod - .string() - .describe( - 'The name of the processor, used to identify the processor in the results and to write the artifacts to disk.' - ), - processor_type: zod - .literal('schema_transform') - .default( - dataDesignerPreviewfunctionRouteBodyConfigProcessorsItemTwoProcessorTypeDefault - ), - template: zod - .record(zod.string(), zod.unknown()) - .describe( - '\n Dictionary specifying columns and templates to use in the new dataset with transformed schema.\n\n Each key is a new column name, and each value is an object containing Jinja2 templates - for instance, a string or a list of strings.\n Values must be JSON-serializable.\n\n Example:\n\n ```python\n template = {\n \"list_of_strings\": [\"{{ col1 }}\", \"{{ col2 }}\"],\n \"uppercase_string\": \"{{ col1 | upper }}\",\n \"lowercase_string\": \"{{ col2 | lower }}\",\n }\n ```\n\n The above templates will create an new dataset with three columns: \"list_of_strings\", \"uppercase_string\", and \"lowercase_string\".\n References to columns \"col1\" and \"col2\" in the templates will be replaced with the actual values of the columns in the dataset.\n ' - ), - }) - .describe( - 'Configuration for transforming the dataset schema using Jinja2 templates.\n\nThis processor creates a new dataset with a transformed schema. Each key in the\ntemplate becomes a column in the output, and values are Jinja2 templates that\ncan reference any column in the batch. The transformed dataset is written to\na `processors-files\/{processor_name}\/` directory alongside the main dataset.\n\nAttributes:\n template (required): Dictionary defining the output schema. Keys are new column names,\n values are Jinja2 templates (strings, lists, or nested structures).\n Must be JSON-serializable.\n\nInherited Attributes:\n name (required): Name of the processor.' - ), - ]) - ) - .optional(), - }) - .describe( - 'Configuration for NeMo Data Designer.\n\nThis class defines the main configuration structure for NeMo Data Designer,\nwhich the engine consumes when generating synthetic data.\n\nAttributes:\n columns: Required list of column configurations defining how each column\n should be generated. Must contain at least one column.\n model_configs: Optional list of model configurations for LLM-based generation.\n Each model config defines the model, provider, and inference parameters.\n tool_configs: Optional list of tool configurations for MCP tool calling.\n Each tool config defines the provider, allowed tools, and execution limits.\n seed_config: Optional seed dataset settings to use for generation.\n constraints: Optional list of column constraints.\n profilers: Optional list of column profilers for analyzing generated data characteristics.\n processors: Optional list of processor configurations for post-generation transformations.' - ), - num_records: zod.number().optional(), -}); - -export const DataDesignerPreviewfunctionRouteResponse = zod.unknown(); diff --git a/web/packages/sdk/generated/fetchers/agents.ts b/web/packages/sdk/generated/fetchers/agents.ts deleted file mode 100644 index 6f041b302d..0000000000 --- a/web/packages/sdk/generated/fetchers/agents.ts +++ /dev/null @@ -1,104 +0,0 @@ -// SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -// SPDX-License-Identifier: Apache-2.0 - -import axios from 'axios'; -import type { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios'; -import qs from 'qs'; -import { User } from 'oidc-client-ts'; -import { resolveBrowserBaseUrl } from '../../src/utils/url'; - -const headers = { - 'X-Source': 'NeMo Studio', -}; - -interface RequestOptions extends AxiosRequestConfig { - params?: Record; -} - -// Add X-Source header and OIDC Bearer token to ALL requests -axios.interceptors.request.use((config) => { - Object.assign(config.headers, headers); - - // If Authorization is already set (e.g. via axios.defaults in a Web Worker), skip OIDC lookup - if (config.headers.Authorization) { - return config; - } - - // Attach OIDC access token as Bearer token if available - // Guard localStorage access — it is unavailable in Web Worker contexts - const authority = import.meta.env.VITE_AUTH_AUTHORITY; - const clientId = import.meta.env.VITE_AUTH_CLIENT_ID; - if (authority && clientId && typeof localStorage !== 'undefined') { - const oidcStorageKey = `oidc.user:${authority}:${clientId}`; - const oidcStorage = localStorage.getItem(oidcStorageKey); - if (oidcStorage) { - try { - const user = User.fromStorageString(oidcStorage); - if (user?.access_token && !user.expired) { - config.headers.Authorization = `Bearer ${user.access_token}`; - } - } catch { - // Remove malformed storage entry and trigger re-authentication - console.warn( - 'Malformed OIDC storage entry detected. Clearing storage and re-authenticating.' - ); - localStorage.removeItem(oidcStorageKey); - } - } - } - - return config; -}); - -const getBaseUrl = (): string | undefined => { - // Check Vite environment variables first (import.meta.env) - const VITE_VALUE_VITE_PLATFORM_BASE_URL = import.meta.env.VITE_PLATFORM_BASE_URL; - if (VITE_VALUE_VITE_PLATFORM_BASE_URL && VITE_VALUE_VITE_PLATFORM_BASE_URL.trim() !== '') { - return resolveBrowserBaseUrl(VITE_VALUE_VITE_PLATFORM_BASE_URL); - } - - // Fallback to Node.js process.env - if (typeof process !== 'undefined' && process.env) { - const NODE_VALUE_PLATFORM_BASE_URL = process.env.PLATFORM_BASE_URL; - if (NODE_VALUE_PLATFORM_BASE_URL && NODE_VALUE_PLATFORM_BASE_URL.trim() !== '') { - return NODE_VALUE_PLATFORM_BASE_URL; - } - } - - // If no variables found, return empty string - return ''; -}; - -const getUrl = (request: AxiosRequestConfig): string => { - const baseUrl = getBaseUrl(); - const { url } = request; - const fullUrl = `${baseUrl}${url}`; - - if (!baseUrl) { - return fullUrl; - } - - try { - // Construct the full URL with base URL and query parameters - return new URL(fullUrl).toString(); - } catch (error) { - console.error('Invalid URL:', fullUrl, error); - throw new Error(`Invalid URL format: ${fullUrl}`); - } -}; - -export const customFetch = async (request: RequestOptions): Promise => { - const requestUrl = getUrl(request); - const response: AxiosResponse = await axios({ - ...request, - url: requestUrl, - paramsSerializer: { - serialize: (params) => qs.stringify(params, { indices: false }), - }, - }); - return response.data; -}; - -// https://orval.dev/reference/configuration/output#mutator -// In some case with react-query and swr you want to be able to override the return error type so you can also do it here like this -export type ErrorType = AxiosError; diff --git a/web/packages/sdk/generated/fetchers/data-designer.ts b/web/packages/sdk/generated/fetchers/data-designer.ts deleted file mode 100644 index 6f041b302d..0000000000 --- a/web/packages/sdk/generated/fetchers/data-designer.ts +++ /dev/null @@ -1,104 +0,0 @@ -// SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -// SPDX-License-Identifier: Apache-2.0 - -import axios from 'axios'; -import type { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios'; -import qs from 'qs'; -import { User } from 'oidc-client-ts'; -import { resolveBrowserBaseUrl } from '../../src/utils/url'; - -const headers = { - 'X-Source': 'NeMo Studio', -}; - -interface RequestOptions extends AxiosRequestConfig { - params?: Record; -} - -// Add X-Source header and OIDC Bearer token to ALL requests -axios.interceptors.request.use((config) => { - Object.assign(config.headers, headers); - - // If Authorization is already set (e.g. via axios.defaults in a Web Worker), skip OIDC lookup - if (config.headers.Authorization) { - return config; - } - - // Attach OIDC access token as Bearer token if available - // Guard localStorage access — it is unavailable in Web Worker contexts - const authority = import.meta.env.VITE_AUTH_AUTHORITY; - const clientId = import.meta.env.VITE_AUTH_CLIENT_ID; - if (authority && clientId && typeof localStorage !== 'undefined') { - const oidcStorageKey = `oidc.user:${authority}:${clientId}`; - const oidcStorage = localStorage.getItem(oidcStorageKey); - if (oidcStorage) { - try { - const user = User.fromStorageString(oidcStorage); - if (user?.access_token && !user.expired) { - config.headers.Authorization = `Bearer ${user.access_token}`; - } - } catch { - // Remove malformed storage entry and trigger re-authentication - console.warn( - 'Malformed OIDC storage entry detected. Clearing storage and re-authenticating.' - ); - localStorage.removeItem(oidcStorageKey); - } - } - } - - return config; -}); - -const getBaseUrl = (): string | undefined => { - // Check Vite environment variables first (import.meta.env) - const VITE_VALUE_VITE_PLATFORM_BASE_URL = import.meta.env.VITE_PLATFORM_BASE_URL; - if (VITE_VALUE_VITE_PLATFORM_BASE_URL && VITE_VALUE_VITE_PLATFORM_BASE_URL.trim() !== '') { - return resolveBrowserBaseUrl(VITE_VALUE_VITE_PLATFORM_BASE_URL); - } - - // Fallback to Node.js process.env - if (typeof process !== 'undefined' && process.env) { - const NODE_VALUE_PLATFORM_BASE_URL = process.env.PLATFORM_BASE_URL; - if (NODE_VALUE_PLATFORM_BASE_URL && NODE_VALUE_PLATFORM_BASE_URL.trim() !== '') { - return NODE_VALUE_PLATFORM_BASE_URL; - } - } - - // If no variables found, return empty string - return ''; -}; - -const getUrl = (request: AxiosRequestConfig): string => { - const baseUrl = getBaseUrl(); - const { url } = request; - const fullUrl = `${baseUrl}${url}`; - - if (!baseUrl) { - return fullUrl; - } - - try { - // Construct the full URL with base URL and query parameters - return new URL(fullUrl).toString(); - } catch (error) { - console.error('Invalid URL:', fullUrl, error); - throw new Error(`Invalid URL format: ${fullUrl}`); - } -}; - -export const customFetch = async (request: RequestOptions): Promise => { - const requestUrl = getUrl(request); - const response: AxiosResponse = await axios({ - ...request, - url: requestUrl, - paramsSerializer: { - serialize: (params) => qs.stringify(params, { indices: false }), - }, - }); - return response.data; -}; - -// https://orval.dev/reference/configuration/output#mutator -// In some case with react-query and swr you want to be able to override the return error type so you can also do it here like this -export type ErrorType = AxiosError; diff --git a/web/packages/sdk/generated/fetchers/platform.ts b/web/packages/sdk/generated/fetchers/platform.ts deleted file mode 100644 index 6f041b302d..0000000000 --- a/web/packages/sdk/generated/fetchers/platform.ts +++ /dev/null @@ -1,104 +0,0 @@ -// SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. -// SPDX-License-Identifier: Apache-2.0 - -import axios from 'axios'; -import type { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios'; -import qs from 'qs'; -import { User } from 'oidc-client-ts'; -import { resolveBrowserBaseUrl } from '../../src/utils/url'; - -const headers = { - 'X-Source': 'NeMo Studio', -}; - -interface RequestOptions extends AxiosRequestConfig { - params?: Record; -} - -// Add X-Source header and OIDC Bearer token to ALL requests -axios.interceptors.request.use((config) => { - Object.assign(config.headers, headers); - - // If Authorization is already set (e.g. via axios.defaults in a Web Worker), skip OIDC lookup - if (config.headers.Authorization) { - return config; - } - - // Attach OIDC access token as Bearer token if available - // Guard localStorage access — it is unavailable in Web Worker contexts - const authority = import.meta.env.VITE_AUTH_AUTHORITY; - const clientId = import.meta.env.VITE_AUTH_CLIENT_ID; - if (authority && clientId && typeof localStorage !== 'undefined') { - const oidcStorageKey = `oidc.user:${authority}:${clientId}`; - const oidcStorage = localStorage.getItem(oidcStorageKey); - if (oidcStorage) { - try { - const user = User.fromStorageString(oidcStorage); - if (user?.access_token && !user.expired) { - config.headers.Authorization = `Bearer ${user.access_token}`; - } - } catch { - // Remove malformed storage entry and trigger re-authentication - console.warn( - 'Malformed OIDC storage entry detected. Clearing storage and re-authenticating.' - ); - localStorage.removeItem(oidcStorageKey); - } - } - } - - return config; -}); - -const getBaseUrl = (): string | undefined => { - // Check Vite environment variables first (import.meta.env) - const VITE_VALUE_VITE_PLATFORM_BASE_URL = import.meta.env.VITE_PLATFORM_BASE_URL; - if (VITE_VALUE_VITE_PLATFORM_BASE_URL && VITE_VALUE_VITE_PLATFORM_BASE_URL.trim() !== '') { - return resolveBrowserBaseUrl(VITE_VALUE_VITE_PLATFORM_BASE_URL); - } - - // Fallback to Node.js process.env - if (typeof process !== 'undefined' && process.env) { - const NODE_VALUE_PLATFORM_BASE_URL = process.env.PLATFORM_BASE_URL; - if (NODE_VALUE_PLATFORM_BASE_URL && NODE_VALUE_PLATFORM_BASE_URL.trim() !== '') { - return NODE_VALUE_PLATFORM_BASE_URL; - } - } - - // If no variables found, return empty string - return ''; -}; - -const getUrl = (request: AxiosRequestConfig): string => { - const baseUrl = getBaseUrl(); - const { url } = request; - const fullUrl = `${baseUrl}${url}`; - - if (!baseUrl) { - return fullUrl; - } - - try { - // Construct the full URL with base URL and query parameters - return new URL(fullUrl).toString(); - } catch (error) { - console.error('Invalid URL:', fullUrl, error); - throw new Error(`Invalid URL format: ${fullUrl}`); - } -}; - -export const customFetch = async (request: RequestOptions): Promise => { - const requestUrl = getUrl(request); - const response: AxiosResponse = await axios({ - ...request, - url: requestUrl, - paramsSerializer: { - serialize: (params) => qs.stringify(params, { indices: false }), - }, - }); - return response.data; -}; - -// https://orval.dev/reference/configuration/output#mutator -// In some case with react-query and swr you want to be able to override the return error type so you can also do it here like this -export type ErrorType = AxiosError; diff --git a/web/packages/sdk/generated/platform/api.ts b/web/packages/sdk/generated/platform/api.ts deleted file mode 100644 index 15f074dc70..0000000000 --- a/web/packages/sdk/generated/platform/api.ts +++ /dev/null @@ -1,36454 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import { useMutation, useQuery, useSuspenseQuery } from '@tanstack/react-query'; -import type { - DataTag, - DefinedInitialDataOptions, - DefinedUseQueryResult, - MutationFunction, - QueryClient, - QueryFunction, - QueryKey, - UndefinedInitialDataOptions, - UseMutationOptions, - UseMutationResult, - UseQueryOptions, - UseQueryResult, - UseSuspenseQueryOptions, - UseSuspenseQueryResult, -} from '@tanstack/react-query'; - -import type { - Adapter, - AdaptersPage, - AgentGoalAccuracyMetricInput, - AgentGoalAccuracyMetricResponse, - AggregatedMetricResult, - AnswerAccuracyMetricInput, - AnswerAccuracyMetricResponse, - App, - AppInput, - AppUpdate, - AppsPage, - AtifIngestRequest, - AuthCreateIamRoleBindingParams, - AuthDiscoveryResponse, - AuthListIamRoleBindingsParams, - AuthRevokeIamRoleBindingParams, - BLEUMetricInput, - BLEUMetricResponse, - Benchmark, - BenchmarkEvaluationJob, - BenchmarkEvaluationJobRequest, - BenchmarkEvaluationJobsPage, - BenchmarkEvaluationResult, - BenchmarkJobResult, - BenchmarkJobResultsListResponse, - BenchmarkRequest, - BenchmarksListResponse, - ChatCompletionsIngestRequest, - ChatCompletionsIngestResponse, - ContextEntityRecallMetricInput, - ContextEntityRecallMetricResponse, - ContextPrecisionMetricInput, - ContextPrecisionMetricResponse, - ContextRecallMetricInput, - ContextRecallMetricResponse, - ContextRelevanceMetricInput, - ContextRelevanceMetricResponse, - CreateAdapterRequest, - CreateFilesetRequest, - CreateModelAdapterRequest, - CreateModelDeploymentConfigRequest, - CreateModelDeploymentRequest, - CreateModelEntityRequest, - CreateModelProviderRequest, - CreatePlatformJobRequest, - CreateVirtualModelRequest, - DeleteResponse, - DockerJobExecutionProfile, - E2EJobExecutionProfile, - EntitiesAddWorkspaceMemberParams, - EntitiesCreateWorkspaceParams, - EntitiesDeleteEntityByNameParams, - EntitiesGetEntityByNameParams, - EntitiesListEntitiesParams, - EntitiesListProjectsParams, - EntitiesListWorkspacesParams, - EntitiesPage, - EntitiesRemoveWorkspaceMemberParams, - EntitiesUpdateEntityByNameParams, - EntitiesUpdateWorkspaceMemberParams, - Entity, - EntityCreateInput, - EntityUpdate, - Entry, - EntryInput, - EntryUpdate, - EntrysPage, - ErrorResponse, - EvaluationCreateBenchmarkParams, - EvaluationDownloadBenchmarkJobResultRowScoresParams, - EvaluationDownloadMetricJobResultRowScoresParams, - EvaluationEvaluateMetricParams, - EvaluationGetBenchmarkJobLogsParams, - EvaluationGetBenchmarkJobResultParams, - EvaluationGetBenchmarkParams, - EvaluationGetMetricJobLogsParams, - EvaluationGetMetricJobResultParams, - EvaluationListBenchmarkJobResultsParams, - EvaluationListBenchmarkJobsParams, - EvaluationListBenchmarksParams, - EvaluationListMetricJobResultsParams, - EvaluationListMetricJobsParams, - EvaluationListMetricsParams, - EvaluatorResult, - EvaluatorResultInput, - EvaluatorResultsPage, - EventsCreateRequest, - ExactMatchMetricInput, - ExactMatchMetricResponse, - ExportJob, - ExportJobInput, - ExportJobsPage, - ExportPreviewRequest, - ExportPreviewResponse, - ExtendedBenchmark, - F1MetricInput, - F1MetricResponse, - FaithfulnessMetricInput, - FaithfulnessMetricResponse, - FilesListFilesetFilesParams, - FilesListFilesetsParams, - FilesetFileOutput, - FilesetOutput, - FilesetOutputsPage, - GatewayProxyPatch200, - GatewayProxyPatchBody, - GatewayProxyPost200, - GatewayProxyPostBody, - GatewayProxyPut200, - GatewayProxyPutBody, - GetTraceParams, - GuardrailCheckRequest, - GuardrailCheckResponse, - GuardrailConfig, - GuardrailConfigInput, - GuardrailConfigUpdate, - GuardrailConfigsPage, - GuardrailsListGuardrailConfigsParams, - HTTPValidationError, - IngestResponse, - JobsListJobResultsParams, - JobsListJobsParams, - JobsListStepsParams, - JobsPageJobLogsParams, - JobsUpdateJobStatusDetailsBody, - KubernetesJobExecutionProfile, - LLMJudgeMetricInput, - LLMJudgeMetricResponse, - ListAppsParams, - ListEntriesParams, - ListEvaluatorResultsParams, - ListExportJobsParams, - ListFilesetFilesResponse, - ListSpansParams, - ListTasksParams, - ListTracesParams, - ListVirtualModelsParams, - LogQueryRequest, - MetricEvaluationJob, - MetricEvaluationJobRequest, - MetricEvaluationJobsPage, - MetricEvaluationRequest, - MetricEvaluationResponse, - MetricJobResult, - MetricJobResultsListResponse, - MetricsListResponse, - ModelDeployment, - ModelDeploymentConfig, - ModelDeploymentConfigsPage, - ModelDeploymentsPage, - ModelEntity, - ModelEntitysPage, - ModelProvider, - ModelProvidersPage, - ModelsGetDeploymentModels200, - ModelsGetModelParams, - ModelsListAdaptersParams, - ModelsListDeploymentConfigsParams, - ModelsListDeploymentsParams, - ModelsListModelsParams, - ModelsListProvidersParams, - ModelsUpdateDeploymentStatusParams, - ModelsUpdateModelParams, - NemoAgentToolkitRemoteMetricInput, - NemoAgentToolkitRemoteMetricResponse, - NoiseSensitivityMetricInput, - NoiseSensitivityMetricResponse, - NumberCheckMetricInput, - NumberCheckMetricResponse, - OpenAIListModelsResp, - OpenAIModelResp, - OpenaiProxyPatch200, - OpenaiProxyPatchBody, - OpenaiProxyPost200, - OpenaiProxyPostBody, - OpenaiProxyPut200, - OpenaiProxyPutBody, - OtelExportLogsServiceResponse, - PlatformJobListResultResponse, - PlatformJobListTaskResponse, - PlatformJobLogPage, - PlatformJobResponse, - PlatformJobResponsesPage, - PlatformJobResultCreateRequest, - PlatformJobResultResponse, - PlatformJobStatusResponse, - PlatformJobStatusUpdateRequest, - PlatformJobStep, - PlatformJobStepWithContextsPage, - PlatformJobTask, - PlatformJobTaskUpdate, - PlatformSecretAccessResponse, - PlatformSecretAdminRotationResponse, - PlatformSecretCreateRequest, - PlatformSecretResponse, - PlatformSecretResponsesPage, - PlatformSecretUpdateRequest, - Project, - ProjectInput, - ProjectUpdate, - ProjectsPage, - ProviderProxyPatch200, - ProviderProxyPatchBody, - ProviderProxyPost200, - ProviderProxyPostBody, - ProviderProxyPut200, - ProviderProxyPutBody, - ProviderReady200, - ROUGEMetricInput, - ROUGEMetricResponse, - RemoteMetricInput, - RemoteMetricResponse, - ResponseGroundednessMetricInput, - ResponseGroundednessMetricResponse, - ResponseRelevancyMetricInput, - ResponseRelevancyMetricResponse, - RoleBinding, - RoleBindingInput, - RoleBindingsPage, - SafeSynthesizerGetJobLogsParams, - SafeSynthesizerJob, - SafeSynthesizerJobRequest, - SafeSynthesizerJobsPage, - SafeSynthesizerListJobsParams, - SafeSynthesizerSummary, - SecretsListSecretsParams, - Span, - SpansPage, - StringCheckMetricInput, - StringCheckMetricResponse, - SubprocessJobExecutionProfile, - SystemBenchmark, - SystemMetricResponse, - Task, - TaskInput, - TaskUpdate, - TasksPage, - ToolCallAccuracyMetricInput, - ToolCallAccuracyMetricResponse, - ToolCallingMetricInput, - ToolCallingMetricResponse, - TopicAdherenceMetricInput, - TopicAdherenceMetricResponse, - Trace, - TracesPage, - UpdateAdapterRequest, - UpdateFilesetRequest, - UpdateModelDeploymentConfigRequest, - UpdateModelDeploymentRequest, - UpdateModelDeploymentStatusRequest, - UpdateModelEntityRequest, - UpdateModelProviderStatusRequest, - UpdateVirtualModelRequest, - UpsertModelProviderRequest, - VirtualModel, - VirtualModelsPage, - VolcanoJobExecutionProfile, - Workspace, - WorkspaceInput, - WorkspaceMember, - WorkspaceMemberInput, - WorkspaceMemberListResponse, - WorkspaceMemberUpdate, - WorkspaceUpdate, - WorkspacesPage, -} from './schema'; - -import { customFetch } from '../fetchers/platform'; -import type { ErrorType } from '../fetchers/platform'; -type AwaitedInput = PromiseLike | T; - -type Awaited = O extends AwaitedInput ? T : never; - -/** - * Return authentication configuration for CLI/SDK discovery. - -This endpoint is unauthenticated and returns the information clients -need to authenticate with this NeMo Platform deployment. - -**Response fields:** - -- `auth_enabled`: Whether authentication is enabled on this cluster -- `oidc`: OIDC configuration (only present when OIDC is enabled) - - `issuer`: The OIDC issuer URL - - `authorization_endpoint`: Authorization endpoint for browser-based flows - - `token_endpoint`: Token exchange endpoint - - `device_authorization_endpoint`: Device flow authorization endpoint (for CLI) - - `userinfo_endpoint`: UserInfo endpoint - - `client_id`: OAuth client ID to use - - `default_scopes`: OAuth scopes to request during authentication - - `scope_prefix`: Prefix to prepend to custom scopes (those with ':' or '.default') - * @summary Discover auth configuration - */ -export const getAuthDiscoveryApisAuthDiscoveryGet = (signal?: AbortSignal) => { - return customFetch({ url: `/apis/auth/discovery`, method: 'GET', signal }); -}; - -export const getGetAuthDiscoveryApisAuthDiscoveryGetQueryKey = () => { - return [`/apis/auth/discovery`] as const; -}; - -export const getGetAuthDiscoveryApisAuthDiscoveryGetQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->(options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; -}) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getGetAuthDiscoveryApisAuthDiscoveryGetQueryKey(); - - const queryFn: QueryFunction< - Awaited> - > = ({ signal }) => getAuthDiscoveryApisAuthDiscoveryGet(signal); - - return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type GetAuthDiscoveryApisAuthDiscoveryGetQueryResult = NonNullable< - Awaited> ->; -export type GetAuthDiscoveryApisAuthDiscoveryGetQueryError = ErrorType; - -export function useGetAuthDiscoveryApisAuthDiscoveryGet< - TData = Awaited>, - TError = ErrorType, ->( - options: { - query: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useGetAuthDiscoveryApisAuthDiscoveryGet< - TData = Awaited>, - TError = ErrorType, ->( - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useGetAuthDiscoveryApisAuthDiscoveryGet< - TData = Awaited>, - TError = ErrorType, ->( - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Discover auth configuration - */ - -export function useGetAuthDiscoveryApisAuthDiscoveryGet< - TData = Awaited>, - TError = ErrorType, ->( - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getGetAuthDiscoveryApisAuthDiscoveryGetQueryOptions(options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getGetAuthDiscoveryApisAuthDiscoveryGetSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->(options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; -}) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getGetAuthDiscoveryApisAuthDiscoveryGetQueryKey(); - - const queryFn: QueryFunction< - Awaited> - > = ({ signal }) => getAuthDiscoveryApisAuthDiscoveryGet(signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type GetAuthDiscoveryApisAuthDiscoveryGetSuspenseQueryResult = NonNullable< - Awaited> ->; -export type GetAuthDiscoveryApisAuthDiscoveryGetSuspenseQueryError = ErrorType; - -export function useGetAuthDiscoveryApisAuthDiscoveryGetSuspense< - TData = Awaited>, - TError = ErrorType, ->( - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useGetAuthDiscoveryApisAuthDiscoveryGetSuspense< - TData = Awaited>, - TError = ErrorType, ->( - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useGetAuthDiscoveryApisAuthDiscoveryGetSuspense< - TData = Awaited>, - TError = ErrorType, ->( - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Discover auth configuration - */ - -export function useGetAuthDiscoveryApisAuthDiscoveryGetSuspense< - TData = Awaited>, - TError = ErrorType, ->( - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getGetAuthDiscoveryApisAuthDiscoveryGetSuspenseQueryOptions(options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * List all role bindings (Platform Admin only) - * @summary List role bindings - */ -export const authListIamRoleBindings = ( - params?: AuthListIamRoleBindingsParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/auth/v2/iam/role-bindings`, - method: 'GET', - params, - signal, - }); -}; - -export const getAuthListIamRoleBindingsQueryKey = (params?: AuthListIamRoleBindingsParams) => { - return [`/apis/auth/v2/iam/role-bindings`, ...(params ? [params] : [])] as const; -}; - -export const getAuthListIamRoleBindingsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - params?: AuthListIamRoleBindingsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getAuthListIamRoleBindingsQueryKey(params); - - const queryFn: QueryFunction>> = ({ - signal, - }) => authListIamRoleBindings(params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type AuthListIamRoleBindingsQueryResult = NonNullable< - Awaited> ->; -export type AuthListIamRoleBindingsQueryError = ErrorType; - -export function useAuthListIamRoleBindings< - TData = Awaited>, - TError = ErrorType, ->( - params: undefined | AuthListIamRoleBindingsParams, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useAuthListIamRoleBindings< - TData = Awaited>, - TError = ErrorType, ->( - params?: AuthListIamRoleBindingsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useAuthListIamRoleBindings< - TData = Awaited>, - TError = ErrorType, ->( - params?: AuthListIamRoleBindingsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List role bindings - */ - -export function useAuthListIamRoleBindings< - TData = Awaited>, - TError = ErrorType, ->( - params?: AuthListIamRoleBindingsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getAuthListIamRoleBindingsQueryOptions(params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getAuthListIamRoleBindingsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - params?: AuthListIamRoleBindingsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getAuthListIamRoleBindingsQueryKey(params); - - const queryFn: QueryFunction>> = ({ - signal, - }) => authListIamRoleBindings(params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type AuthListIamRoleBindingsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type AuthListIamRoleBindingsSuspenseQueryError = ErrorType; - -export function useAuthListIamRoleBindingsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - params: undefined | AuthListIamRoleBindingsParams, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useAuthListIamRoleBindingsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - params?: AuthListIamRoleBindingsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useAuthListIamRoleBindingsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - params?: AuthListIamRoleBindingsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List role bindings - */ - -export function useAuthListIamRoleBindingsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - params?: AuthListIamRoleBindingsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getAuthListIamRoleBindingsSuspenseQueryOptions(params, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Create a new role binding (Platform Admin only) - * @summary Create role binding - */ -export const authCreateIamRoleBinding = ( - roleBindingInput: RoleBindingInput, - params?: AuthCreateIamRoleBindingParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/auth/v2/iam/role-bindings`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: roleBindingInput, - params, - signal, - }); -}; - -export const getAuthCreateIamRoleBindingMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { data: RoleBindingInput; params?: AuthCreateIamRoleBindingParams }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { data: RoleBindingInput; params?: AuthCreateIamRoleBindingParams }, - TContext -> => { - const mutationKey = ['authCreateIamRoleBinding']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { data: RoleBindingInput; params?: AuthCreateIamRoleBindingParams } - > = (props) => { - const { data, params } = props ?? {}; - - return authCreateIamRoleBinding(data, params); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type AuthCreateIamRoleBindingMutationResult = NonNullable< - Awaited> ->; -export type AuthCreateIamRoleBindingMutationBody = RoleBindingInput; -export type AuthCreateIamRoleBindingMutationError = ErrorType; - -/** - * @summary Create role binding - */ -export const useAuthCreateIamRoleBinding = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { data: RoleBindingInput; params?: AuthCreateIamRoleBindingParams }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { data: RoleBindingInput; params?: AuthCreateIamRoleBindingParams }, - TContext -> => { - return useMutation(getAuthCreateIamRoleBindingMutationOptions(options), queryClient); -}; - -/** - * Get a specific role binding (Platform Admin only) - * @summary Get role binding - */ -export const authGetIamRoleBinding = (name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/auth/v2/iam/role-bindings/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getAuthGetIamRoleBindingQueryKey = (name: string) => { - return [`/apis/auth/v2/iam/role-bindings/${name}`] as const; -}; - -export const getAuthGetIamRoleBindingQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getAuthGetIamRoleBindingQueryKey(name); - - const queryFn: QueryFunction>> = ({ signal }) => - authGetIamRoleBinding(name, signal); - - return { queryKey, queryFn, enabled: !!name, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type AuthGetIamRoleBindingQueryResult = NonNullable< - Awaited> ->; -export type AuthGetIamRoleBindingQueryError = ErrorType; - -export function useAuthGetIamRoleBinding< - TData = Awaited>, - TError = ErrorType, ->( - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useAuthGetIamRoleBinding< - TData = Awaited>, - TError = ErrorType, ->( - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useAuthGetIamRoleBinding< - TData = Awaited>, - TError = ErrorType, ->( - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get role binding - */ - -export function useAuthGetIamRoleBinding< - TData = Awaited>, - TError = ErrorType, ->( - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getAuthGetIamRoleBindingQueryOptions(name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getAuthGetIamRoleBindingSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getAuthGetIamRoleBindingQueryKey(name); - - const queryFn: QueryFunction>> = ({ signal }) => - authGetIamRoleBinding(name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type AuthGetIamRoleBindingSuspenseQueryResult = NonNullable< - Awaited> ->; -export type AuthGetIamRoleBindingSuspenseQueryError = ErrorType; - -export function useAuthGetIamRoleBindingSuspense< - TData = Awaited>, - TError = ErrorType, ->( - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useAuthGetIamRoleBindingSuspense< - TData = Awaited>, - TError = ErrorType, ->( - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useAuthGetIamRoleBindingSuspense< - TData = Awaited>, - TError = ErrorType, ->( - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get role binding - */ - -export function useAuthGetIamRoleBindingSuspense< - TData = Awaited>, - TError = ErrorType, ->( - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getAuthGetIamRoleBindingSuspenseQueryOptions(name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Revoke a role binding (Platform Admin only) - * @summary Revoke role binding - */ -export const authRevokeIamRoleBinding = ( - name: string, - params?: AuthRevokeIamRoleBindingParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/auth/v2/iam/role-bindings/${encodeURIComponent(String(name))}`, - method: 'DELETE', - params, - signal, - }); -}; - -export const getAuthRevokeIamRoleBindingMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { name: string; params?: AuthRevokeIamRoleBindingParams }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { name: string; params?: AuthRevokeIamRoleBindingParams }, - TContext -> => { - const mutationKey = ['authRevokeIamRoleBinding']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { name: string; params?: AuthRevokeIamRoleBindingParams } - > = (props) => { - const { name, params } = props ?? {}; - - return authRevokeIamRoleBinding(name, params); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type AuthRevokeIamRoleBindingMutationResult = NonNullable< - Awaited> ->; - -export type AuthRevokeIamRoleBindingMutationError = ErrorType; - -/** - * @summary Revoke role binding - */ -export const useAuthRevokeIamRoleBinding = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { name: string; params?: AuthRevokeIamRoleBindingParams }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { name: string; params?: AuthRevokeIamRoleBindingParams }, - TContext -> => { - return useMutation(getAuthRevokeIamRoleBindingMutationOptions(options), queryClient); -}; - -/** - * Get a specific entity by its unique identifier. -This endpoint is primarily for debugging and internal use. - -Example: -``` -GET /apis/entities/v2/entities/customization-config-5Q2LoF8z8M9JZxZsHwJKNn -``` - * @summary Get entity by ID (debug/internal) - */ -export const entitiesGetEntityById = (id: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/entities/v2/entities/${encodeURIComponent(String(id))}`, - method: 'GET', - signal, - }); -}; - -export const getEntitiesGetEntityByIdQueryKey = (id: string) => { - return [`/apis/entities/v2/entities/${id}`] as const; -}; - -export const getEntitiesGetEntityByIdQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - id: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getEntitiesGetEntityByIdQueryKey(id); - - const queryFn: QueryFunction>> = ({ signal }) => - entitiesGetEntityById(id, signal); - - return { queryKey, queryFn, enabled: !!id, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EntitiesGetEntityByIdQueryResult = NonNullable< - Awaited> ->; -export type EntitiesGetEntityByIdQueryError = ErrorType; - -export function useEntitiesGetEntityById< - TData = Awaited>, - TError = ErrorType, ->( - id: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEntitiesGetEntityById< - TData = Awaited>, - TError = ErrorType, ->( - id: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEntitiesGetEntityById< - TData = Awaited>, - TError = ErrorType, ->( - id: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get entity by ID (debug/internal) - */ - -export function useEntitiesGetEntityById< - TData = Awaited>, - TError = ErrorType, ->( - id: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEntitiesGetEntityByIdQueryOptions(id, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEntitiesGetEntityByIdSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - id: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getEntitiesGetEntityByIdQueryKey(id); - - const queryFn: QueryFunction>> = ({ signal }) => - entitiesGetEntityById(id, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EntitiesGetEntityByIdSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EntitiesGetEntityByIdSuspenseQueryError = ErrorType; - -export function useEntitiesGetEntityByIdSuspense< - TData = Awaited>, - TError = ErrorType, ->( - id: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEntitiesGetEntityByIdSuspense< - TData = Awaited>, - TError = ErrorType, ->( - id: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEntitiesGetEntityByIdSuspense< - TData = Awaited>, - TError = ErrorType, ->( - id: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get entity by ID (debug/internal) - */ - -export function useEntitiesGetEntityByIdSuspense< - TData = Awaited>, - TError = ErrorType, ->( - id: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEntitiesGetEntityByIdSuspenseQueryOptions(id, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Create a new workspace. - -The creator is automatically granted Admin role on the workspace. -By default, this endpoint waits for the Admin role to propagate before returning. -Use `wait_role_propagation=false` to skip waiting (useful for bulk operations). - -Example: -``` -POST /apis/entities/v2/workspaces -{ - "name": "ml-team", - "description": "Machine Learning Team workspace" -} -``` - * @summary Create a new workspace - */ -export const entitiesCreateWorkspace = ( - workspaceInput: WorkspaceInput, - params?: EntitiesCreateWorkspaceParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/entities/v2/workspaces`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: workspaceInput, - params, - signal, - }); -}; - -export const getEntitiesCreateWorkspaceMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { data: WorkspaceInput; params?: EntitiesCreateWorkspaceParams }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { data: WorkspaceInput; params?: EntitiesCreateWorkspaceParams }, - TContext -> => { - const mutationKey = ['entitiesCreateWorkspace']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { data: WorkspaceInput; params?: EntitiesCreateWorkspaceParams } - > = (props) => { - const { data, params } = props ?? {}; - - return entitiesCreateWorkspace(data, params); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type EntitiesCreateWorkspaceMutationResult = NonNullable< - Awaited> ->; -export type EntitiesCreateWorkspaceMutationBody = WorkspaceInput; -export type EntitiesCreateWorkspaceMutationError = ErrorType; - -/** - * @summary Create a new workspace - */ -export const useEntitiesCreateWorkspace = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { data: WorkspaceInput; params?: EntitiesCreateWorkspaceParams }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { data: WorkspaceInput; params?: EntitiesCreateWorkspaceParams }, - TContext -> => { - return useMutation(getEntitiesCreateWorkspaceMutationOptions(options), queryClient); -}; - -/** - * List all workspaces with pagination. - -When authentication is enabled, only workspaces the principal has access to -are returned. Service principals and platform admins have access to all workspaces. - -Query Parameters: -- page, page_size: Pagination -- sort: Sort field -- filter: Advanced filters (JSON, text, or bracket notation) - -Example: -``` -GET /apis/entities/v2/workspaces?sort=-created_at&page=1&page_size=10 -``` - * @summary List all workspaces - */ -export const entitiesListWorkspaces = ( - params?: EntitiesListWorkspacesParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/entities/v2/workspaces`, - method: 'GET', - params, - signal, - }); -}; - -export const getEntitiesListWorkspacesQueryKey = (params?: EntitiesListWorkspacesParams) => { - return [`/apis/entities/v2/workspaces`, ...(params ? [params] : [])] as const; -}; - -export const getEntitiesListWorkspacesQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - params?: EntitiesListWorkspacesParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getEntitiesListWorkspacesQueryKey(params); - - const queryFn: QueryFunction>> = ({ signal }) => - entitiesListWorkspaces(params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EntitiesListWorkspacesQueryResult = NonNullable< - Awaited> ->; -export type EntitiesListWorkspacesQueryError = ErrorType; - -export function useEntitiesListWorkspaces< - TData = Awaited>, - TError = ErrorType, ->( - params: undefined | EntitiesListWorkspacesParams, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEntitiesListWorkspaces< - TData = Awaited>, - TError = ErrorType, ->( - params?: EntitiesListWorkspacesParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEntitiesListWorkspaces< - TData = Awaited>, - TError = ErrorType, ->( - params?: EntitiesListWorkspacesParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List all workspaces - */ - -export function useEntitiesListWorkspaces< - TData = Awaited>, - TError = ErrorType, ->( - params?: EntitiesListWorkspacesParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEntitiesListWorkspacesQueryOptions(params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEntitiesListWorkspacesSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - params?: EntitiesListWorkspacesParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getEntitiesListWorkspacesQueryKey(params); - - const queryFn: QueryFunction>> = ({ signal }) => - entitiesListWorkspaces(params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EntitiesListWorkspacesSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EntitiesListWorkspacesSuspenseQueryError = ErrorType; - -export function useEntitiesListWorkspacesSuspense< - TData = Awaited>, - TError = ErrorType, ->( - params: undefined | EntitiesListWorkspacesParams, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEntitiesListWorkspacesSuspense< - TData = Awaited>, - TError = ErrorType, ->( - params?: EntitiesListWorkspacesParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEntitiesListWorkspacesSuspense< - TData = Awaited>, - TError = ErrorType, ->( - params?: EntitiesListWorkspacesParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List all workspaces - */ - -export function useEntitiesListWorkspacesSuspense< - TData = Awaited>, - TError = ErrorType, ->( - params?: EntitiesListWorkspacesParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEntitiesListWorkspacesSuspenseQueryOptions(params, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Get a specific workspace by ID. - -Example: -``` -GET /apis/entities/v2/workspaces/ml-team -``` - * @summary Get workspace by ID - */ -export const entitiesGetWorkspace = (name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/entities/v2/workspaces/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getEntitiesGetWorkspaceQueryKey = (name: string) => { - return [`/apis/entities/v2/workspaces/${name}`] as const; -}; - -export const getEntitiesGetWorkspaceQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getEntitiesGetWorkspaceQueryKey(name); - - const queryFn: QueryFunction>> = ({ signal }) => - entitiesGetWorkspace(name, signal); - - return { queryKey, queryFn, enabled: !!name, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EntitiesGetWorkspaceQueryResult = NonNullable< - Awaited> ->; -export type EntitiesGetWorkspaceQueryError = ErrorType; - -export function useEntitiesGetWorkspace< - TData = Awaited>, - TError = ErrorType, ->( - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEntitiesGetWorkspace< - TData = Awaited>, - TError = ErrorType, ->( - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEntitiesGetWorkspace< - TData = Awaited>, - TError = ErrorType, ->( - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get workspace by ID - */ - -export function useEntitiesGetWorkspace< - TData = Awaited>, - TError = ErrorType, ->( - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEntitiesGetWorkspaceQueryOptions(name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEntitiesGetWorkspaceSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getEntitiesGetWorkspaceQueryKey(name); - - const queryFn: QueryFunction>> = ({ signal }) => - entitiesGetWorkspace(name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EntitiesGetWorkspaceSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EntitiesGetWorkspaceSuspenseQueryError = ErrorType; - -export function useEntitiesGetWorkspaceSuspense< - TData = Awaited>, - TError = ErrorType, ->( - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEntitiesGetWorkspaceSuspense< - TData = Awaited>, - TError = ErrorType, ->( - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEntitiesGetWorkspaceSuspense< - TData = Awaited>, - TError = ErrorType, ->( - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get workspace by ID - */ - -export function useEntitiesGetWorkspaceSuspense< - TData = Awaited>, - TError = ErrorType, ->( - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEntitiesGetWorkspaceSuspenseQueryOptions(name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Update a workspace's description. - -Example: -``` -PUT /apis/entities/v2/workspaces/ml-team -{ - "description": "Updated description for ML Team" -} -``` - * @summary Update workspace - */ -export const entitiesUpdateWorkspace = ( - name: string, - workspaceUpdate: WorkspaceUpdate, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/entities/v2/workspaces/${encodeURIComponent(String(name))}`, - method: 'PUT', - headers: { 'Content-Type': 'application/json' }, - data: workspaceUpdate, - signal, - }); -}; - -export const getEntitiesUpdateWorkspaceMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { name: string; data: WorkspaceUpdate }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { name: string; data: WorkspaceUpdate }, - TContext -> => { - const mutationKey = ['entitiesUpdateWorkspace']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { name: string; data: WorkspaceUpdate } - > = (props) => { - const { name, data } = props ?? {}; - - return entitiesUpdateWorkspace(name, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type EntitiesUpdateWorkspaceMutationResult = NonNullable< - Awaited> ->; -export type EntitiesUpdateWorkspaceMutationBody = WorkspaceUpdate; -export type EntitiesUpdateWorkspaceMutationError = ErrorType; - -/** - * @summary Update workspace - */ -export const useEntitiesUpdateWorkspace = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { name: string; data: WorkspaceUpdate }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { name: string; data: WorkspaceUpdate }, - TContext -> => { - return useMutation(getEntitiesUpdateWorkspaceMutationOptions(options), queryClient); -}; - -/** - * Delete a workspace. - -This marks the workspace for deletion and returns immediately. The workspace -will no longer be accessible via the API. An asynchronous cleanup controller -will handle deletion of all entities and external resources. - -Role bindings are immediately deleted to revoke access. - -Example: -``` -DELETE /apis/entities/v2/workspaces/ml-team -``` - * @summary Delete workspace - */ -export const entitiesDeleteWorkspace = (name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/entities/v2/workspaces/${encodeURIComponent(String(name))}`, - method: 'DELETE', - signal, - }); -}; - -export const getEntitiesDeleteWorkspaceMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { name: string }, - TContext -> => { - const mutationKey = ['entitiesDeleteWorkspace']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { name: string } - > = (props) => { - const { name } = props ?? {}; - - return entitiesDeleteWorkspace(name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type EntitiesDeleteWorkspaceMutationResult = NonNullable< - Awaited> ->; - -export type EntitiesDeleteWorkspaceMutationError = ErrorType; - -/** - * @summary Delete workspace - */ -export const useEntitiesDeleteWorkspace = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { name: string }, - TContext -> => { - return useMutation(getEntitiesDeleteWorkspaceMutationOptions(options), queryClient); -}; - -/** - * Create a new entity of the specified type in the given workspace. - -If name is not provided, it will be auto-generated based on the entity type. - -Example: -``` -POST /apis/entities/v2/workspaces/default/entities/customization_config -{ - "name": "my-config", - "data": { - "target_id": "llama-2-7b", - "training_options": {"learning_rate": 0.01} - } -} -``` - * @summary Create a new entity - */ -export const entitiesCreateEntity = ( - workspace: string, - entityType: string, - entityCreateInput: EntityCreateInput, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/entities/v2/workspaces/${encodeURIComponent(String(workspace))}/entities/${encodeURIComponent(String(entityType))}`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: entityCreateInput, - signal, - }); -}; - -export const getEntitiesCreateEntityMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; entityType: string; data: EntityCreateInput }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; entityType: string; data: EntityCreateInput }, - TContext -> => { - const mutationKey = ['entitiesCreateEntity']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; entityType: string; data: EntityCreateInput } - > = (props) => { - const { workspace, entityType, data } = props ?? {}; - - return entitiesCreateEntity(workspace, entityType, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type EntitiesCreateEntityMutationResult = NonNullable< - Awaited> ->; -export type EntitiesCreateEntityMutationBody = EntityCreateInput; -export type EntitiesCreateEntityMutationError = ErrorType; - -/** - * @summary Create a new entity - */ -export const useEntitiesCreateEntity = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; entityType: string; data: EntityCreateInput }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; entityType: string; data: EntityCreateInput }, - TContext -> => { - return useMutation(getEntitiesCreateEntityMutationOptions(options), queryClient); -}; - -/** - * List all entities of a specific type in the given workspace. - -Use workspace="-" to list entities across all workspaces the principal has -access to. - -Query Parameters: -- sort: Sort field -- page, page_size: Pagination -- filter: Advanced filters (JSON, text, or bracket notation) - -Examples: -``` -GET /apis/entities/v2/workspaces/default/entities/customization_config?sort=-created_at -GET /apis/entities/v2/workspaces/-/entities/customization_config # Cross-workspace query -``` - * @summary List entities - */ -export const entitiesListEntities = ( - workspace: string, - entityType: string, - params?: EntitiesListEntitiesParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/entities/v2/workspaces/${encodeURIComponent(String(workspace))}/entities/${encodeURIComponent(String(entityType))}`, - method: 'GET', - params, - signal, - }); -}; - -export const getEntitiesListEntitiesQueryKey = ( - workspace: string, - entityType: string, - params?: EntitiesListEntitiesParams -) => { - return [ - `/apis/entities/v2/workspaces/${workspace}/entities/${entityType}`, - ...(params ? [params] : []), - ] as const; -}; - -export const getEntitiesListEntitiesQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - entityType: string, - params?: EntitiesListEntitiesParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEntitiesListEntitiesQueryKey(workspace, entityType, params); - - const queryFn: QueryFunction>> = ({ signal }) => - entitiesListEntities(workspace, entityType, params, signal); - - return { - queryKey, - queryFn, - enabled: !!(workspace && entityType), - ...queryOptions, - } as UseQueryOptions>, TError, TData> & { - queryKey: DataTag; - }; -}; - -export type EntitiesListEntitiesQueryResult = NonNullable< - Awaited> ->; -export type EntitiesListEntitiesQueryError = ErrorType; - -export function useEntitiesListEntities< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - entityType: string, - params: undefined | EntitiesListEntitiesParams, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEntitiesListEntities< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - entityType: string, - params?: EntitiesListEntitiesParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEntitiesListEntities< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - entityType: string, - params?: EntitiesListEntitiesParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List entities - */ - -export function useEntitiesListEntities< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - entityType: string, - params?: EntitiesListEntitiesParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEntitiesListEntitiesQueryOptions(workspace, entityType, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEntitiesListEntitiesSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - entityType: string, - params?: EntitiesListEntitiesParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEntitiesListEntitiesQueryKey(workspace, entityType, params); - - const queryFn: QueryFunction>> = ({ signal }) => - entitiesListEntities(workspace, entityType, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EntitiesListEntitiesSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EntitiesListEntitiesSuspenseQueryError = ErrorType; - -export function useEntitiesListEntitiesSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - entityType: string, - params: undefined | EntitiesListEntitiesParams, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEntitiesListEntitiesSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - entityType: string, - params?: EntitiesListEntitiesParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEntitiesListEntitiesSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - entityType: string, - params?: EntitiesListEntitiesParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List entities - */ - -export function useEntitiesListEntitiesSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - entityType: string, - params?: EntitiesListEntitiesParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEntitiesListEntitiesSuspenseQueryOptions( - workspace, - entityType, - params, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Get a specific entity by its workspace, type, and name. - -Example: -``` -GET /apis/entities/v2/workspaces/default/entities/customization_config/my-config -``` - * @summary Get entity by name - */ -export const entitiesGetEntityByName = ( - workspace: string, - entityType: string, - name: string, - params?: EntitiesGetEntityByNameParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/entities/v2/workspaces/${encodeURIComponent(String(workspace))}/entities/${encodeURIComponent(String(entityType))}/${encodeURIComponent(String(name))}`, - method: 'GET', - params, - signal, - }); -}; - -export const getEntitiesGetEntityByNameQueryKey = ( - workspace: string, - entityType: string, - name: string, - params?: EntitiesGetEntityByNameParams -) => { - return [ - `/apis/entities/v2/workspaces/${workspace}/entities/${entityType}/${name}`, - ...(params ? [params] : []), - ] as const; -}; - -export const getEntitiesGetEntityByNameQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - entityType: string, - name: string, - params?: EntitiesGetEntityByNameParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? - getEntitiesGetEntityByNameQueryKey(workspace, entityType, name, params); - - const queryFn: QueryFunction>> = ({ - signal, - }) => entitiesGetEntityByName(workspace, entityType, name, params, signal); - - return { - queryKey, - queryFn, - enabled: !!(workspace && entityType && name), - ...queryOptions, - } as UseQueryOptions>, TError, TData> & { - queryKey: DataTag; - }; -}; - -export type EntitiesGetEntityByNameQueryResult = NonNullable< - Awaited> ->; -export type EntitiesGetEntityByNameQueryError = ErrorType; - -export function useEntitiesGetEntityByName< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - entityType: string, - name: string, - params: undefined | EntitiesGetEntityByNameParams, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEntitiesGetEntityByName< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - entityType: string, - name: string, - params?: EntitiesGetEntityByNameParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEntitiesGetEntityByName< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - entityType: string, - name: string, - params?: EntitiesGetEntityByNameParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get entity by name - */ - -export function useEntitiesGetEntityByName< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - entityType: string, - name: string, - params?: EntitiesGetEntityByNameParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEntitiesGetEntityByNameQueryOptions( - workspace, - entityType, - name, - params, - options - ); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEntitiesGetEntityByNameSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - entityType: string, - name: string, - params?: EntitiesGetEntityByNameParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? - getEntitiesGetEntityByNameQueryKey(workspace, entityType, name, params); - - const queryFn: QueryFunction>> = ({ - signal, - }) => entitiesGetEntityByName(workspace, entityType, name, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EntitiesGetEntityByNameSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EntitiesGetEntityByNameSuspenseQueryError = ErrorType; - -export function useEntitiesGetEntityByNameSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - entityType: string, - name: string, - params: undefined | EntitiesGetEntityByNameParams, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEntitiesGetEntityByNameSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - entityType: string, - name: string, - params?: EntitiesGetEntityByNameParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEntitiesGetEntityByNameSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - entityType: string, - name: string, - params?: EntitiesGetEntityByNameParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get entity by name - */ - -export function useEntitiesGetEntityByNameSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - entityType: string, - name: string, - params?: EntitiesGetEntityByNameParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEntitiesGetEntityByNameSuspenseQueryOptions( - workspace, - entityType, - name, - params, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Update an entity by its name. Optionally change the entity's name. - -Example: -``` -PUT /apis/entities/v2/workspaces/default/entities/customization_config/my-config -{ - "data": { - "target_id": "llama-2-7b", - "training_options": {"learning_rate": 0.02} - } -} -``` - * @summary Update entity by name - */ -export const entitiesUpdateEntityByName = ( - workspace: string, - entityType: string, - name: string, - entityUpdate: EntityUpdate, - params?: EntitiesUpdateEntityByNameParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/entities/v2/workspaces/${encodeURIComponent(String(workspace))}/entities/${encodeURIComponent(String(entityType))}/${encodeURIComponent(String(name))}`, - method: 'PUT', - headers: { 'Content-Type': 'application/json' }, - data: entityUpdate, - params, - signal, - }); -}; - -export const getEntitiesUpdateEntityByNameMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { - workspace: string; - entityType: string; - name: string; - data: EntityUpdate; - params?: EntitiesUpdateEntityByNameParams; - }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { - workspace: string; - entityType: string; - name: string; - data: EntityUpdate; - params?: EntitiesUpdateEntityByNameParams; - }, - TContext -> => { - const mutationKey = ['entitiesUpdateEntityByName']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { - workspace: string; - entityType: string; - name: string; - data: EntityUpdate; - params?: EntitiesUpdateEntityByNameParams; - } - > = (props) => { - const { workspace, entityType, name, data, params } = props ?? {}; - - return entitiesUpdateEntityByName(workspace, entityType, name, data, params); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type EntitiesUpdateEntityByNameMutationResult = NonNullable< - Awaited> ->; -export type EntitiesUpdateEntityByNameMutationBody = EntityUpdate; -export type EntitiesUpdateEntityByNameMutationError = ErrorType; - -/** - * @summary Update entity by name - */ -export const useEntitiesUpdateEntityByName = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { - workspace: string; - entityType: string; - name: string; - data: EntityUpdate; - params?: EntitiesUpdateEntityByNameParams; - }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { - workspace: string; - entityType: string; - name: string; - data: EntityUpdate; - params?: EntitiesUpdateEntityByNameParams; - }, - TContext -> => { - return useMutation(getEntitiesUpdateEntityByNameMutationOptions(options), queryClient); -}; - -/** - * Delete an entity by its name. - -Example: -``` -DELETE /apis/entities/v2/workspaces/default/entities/customization_config/my-config -``` - * @summary Delete entity by name - */ -export const entitiesDeleteEntityByName = ( - workspace: string, - entityType: string, - name: string, - params?: EntitiesDeleteEntityByNameParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/entities/v2/workspaces/${encodeURIComponent(String(workspace))}/entities/${encodeURIComponent(String(entityType))}/${encodeURIComponent(String(name))}`, - method: 'DELETE', - params, - signal, - }); -}; - -export const getEntitiesDeleteEntityByNameMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { - workspace: string; - entityType: string; - name: string; - params?: EntitiesDeleteEntityByNameParams; - }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { - workspace: string; - entityType: string; - name: string; - params?: EntitiesDeleteEntityByNameParams; - }, - TContext -> => { - const mutationKey = ['entitiesDeleteEntityByName']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { - workspace: string; - entityType: string; - name: string; - params?: EntitiesDeleteEntityByNameParams; - } - > = (props) => { - const { workspace, entityType, name, params } = props ?? {}; - - return entitiesDeleteEntityByName(workspace, entityType, name, params); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type EntitiesDeleteEntityByNameMutationResult = NonNullable< - Awaited> ->; - -export type EntitiesDeleteEntityByNameMutationError = ErrorType; - -/** - * @summary Delete entity by name - */ -export const useEntitiesDeleteEntityByName = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { - workspace: string; - entityType: string; - name: string; - params?: EntitiesDeleteEntityByNameParams; - }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { - workspace: string; - entityType: string; - name: string; - params?: EntitiesDeleteEntityByNameParams; - }, - TContext -> => { - return useMutation(getEntitiesDeleteEntityByNameMutationOptions(options), queryClient); -}; - -/** - * List all members of a workspace with their roles. - -Returns a list of all principals with active role bindings in the workspace. - -Example: -``` -GET /apis/entities/v2/workspaces/ml-team/members -``` - * @summary List workspace members - */ -export const entitiesListWorkspaceMembers = (workspace: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/entities/v2/workspaces/${encodeURIComponent(String(workspace))}/members`, - method: 'GET', - signal, - }); -}; - -export const getEntitiesListWorkspaceMembersQueryKey = (workspace: string) => { - return [`/apis/entities/v2/workspaces/${workspace}/members`] as const; -}; - -export const getEntitiesListWorkspaceMembersQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getEntitiesListWorkspaceMembersQueryKey(workspace); - - const queryFn: QueryFunction>> = ({ - signal, - }) => entitiesListWorkspaceMembers(workspace, signal); - - return { queryKey, queryFn, enabled: !!workspace, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EntitiesListWorkspaceMembersQueryResult = NonNullable< - Awaited> ->; -export type EntitiesListWorkspaceMembersQueryError = ErrorType; - -export function useEntitiesListWorkspaceMembers< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEntitiesListWorkspaceMembers< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEntitiesListWorkspaceMembers< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List workspace members - */ - -export function useEntitiesListWorkspaceMembers< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEntitiesListWorkspaceMembersQueryOptions(workspace, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEntitiesListWorkspaceMembersSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getEntitiesListWorkspaceMembersQueryKey(workspace); - - const queryFn: QueryFunction>> = ({ - signal, - }) => entitiesListWorkspaceMembers(workspace, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EntitiesListWorkspaceMembersSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EntitiesListWorkspaceMembersSuspenseQueryError = ErrorType; - -export function useEntitiesListWorkspaceMembersSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEntitiesListWorkspaceMembersSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEntitiesListWorkspaceMembersSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List workspace members - */ - -export function useEntitiesListWorkspaceMembersSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEntitiesListWorkspaceMembersSuspenseQueryOptions(workspace, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Add a new member to the workspace with specified roles. - -This creates role bindings for the specified principal with the given roles. -By default, this endpoint waits for the roles to propagate before returning. -Use `wait_role_propagation=false` to skip waiting (useful for bulk operations). - -Example: -``` -POST /apis/entities/v2/workspaces/ml-team/members -{ - "principal": "user@example.com", - "roles": ["Editor"] -} -``` - * @summary Add workspace member - */ -export const entitiesAddWorkspaceMember = ( - workspace: string, - workspaceMemberInput: WorkspaceMemberInput, - params?: EntitiesAddWorkspaceMemberParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/entities/v2/workspaces/${encodeURIComponent(String(workspace))}/members`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: workspaceMemberInput, - params, - signal, - }); -}; - -export const getEntitiesAddWorkspaceMemberMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: WorkspaceMemberInput; params?: EntitiesAddWorkspaceMemberParams }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: WorkspaceMemberInput; params?: EntitiesAddWorkspaceMemberParams }, - TContext -> => { - const mutationKey = ['entitiesAddWorkspaceMember']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; data: WorkspaceMemberInput; params?: EntitiesAddWorkspaceMemberParams } - > = (props) => { - const { workspace, data, params } = props ?? {}; - - return entitiesAddWorkspaceMember(workspace, data, params); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type EntitiesAddWorkspaceMemberMutationResult = NonNullable< - Awaited> ->; -export type EntitiesAddWorkspaceMemberMutationBody = WorkspaceMemberInput; -export type EntitiesAddWorkspaceMemberMutationError = ErrorType; - -/** - * @summary Add workspace member - */ -export const useEntitiesAddWorkspaceMember = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: WorkspaceMemberInput; params?: EntitiesAddWorkspaceMemberParams }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; data: WorkspaceMemberInput; params?: EntitiesAddWorkspaceMemberParams }, - TContext -> => { - return useMutation(getEntitiesAddWorkspaceMemberMutationOptions(options), queryClient); -}; - -/** - * Update the roles for a workspace member. - -This will revoke existing roles not in the new list and add new roles. -By default, this endpoint waits for the roles to propagate before returning. -Use `wait_role_propagation=false` to skip waiting (useful for bulk operations). - -Example: -``` -PUT /apis/entities/v2/workspaces/ml-team/members/user@example.com -{ - "roles": ["Viewer", "Editor"] -} -``` - * @summary Update workspace member roles - */ -export const entitiesUpdateWorkspaceMember = ( - workspace: string, - principalId: string, - workspaceMemberUpdate: WorkspaceMemberUpdate, - params?: EntitiesUpdateWorkspaceMemberParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/entities/v2/workspaces/${encodeURIComponent(String(workspace))}/members/${encodeURIComponent(String(principalId))}`, - method: 'PUT', - headers: { 'Content-Type': 'application/json' }, - data: workspaceMemberUpdate, - params, - signal, - }); -}; - -export const getEntitiesUpdateWorkspaceMemberMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { - workspace: string; - principalId: string; - data: WorkspaceMemberUpdate; - params?: EntitiesUpdateWorkspaceMemberParams; - }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { - workspace: string; - principalId: string; - data: WorkspaceMemberUpdate; - params?: EntitiesUpdateWorkspaceMemberParams; - }, - TContext -> => { - const mutationKey = ['entitiesUpdateWorkspaceMember']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { - workspace: string; - principalId: string; - data: WorkspaceMemberUpdate; - params?: EntitiesUpdateWorkspaceMemberParams; - } - > = (props) => { - const { workspace, principalId, data, params } = props ?? {}; - - return entitiesUpdateWorkspaceMember(workspace, principalId, data, params); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type EntitiesUpdateWorkspaceMemberMutationResult = NonNullable< - Awaited> ->; -export type EntitiesUpdateWorkspaceMemberMutationBody = WorkspaceMemberUpdate; -export type EntitiesUpdateWorkspaceMemberMutationError = ErrorType; - -/** - * @summary Update workspace member roles - */ -export const useEntitiesUpdateWorkspaceMember = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { - workspace: string; - principalId: string; - data: WorkspaceMemberUpdate; - params?: EntitiesUpdateWorkspaceMemberParams; - }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { - workspace: string; - principalId: string; - data: WorkspaceMemberUpdate; - params?: EntitiesUpdateWorkspaceMemberParams; - }, - TContext -> => { - return useMutation(getEntitiesUpdateWorkspaceMemberMutationOptions(options), queryClient); -}; - -/** - * Remove a member from the workspace by revoking all their roles. - -This revokes all active role bindings for the principal in the workspace. -By default, this endpoint waits for all roles to be revoked before returning. -Use `wait_role_propagation=false` to skip waiting (useful for bulk operations). - -Example: -``` -DELETE /apis/entities/v2/workspaces/ml-team/members/user@example.com -``` - * @summary Remove workspace member - */ -export const entitiesRemoveWorkspaceMember = ( - workspace: string, - principalId: string, - params?: EntitiesRemoveWorkspaceMemberParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/entities/v2/workspaces/${encodeURIComponent(String(workspace))}/members/${encodeURIComponent(String(principalId))}`, - method: 'DELETE', - params, - signal, - }); -}; - -export const getEntitiesRemoveWorkspaceMemberMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; principalId: string; params?: EntitiesRemoveWorkspaceMemberParams }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; principalId: string; params?: EntitiesRemoveWorkspaceMemberParams }, - TContext -> => { - const mutationKey = ['entitiesRemoveWorkspaceMember']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; principalId: string; params?: EntitiesRemoveWorkspaceMemberParams } - > = (props) => { - const { workspace, principalId, params } = props ?? {}; - - return entitiesRemoveWorkspaceMember(workspace, principalId, params); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type EntitiesRemoveWorkspaceMemberMutationResult = NonNullable< - Awaited> ->; - -export type EntitiesRemoveWorkspaceMemberMutationError = ErrorType; - -/** - * @summary Remove workspace member - */ -export const useEntitiesRemoveWorkspaceMember = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; principalId: string; params?: EntitiesRemoveWorkspaceMemberParams }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; principalId: string; params?: EntitiesRemoveWorkspaceMemberParams }, - TContext -> => { - return useMutation(getEntitiesRemoveWorkspaceMemberMutationOptions(options), queryClient); -}; - -/** - * Create a new project in the given workspace. - -Example: -``` -POST /apis/entities/v2/workspaces/default/projects -{ - "name": "ml-project", - "description": "Machine Learning project" -} -``` - * @summary Create a new project - */ -export const entitiesCreateProject = ( - workspace: string, - projectInput: ProjectInput, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/entities/v2/workspaces/${encodeURIComponent(String(workspace))}/projects`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: projectInput, - signal, - }); -}; - -export const getEntitiesCreateProjectMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: ProjectInput }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: ProjectInput }, - TContext -> => { - const mutationKey = ['entitiesCreateProject']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; data: ProjectInput } - > = (props) => { - const { workspace, data } = props ?? {}; - - return entitiesCreateProject(workspace, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type EntitiesCreateProjectMutationResult = NonNullable< - Awaited> ->; -export type EntitiesCreateProjectMutationBody = ProjectInput; -export type EntitiesCreateProjectMutationError = ErrorType; - -/** - * @summary Create a new project - */ -export const useEntitiesCreateProject = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: ProjectInput }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; data: ProjectInput }, - TContext -> => { - return useMutation(getEntitiesCreateProjectMutationOptions(options), queryClient); -}; - -/** - * List all projects in a workspace with pagination. - -Query Parameters: -- page, page_size: Pagination -- sort: Sort field -- filter: Advanced filters - -Example: -``` -GET /apis/entities/v2/workspaces/default/projects?sort=-created_at&page=1&page_size=10 -``` - * @summary List all projects - */ -export const entitiesListProjects = ( - workspace: string, - params?: EntitiesListProjectsParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/entities/v2/workspaces/${encodeURIComponent(String(workspace))}/projects`, - method: 'GET', - params, - signal, - }); -}; - -export const getEntitiesListProjectsQueryKey = ( - workspace: string, - params?: EntitiesListProjectsParams -) => { - return [ - `/apis/entities/v2/workspaces/${workspace}/projects`, - ...(params ? [params] : []), - ] as const; -}; - -export const getEntitiesListProjectsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EntitiesListProjectsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getEntitiesListProjectsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - entitiesListProjects(workspace, params, signal); - - return { queryKey, queryFn, enabled: !!workspace, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EntitiesListProjectsQueryResult = NonNullable< - Awaited> ->; -export type EntitiesListProjectsQueryError = ErrorType; - -export function useEntitiesListProjects< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | EntitiesListProjectsParams, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEntitiesListProjects< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EntitiesListProjectsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEntitiesListProjects< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EntitiesListProjectsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List all projects - */ - -export function useEntitiesListProjects< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EntitiesListProjectsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEntitiesListProjectsQueryOptions(workspace, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEntitiesListProjectsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EntitiesListProjectsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getEntitiesListProjectsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - entitiesListProjects(workspace, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EntitiesListProjectsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EntitiesListProjectsSuspenseQueryError = ErrorType; - -export function useEntitiesListProjectsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | EntitiesListProjectsParams, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEntitiesListProjectsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EntitiesListProjectsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEntitiesListProjectsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EntitiesListProjectsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List all projects - */ - -export function useEntitiesListProjectsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EntitiesListProjectsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEntitiesListProjectsSuspenseQueryOptions(workspace, params, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Get a specific project by its workspace and name. - -Example: -``` -GET /apis/entities/v2/workspaces/default/projects/ml-project -``` - * @summary Get project by name - */ -export const entitiesGetProject = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/entities/v2/workspaces/${encodeURIComponent(String(workspace))}/projects/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getEntitiesGetProjectQueryKey = (workspace: string, name: string) => { - return [`/apis/entities/v2/workspaces/${workspace}/projects/${name}`] as const; -}; - -export const getEntitiesGetProjectQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getEntitiesGetProjectQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - entitiesGetProject(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EntitiesGetProjectQueryResult = NonNullable< - Awaited> ->; -export type EntitiesGetProjectQueryError = ErrorType; - -export function useEntitiesGetProject< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEntitiesGetProject< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEntitiesGetProject< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get project by name - */ - -export function useEntitiesGetProject< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEntitiesGetProjectQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEntitiesGetProjectSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getEntitiesGetProjectQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - entitiesGetProject(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EntitiesGetProjectSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EntitiesGetProjectSuspenseQueryError = ErrorType; - -export function useEntitiesGetProjectSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEntitiesGetProjectSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEntitiesGetProjectSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get project by name - */ - -export function useEntitiesGetProjectSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEntitiesGetProjectSuspenseQueryOptions(workspace, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Update a project's description. - -Example: -``` -PUT /apis/entities/v2/workspaces/default/projects/ml-project -{ - "description": "Updated description for ML project" -} -``` - * @summary Update project - */ -export const entitiesUpdateProject = ( - workspace: string, - name: string, - projectUpdate: ProjectUpdate, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/entities/v2/workspaces/${encodeURIComponent(String(workspace))}/projects/${encodeURIComponent(String(name))}`, - method: 'PUT', - headers: { 'Content-Type': 'application/json' }, - data: projectUpdate, - signal, - }); -}; - -export const getEntitiesUpdateProjectMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: ProjectUpdate }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: ProjectUpdate }, - TContext -> => { - const mutationKey = ['entitiesUpdateProject']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string; data: ProjectUpdate } - > = (props) => { - const { workspace, name, data } = props ?? {}; - - return entitiesUpdateProject(workspace, name, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type EntitiesUpdateProjectMutationResult = NonNullable< - Awaited> ->; -export type EntitiesUpdateProjectMutationBody = ProjectUpdate; -export type EntitiesUpdateProjectMutationError = ErrorType; - -/** - * @summary Update project - */ -export const useEntitiesUpdateProject = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: ProjectUpdate }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string; data: ProjectUpdate }, - TContext -> => { - return useMutation(getEntitiesUpdateProjectMutationOptions(options), queryClient); -}; - -/** - * Delete a project. - -Example: -``` -DELETE /apis/entities/v2/workspaces/default/projects/ml-project -``` - * @summary Delete project - */ -export const entitiesDeleteProject = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/entities/v2/workspaces/${encodeURIComponent(String(workspace))}/projects/${encodeURIComponent(String(name))}`, - method: 'DELETE', - signal, - }); -}; - -export const getEntitiesDeleteProjectMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - const mutationKey = ['entitiesDeleteProject']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string } - > = (props) => { - const { workspace, name } = props ?? {}; - - return entitiesDeleteProject(workspace, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type EntitiesDeleteProjectMutationResult = NonNullable< - Awaited> ->; - -export type EntitiesDeleteProjectMutationError = ErrorType; - -/** - * @summary Delete project - */ -export const useEntitiesDeleteProject = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - return useMutation(getEntitiesDeleteProjectMutationOptions(options), queryClient); -}; - -/** - * List stored evaluation results for benchmark jobs. - * @summary List Benchmark Job Results - */ -export const evaluationListBenchmarkJobResults = ( - workspace: string, - params?: EvaluationListBenchmarkJobResultsParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/benchmark-job-results`, - method: 'GET', - params, - signal, - }); -}; - -export const getEvaluationListBenchmarkJobResultsQueryKey = ( - workspace: string, - params?: EvaluationListBenchmarkJobResultsParams -) => { - return [ - `/apis/evaluation/v2/workspaces/${workspace}/benchmark-job-results`, - ...(params ? [params] : []), - ] as const; -}; - -export const getEvaluationListBenchmarkJobResultsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListBenchmarkJobResultsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEvaluationListBenchmarkJobResultsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ - signal, - }) => evaluationListBenchmarkJobResults(workspace, params, signal); - - return { queryKey, queryFn, enabled: !!workspace, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationListBenchmarkJobResultsQueryResult = NonNullable< - Awaited> ->; -export type EvaluationListBenchmarkJobResultsQueryError = ErrorType; - -export function useEvaluationListBenchmarkJobResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | EvaluationListBenchmarkJobResultsParams, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEvaluationListBenchmarkJobResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListBenchmarkJobResultsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEvaluationListBenchmarkJobResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListBenchmarkJobResultsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List Benchmark Job Results - */ - -export function useEvaluationListBenchmarkJobResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListBenchmarkJobResultsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationListBenchmarkJobResultsQueryOptions(workspace, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEvaluationListBenchmarkJobResultsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListBenchmarkJobResultsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEvaluationListBenchmarkJobResultsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ - signal, - }) => evaluationListBenchmarkJobResults(workspace, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationListBenchmarkJobResultsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EvaluationListBenchmarkJobResultsSuspenseQueryError = ErrorType; - -export function useEvaluationListBenchmarkJobResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | EvaluationListBenchmarkJobResultsParams, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationListBenchmarkJobResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListBenchmarkJobResultsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationListBenchmarkJobResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListBenchmarkJobResultsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List Benchmark Job Results - */ - -export function useEvaluationListBenchmarkJobResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListBenchmarkJobResultsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationListBenchmarkJobResultsSuspenseQueryOptions( - workspace, - params, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Get a specific benchmark job result by workspace and job name. - * @summary Get Benchmark Job Result - */ -export const evaluationGetBenchmarkJobResult = ( - workspace: string, - name: string, - params?: EvaluationGetBenchmarkJobResultParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/benchmark-job-results/${encodeURIComponent(String(name))}`, - method: 'GET', - params, - signal, - }); -}; - -export const getEvaluationGetBenchmarkJobResultQueryKey = ( - workspace: string, - name: string, - params?: EvaluationGetBenchmarkJobResultParams -) => { - return [ - `/apis/evaluation/v2/workspaces/${workspace}/benchmark-job-results/${name}`, - ...(params ? [params] : []), - ] as const; -}; - -export const getEvaluationGetBenchmarkJobResultQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetBenchmarkJobResultParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEvaluationGetBenchmarkJobResultQueryKey(workspace, name, params); - - const queryFn: QueryFunction>> = ({ - signal, - }) => evaluationGetBenchmarkJobResult(workspace, name, params, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationGetBenchmarkJobResultQueryResult = NonNullable< - Awaited> ->; -export type EvaluationGetBenchmarkJobResultQueryError = ErrorType< - ErrorResponse | HTTPValidationError ->; - -export function useEvaluationGetBenchmarkJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params: undefined | EvaluationGetBenchmarkJobResultParams, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetBenchmarkJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetBenchmarkJobResultParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetBenchmarkJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetBenchmarkJobResultParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Benchmark Job Result - */ - -export function useEvaluationGetBenchmarkJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetBenchmarkJobResultParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationGetBenchmarkJobResultQueryOptions( - workspace, - name, - params, - options - ); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEvaluationGetBenchmarkJobResultSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetBenchmarkJobResultParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEvaluationGetBenchmarkJobResultQueryKey(workspace, name, params); - - const queryFn: QueryFunction>> = ({ - signal, - }) => evaluationGetBenchmarkJobResult(workspace, name, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationGetBenchmarkJobResultSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EvaluationGetBenchmarkJobResultSuspenseQueryError = ErrorType< - ErrorResponse | HTTPValidationError ->; - -export function useEvaluationGetBenchmarkJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params: undefined | EvaluationGetBenchmarkJobResultParams, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetBenchmarkJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetBenchmarkJobResultParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetBenchmarkJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetBenchmarkJobResultParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Benchmark Job Result - */ - -export function useEvaluationGetBenchmarkJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetBenchmarkJobResultParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationGetBenchmarkJobResultSuspenseQueryOptions( - workspace, - name, - params, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Delete an evaluation benchmark job result. - * @summary Delete Benchmark Job Result - */ -export const evaluationDeleteBenchmarkJobResult = ( - workspace: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/benchmark-job-results/${encodeURIComponent(String(name))}`, - method: 'DELETE', - signal, - }); -}; - -export const getEvaluationDeleteBenchmarkJobResultMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - const mutationKey = ['evaluationDeleteBenchmarkJobResult']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string } - > = (props) => { - const { workspace, name } = props ?? {}; - - return evaluationDeleteBenchmarkJobResult(workspace, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type EvaluationDeleteBenchmarkJobResultMutationResult = NonNullable< - Awaited> ->; - -export type EvaluationDeleteBenchmarkJobResultMutationError = ErrorType< - ErrorResponse | HTTPValidationError ->; - -/** - * @summary Delete Benchmark Job Result - */ -export const useEvaluationDeleteBenchmarkJobResult = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - return useMutation(getEvaluationDeleteBenchmarkJobResultMutationOptions(options), queryClient); -}; - -/** - * @summary Create Job - */ -export const evaluationCreateBenchmarkJob = ( - workspace: string, - benchmarkEvaluationJobRequest: BenchmarkEvaluationJobRequest, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/benchmark-jobs`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: benchmarkEvaluationJobRequest, - signal, - }); -}; - -export const getEvaluationCreateBenchmarkJobMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: BenchmarkEvaluationJobRequest }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: BenchmarkEvaluationJobRequest }, - TContext -> => { - const mutationKey = ['evaluationCreateBenchmarkJob']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; data: BenchmarkEvaluationJobRequest } - > = (props) => { - const { workspace, data } = props ?? {}; - - return evaluationCreateBenchmarkJob(workspace, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type EvaluationCreateBenchmarkJobMutationResult = NonNullable< - Awaited> ->; -export type EvaluationCreateBenchmarkJobMutationBody = BenchmarkEvaluationJobRequest; -export type EvaluationCreateBenchmarkJobMutationError = ErrorType; - -/** - * @summary Create Job - */ -export const useEvaluationCreateBenchmarkJob = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: BenchmarkEvaluationJobRequest }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; data: BenchmarkEvaluationJobRequest }, - TContext -> => { - return useMutation(getEvaluationCreateBenchmarkJobMutationOptions(options), queryClient); -}; - -/** - * @summary List Jobs - */ -export const evaluationListBenchmarkJobs = ( - workspace: string, - params?: EvaluationListBenchmarkJobsParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/benchmark-jobs`, - method: 'GET', - params, - signal, - }); -}; - -export const getEvaluationListBenchmarkJobsQueryKey = ( - workspace: string, - params?: EvaluationListBenchmarkJobsParams -) => { - return [ - `/apis/evaluation/v2/workspaces/${workspace}/benchmark-jobs`, - ...(params ? [params] : []), - ] as const; -}; - -export const getEvaluationListBenchmarkJobsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListBenchmarkJobsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEvaluationListBenchmarkJobsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ - signal, - }) => evaluationListBenchmarkJobs(workspace, params, signal); - - return { queryKey, queryFn, enabled: !!workspace, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationListBenchmarkJobsQueryResult = NonNullable< - Awaited> ->; -export type EvaluationListBenchmarkJobsQueryError = ErrorType; - -export function useEvaluationListBenchmarkJobs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | EvaluationListBenchmarkJobsParams, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEvaluationListBenchmarkJobs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListBenchmarkJobsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEvaluationListBenchmarkJobs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListBenchmarkJobsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List Jobs - */ - -export function useEvaluationListBenchmarkJobs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListBenchmarkJobsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationListBenchmarkJobsQueryOptions(workspace, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEvaluationListBenchmarkJobsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListBenchmarkJobsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEvaluationListBenchmarkJobsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ - signal, - }) => evaluationListBenchmarkJobs(workspace, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationListBenchmarkJobsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EvaluationListBenchmarkJobsSuspenseQueryError = ErrorType; - -export function useEvaluationListBenchmarkJobsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | EvaluationListBenchmarkJobsParams, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationListBenchmarkJobsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListBenchmarkJobsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationListBenchmarkJobsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListBenchmarkJobsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List Jobs - */ - -export function useEvaluationListBenchmarkJobsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListBenchmarkJobsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationListBenchmarkJobsSuspenseQueryOptions( - workspace, - params, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Download Job Result Aggregate-Scores - */ -export const evaluationDownloadBenchmarkJobResultAggregateScores = ( - workspace: string, - job: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/benchmark-jobs/${encodeURIComponent(String(job))}/results/aggregate-scores/download`, - method: 'GET', - signal, - }); -}; - -export const getEvaluationDownloadBenchmarkJobResultAggregateScoresQueryKey = ( - workspace: string, - job: string -) => { - return [ - `/apis/evaluation/v2/workspaces/${workspace}/benchmark-jobs/${job}/results/aggregate-scores/download`, - ] as const; -}; - -export const getEvaluationDownloadBenchmarkJobResultAggregateScoresQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? - getEvaluationDownloadBenchmarkJobResultAggregateScoresQueryKey(workspace, job); - - const queryFn: QueryFunction< - Awaited> - > = ({ signal }) => evaluationDownloadBenchmarkJobResultAggregateScores(workspace, job, signal); - - return { queryKey, queryFn, enabled: !!(workspace && job), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationDownloadBenchmarkJobResultAggregateScoresQueryResult = NonNullable< - Awaited> ->; -export type EvaluationDownloadBenchmarkJobResultAggregateScoresQueryError = - ErrorType; - -export function useEvaluationDownloadBenchmarkJobResultAggregateScores< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options: { - query: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEvaluationDownloadBenchmarkJobResultAggregateScores< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEvaluationDownloadBenchmarkJobResultAggregateScores< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Download Job Result Aggregate-Scores - */ - -export function useEvaluationDownloadBenchmarkJobResultAggregateScores< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationDownloadBenchmarkJobResultAggregateScoresQueryOptions( - workspace, - job, - options - ); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEvaluationDownloadBenchmarkJobResultAggregateScoresSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? - getEvaluationDownloadBenchmarkJobResultAggregateScoresQueryKey(workspace, job); - - const queryFn: QueryFunction< - Awaited> - > = ({ signal }) => evaluationDownloadBenchmarkJobResultAggregateScores(workspace, job, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationDownloadBenchmarkJobResultAggregateScoresSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EvaluationDownloadBenchmarkJobResultAggregateScoresSuspenseQueryError = - ErrorType; - -export function useEvaluationDownloadBenchmarkJobResultAggregateScoresSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationDownloadBenchmarkJobResultAggregateScoresSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationDownloadBenchmarkJobResultAggregateScoresSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Download Job Result Aggregate-Scores - */ - -export function useEvaluationDownloadBenchmarkJobResultAggregateScoresSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationDownloadBenchmarkJobResultAggregateScoresSuspenseQueryOptions( - workspace, - job, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Download Job Result Artifacts - */ -export const evaluationDownloadBenchmarkJobResultArtifacts = ( - workspace: string, - job: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/benchmark-jobs/${encodeURIComponent(String(job))}/results/artifacts/download`, - method: 'GET', - responseType: 'blob', - signal, - }); -}; - -export const getEvaluationDownloadBenchmarkJobResultArtifactsQueryKey = ( - workspace: string, - job: string -) => { - return [ - `/apis/evaluation/v2/workspaces/${workspace}/benchmark-jobs/${job}/results/artifacts/download`, - ] as const; -}; - -export const getEvaluationDownloadBenchmarkJobResultArtifactsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? - getEvaluationDownloadBenchmarkJobResultArtifactsQueryKey(workspace, job); - - const queryFn: QueryFunction< - Awaited> - > = ({ signal }) => evaluationDownloadBenchmarkJobResultArtifacts(workspace, job, signal); - - return { queryKey, queryFn, enabled: !!(workspace && job), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationDownloadBenchmarkJobResultArtifactsQueryResult = NonNullable< - Awaited> ->; -export type EvaluationDownloadBenchmarkJobResultArtifactsQueryError = - ErrorType; - -export function useEvaluationDownloadBenchmarkJobResultArtifacts< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options: { - query: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEvaluationDownloadBenchmarkJobResultArtifacts< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEvaluationDownloadBenchmarkJobResultArtifacts< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Download Job Result Artifacts - */ - -export function useEvaluationDownloadBenchmarkJobResultArtifacts< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationDownloadBenchmarkJobResultArtifactsQueryOptions( - workspace, - job, - options - ); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEvaluationDownloadBenchmarkJobResultArtifactsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? - getEvaluationDownloadBenchmarkJobResultArtifactsQueryKey(workspace, job); - - const queryFn: QueryFunction< - Awaited> - > = ({ signal }) => evaluationDownloadBenchmarkJobResultArtifacts(workspace, job, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationDownloadBenchmarkJobResultArtifactsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EvaluationDownloadBenchmarkJobResultArtifactsSuspenseQueryError = - ErrorType; - -export function useEvaluationDownloadBenchmarkJobResultArtifactsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationDownloadBenchmarkJobResultArtifactsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationDownloadBenchmarkJobResultArtifactsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Download Job Result Artifacts - */ - -export function useEvaluationDownloadBenchmarkJobResultArtifactsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationDownloadBenchmarkJobResultArtifactsSuspenseQueryOptions( - workspace, - job, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Download Job Result Row-Scores - */ -export const evaluationDownloadBenchmarkJobResultRowScores = ( - workspace: string, - job: string, - params?: EvaluationDownloadBenchmarkJobResultRowScoresParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/benchmark-jobs/${encodeURIComponent(String(job))}/results/row-scores/download`, - method: 'GET', - params, - responseType: 'blob', - signal, - }); -}; - -export const getEvaluationDownloadBenchmarkJobResultRowScoresQueryKey = ( - workspace: string, - job: string, - params?: EvaluationDownloadBenchmarkJobResultRowScoresParams -) => { - return [ - `/apis/evaluation/v2/workspaces/${workspace}/benchmark-jobs/${job}/results/row-scores/download`, - ...(params ? [params] : []), - ] as const; -}; - -export const getEvaluationDownloadBenchmarkJobResultRowScoresQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - params?: EvaluationDownloadBenchmarkJobResultRowScoresParams, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? - getEvaluationDownloadBenchmarkJobResultRowScoresQueryKey(workspace, job, params); - - const queryFn: QueryFunction< - Awaited> - > = ({ signal }) => evaluationDownloadBenchmarkJobResultRowScores(workspace, job, params, signal); - - return { queryKey, queryFn, enabled: !!(workspace && job), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationDownloadBenchmarkJobResultRowScoresQueryResult = NonNullable< - Awaited> ->; -export type EvaluationDownloadBenchmarkJobResultRowScoresQueryError = - ErrorType; - -export function useEvaluationDownloadBenchmarkJobResultRowScores< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - params: undefined | EvaluationDownloadBenchmarkJobResultRowScoresParams, - options: { - query: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEvaluationDownloadBenchmarkJobResultRowScores< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - params?: EvaluationDownloadBenchmarkJobResultRowScoresParams, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEvaluationDownloadBenchmarkJobResultRowScores< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - params?: EvaluationDownloadBenchmarkJobResultRowScoresParams, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Download Job Result Row-Scores - */ - -export function useEvaluationDownloadBenchmarkJobResultRowScores< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - params?: EvaluationDownloadBenchmarkJobResultRowScoresParams, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationDownloadBenchmarkJobResultRowScoresQueryOptions( - workspace, - job, - params, - options - ); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEvaluationDownloadBenchmarkJobResultRowScoresSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - params?: EvaluationDownloadBenchmarkJobResultRowScoresParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? - getEvaluationDownloadBenchmarkJobResultRowScoresQueryKey(workspace, job, params); - - const queryFn: QueryFunction< - Awaited> - > = ({ signal }) => evaluationDownloadBenchmarkJobResultRowScores(workspace, job, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationDownloadBenchmarkJobResultRowScoresSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EvaluationDownloadBenchmarkJobResultRowScoresSuspenseQueryError = - ErrorType; - -export function useEvaluationDownloadBenchmarkJobResultRowScoresSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - params: undefined | EvaluationDownloadBenchmarkJobResultRowScoresParams, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationDownloadBenchmarkJobResultRowScoresSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - params?: EvaluationDownloadBenchmarkJobResultRowScoresParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationDownloadBenchmarkJobResultRowScoresSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - params?: EvaluationDownloadBenchmarkJobResultRowScoresParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Download Job Result Row-Scores - */ - -export function useEvaluationDownloadBenchmarkJobResultRowScoresSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - params?: EvaluationDownloadBenchmarkJobResultRowScoresParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationDownloadBenchmarkJobResultRowScoresSuspenseQueryOptions( - workspace, - job, - params, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Get Job Result - */ -export const evaluationGetBenchmarkJobsResults = ( - workspace: string, - job: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/benchmark-jobs/${encodeURIComponent(String(job))}/results/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getEvaluationGetBenchmarkJobsResultsQueryKey = ( - workspace: string, - job: string, - name: string -) => { - return [ - `/apis/evaluation/v2/workspaces/${workspace}/benchmark-jobs/${job}/results/${name}`, - ] as const; -}; - -export const getEvaluationGetBenchmarkJobsResultsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEvaluationGetBenchmarkJobsResultsQueryKey(workspace, job, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => evaluationGetBenchmarkJobsResults(workspace, job, name, signal); - - return { - queryKey, - queryFn, - enabled: !!(workspace && job && name), - ...queryOptions, - } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationGetBenchmarkJobsResultsQueryResult = NonNullable< - Awaited> ->; -export type EvaluationGetBenchmarkJobsResultsQueryError = ErrorType; - -export function useEvaluationGetBenchmarkJobsResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetBenchmarkJobsResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetBenchmarkJobsResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Result - */ - -export function useEvaluationGetBenchmarkJobsResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationGetBenchmarkJobsResultsQueryOptions( - workspace, - job, - name, - options - ); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEvaluationGetBenchmarkJobsResultsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEvaluationGetBenchmarkJobsResultsQueryKey(workspace, job, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => evaluationGetBenchmarkJobsResults(workspace, job, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationGetBenchmarkJobsResultsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EvaluationGetBenchmarkJobsResultsSuspenseQueryError = ErrorType; - -export function useEvaluationGetBenchmarkJobsResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetBenchmarkJobsResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetBenchmarkJobsResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Result - */ - -export function useEvaluationGetBenchmarkJobsResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationGetBenchmarkJobsResultsSuspenseQueryOptions( - workspace, - job, - name, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Download Job Result - */ -export const evaluationDownloadBenchmarkJobResult = ( - workspace: string, - job: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/benchmark-jobs/${encodeURIComponent(String(job))}/results/${encodeURIComponent(String(name))}/download`, - method: 'GET', - responseType: 'blob', - signal, - }); -}; - -export const getEvaluationDownloadBenchmarkJobResultQueryKey = ( - workspace: string, - job: string, - name: string -) => { - return [ - `/apis/evaluation/v2/workspaces/${workspace}/benchmark-jobs/${job}/results/${name}/download`, - ] as const; -}; - -export const getEvaluationDownloadBenchmarkJobResultQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEvaluationDownloadBenchmarkJobResultQueryKey(workspace, job, name); - - const queryFn: QueryFunction< - Awaited> - > = ({ signal }) => evaluationDownloadBenchmarkJobResult(workspace, job, name, signal); - - return { - queryKey, - queryFn, - enabled: !!(workspace && job && name), - ...queryOptions, - } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationDownloadBenchmarkJobResultQueryResult = NonNullable< - Awaited> ->; -export type EvaluationDownloadBenchmarkJobResultQueryError = ErrorType; - -export function useEvaluationDownloadBenchmarkJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options: { - query: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEvaluationDownloadBenchmarkJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEvaluationDownloadBenchmarkJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Download Job Result - */ - -export function useEvaluationDownloadBenchmarkJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationDownloadBenchmarkJobResultQueryOptions( - workspace, - job, - name, - options - ); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEvaluationDownloadBenchmarkJobResultSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEvaluationDownloadBenchmarkJobResultQueryKey(workspace, job, name); - - const queryFn: QueryFunction< - Awaited> - > = ({ signal }) => evaluationDownloadBenchmarkJobResult(workspace, job, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationDownloadBenchmarkJobResultSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EvaluationDownloadBenchmarkJobResultSuspenseQueryError = - ErrorType; - -export function useEvaluationDownloadBenchmarkJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationDownloadBenchmarkJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationDownloadBenchmarkJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Download Job Result - */ - -export function useEvaluationDownloadBenchmarkJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationDownloadBenchmarkJobResultSuspenseQueryOptions( - workspace, - job, - name, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Get Job - */ -export const evaluationGetBenchmarkJob = ( - workspace: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/benchmark-jobs/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getEvaluationGetBenchmarkJobQueryKey = (workspace: string, name: string) => { - return [`/apis/evaluation/v2/workspaces/${workspace}/benchmark-jobs/${name}`] as const; -}; - -export const getEvaluationGetBenchmarkJobQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getEvaluationGetBenchmarkJobQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => evaluationGetBenchmarkJob(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationGetBenchmarkJobQueryResult = NonNullable< - Awaited> ->; -export type EvaluationGetBenchmarkJobQueryError = ErrorType; - -export function useEvaluationGetBenchmarkJob< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetBenchmarkJob< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetBenchmarkJob< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job - */ - -export function useEvaluationGetBenchmarkJob< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationGetBenchmarkJobQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEvaluationGetBenchmarkJobSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getEvaluationGetBenchmarkJobQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => evaluationGetBenchmarkJob(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationGetBenchmarkJobSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EvaluationGetBenchmarkJobSuspenseQueryError = ErrorType; - -export function useEvaluationGetBenchmarkJobSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetBenchmarkJobSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetBenchmarkJobSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job - */ - -export function useEvaluationGetBenchmarkJobSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationGetBenchmarkJobSuspenseQueryOptions(workspace, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Delete Job - */ -export const evaluationDeleteBenchmarkJob = ( - workspace: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/benchmark-jobs/${encodeURIComponent(String(name))}`, - method: 'DELETE', - signal, - }); -}; - -export const getEvaluationDeleteBenchmarkJobMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - const mutationKey = ['evaluationDeleteBenchmarkJob']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string } - > = (props) => { - const { workspace, name } = props ?? {}; - - return evaluationDeleteBenchmarkJob(workspace, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type EvaluationDeleteBenchmarkJobMutationResult = NonNullable< - Awaited> ->; - -export type EvaluationDeleteBenchmarkJobMutationError = ErrorType; - -/** - * @summary Delete Job - */ -export const useEvaluationDeleteBenchmarkJob = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - return useMutation(getEvaluationDeleteBenchmarkJobMutationOptions(options), queryClient); -}; - -/** - * @summary Cancel Job - */ -export const evaluationCancelBenchmarkJob = ( - workspace: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/benchmark-jobs/${encodeURIComponent(String(name))}/cancel`, - method: 'POST', - signal, - }); -}; - -export const getEvaluationCancelBenchmarkJobMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - const mutationKey = ['evaluationCancelBenchmarkJob']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string } - > = (props) => { - const { workspace, name } = props ?? {}; - - return evaluationCancelBenchmarkJob(workspace, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type EvaluationCancelBenchmarkJobMutationResult = NonNullable< - Awaited> ->; - -export type EvaluationCancelBenchmarkJobMutationError = ErrorType; - -/** - * @summary Cancel Job - */ -export const useEvaluationCancelBenchmarkJob = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - return useMutation(getEvaluationCancelBenchmarkJobMutationOptions(options), queryClient); -}; - -/** - * @summary Get Job Logs - */ -export const evaluationGetBenchmarkJobLogs = ( - workspace: string, - name: string, - params?: EvaluationGetBenchmarkJobLogsParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/benchmark-jobs/${encodeURIComponent(String(name))}/logs`, - method: 'GET', - params, - signal, - }); -}; - -export const getEvaluationGetBenchmarkJobLogsQueryKey = ( - workspace: string, - name: string, - params?: EvaluationGetBenchmarkJobLogsParams -) => { - return [ - `/apis/evaluation/v2/workspaces/${workspace}/benchmark-jobs/${name}/logs`, - ...(params ? [params] : []), - ] as const; -}; - -export const getEvaluationGetBenchmarkJobLogsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetBenchmarkJobLogsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEvaluationGetBenchmarkJobLogsQueryKey(workspace, name, params); - - const queryFn: QueryFunction>> = ({ - signal, - }) => evaluationGetBenchmarkJobLogs(workspace, name, params, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationGetBenchmarkJobLogsQueryResult = NonNullable< - Awaited> ->; -export type EvaluationGetBenchmarkJobLogsQueryError = ErrorType; - -export function useEvaluationGetBenchmarkJobLogs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params: undefined | EvaluationGetBenchmarkJobLogsParams, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetBenchmarkJobLogs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetBenchmarkJobLogsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetBenchmarkJobLogs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetBenchmarkJobLogsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Logs - */ - -export function useEvaluationGetBenchmarkJobLogs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetBenchmarkJobLogsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationGetBenchmarkJobLogsQueryOptions( - workspace, - name, - params, - options - ); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEvaluationGetBenchmarkJobLogsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetBenchmarkJobLogsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEvaluationGetBenchmarkJobLogsQueryKey(workspace, name, params); - - const queryFn: QueryFunction>> = ({ - signal, - }) => evaluationGetBenchmarkJobLogs(workspace, name, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationGetBenchmarkJobLogsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EvaluationGetBenchmarkJobLogsSuspenseQueryError = ErrorType; - -export function useEvaluationGetBenchmarkJobLogsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params: undefined | EvaluationGetBenchmarkJobLogsParams, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetBenchmarkJobLogsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetBenchmarkJobLogsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetBenchmarkJobLogsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetBenchmarkJobLogsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Logs - */ - -export function useEvaluationGetBenchmarkJobLogsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetBenchmarkJobLogsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationGetBenchmarkJobLogsSuspenseQueryOptions( - workspace, - name, - params, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary List Job Results - */ -export const evaluationListBenchmarkJobsResults = ( - workspace: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/benchmark-jobs/${encodeURIComponent(String(name))}/results`, - method: 'GET', - signal, - }); -}; - -export const getEvaluationListBenchmarkJobsResultsQueryKey = (workspace: string, name: string) => { - return [`/apis/evaluation/v2/workspaces/${workspace}/benchmark-jobs/${name}/results`] as const; -}; - -export const getEvaluationListBenchmarkJobsResultsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEvaluationListBenchmarkJobsResultsQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => evaluationListBenchmarkJobsResults(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationListBenchmarkJobsResultsQueryResult = NonNullable< - Awaited> ->; -export type EvaluationListBenchmarkJobsResultsQueryError = ErrorType; - -export function useEvaluationListBenchmarkJobsResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEvaluationListBenchmarkJobsResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEvaluationListBenchmarkJobsResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List Job Results - */ - -export function useEvaluationListBenchmarkJobsResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationListBenchmarkJobsResultsQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEvaluationListBenchmarkJobsResultsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEvaluationListBenchmarkJobsResultsQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => evaluationListBenchmarkJobsResults(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationListBenchmarkJobsResultsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EvaluationListBenchmarkJobsResultsSuspenseQueryError = ErrorType; - -export function useEvaluationListBenchmarkJobsResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationListBenchmarkJobsResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationListBenchmarkJobsResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List Job Results - */ - -export function useEvaluationListBenchmarkJobsResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationListBenchmarkJobsResultsSuspenseQueryOptions( - workspace, - name, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Get Job Status - */ -export const evaluationGetBenchmarkJobStatus = ( - workspace: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/benchmark-jobs/${encodeURIComponent(String(name))}/status`, - method: 'GET', - signal, - }); -}; - -export const getEvaluationGetBenchmarkJobStatusQueryKey = (workspace: string, name: string) => { - return [`/apis/evaluation/v2/workspaces/${workspace}/benchmark-jobs/${name}/status`] as const; -}; - -export const getEvaluationGetBenchmarkJobStatusQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEvaluationGetBenchmarkJobStatusQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => evaluationGetBenchmarkJobStatus(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationGetBenchmarkJobStatusQueryResult = NonNullable< - Awaited> ->; -export type EvaluationGetBenchmarkJobStatusQueryError = ErrorType; - -export function useEvaluationGetBenchmarkJobStatus< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetBenchmarkJobStatus< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetBenchmarkJobStatus< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Status - */ - -export function useEvaluationGetBenchmarkJobStatus< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationGetBenchmarkJobStatusQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEvaluationGetBenchmarkJobStatusSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEvaluationGetBenchmarkJobStatusQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => evaluationGetBenchmarkJobStatus(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationGetBenchmarkJobStatusSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EvaluationGetBenchmarkJobStatusSuspenseQueryError = ErrorType; - -export function useEvaluationGetBenchmarkJobStatusSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetBenchmarkJobStatusSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetBenchmarkJobStatusSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Status - */ - -export function useEvaluationGetBenchmarkJobStatusSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationGetBenchmarkJobStatusSuspenseQueryOptions( - workspace, - name, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * List all available evaluation benchmarks. - * @summary List Benchmarks - */ -export const evaluationListBenchmarks = ( - workspace: string, - params?: EvaluationListBenchmarksParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/benchmarks`, - method: 'GET', - params, - signal, - }); -}; - -export const getEvaluationListBenchmarksQueryKey = ( - workspace: string, - params?: EvaluationListBenchmarksParams -) => { - return [ - `/apis/evaluation/v2/workspaces/${workspace}/benchmarks`, - ...(params ? [params] : []), - ] as const; -}; - -export const getEvaluationListBenchmarksQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListBenchmarksParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getEvaluationListBenchmarksQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ - signal, - }) => evaluationListBenchmarks(workspace, params, signal); - - return { queryKey, queryFn, enabled: !!workspace, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationListBenchmarksQueryResult = NonNullable< - Awaited> ->; -export type EvaluationListBenchmarksQueryError = ErrorType; - -export function useEvaluationListBenchmarks< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | EvaluationListBenchmarksParams, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEvaluationListBenchmarks< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListBenchmarksParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEvaluationListBenchmarks< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListBenchmarksParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List Benchmarks - */ - -export function useEvaluationListBenchmarks< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListBenchmarksParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationListBenchmarksQueryOptions(workspace, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEvaluationListBenchmarksSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListBenchmarksParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getEvaluationListBenchmarksQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ - signal, - }) => evaluationListBenchmarks(workspace, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationListBenchmarksSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EvaluationListBenchmarksSuspenseQueryError = ErrorType; - -export function useEvaluationListBenchmarksSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | EvaluationListBenchmarksParams, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationListBenchmarksSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListBenchmarksParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationListBenchmarksSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListBenchmarksParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List Benchmarks - */ - -export function useEvaluationListBenchmarksSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListBenchmarksParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationListBenchmarksSuspenseQueryOptions(workspace, params, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Create a new custom evaluation benchmark. - -Benchmarks can be reused across multiple evaluations. The benchmark type determines -the evaluation method (currently only LLM-as-a-Judge is supported). - * @summary Create Benchmark - */ -export const evaluationCreateBenchmark = ( - workspace: string, - benchmarkRequest: BenchmarkRequest, - params?: EvaluationCreateBenchmarkParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/benchmarks`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: benchmarkRequest, - params, - signal, - }); -}; - -export const getEvaluationCreateBenchmarkMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: BenchmarkRequest; params?: EvaluationCreateBenchmarkParams }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: BenchmarkRequest; params?: EvaluationCreateBenchmarkParams }, - TContext -> => { - const mutationKey = ['evaluationCreateBenchmark']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; data: BenchmarkRequest; params?: EvaluationCreateBenchmarkParams } - > = (props) => { - const { workspace, data, params } = props ?? {}; - - return evaluationCreateBenchmark(workspace, data, params); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type EvaluationCreateBenchmarkMutationResult = NonNullable< - Awaited> ->; -export type EvaluationCreateBenchmarkMutationBody = BenchmarkRequest; -export type EvaluationCreateBenchmarkMutationError = ErrorType; - -/** - * @summary Create Benchmark - */ -export const useEvaluationCreateBenchmark = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: BenchmarkRequest; params?: EvaluationCreateBenchmarkParams }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; data: BenchmarkRequest; params?: EvaluationCreateBenchmarkParams }, - TContext -> => { - return useMutation(getEvaluationCreateBenchmarkMutationOptions(options), queryClient); -}; - -/** - * Get a specific evaluation benchmark by workspace and benchmark name. - * @summary Get Benchmark - */ -export const evaluationGetBenchmark = ( - workspace: string, - name: string, - params?: EvaluationGetBenchmarkParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/benchmarks/${encodeURIComponent(String(name))}`, - method: 'GET', - params, - signal, - }); -}; - -export const getEvaluationGetBenchmarkQueryKey = ( - workspace: string, - name: string, - params?: EvaluationGetBenchmarkParams -) => { - return [ - `/apis/evaluation/v2/workspaces/${workspace}/benchmarks/${name}`, - ...(params ? [params] : []), - ] as const; -}; - -export const getEvaluationGetBenchmarkQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetBenchmarkParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEvaluationGetBenchmarkQueryKey(workspace, name, params); - - const queryFn: QueryFunction>> = ({ signal }) => - evaluationGetBenchmark(workspace, name, params, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationGetBenchmarkQueryResult = NonNullable< - Awaited> ->; -export type EvaluationGetBenchmarkQueryError = ErrorType; - -export function useEvaluationGetBenchmark< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params: undefined | EvaluationGetBenchmarkParams, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetBenchmark< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetBenchmarkParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetBenchmark< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetBenchmarkParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Benchmark - */ - -export function useEvaluationGetBenchmark< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetBenchmarkParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationGetBenchmarkQueryOptions(workspace, name, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEvaluationGetBenchmarkSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetBenchmarkParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEvaluationGetBenchmarkQueryKey(workspace, name, params); - - const queryFn: QueryFunction>> = ({ signal }) => - evaluationGetBenchmark(workspace, name, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationGetBenchmarkSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EvaluationGetBenchmarkSuspenseQueryError = ErrorType; - -export function useEvaluationGetBenchmarkSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params: undefined | EvaluationGetBenchmarkParams, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetBenchmarkSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetBenchmarkParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetBenchmarkSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetBenchmarkParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Benchmark - */ - -export function useEvaluationGetBenchmarkSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetBenchmarkParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationGetBenchmarkSuspenseQueryOptions( - workspace, - name, - params, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Delete a custom evaluation benchmark. Predefined benchmarks cannot be deleted. - * @summary Delete Benchmark - */ -export const evaluationDeleteBenchmark = ( - workspace: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/benchmarks/${encodeURIComponent(String(name))}`, - method: 'DELETE', - signal, - }); -}; - -export const getEvaluationDeleteBenchmarkMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - const mutationKey = ['evaluationDeleteBenchmark']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string } - > = (props) => { - const { workspace, name } = props ?? {}; - - return evaluationDeleteBenchmark(workspace, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type EvaluationDeleteBenchmarkMutationResult = NonNullable< - Awaited> ->; - -export type EvaluationDeleteBenchmarkMutationError = ErrorType; - -/** - * @summary Delete Benchmark - */ -export const useEvaluationDeleteBenchmark = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - return useMutation(getEvaluationDeleteBenchmarkMutationOptions(options), queryClient); -}; - -/** - * Run a synchronous metric evaluation on a dataset. - -This endpoint evaluates the given dataset using the specified metric and returns -results immediately. Use this for quick, interactive evaluations with small datasets -(up to 10 rows). For larger evaluations, use the async job-based evaluation endpoints. - -The metric can be specified either as a URN reference to a stored metric -(e.g., "workspace/metric_name") or as an inline metric definition. - -The dataset must be provided inline with rows. - -**Aggregate Score Fields:** -The `name` and `count` fields are always included in aggregate scores. -By default, additional fields returned are: nan_count, sum, mean, min, max. -Use the `aggregate_fields` query parameter to customize which optional fields -are included (e.g., std_dev, variance, percentiles, histogram, rubric_distribution, mode_category). - * @summary Evaluate Metric - */ -export const evaluationEvaluateMetric = ( - workspace: string, - metricEvaluationRequest: MetricEvaluationRequest, - params?: EvaluationEvaluateMetricParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/metric-evaluate`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: metricEvaluationRequest, - params, - signal, - }); -}; - -export const getEvaluationEvaluateMetricMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: MetricEvaluationRequest; params?: EvaluationEvaluateMetricParams }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: MetricEvaluationRequest; params?: EvaluationEvaluateMetricParams }, - TContext -> => { - const mutationKey = ['evaluationEvaluateMetric']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; data: MetricEvaluationRequest; params?: EvaluationEvaluateMetricParams } - > = (props) => { - const { workspace, data, params } = props ?? {}; - - return evaluationEvaluateMetric(workspace, data, params); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type EvaluationEvaluateMetricMutationResult = NonNullable< - Awaited> ->; -export type EvaluationEvaluateMetricMutationBody = MetricEvaluationRequest; -export type EvaluationEvaluateMetricMutationError = ErrorType; - -/** - * @summary Evaluate Metric - */ -export const useEvaluationEvaluateMetric = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: MetricEvaluationRequest; params?: EvaluationEvaluateMetricParams }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; data: MetricEvaluationRequest; params?: EvaluationEvaluateMetricParams }, - TContext -> => { - return useMutation(getEvaluationEvaluateMetricMutationOptions(options), queryClient); -}; - -/** - * List stored evaluation results for metric jobs. - * @summary List Metric Job Results - */ -export const evaluationListMetricJobResults = ( - workspace: string, - params?: EvaluationListMetricJobResultsParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/metric-job-results`, - method: 'GET', - params, - signal, - }); -}; - -export const getEvaluationListMetricJobResultsQueryKey = ( - workspace: string, - params?: EvaluationListMetricJobResultsParams -) => { - return [ - `/apis/evaluation/v2/workspaces/${workspace}/metric-job-results`, - ...(params ? [params] : []), - ] as const; -}; - -export const getEvaluationListMetricJobResultsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListMetricJobResultsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEvaluationListMetricJobResultsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ - signal, - }) => evaluationListMetricJobResults(workspace, params, signal); - - return { queryKey, queryFn, enabled: !!workspace, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationListMetricJobResultsQueryResult = NonNullable< - Awaited> ->; -export type EvaluationListMetricJobResultsQueryError = ErrorType; - -export function useEvaluationListMetricJobResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | EvaluationListMetricJobResultsParams, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEvaluationListMetricJobResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListMetricJobResultsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEvaluationListMetricJobResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListMetricJobResultsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List Metric Job Results - */ - -export function useEvaluationListMetricJobResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListMetricJobResultsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationListMetricJobResultsQueryOptions(workspace, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEvaluationListMetricJobResultsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListMetricJobResultsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEvaluationListMetricJobResultsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ - signal, - }) => evaluationListMetricJobResults(workspace, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationListMetricJobResultsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EvaluationListMetricJobResultsSuspenseQueryError = ErrorType; - -export function useEvaluationListMetricJobResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | EvaluationListMetricJobResultsParams, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationListMetricJobResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListMetricJobResultsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationListMetricJobResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListMetricJobResultsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List Metric Job Results - */ - -export function useEvaluationListMetricJobResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListMetricJobResultsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationListMetricJobResultsSuspenseQueryOptions( - workspace, - params, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Get a specific metric job result by workspace and job name. - * @summary Get Metric Job Result - */ -export const evaluationGetMetricJobResult = ( - workspace: string, - name: string, - params?: EvaluationGetMetricJobResultParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/metric-job-results/${encodeURIComponent(String(name))}`, - method: 'GET', - params, - signal, - }); -}; - -export const getEvaluationGetMetricJobResultQueryKey = ( - workspace: string, - name: string, - params?: EvaluationGetMetricJobResultParams -) => { - return [ - `/apis/evaluation/v2/workspaces/${workspace}/metric-job-results/${name}`, - ...(params ? [params] : []), - ] as const; -}; - -export const getEvaluationGetMetricJobResultQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetMetricJobResultParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEvaluationGetMetricJobResultQueryKey(workspace, name, params); - - const queryFn: QueryFunction>> = ({ - signal, - }) => evaluationGetMetricJobResult(workspace, name, params, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationGetMetricJobResultQueryResult = NonNullable< - Awaited> ->; -export type EvaluationGetMetricJobResultQueryError = ErrorType; - -export function useEvaluationGetMetricJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params: undefined | EvaluationGetMetricJobResultParams, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetMetricJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetMetricJobResultParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetMetricJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetMetricJobResultParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Metric Job Result - */ - -export function useEvaluationGetMetricJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetMetricJobResultParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationGetMetricJobResultQueryOptions( - workspace, - name, - params, - options - ); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEvaluationGetMetricJobResultSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetMetricJobResultParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEvaluationGetMetricJobResultQueryKey(workspace, name, params); - - const queryFn: QueryFunction>> = ({ - signal, - }) => evaluationGetMetricJobResult(workspace, name, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationGetMetricJobResultSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EvaluationGetMetricJobResultSuspenseQueryError = ErrorType< - ErrorResponse | HTTPValidationError ->; - -export function useEvaluationGetMetricJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params: undefined | EvaluationGetMetricJobResultParams, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetMetricJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetMetricJobResultParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetMetricJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetMetricJobResultParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Metric Job Result - */ - -export function useEvaluationGetMetricJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetMetricJobResultParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationGetMetricJobResultSuspenseQueryOptions( - workspace, - name, - params, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Delete an evaluation metric job result. - * @summary Delete Metric Job Result - */ -export const evaluationDeleteMetricJobResult = ( - workspace: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/metric-job-results/${encodeURIComponent(String(name))}`, - method: 'DELETE', - signal, - }); -}; - -export const getEvaluationDeleteMetricJobResultMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - const mutationKey = ['evaluationDeleteMetricJobResult']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string } - > = (props) => { - const { workspace, name } = props ?? {}; - - return evaluationDeleteMetricJobResult(workspace, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type EvaluationDeleteMetricJobResultMutationResult = NonNullable< - Awaited> ->; - -export type EvaluationDeleteMetricJobResultMutationError = ErrorType< - ErrorResponse | HTTPValidationError ->; - -/** - * @summary Delete Metric Job Result - */ -export const useEvaluationDeleteMetricJobResult = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - return useMutation(getEvaluationDeleteMetricJobResultMutationOptions(options), queryClient); -}; - -/** - * @summary Create Job - */ -export const evaluationCreateMetricJob = ( - workspace: string, - metricEvaluationJobRequest: MetricEvaluationJobRequest, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/metric-jobs`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: metricEvaluationJobRequest, - signal, - }); -}; - -export const getEvaluationCreateMetricJobMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: MetricEvaluationJobRequest }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: MetricEvaluationJobRequest }, - TContext -> => { - const mutationKey = ['evaluationCreateMetricJob']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; data: MetricEvaluationJobRequest } - > = (props) => { - const { workspace, data } = props ?? {}; - - return evaluationCreateMetricJob(workspace, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type EvaluationCreateMetricJobMutationResult = NonNullable< - Awaited> ->; -export type EvaluationCreateMetricJobMutationBody = MetricEvaluationJobRequest; -export type EvaluationCreateMetricJobMutationError = ErrorType; - -/** - * @summary Create Job - */ -export const useEvaluationCreateMetricJob = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: MetricEvaluationJobRequest }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; data: MetricEvaluationJobRequest }, - TContext -> => { - return useMutation(getEvaluationCreateMetricJobMutationOptions(options), queryClient); -}; - -/** - * @summary List Jobs - */ -export const evaluationListMetricJobs = ( - workspace: string, - params?: EvaluationListMetricJobsParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/metric-jobs`, - method: 'GET', - params, - signal, - }); -}; - -export const getEvaluationListMetricJobsQueryKey = ( - workspace: string, - params?: EvaluationListMetricJobsParams -) => { - return [ - `/apis/evaluation/v2/workspaces/${workspace}/metric-jobs`, - ...(params ? [params] : []), - ] as const; -}; - -export const getEvaluationListMetricJobsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListMetricJobsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getEvaluationListMetricJobsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ - signal, - }) => evaluationListMetricJobs(workspace, params, signal); - - return { queryKey, queryFn, enabled: !!workspace, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationListMetricJobsQueryResult = NonNullable< - Awaited> ->; -export type EvaluationListMetricJobsQueryError = ErrorType; - -export function useEvaluationListMetricJobs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | EvaluationListMetricJobsParams, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEvaluationListMetricJobs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListMetricJobsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEvaluationListMetricJobs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListMetricJobsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List Jobs - */ - -export function useEvaluationListMetricJobs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListMetricJobsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationListMetricJobsQueryOptions(workspace, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEvaluationListMetricJobsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListMetricJobsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getEvaluationListMetricJobsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ - signal, - }) => evaluationListMetricJobs(workspace, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationListMetricJobsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EvaluationListMetricJobsSuspenseQueryError = ErrorType; - -export function useEvaluationListMetricJobsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | EvaluationListMetricJobsParams, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationListMetricJobsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListMetricJobsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationListMetricJobsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListMetricJobsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List Jobs - */ - -export function useEvaluationListMetricJobsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListMetricJobsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationListMetricJobsSuspenseQueryOptions(workspace, params, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Download Job Result Aggregate-Scores - */ -export const evaluationDownloadMetricJobResultAggregateScores = ( - workspace: string, - job: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/metric-jobs/${encodeURIComponent(String(job))}/results/aggregate-scores/download`, - method: 'GET', - signal, - }); -}; - -export const getEvaluationDownloadMetricJobResultAggregateScoresQueryKey = ( - workspace: string, - job: string -) => { - return [ - `/apis/evaluation/v2/workspaces/${workspace}/metric-jobs/${job}/results/aggregate-scores/download`, - ] as const; -}; - -export const getEvaluationDownloadMetricJobResultAggregateScoresQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? - getEvaluationDownloadMetricJobResultAggregateScoresQueryKey(workspace, job); - - const queryFn: QueryFunction< - Awaited> - > = ({ signal }) => evaluationDownloadMetricJobResultAggregateScores(workspace, job, signal); - - return { queryKey, queryFn, enabled: !!(workspace && job), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationDownloadMetricJobResultAggregateScoresQueryResult = NonNullable< - Awaited> ->; -export type EvaluationDownloadMetricJobResultAggregateScoresQueryError = - ErrorType; - -export function useEvaluationDownloadMetricJobResultAggregateScores< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options: { - query: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEvaluationDownloadMetricJobResultAggregateScores< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEvaluationDownloadMetricJobResultAggregateScores< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Download Job Result Aggregate-Scores - */ - -export function useEvaluationDownloadMetricJobResultAggregateScores< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationDownloadMetricJobResultAggregateScoresQueryOptions( - workspace, - job, - options - ); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEvaluationDownloadMetricJobResultAggregateScoresSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? - getEvaluationDownloadMetricJobResultAggregateScoresQueryKey(workspace, job); - - const queryFn: QueryFunction< - Awaited> - > = ({ signal }) => evaluationDownloadMetricJobResultAggregateScores(workspace, job, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationDownloadMetricJobResultAggregateScoresSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EvaluationDownloadMetricJobResultAggregateScoresSuspenseQueryError = - ErrorType; - -export function useEvaluationDownloadMetricJobResultAggregateScoresSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationDownloadMetricJobResultAggregateScoresSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationDownloadMetricJobResultAggregateScoresSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Download Job Result Aggregate-Scores - */ - -export function useEvaluationDownloadMetricJobResultAggregateScoresSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationDownloadMetricJobResultAggregateScoresSuspenseQueryOptions( - workspace, - job, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Download Job Result Artifacts - */ -export const evaluationDownloadMetricJobResultArtifacts = ( - workspace: string, - job: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/metric-jobs/${encodeURIComponent(String(job))}/results/artifacts/download`, - method: 'GET', - responseType: 'blob', - signal, - }); -}; - -export const getEvaluationDownloadMetricJobResultArtifactsQueryKey = ( - workspace: string, - job: string -) => { - return [ - `/apis/evaluation/v2/workspaces/${workspace}/metric-jobs/${job}/results/artifacts/download`, - ] as const; -}; - -export const getEvaluationDownloadMetricJobResultArtifactsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEvaluationDownloadMetricJobResultArtifactsQueryKey(workspace, job); - - const queryFn: QueryFunction< - Awaited> - > = ({ signal }) => evaluationDownloadMetricJobResultArtifacts(workspace, job, signal); - - return { queryKey, queryFn, enabled: !!(workspace && job), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationDownloadMetricJobResultArtifactsQueryResult = NonNullable< - Awaited> ->; -export type EvaluationDownloadMetricJobResultArtifactsQueryError = - ErrorType; - -export function useEvaluationDownloadMetricJobResultArtifacts< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options: { - query: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEvaluationDownloadMetricJobResultArtifacts< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEvaluationDownloadMetricJobResultArtifacts< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Download Job Result Artifacts - */ - -export function useEvaluationDownloadMetricJobResultArtifacts< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationDownloadMetricJobResultArtifactsQueryOptions( - workspace, - job, - options - ); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEvaluationDownloadMetricJobResultArtifactsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEvaluationDownloadMetricJobResultArtifactsQueryKey(workspace, job); - - const queryFn: QueryFunction< - Awaited> - > = ({ signal }) => evaluationDownloadMetricJobResultArtifacts(workspace, job, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationDownloadMetricJobResultArtifactsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EvaluationDownloadMetricJobResultArtifactsSuspenseQueryError = - ErrorType; - -export function useEvaluationDownloadMetricJobResultArtifactsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationDownloadMetricJobResultArtifactsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationDownloadMetricJobResultArtifactsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Download Job Result Artifacts - */ - -export function useEvaluationDownloadMetricJobResultArtifactsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationDownloadMetricJobResultArtifactsSuspenseQueryOptions( - workspace, - job, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Download Job Result Row-Scores - */ -export const evaluationDownloadMetricJobResultRowScores = ( - workspace: string, - job: string, - params?: EvaluationDownloadMetricJobResultRowScoresParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/metric-jobs/${encodeURIComponent(String(job))}/results/row-scores/download`, - method: 'GET', - params, - responseType: 'blob', - signal, - }); -}; - -export const getEvaluationDownloadMetricJobResultRowScoresQueryKey = ( - workspace: string, - job: string, - params?: EvaluationDownloadMetricJobResultRowScoresParams -) => { - return [ - `/apis/evaluation/v2/workspaces/${workspace}/metric-jobs/${job}/results/row-scores/download`, - ...(params ? [params] : []), - ] as const; -}; - -export const getEvaluationDownloadMetricJobResultRowScoresQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - params?: EvaluationDownloadMetricJobResultRowScoresParams, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? - getEvaluationDownloadMetricJobResultRowScoresQueryKey(workspace, job, params); - - const queryFn: QueryFunction< - Awaited> - > = ({ signal }) => evaluationDownloadMetricJobResultRowScores(workspace, job, params, signal); - - return { queryKey, queryFn, enabled: !!(workspace && job), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationDownloadMetricJobResultRowScoresQueryResult = NonNullable< - Awaited> ->; -export type EvaluationDownloadMetricJobResultRowScoresQueryError = - ErrorType; - -export function useEvaluationDownloadMetricJobResultRowScores< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - params: undefined | EvaluationDownloadMetricJobResultRowScoresParams, - options: { - query: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEvaluationDownloadMetricJobResultRowScores< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - params?: EvaluationDownloadMetricJobResultRowScoresParams, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEvaluationDownloadMetricJobResultRowScores< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - params?: EvaluationDownloadMetricJobResultRowScoresParams, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Download Job Result Row-Scores - */ - -export function useEvaluationDownloadMetricJobResultRowScores< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - params?: EvaluationDownloadMetricJobResultRowScoresParams, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationDownloadMetricJobResultRowScoresQueryOptions( - workspace, - job, - params, - options - ); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEvaluationDownloadMetricJobResultRowScoresSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - params?: EvaluationDownloadMetricJobResultRowScoresParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? - getEvaluationDownloadMetricJobResultRowScoresQueryKey(workspace, job, params); - - const queryFn: QueryFunction< - Awaited> - > = ({ signal }) => evaluationDownloadMetricJobResultRowScores(workspace, job, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationDownloadMetricJobResultRowScoresSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EvaluationDownloadMetricJobResultRowScoresSuspenseQueryError = - ErrorType; - -export function useEvaluationDownloadMetricJobResultRowScoresSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - params: undefined | EvaluationDownloadMetricJobResultRowScoresParams, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationDownloadMetricJobResultRowScoresSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - params?: EvaluationDownloadMetricJobResultRowScoresParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationDownloadMetricJobResultRowScoresSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - params?: EvaluationDownloadMetricJobResultRowScoresParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Download Job Result Row-Scores - */ - -export function useEvaluationDownloadMetricJobResultRowScoresSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - params?: EvaluationDownloadMetricJobResultRowScoresParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationDownloadMetricJobResultRowScoresSuspenseQueryOptions( - workspace, - job, - params, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Get Job Result - */ -export const evaluationGetMetricJobsResults = ( - workspace: string, - job: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/metric-jobs/${encodeURIComponent(String(job))}/results/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getEvaluationGetMetricJobsResultsQueryKey = ( - workspace: string, - job: string, - name: string -) => { - return [ - `/apis/evaluation/v2/workspaces/${workspace}/metric-jobs/${job}/results/${name}`, - ] as const; -}; - -export const getEvaluationGetMetricJobsResultsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEvaluationGetMetricJobsResultsQueryKey(workspace, job, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => evaluationGetMetricJobsResults(workspace, job, name, signal); - - return { - queryKey, - queryFn, - enabled: !!(workspace && job && name), - ...queryOptions, - } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationGetMetricJobsResultsQueryResult = NonNullable< - Awaited> ->; -export type EvaluationGetMetricJobsResultsQueryError = ErrorType; - -export function useEvaluationGetMetricJobsResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetMetricJobsResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetMetricJobsResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Result - */ - -export function useEvaluationGetMetricJobsResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationGetMetricJobsResultsQueryOptions(workspace, job, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEvaluationGetMetricJobsResultsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEvaluationGetMetricJobsResultsQueryKey(workspace, job, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => evaluationGetMetricJobsResults(workspace, job, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationGetMetricJobsResultsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EvaluationGetMetricJobsResultsSuspenseQueryError = ErrorType; - -export function useEvaluationGetMetricJobsResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetMetricJobsResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetMetricJobsResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Result - */ - -export function useEvaluationGetMetricJobsResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationGetMetricJobsResultsSuspenseQueryOptions( - workspace, - job, - name, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Download Job Result - */ -export const evaluationDownloadMetricJobResult = ( - workspace: string, - job: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/metric-jobs/${encodeURIComponent(String(job))}/results/${encodeURIComponent(String(name))}/download`, - method: 'GET', - responseType: 'blob', - signal, - }); -}; - -export const getEvaluationDownloadMetricJobResultQueryKey = ( - workspace: string, - job: string, - name: string -) => { - return [ - `/apis/evaluation/v2/workspaces/${workspace}/metric-jobs/${job}/results/${name}/download`, - ] as const; -}; - -export const getEvaluationDownloadMetricJobResultQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEvaluationDownloadMetricJobResultQueryKey(workspace, job, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => evaluationDownloadMetricJobResult(workspace, job, name, signal); - - return { - queryKey, - queryFn, - enabled: !!(workspace && job && name), - ...queryOptions, - } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationDownloadMetricJobResultQueryResult = NonNullable< - Awaited> ->; -export type EvaluationDownloadMetricJobResultQueryError = ErrorType; - -export function useEvaluationDownloadMetricJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEvaluationDownloadMetricJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEvaluationDownloadMetricJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Download Job Result - */ - -export function useEvaluationDownloadMetricJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationDownloadMetricJobResultQueryOptions( - workspace, - job, - name, - options - ); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEvaluationDownloadMetricJobResultSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEvaluationDownloadMetricJobResultQueryKey(workspace, job, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => evaluationDownloadMetricJobResult(workspace, job, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationDownloadMetricJobResultSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EvaluationDownloadMetricJobResultSuspenseQueryError = - ErrorType; - -export function useEvaluationDownloadMetricJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationDownloadMetricJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationDownloadMetricJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Download Job Result - */ - -export function useEvaluationDownloadMetricJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationDownloadMetricJobResultSuspenseQueryOptions( - workspace, - job, - name, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Get Job - */ -export const evaluationGetMetricJob = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/metric-jobs/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getEvaluationGetMetricJobQueryKey = (workspace: string, name: string) => { - return [`/apis/evaluation/v2/workspaces/${workspace}/metric-jobs/${name}`] as const; -}; - -export const getEvaluationGetMetricJobQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getEvaluationGetMetricJobQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - evaluationGetMetricJob(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationGetMetricJobQueryResult = NonNullable< - Awaited> ->; -export type EvaluationGetMetricJobQueryError = ErrorType; - -export function useEvaluationGetMetricJob< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetMetricJob< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetMetricJob< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job - */ - -export function useEvaluationGetMetricJob< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationGetMetricJobQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEvaluationGetMetricJobSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getEvaluationGetMetricJobQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - evaluationGetMetricJob(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationGetMetricJobSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EvaluationGetMetricJobSuspenseQueryError = ErrorType; - -export function useEvaluationGetMetricJobSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetMetricJobSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetMetricJobSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job - */ - -export function useEvaluationGetMetricJobSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationGetMetricJobSuspenseQueryOptions(workspace, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Delete Job - */ -export const evaluationDeleteMetricJob = ( - workspace: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/metric-jobs/${encodeURIComponent(String(name))}`, - method: 'DELETE', - signal, - }); -}; - -export const getEvaluationDeleteMetricJobMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - const mutationKey = ['evaluationDeleteMetricJob']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string } - > = (props) => { - const { workspace, name } = props ?? {}; - - return evaluationDeleteMetricJob(workspace, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type EvaluationDeleteMetricJobMutationResult = NonNullable< - Awaited> ->; - -export type EvaluationDeleteMetricJobMutationError = ErrorType; - -/** - * @summary Delete Job - */ -export const useEvaluationDeleteMetricJob = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - return useMutation(getEvaluationDeleteMetricJobMutationOptions(options), queryClient); -}; - -/** - * @summary Cancel Job - */ -export const evaluationCancelMetricJob = ( - workspace: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/metric-jobs/${encodeURIComponent(String(name))}/cancel`, - method: 'POST', - signal, - }); -}; - -export const getEvaluationCancelMetricJobMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - const mutationKey = ['evaluationCancelMetricJob']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string } - > = (props) => { - const { workspace, name } = props ?? {}; - - return evaluationCancelMetricJob(workspace, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type EvaluationCancelMetricJobMutationResult = NonNullable< - Awaited> ->; - -export type EvaluationCancelMetricJobMutationError = ErrorType; - -/** - * @summary Cancel Job - */ -export const useEvaluationCancelMetricJob = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - return useMutation(getEvaluationCancelMetricJobMutationOptions(options), queryClient); -}; - -/** - * @summary Get Job Logs - */ -export const evaluationGetMetricJobLogs = ( - workspace: string, - name: string, - params?: EvaluationGetMetricJobLogsParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/metric-jobs/${encodeURIComponent(String(name))}/logs`, - method: 'GET', - params, - signal, - }); -}; - -export const getEvaluationGetMetricJobLogsQueryKey = ( - workspace: string, - name: string, - params?: EvaluationGetMetricJobLogsParams -) => { - return [ - `/apis/evaluation/v2/workspaces/${workspace}/metric-jobs/${name}/logs`, - ...(params ? [params] : []), - ] as const; -}; - -export const getEvaluationGetMetricJobLogsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetMetricJobLogsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEvaluationGetMetricJobLogsQueryKey(workspace, name, params); - - const queryFn: QueryFunction>> = ({ - signal, - }) => evaluationGetMetricJobLogs(workspace, name, params, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationGetMetricJobLogsQueryResult = NonNullable< - Awaited> ->; -export type EvaluationGetMetricJobLogsQueryError = ErrorType; - -export function useEvaluationGetMetricJobLogs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params: undefined | EvaluationGetMetricJobLogsParams, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetMetricJobLogs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetMetricJobLogsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetMetricJobLogs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetMetricJobLogsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Logs - */ - -export function useEvaluationGetMetricJobLogs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetMetricJobLogsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationGetMetricJobLogsQueryOptions(workspace, name, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEvaluationGetMetricJobLogsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetMetricJobLogsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEvaluationGetMetricJobLogsQueryKey(workspace, name, params); - - const queryFn: QueryFunction>> = ({ - signal, - }) => evaluationGetMetricJobLogs(workspace, name, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationGetMetricJobLogsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EvaluationGetMetricJobLogsSuspenseQueryError = ErrorType; - -export function useEvaluationGetMetricJobLogsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params: undefined | EvaluationGetMetricJobLogsParams, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetMetricJobLogsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetMetricJobLogsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetMetricJobLogsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetMetricJobLogsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Logs - */ - -export function useEvaluationGetMetricJobLogsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: EvaluationGetMetricJobLogsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationGetMetricJobLogsSuspenseQueryOptions( - workspace, - name, - params, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary List Job Results - */ -export const evaluationListMetricJobsResults = ( - workspace: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/metric-jobs/${encodeURIComponent(String(name))}/results`, - method: 'GET', - signal, - }); -}; - -export const getEvaluationListMetricJobsResultsQueryKey = (workspace: string, name: string) => { - return [`/apis/evaluation/v2/workspaces/${workspace}/metric-jobs/${name}/results`] as const; -}; - -export const getEvaluationListMetricJobsResultsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEvaluationListMetricJobsResultsQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => evaluationListMetricJobsResults(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationListMetricJobsResultsQueryResult = NonNullable< - Awaited> ->; -export type EvaluationListMetricJobsResultsQueryError = ErrorType; - -export function useEvaluationListMetricJobsResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEvaluationListMetricJobsResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEvaluationListMetricJobsResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List Job Results - */ - -export function useEvaluationListMetricJobsResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationListMetricJobsResultsQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEvaluationListMetricJobsResultsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEvaluationListMetricJobsResultsQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => evaluationListMetricJobsResults(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationListMetricJobsResultsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EvaluationListMetricJobsResultsSuspenseQueryError = ErrorType; - -export function useEvaluationListMetricJobsResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationListMetricJobsResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationListMetricJobsResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List Job Results - */ - -export function useEvaluationListMetricJobsResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationListMetricJobsResultsSuspenseQueryOptions( - workspace, - name, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Get Job Status - */ -export const evaluationGetMetricJobStatus = ( - workspace: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/metric-jobs/${encodeURIComponent(String(name))}/status`, - method: 'GET', - signal, - }); -}; - -export const getEvaluationGetMetricJobStatusQueryKey = (workspace: string, name: string) => { - return [`/apis/evaluation/v2/workspaces/${workspace}/metric-jobs/${name}/status`] as const; -}; - -export const getEvaluationGetMetricJobStatusQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEvaluationGetMetricJobStatusQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => evaluationGetMetricJobStatus(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationGetMetricJobStatusQueryResult = NonNullable< - Awaited> ->; -export type EvaluationGetMetricJobStatusQueryError = ErrorType; - -export function useEvaluationGetMetricJobStatus< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetMetricJobStatus< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetMetricJobStatus< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Status - */ - -export function useEvaluationGetMetricJobStatus< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationGetMetricJobStatusQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEvaluationGetMetricJobStatusSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getEvaluationGetMetricJobStatusQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => evaluationGetMetricJobStatus(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationGetMetricJobStatusSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EvaluationGetMetricJobStatusSuspenseQueryError = ErrorType; - -export function useEvaluationGetMetricJobStatusSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetMetricJobStatusSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetMetricJobStatusSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Status - */ - -export function useEvaluationGetMetricJobStatusSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationGetMetricJobStatusSuspenseQueryOptions( - workspace, - name, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * List evaluation metrics. - * @summary List Metrics - */ -export const evaluationListMetrics = ( - workspace: string, - params?: EvaluationListMetricsParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/metrics`, - method: 'GET', - params, - signal, - }); -}; - -export const getEvaluationListMetricsQueryKey = ( - workspace: string, - params?: EvaluationListMetricsParams -) => { - return [ - `/apis/evaluation/v2/workspaces/${workspace}/metrics`, - ...(params ? [params] : []), - ] as const; -}; - -export const getEvaluationListMetricsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListMetricsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getEvaluationListMetricsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - evaluationListMetrics(workspace, params, signal); - - return { queryKey, queryFn, enabled: !!workspace, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationListMetricsQueryResult = NonNullable< - Awaited> ->; -export type EvaluationListMetricsQueryError = ErrorType; - -export function useEvaluationListMetrics< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | EvaluationListMetricsParams, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEvaluationListMetrics< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListMetricsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEvaluationListMetrics< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListMetricsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List Metrics - */ - -export function useEvaluationListMetrics< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListMetricsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationListMetricsQueryOptions(workspace, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEvaluationListMetricsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListMetricsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getEvaluationListMetricsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - evaluationListMetrics(workspace, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationListMetricsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EvaluationListMetricsSuspenseQueryError = ErrorType; - -export function useEvaluationListMetricsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | EvaluationListMetricsParams, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationListMetricsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListMetricsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationListMetricsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListMetricsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List Metrics - */ - -export function useEvaluationListMetricsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: EvaluationListMetricsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationListMetricsSuspenseQueryOptions(workspace, params, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Get a specific evaluation metric by workspace and metric name. - * @summary Get Metric - */ -export const evaluationGetMetric = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch< - | LLMJudgeMetricResponse - | TopicAdherenceMetricResponse - | AgentGoalAccuracyMetricResponse - | AnswerAccuracyMetricResponse - | ContextRelevanceMetricResponse - | ResponseGroundednessMetricResponse - | ContextRecallMetricResponse - | ContextPrecisionMetricResponse - | ContextEntityRecallMetricResponse - | ResponseRelevancyMetricResponse - | FaithfulnessMetricResponse - | NoiseSensitivityMetricResponse - | ToolCallAccuracyMetricResponse - | BLEUMetricResponse - | ExactMatchMetricResponse - | F1MetricResponse - | NumberCheckMetricResponse - | RemoteMetricResponse - | NemoAgentToolkitRemoteMetricResponse - | ROUGEMetricResponse - | StringCheckMetricResponse - | ToolCallingMetricResponse - | SystemMetricResponse - >({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/metrics/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getEvaluationGetMetricQueryKey = (workspace: string, name: string) => { - return [`/apis/evaluation/v2/workspaces/${workspace}/metrics/${name}`] as const; -}; - -export const getEvaluationGetMetricQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getEvaluationGetMetricQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - evaluationGetMetric(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationGetMetricQueryResult = NonNullable< - Awaited> ->; -export type EvaluationGetMetricQueryError = ErrorType; - -export function useEvaluationGetMetric< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetMetric< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetMetric< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Metric - */ - -export function useEvaluationGetMetric< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationGetMetricQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getEvaluationGetMetricSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getEvaluationGetMetricQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - evaluationGetMetric(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type EvaluationGetMetricSuspenseQueryResult = NonNullable< - Awaited> ->; -export type EvaluationGetMetricSuspenseQueryError = ErrorType; - -export function useEvaluationGetMetricSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetMetricSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useEvaluationGetMetricSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Metric - */ - -export function useEvaluationGetMetricSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getEvaluationGetMetricSuspenseQueryOptions(workspace, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Create a new custom evaluation metric. - -Metrics can be reused across multiple evaluations. The metric type determines -the evaluation method (currently only LLM-as-a-Judge is supported). - * @summary Create Metric - */ -export const evaluationCreateMetric = ( - workspace: string, - name: string, - lLMJudgeMetricInputTopicAdherenceMetricInputAgentGoalAccuracyMetricInputAnswerAccuracyMetricInputContextRelevanceMetricInputResponseGroundednessMetricInputContextRecallMetricInputContextPrecisionMetricInputContextEntityRecallMetricInputResponseRelevancyMetricInputFaithfulnessMetricInputNoiseSensitivityMetricInputToolCallAccuracyMetricInputBLEUMetricInputExactMatchMetricInputF1MetricInputNumberCheckMetricInputRemoteMetricInputNemoAgentToolkitRemoteMetricInputROUGEMetricInputStringCheckMetricInputToolCallingMetricInput: - | LLMJudgeMetricInput - | TopicAdherenceMetricInput - | AgentGoalAccuracyMetricInput - | AnswerAccuracyMetricInput - | ContextRelevanceMetricInput - | ResponseGroundednessMetricInput - | ContextRecallMetricInput - | ContextPrecisionMetricInput - | ContextEntityRecallMetricInput - | ResponseRelevancyMetricInput - | FaithfulnessMetricInput - | NoiseSensitivityMetricInput - | ToolCallAccuracyMetricInput - | BLEUMetricInput - | ExactMatchMetricInput - | F1MetricInput - | NumberCheckMetricInput - | RemoteMetricInput - | NemoAgentToolkitRemoteMetricInput - | ROUGEMetricInput - | StringCheckMetricInput - | ToolCallingMetricInput, - signal?: AbortSignal -) => { - return customFetch< - | LLMJudgeMetricResponse - | TopicAdherenceMetricResponse - | AgentGoalAccuracyMetricResponse - | AnswerAccuracyMetricResponse - | ContextRelevanceMetricResponse - | ResponseGroundednessMetricResponse - | ContextRecallMetricResponse - | ContextPrecisionMetricResponse - | ContextEntityRecallMetricResponse - | ResponseRelevancyMetricResponse - | FaithfulnessMetricResponse - | NoiseSensitivityMetricResponse - | ToolCallAccuracyMetricResponse - | BLEUMetricResponse - | ExactMatchMetricResponse - | F1MetricResponse - | NumberCheckMetricResponse - | RemoteMetricResponse - | NemoAgentToolkitRemoteMetricResponse - | ROUGEMetricResponse - | StringCheckMetricResponse - | ToolCallingMetricResponse - | SystemMetricResponse - >({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/metrics/${encodeURIComponent(String(name))}`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: lLMJudgeMetricInputTopicAdherenceMetricInputAgentGoalAccuracyMetricInputAnswerAccuracyMetricInputContextRelevanceMetricInputResponseGroundednessMetricInputContextRecallMetricInputContextPrecisionMetricInputContextEntityRecallMetricInputResponseRelevancyMetricInputFaithfulnessMetricInputNoiseSensitivityMetricInputToolCallAccuracyMetricInputBLEUMetricInputExactMatchMetricInputF1MetricInputNumberCheckMetricInputRemoteMetricInputNemoAgentToolkitRemoteMetricInputROUGEMetricInputStringCheckMetricInputToolCallingMetricInput, - signal, - }); -}; - -export const getEvaluationCreateMetricMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { - workspace: string; - name: string; - data: - | LLMJudgeMetricInput - | TopicAdherenceMetricInput - | AgentGoalAccuracyMetricInput - | AnswerAccuracyMetricInput - | ContextRelevanceMetricInput - | ResponseGroundednessMetricInput - | ContextRecallMetricInput - | ContextPrecisionMetricInput - | ContextEntityRecallMetricInput - | ResponseRelevancyMetricInput - | FaithfulnessMetricInput - | NoiseSensitivityMetricInput - | ToolCallAccuracyMetricInput - | BLEUMetricInput - | ExactMatchMetricInput - | F1MetricInput - | NumberCheckMetricInput - | RemoteMetricInput - | NemoAgentToolkitRemoteMetricInput - | ROUGEMetricInput - | StringCheckMetricInput - | ToolCallingMetricInput; - }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { - workspace: string; - name: string; - data: - | LLMJudgeMetricInput - | TopicAdherenceMetricInput - | AgentGoalAccuracyMetricInput - | AnswerAccuracyMetricInput - | ContextRelevanceMetricInput - | ResponseGroundednessMetricInput - | ContextRecallMetricInput - | ContextPrecisionMetricInput - | ContextEntityRecallMetricInput - | ResponseRelevancyMetricInput - | FaithfulnessMetricInput - | NoiseSensitivityMetricInput - | ToolCallAccuracyMetricInput - | BLEUMetricInput - | ExactMatchMetricInput - | F1MetricInput - | NumberCheckMetricInput - | RemoteMetricInput - | NemoAgentToolkitRemoteMetricInput - | ROUGEMetricInput - | StringCheckMetricInput - | ToolCallingMetricInput; - }, - TContext -> => { - const mutationKey = ['evaluationCreateMetric']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { - workspace: string; - name: string; - data: - | LLMJudgeMetricInput - | TopicAdherenceMetricInput - | AgentGoalAccuracyMetricInput - | AnswerAccuracyMetricInput - | ContextRelevanceMetricInput - | ResponseGroundednessMetricInput - | ContextRecallMetricInput - | ContextPrecisionMetricInput - | ContextEntityRecallMetricInput - | ResponseRelevancyMetricInput - | FaithfulnessMetricInput - | NoiseSensitivityMetricInput - | ToolCallAccuracyMetricInput - | BLEUMetricInput - | ExactMatchMetricInput - | F1MetricInput - | NumberCheckMetricInput - | RemoteMetricInput - | NemoAgentToolkitRemoteMetricInput - | ROUGEMetricInput - | StringCheckMetricInput - | ToolCallingMetricInput; - } - > = (props) => { - const { workspace, name, data } = props ?? {}; - - return evaluationCreateMetric(workspace, name, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type EvaluationCreateMetricMutationResult = NonNullable< - Awaited> ->; -export type EvaluationCreateMetricMutationBody = - | LLMJudgeMetricInput - | TopicAdherenceMetricInput - | AgentGoalAccuracyMetricInput - | AnswerAccuracyMetricInput - | ContextRelevanceMetricInput - | ResponseGroundednessMetricInput - | ContextRecallMetricInput - | ContextPrecisionMetricInput - | ContextEntityRecallMetricInput - | ResponseRelevancyMetricInput - | FaithfulnessMetricInput - | NoiseSensitivityMetricInput - | ToolCallAccuracyMetricInput - | BLEUMetricInput - | ExactMatchMetricInput - | F1MetricInput - | NumberCheckMetricInput - | RemoteMetricInput - | NemoAgentToolkitRemoteMetricInput - | ROUGEMetricInput - | StringCheckMetricInput - | ToolCallingMetricInput; -export type EvaluationCreateMetricMutationError = ErrorType; - -/** - * @summary Create Metric - */ -export const useEvaluationCreateMetric = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { - workspace: string; - name: string; - data: - | LLMJudgeMetricInput - | TopicAdherenceMetricInput - | AgentGoalAccuracyMetricInput - | AnswerAccuracyMetricInput - | ContextRelevanceMetricInput - | ResponseGroundednessMetricInput - | ContextRecallMetricInput - | ContextPrecisionMetricInput - | ContextEntityRecallMetricInput - | ResponseRelevancyMetricInput - | FaithfulnessMetricInput - | NoiseSensitivityMetricInput - | ToolCallAccuracyMetricInput - | BLEUMetricInput - | ExactMatchMetricInput - | F1MetricInput - | NumberCheckMetricInput - | RemoteMetricInput - | NemoAgentToolkitRemoteMetricInput - | ROUGEMetricInput - | StringCheckMetricInput - | ToolCallingMetricInput; - }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { - workspace: string; - name: string; - data: - | LLMJudgeMetricInput - | TopicAdherenceMetricInput - | AgentGoalAccuracyMetricInput - | AnswerAccuracyMetricInput - | ContextRelevanceMetricInput - | ResponseGroundednessMetricInput - | ContextRecallMetricInput - | ContextPrecisionMetricInput - | ContextEntityRecallMetricInput - | ResponseRelevancyMetricInput - | FaithfulnessMetricInput - | NoiseSensitivityMetricInput - | ToolCallAccuracyMetricInput - | BLEUMetricInput - | ExactMatchMetricInput - | F1MetricInput - | NumberCheckMetricInput - | RemoteMetricInput - | NemoAgentToolkitRemoteMetricInput - | ROUGEMetricInput - | StringCheckMetricInput - | ToolCallingMetricInput; - }, - TContext -> => { - return useMutation(getEvaluationCreateMetricMutationOptions(options), queryClient); -}; - -/** - * Delete a custom evaluation metric. Predefined metrics cannot be deleted. - * @summary Delete Metric - */ -export const evaluationDeleteMetric = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/evaluation/v2/workspaces/${encodeURIComponent(String(workspace))}/metrics/${encodeURIComponent(String(name))}`, - method: 'DELETE', - signal, - }); -}; - -export const getEvaluationDeleteMetricMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - const mutationKey = ['evaluationDeleteMetric']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string } - > = (props) => { - const { workspace, name } = props ?? {}; - - return evaluationDeleteMetric(workspace, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type EvaluationDeleteMetricMutationResult = NonNullable< - Awaited> ->; - -export type EvaluationDeleteMetricMutationError = ErrorType; - -/** - * @summary Delete Metric - */ -export const useEvaluationDeleteMetric = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - return useMutation(getEvaluationDeleteMetricMutationOptions(options), queryClient); -}; - -/** - * Create a new fileset. - -If no storage configuration is provided, the default storage backend will be used. - * @summary Create Fileset - */ -export const filesCreateFileset = ( - workspace: string, - createFilesetRequest: CreateFilesetRequest, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/files/v2/workspaces/${encodeURIComponent(String(workspace))}/filesets`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: createFilesetRequest, - signal, - }); -}; - -export const getFilesCreateFilesetMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: CreateFilesetRequest }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: CreateFilesetRequest }, - TContext -> => { - const mutationKey = ['filesCreateFileset']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; data: CreateFilesetRequest } - > = (props) => { - const { workspace, data } = props ?? {}; - - return filesCreateFileset(workspace, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type FilesCreateFilesetMutationResult = NonNullable< - Awaited> ->; -export type FilesCreateFilesetMutationBody = CreateFilesetRequest; -export type FilesCreateFilesetMutationError = ErrorType; - -/** - * @summary Create Fileset - */ -export const useFilesCreateFileset = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: CreateFilesetRequest }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; data: CreateFilesetRequest }, - TContext -> => { - return useMutation(getFilesCreateFilesetMutationOptions(options), queryClient); -}; - -/** - * List Filesets endpoint with filtering and pagination. - -Supports filtering by name, description, purpose, storage_type, created_at, and updated_at via query parameters. -Returns paginated results with sorting options. - * @summary List Filesets - */ -export const filesListFilesets = ( - workspace: string, - params?: FilesListFilesetsParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/files/v2/workspaces/${encodeURIComponent(String(workspace))}/filesets`, - method: 'GET', - params, - signal, - }); -}; - -export const getFilesListFilesetsQueryKey = ( - workspace: string, - params?: FilesListFilesetsParams -) => { - return [`/apis/files/v2/workspaces/${workspace}/filesets`, ...(params ? [params] : [])] as const; -}; - -export const getFilesListFilesetsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: FilesListFilesetsParams, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getFilesListFilesetsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - filesListFilesets(workspace, params, signal); - - return { queryKey, queryFn, enabled: !!workspace, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type FilesListFilesetsQueryResult = NonNullable< - Awaited> ->; -export type FilesListFilesetsQueryError = ErrorType; - -export function useFilesListFilesets< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | FilesListFilesetsParams, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useFilesListFilesets< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: FilesListFilesetsParams, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useFilesListFilesets< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: FilesListFilesetsParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List Filesets - */ - -export function useFilesListFilesets< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: FilesListFilesetsParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getFilesListFilesetsQueryOptions(workspace, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getFilesListFilesetsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: FilesListFilesetsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getFilesListFilesetsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - filesListFilesets(workspace, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type FilesListFilesetsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type FilesListFilesetsSuspenseQueryError = ErrorType; - -export function useFilesListFilesetsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | FilesListFilesetsParams, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useFilesListFilesetsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: FilesListFilesetsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useFilesListFilesetsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: FilesListFilesetsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List Filesets - */ - -export function useFilesListFilesetsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: FilesListFilesetsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getFilesListFilesetsSuspenseQueryOptions(workspace, params, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Get Fileset by Workspace and Name. - -Returns the details of a specific fileset identified by its workspace and name. - * @summary Get Fileset by Workspace and Name - */ -export const filesRetrieveFileset = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/files/v2/workspaces/${encodeURIComponent(String(workspace))}/filesets/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getFilesRetrieveFilesetQueryKey = (workspace: string, name: string) => { - return [`/apis/files/v2/workspaces/${workspace}/filesets/${name}`] as const; -}; - -export const getFilesRetrieveFilesetQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getFilesRetrieveFilesetQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - filesRetrieveFileset(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type FilesRetrieveFilesetQueryResult = NonNullable< - Awaited> ->; -export type FilesRetrieveFilesetQueryError = ErrorType; - -export function useFilesRetrieveFileset< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useFilesRetrieveFileset< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useFilesRetrieveFileset< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Fileset by Workspace and Name - */ - -export function useFilesRetrieveFileset< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getFilesRetrieveFilesetQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getFilesRetrieveFilesetSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getFilesRetrieveFilesetQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - filesRetrieveFileset(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type FilesRetrieveFilesetSuspenseQueryResult = NonNullable< - Awaited> ->; -export type FilesRetrieveFilesetSuspenseQueryError = ErrorType; - -export function useFilesRetrieveFilesetSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useFilesRetrieveFilesetSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useFilesRetrieveFilesetSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Fileset by Workspace and Name - */ - -export function useFilesRetrieveFilesetSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getFilesRetrieveFilesetSuspenseQueryOptions(workspace, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Delete Fileset. - -Permanently deletes a fileset from the platform. -Returns metadata about the deleted fileset. -For local storage backends, this also deletes the underlying files. - * @summary Delete Fileset - */ -export const filesDeleteFileset = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/files/v2/workspaces/${encodeURIComponent(String(workspace))}/filesets/${encodeURIComponent(String(name))}`, - method: 'DELETE', - signal, - }); -}; - -export const getFilesDeleteFilesetMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - const mutationKey = ['filesDeleteFileset']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string } - > = (props) => { - const { workspace, name } = props ?? {}; - - return filesDeleteFileset(workspace, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type FilesDeleteFilesetMutationResult = NonNullable< - Awaited> ->; - -export type FilesDeleteFilesetMutationError = ErrorType; - -/** - * @summary Delete Fileset - */ -export const useFilesDeleteFileset = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - return useMutation(getFilesDeleteFilesetMutationOptions(options), queryClient); -}; - -/** - * Update Fileset Metadata. - * @summary Update Fileset Metadata - */ -export const filesUpdateFilesetMetadata = ( - workspace: string, - name: string, - updateFilesetRequest: UpdateFilesetRequest, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/files/v2/workspaces/${encodeURIComponent(String(workspace))}/filesets/${encodeURIComponent(String(name))}`, - method: 'PATCH', - headers: { 'Content-Type': 'application/json' }, - data: updateFilesetRequest, - signal, - }); -}; - -export const getFilesUpdateFilesetMetadataMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: UpdateFilesetRequest }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: UpdateFilesetRequest }, - TContext -> => { - const mutationKey = ['filesUpdateFilesetMetadata']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string; data: UpdateFilesetRequest } - > = (props) => { - const { workspace, name, data } = props ?? {}; - - return filesUpdateFilesetMetadata(workspace, name, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type FilesUpdateFilesetMetadataMutationResult = NonNullable< - Awaited> ->; -export type FilesUpdateFilesetMetadataMutationBody = UpdateFilesetRequest; -export type FilesUpdateFilesetMetadataMutationError = ErrorType; - -/** - * @summary Update Fileset Metadata - */ -export const useFilesUpdateFilesetMetadata = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: UpdateFilesetRequest }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string; data: UpdateFilesetRequest }, - TContext -> => { - return useMutation(getFilesUpdateFilesetMetadataMutationOptions(options), queryClient); -}; - -/** - * Get file metadata without downloading content. - -HEAD requests are often used before Range GETs to ensure the server -supports partial downloads (e.g., DuckDB's httpfs). -Returns Accept-Ranges, Content-Length, and Content-Type headers. - * @summary Get File Metadata - */ -export const filesHeadFile = ( - workspace: string, - name: string, - path: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/files/v2/workspaces/${encodeURIComponent(String(workspace))}/filesets/${encodeURIComponent(String(name))}/-/${encodeURIComponent(String(path))}`, - method: 'HEAD', - signal, - }); -}; - -export const getFilesHeadFileMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; path: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; path: string }, - TContext -> => { - const mutationKey = ['filesHeadFile']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string; path: string } - > = (props) => { - const { workspace, name, path } = props ?? {}; - - return filesHeadFile(workspace, name, path); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type FilesHeadFileMutationResult = NonNullable>>; - -export type FilesHeadFileMutationError = ErrorType; - -/** - * @summary Get File Metadata - */ -export const useFilesHeadFile = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; path: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string; path: string }, - TContext -> => { - return useMutation(getFilesHeadFileMutationOptions(options), queryClient); -}; - -/** - * Download file content from a fileset. - -Supports HTTP Range requests for partial content retrieval (status 206). -Returns the full file content (status 200) if no Range header is provided. -For external resources (HuggingFace, NGC), content is cached locally on first access. - * @summary Download File Content - */ -export const filesDownloadFile = ( - workspace: string, - name: string, - path: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/files/v2/workspaces/${encodeURIComponent(String(workspace))}/filesets/${encodeURIComponent(String(name))}/-/${encodeURIComponent(String(path))}`, - method: 'GET', - responseType: 'blob', - signal, - }); -}; - -export const getFilesDownloadFileQueryKey = (workspace: string, name: string, path: string) => { - return [`/apis/files/v2/workspaces/${workspace}/filesets/${name}/-/${path}`] as const; -}; - -export const getFilesDownloadFileQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - path: string, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getFilesDownloadFileQueryKey(workspace, name, path); - - const queryFn: QueryFunction>> = ({ signal }) => - filesDownloadFile(workspace, name, path, signal); - - return { - queryKey, - queryFn, - enabled: !!(workspace && name && path), - ...queryOptions, - } as UseQueryOptions>, TError, TData> & { - queryKey: DataTag; - }; -}; - -export type FilesDownloadFileQueryResult = NonNullable< - Awaited> ->; -export type FilesDownloadFileQueryError = ErrorType; - -export function useFilesDownloadFile< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - path: string, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useFilesDownloadFile< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - path: string, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useFilesDownloadFile< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - path: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Download File Content - */ - -export function useFilesDownloadFile< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - path: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getFilesDownloadFileQueryOptions(workspace, name, path, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getFilesDownloadFileSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - path: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getFilesDownloadFileQueryKey(workspace, name, path); - - const queryFn: QueryFunction>> = ({ signal }) => - filesDownloadFile(workspace, name, path, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type FilesDownloadFileSuspenseQueryResult = NonNullable< - Awaited> ->; -export type FilesDownloadFileSuspenseQueryError = ErrorType; - -export function useFilesDownloadFileSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - path: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useFilesDownloadFileSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - path: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useFilesDownloadFileSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - path: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Download File Content - */ - -export function useFilesDownloadFileSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - path: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getFilesDownloadFileSuspenseQueryOptions(workspace, name, path, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Upload file content to a fileset. - * @summary Upload Fileset Content - */ -export const filesUploadFile = ( - workspace: string, - name: string, - path: string, - filesUploadFileBody: Blob, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/files/v2/workspaces/${encodeURIComponent(String(workspace))}/filesets/${encodeURIComponent(String(name))}/-/${encodeURIComponent(String(path))}`, - method: 'PUT', - headers: { 'Content-Type': 'application/octet-stream' }, - data: filesUploadFileBody, - signal, - }); -}; - -export const getFilesUploadFileMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; path: string; data: Blob }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; path: string; data: Blob }, - TContext -> => { - const mutationKey = ['filesUploadFile']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string; path: string; data: Blob } - > = (props) => { - const { workspace, name, path, data } = props ?? {}; - - return filesUploadFile(workspace, name, path, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type FilesUploadFileMutationResult = NonNullable< - Awaited> ->; -export type FilesUploadFileMutationBody = Blob; -export type FilesUploadFileMutationError = ErrorType; - -/** - * @summary Upload Fileset Content - */ -export const useFilesUploadFile = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; path: string; data: Blob }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string; path: string; data: Blob }, - TContext -> => { - return useMutation(getFilesUploadFileMutationOptions(options), queryClient); -}; - -/** - * Delete a specific file from a fileset. - -Permanently deletes the file from the storage backend. -Returns metadata about the deleted file. - * @summary Delete a specific file from a fileset - */ -export const filesDeleteFile = ( - workspace: string, - name: string, - path: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/files/v2/workspaces/${encodeURIComponent(String(workspace))}/filesets/${encodeURIComponent(String(name))}/-/${encodeURIComponent(String(path))}`, - method: 'DELETE', - signal, - }); -}; - -export const getFilesDeleteFileMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; path: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; path: string }, - TContext -> => { - const mutationKey = ['filesDeleteFile']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string; path: string } - > = (props) => { - const { workspace, name, path } = props ?? {}; - - return filesDeleteFile(workspace, name, path); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type FilesDeleteFileMutationResult = NonNullable< - Awaited> ->; - -export type FilesDeleteFileMutationError = ErrorType; - -/** - * @summary Delete a specific file from a fileset - */ -export const useFilesDeleteFile = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; path: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string; path: string }, - TContext -> => { - return useMutation(getFilesDeleteFileMutationOptions(options), queryClient); -}; - -/** - * List Files in Fileset. - -Returns a list of files stored in the specified fileset. -Optionally filter by path prefix to list files under a specific directory. - -Each file includes a cache_status field: -- "not_cacheable": File is on default storage, caching not applicable -- "cached": File exists in cache storage -- "caching": File is currently being downloaded and cached -- "not_cached": File not in cache, will be cached on next download -- null: External storage, but cache status not checked (use include_cache_status=true) - * @summary List Fileset Files - */ -export const filesListFilesetFiles = ( - workspace: string, - name: string, - params?: FilesListFilesetFilesParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/files/v2/workspaces/${encodeURIComponent(String(workspace))}/filesets/${encodeURIComponent(String(name))}/files`, - method: 'GET', - params, - signal, - }); -}; - -export const getFilesListFilesetFilesQueryKey = ( - workspace: string, - name: string, - params?: FilesListFilesetFilesParams -) => { - return [ - `/apis/files/v2/workspaces/${workspace}/filesets/${name}/files`, - ...(params ? [params] : []), - ] as const; -}; - -export const getFilesListFilesetFilesQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: FilesListFilesetFilesParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getFilesListFilesetFilesQueryKey(workspace, name, params); - - const queryFn: QueryFunction>> = ({ signal }) => - filesListFilesetFiles(workspace, name, params, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type FilesListFilesetFilesQueryResult = NonNullable< - Awaited> ->; -export type FilesListFilesetFilesQueryError = ErrorType; - -export function useFilesListFilesetFiles< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params: undefined | FilesListFilesetFilesParams, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useFilesListFilesetFiles< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: FilesListFilesetFilesParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useFilesListFilesetFiles< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: FilesListFilesetFilesParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List Fileset Files - */ - -export function useFilesListFilesetFiles< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: FilesListFilesetFilesParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getFilesListFilesetFilesQueryOptions(workspace, name, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getFilesListFilesetFilesSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: FilesListFilesetFilesParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getFilesListFilesetFilesQueryKey(workspace, name, params); - - const queryFn: QueryFunction>> = ({ signal }) => - filesListFilesetFiles(workspace, name, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type FilesListFilesetFilesSuspenseQueryResult = NonNullable< - Awaited> ->; -export type FilesListFilesetFilesSuspenseQueryError = ErrorType; - -export function useFilesListFilesetFilesSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params: undefined | FilesListFilesetFilesParams, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useFilesListFilesetFilesSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: FilesListFilesetFilesParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useFilesListFilesetFilesSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: FilesListFilesetFilesParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List Fileset Files - */ - -export function useFilesListFilesetFilesSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: FilesListFilesetFilesParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getFilesListFilesetFilesSuspenseQueryOptions( - workspace, - name, - params, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Upload OTLP logs to a specified fileset in JSON or Protobuf format. - -Supports both application/json and application/x-protobuf content types. - * @summary Upload OTLP Logs to Fileset - */ -export const filesUploadOtlpLogs = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/files/v2/workspaces/${encodeURIComponent(String(workspace))}/filesets/${encodeURIComponent(String(name))}/otlp/v1/logs`, - method: 'POST', - signal, - }); -}; - -export const getFilesUploadOtlpLogsMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - const mutationKey = ['filesUploadOtlpLogs']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string } - > = (props) => { - const { workspace, name } = props ?? {}; - - return filesUploadOtlpLogs(workspace, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type FilesUploadOtlpLogsMutationResult = NonNullable< - Awaited> ->; - -export type FilesUploadOtlpLogsMutationError = ErrorType; - -/** - * @summary Upload OTLP Logs to Fileset - */ -export const useFilesUploadOtlpLogs = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - return useMutation(getFilesUploadOtlpLogsMutationOptions(options), queryClient); -}; - -/** - * Query logs from parquet files in a fileset. - -This is an internal endpoint that runs DuckDB queries with direct storage -access. - * @summary Query OTLP Logs from Fileset - */ -export const filesQueryOtlpLogs = ( - workspace: string, - name: string, - logQueryRequest: LogQueryRequest, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/files/v2/workspaces/${encodeURIComponent(String(workspace))}/filesets/${encodeURIComponent(String(name))}/otlp/v1/logs/query`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: logQueryRequest, - signal, - }); -}; - -export const getFilesQueryOtlpLogsMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: LogQueryRequest }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: LogQueryRequest }, - TContext -> => { - const mutationKey = ['filesQueryOtlpLogs']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string; data: LogQueryRequest } - > = (props) => { - const { workspace, name, data } = props ?? {}; - - return filesQueryOtlpLogs(workspace, name, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type FilesQueryOtlpLogsMutationResult = NonNullable< - Awaited> ->; -export type FilesQueryOtlpLogsMutationBody = LogQueryRequest; -export type FilesQueryOtlpLogsMutationError = ErrorType; - -/** - * @summary Query OTLP Logs from Fileset - */ -export const useFilesQueryOtlpLogs = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: LogQueryRequest }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string; data: LogQueryRequest }, - TContext -> => { - return useMutation(getFilesQueryOtlpLogsMutationOptions(options), queryClient); -}; - -/** - * Chat completion for the provided conversation. - * @summary Guardrail check request - */ -export const guardrailsCheck = ( - workspace: string, - guardrailCheckRequest: GuardrailCheckRequest, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/guardrails/v2/workspaces/${encodeURIComponent(String(workspace))}/checks`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: guardrailCheckRequest, - signal, - }); -}; - -export const getGuardrailsCheckMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: GuardrailCheckRequest }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: GuardrailCheckRequest }, - TContext -> => { - const mutationKey = ['guardrailsCheck']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; data: GuardrailCheckRequest } - > = (props) => { - const { workspace, data } = props ?? {}; - - return guardrailsCheck(workspace, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type GuardrailsCheckMutationResult = NonNullable< - Awaited> ->; -export type GuardrailsCheckMutationBody = GuardrailCheckRequest; -export type GuardrailsCheckMutationError = ErrorType; - -/** - * @summary Guardrail check request - */ -export const useGuardrailsCheck = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: GuardrailCheckRequest }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; data: GuardrailCheckRequest }, - TContext -> => { - return useMutation(getGuardrailsCheckMutationOptions(options), queryClient); -}; - -/** - * List available guardrail configs. - -Lists guardrail configs for a specific workspace. - * @summary List Guardrail Configs - */ -export const guardrailsListGuardrailConfigs = ( - workspace: string, - params?: GuardrailsListGuardrailConfigsParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/guardrails/v2/workspaces/${encodeURIComponent(String(workspace))}/configs`, - method: 'GET', - params, - signal, - }); -}; - -export const getGuardrailsListGuardrailConfigsQueryKey = ( - workspace: string, - params?: GuardrailsListGuardrailConfigsParams -) => { - return [ - `/apis/guardrails/v2/workspaces/${workspace}/configs`, - ...(params ? [params] : []), - ] as const; -}; - -export const getGuardrailsListGuardrailConfigsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: GuardrailsListGuardrailConfigsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getGuardrailsListGuardrailConfigsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ - signal, - }) => guardrailsListGuardrailConfigs(workspace, params, signal); - - return { queryKey, queryFn, enabled: !!workspace, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type GuardrailsListGuardrailConfigsQueryResult = NonNullable< - Awaited> ->; -export type GuardrailsListGuardrailConfigsQueryError = ErrorType; - -export function useGuardrailsListGuardrailConfigs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | GuardrailsListGuardrailConfigsParams, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useGuardrailsListGuardrailConfigs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: GuardrailsListGuardrailConfigsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useGuardrailsListGuardrailConfigs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: GuardrailsListGuardrailConfigsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List Guardrail Configs - */ - -export function useGuardrailsListGuardrailConfigs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: GuardrailsListGuardrailConfigsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getGuardrailsListGuardrailConfigsQueryOptions(workspace, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getGuardrailsListGuardrailConfigsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: GuardrailsListGuardrailConfigsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getGuardrailsListGuardrailConfigsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ - signal, - }) => guardrailsListGuardrailConfigs(workspace, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type GuardrailsListGuardrailConfigsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type GuardrailsListGuardrailConfigsSuspenseQueryError = ErrorType; - -export function useGuardrailsListGuardrailConfigsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | GuardrailsListGuardrailConfigsParams, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useGuardrailsListGuardrailConfigsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: GuardrailsListGuardrailConfigsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useGuardrailsListGuardrailConfigsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: GuardrailsListGuardrailConfigsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List Guardrail Configs - */ - -export function useGuardrailsListGuardrailConfigsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: GuardrailsListGuardrailConfigsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getGuardrailsListGuardrailConfigsSuspenseQueryOptions( - workspace, - params, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Create a new guardrail config. - * @summary Create Config - */ -export const guardrailsCreateConfig = ( - workspace: string, - guardrailConfigInput: GuardrailConfigInput, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/guardrails/v2/workspaces/${encodeURIComponent(String(workspace))}/configs`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: guardrailConfigInput, - signal, - }); -}; - -export const getGuardrailsCreateConfigMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: GuardrailConfigInput }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: GuardrailConfigInput }, - TContext -> => { - const mutationKey = ['guardrailsCreateConfig']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; data: GuardrailConfigInput } - > = (props) => { - const { workspace, data } = props ?? {}; - - return guardrailsCreateConfig(workspace, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type GuardrailsCreateConfigMutationResult = NonNullable< - Awaited> ->; -export type GuardrailsCreateConfigMutationBody = GuardrailConfigInput; -export type GuardrailsCreateConfigMutationError = ErrorType; - -/** - * @summary Create Config - */ -export const useGuardrailsCreateConfig = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: GuardrailConfigInput }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; data: GuardrailConfigInput }, - TContext -> => { - return useMutation(getGuardrailsCreateConfigMutationOptions(options), queryClient); -}; - -/** - * Get info about a guardrail configuration. - * @summary Get Guardrail Config - */ -export const guardrailsGetGuardrailConfig = ( - workspace: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/guardrails/v2/workspaces/${encodeURIComponent(String(workspace))}/configs/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getGuardrailsGetGuardrailConfigQueryKey = (workspace: string, name: string) => { - return [`/apis/guardrails/v2/workspaces/${workspace}/configs/${name}`] as const; -}; - -export const getGuardrailsGetGuardrailConfigQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getGuardrailsGetGuardrailConfigQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => guardrailsGetGuardrailConfig(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type GuardrailsGetGuardrailConfigQueryResult = NonNullable< - Awaited> ->; -export type GuardrailsGetGuardrailConfigQueryError = ErrorType; - -export function useGuardrailsGetGuardrailConfig< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useGuardrailsGetGuardrailConfig< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useGuardrailsGetGuardrailConfig< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Guardrail Config - */ - -export function useGuardrailsGetGuardrailConfig< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getGuardrailsGetGuardrailConfigQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getGuardrailsGetGuardrailConfigSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getGuardrailsGetGuardrailConfigQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => guardrailsGetGuardrailConfig(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type GuardrailsGetGuardrailConfigSuspenseQueryResult = NonNullable< - Awaited> ->; -export type GuardrailsGetGuardrailConfigSuspenseQueryError = ErrorType; - -export function useGuardrailsGetGuardrailConfigSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useGuardrailsGetGuardrailConfigSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useGuardrailsGetGuardrailConfigSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Guardrail Config - */ - -export function useGuardrailsGetGuardrailConfigSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getGuardrailsGetGuardrailConfigSuspenseQueryOptions( - workspace, - name, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Update model metadata. If the request body has an empty field, -keep the old value. - * @summary Update Config - */ -export const guardrailsUpdateConfig = ( - workspace: string, - name: string, - guardrailConfigUpdate: GuardrailConfigUpdate, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/guardrails/v2/workspaces/${encodeURIComponent(String(workspace))}/configs/${encodeURIComponent(String(name))}`, - method: 'PATCH', - headers: { 'Content-Type': 'application/json' }, - data: guardrailConfigUpdate, - signal, - }); -}; - -export const getGuardrailsUpdateConfigMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: GuardrailConfigUpdate }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: GuardrailConfigUpdate }, - TContext -> => { - const mutationKey = ['guardrailsUpdateConfig']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string; data: GuardrailConfigUpdate } - > = (props) => { - const { workspace, name, data } = props ?? {}; - - return guardrailsUpdateConfig(workspace, name, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type GuardrailsUpdateConfigMutationResult = NonNullable< - Awaited> ->; -export type GuardrailsUpdateConfigMutationBody = GuardrailConfigUpdate; -export type GuardrailsUpdateConfigMutationError = ErrorType; - -/** - * @summary Update Config - */ -export const useGuardrailsUpdateConfig = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: GuardrailConfigUpdate }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string; data: GuardrailConfigUpdate }, - TContext -> => { - return useMutation(getGuardrailsUpdateConfigMutationOptions(options), queryClient); -}; - -/** - * Delete a guardrail config. - * @summary Delete Config - */ -export const guardrailsDeleteConfig = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/guardrails/v2/workspaces/${encodeURIComponent(String(workspace))}/configs/${encodeURIComponent(String(name))}`, - method: 'DELETE', - signal, - }); -}; - -export const getGuardrailsDeleteConfigMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - const mutationKey = ['guardrailsDeleteConfig']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string } - > = (props) => { - const { workspace, name } = props ?? {}; - - return guardrailsDeleteConfig(workspace, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type GuardrailsDeleteConfigMutationResult = NonNullable< - Awaited> ->; - -export type GuardrailsDeleteConfigMutationError = ErrorType; - -/** - * @summary Delete Config - */ -export const useGuardrailsDeleteConfig = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - return useMutation(getGuardrailsDeleteConfigMutationOptions(options), queryClient); -}; - -/** - * Proxy requests to model entity inference endpoints. - -All inference requests must resolve to a `VirtualModel`. The platform's -provider reconciler auto-creates an implicit `autoprovisioned` VirtualModel -for every served model entity (named after the entity, with -`default_model_entity` set to the entity ref) so this is the typical case; -operators can also create custom VirtualModels for routing, plugin chains, -LoRA escape-hatches, etc. Requests for which no VirtualModel can be found -return `404`. - * @summary Model Inference Proxy PATCH - */ -export const gatewayProxyPatch = ( - workspace: string, - name: string, - trailingUri: string, - gatewayProxyPatchBody?: GatewayProxyPatchBody, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/inference-gateway/v2/workspaces/${encodeURIComponent(String(workspace))}/model/${encodeURIComponent(String(name))}/-/${encodeURIComponent(String(trailingUri))}`, - method: 'PATCH', - headers: { 'Content-Type': 'application/json' }, - data: gatewayProxyPatchBody, - signal, - }); -}; - -export const getGatewayProxyPatchMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; trailingUri: string; data: GatewayProxyPatchBody }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; trailingUri: string; data: GatewayProxyPatchBody }, - TContext -> => { - const mutationKey = ['gatewayProxyPatch']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string; trailingUri: string; data: GatewayProxyPatchBody } - > = (props) => { - const { workspace, name, trailingUri, data } = props ?? {}; - - return gatewayProxyPatch(workspace, name, trailingUri, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type GatewayProxyPatchMutationResult = NonNullable< - Awaited> ->; -export type GatewayProxyPatchMutationBody = GatewayProxyPatchBody; -export type GatewayProxyPatchMutationError = ErrorType; - -/** - * @summary Model Inference Proxy PATCH - */ -export const useGatewayProxyPatch = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; trailingUri: string; data: GatewayProxyPatchBody }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string; trailingUri: string; data: GatewayProxyPatchBody }, - TContext -> => { - return useMutation(getGatewayProxyPatchMutationOptions(options), queryClient); -}; - -/** - * Proxy requests to model entity inference endpoints. - -All inference requests must resolve to a `VirtualModel`. The platform's -provider reconciler auto-creates an implicit `autoprovisioned` VirtualModel -for every served model entity (named after the entity, with -`default_model_entity` set to the entity ref) so this is the typical case; -operators can also create custom VirtualModels for routing, plugin chains, -LoRA escape-hatches, etc. Requests for which no VirtualModel can be found -return `404`. - * @summary Model Inference Proxy DELETE - */ -export const gatewayProxyDelete = ( - workspace: string, - name: string, - trailingUri: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/inference-gateway/v2/workspaces/${encodeURIComponent(String(workspace))}/model/${encodeURIComponent(String(name))}/-/${encodeURIComponent(String(trailingUri))}`, - method: 'DELETE', - signal, - }); -}; - -export const getGatewayProxyDeleteMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; trailingUri: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; trailingUri: string }, - TContext -> => { - const mutationKey = ['gatewayProxyDelete']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string; trailingUri: string } - > = (props) => { - const { workspace, name, trailingUri } = props ?? {}; - - return gatewayProxyDelete(workspace, name, trailingUri); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type GatewayProxyDeleteMutationResult = NonNullable< - Awaited> ->; - -export type GatewayProxyDeleteMutationError = ErrorType; - -/** - * @summary Model Inference Proxy DELETE - */ -export const useGatewayProxyDelete = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; trailingUri: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string; trailingUri: string }, - TContext -> => { - return useMutation(getGatewayProxyDeleteMutationOptions(options), queryClient); -}; - -/** - * Proxy requests to model entity inference endpoints. - -All inference requests must resolve to a `VirtualModel`. The platform's -provider reconciler auto-creates an implicit `autoprovisioned` VirtualModel -for every served model entity (named after the entity, with -`default_model_entity` set to the entity ref) so this is the typical case; -operators can also create custom VirtualModels for routing, plugin chains, -LoRA escape-hatches, etc. Requests for which no VirtualModel can be found -return `404`. - * @summary Model Inference Proxy PUT - */ -export const gatewayProxyPut = ( - workspace: string, - name: string, - trailingUri: string, - gatewayProxyPutBody?: GatewayProxyPutBody, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/inference-gateway/v2/workspaces/${encodeURIComponent(String(workspace))}/model/${encodeURIComponent(String(name))}/-/${encodeURIComponent(String(trailingUri))}`, - method: 'PUT', - headers: { 'Content-Type': 'application/json' }, - data: gatewayProxyPutBody, - signal, - }); -}; - -export const getGatewayProxyPutMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; trailingUri: string; data: GatewayProxyPutBody }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; trailingUri: string; data: GatewayProxyPutBody }, - TContext -> => { - const mutationKey = ['gatewayProxyPut']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string; trailingUri: string; data: GatewayProxyPutBody } - > = (props) => { - const { workspace, name, trailingUri, data } = props ?? {}; - - return gatewayProxyPut(workspace, name, trailingUri, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type GatewayProxyPutMutationResult = NonNullable< - Awaited> ->; -export type GatewayProxyPutMutationBody = GatewayProxyPutBody; -export type GatewayProxyPutMutationError = ErrorType; - -/** - * @summary Model Inference Proxy PUT - */ -export const useGatewayProxyPut = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; trailingUri: string; data: GatewayProxyPutBody }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string; trailingUri: string; data: GatewayProxyPutBody }, - TContext -> => { - return useMutation(getGatewayProxyPutMutationOptions(options), queryClient); -}; - -/** - * Proxy requests to model entity inference endpoints. - -All inference requests must resolve to a `VirtualModel`. The platform's -provider reconciler auto-creates an implicit `autoprovisioned` VirtualModel -for every served model entity (named after the entity, with -`default_model_entity` set to the entity ref) so this is the typical case; -operators can also create custom VirtualModels for routing, plugin chains, -LoRA escape-hatches, etc. Requests for which no VirtualModel can be found -return `404`. - * @summary Model Inference Proxy POST - */ -export const gatewayProxyPost = ( - workspace: string, - name: string, - trailingUri: string, - gatewayProxyPostBody?: GatewayProxyPostBody, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/inference-gateway/v2/workspaces/${encodeURIComponent(String(workspace))}/model/${encodeURIComponent(String(name))}/-/${encodeURIComponent(String(trailingUri))}`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: gatewayProxyPostBody, - signal, - }); -}; - -export const getGatewayProxyPostMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; trailingUri: string; data: GatewayProxyPostBody }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; trailingUri: string; data: GatewayProxyPostBody }, - TContext -> => { - const mutationKey = ['gatewayProxyPost']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string; trailingUri: string; data: GatewayProxyPostBody } - > = (props) => { - const { workspace, name, trailingUri, data } = props ?? {}; - - return gatewayProxyPost(workspace, name, trailingUri, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type GatewayProxyPostMutationResult = NonNullable< - Awaited> ->; -export type GatewayProxyPostMutationBody = GatewayProxyPostBody; -export type GatewayProxyPostMutationError = ErrorType; - -/** - * @summary Model Inference Proxy POST - */ -export const useGatewayProxyPost = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; trailingUri: string; data: GatewayProxyPostBody }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string; trailingUri: string; data: GatewayProxyPostBody }, - TContext -> => { - return useMutation(getGatewayProxyPostMutationOptions(options), queryClient); -}; - -/** - * Proxy requests to model entity inference endpoints. - -All inference requests must resolve to a `VirtualModel`. The platform's -provider reconciler auto-creates an implicit `autoprovisioned` VirtualModel -for every served model entity (named after the entity, with -`default_model_entity` set to the entity ref) so this is the typical case; -operators can also create custom VirtualModels for routing, plugin chains, -LoRA escape-hatches, etc. Requests for which no VirtualModel can be found -return `404`. - * @summary Model Inference Proxy GET - */ -export const gatewayProxyGet = ( - workspace: string, - name: string, - trailingUri: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/inference-gateway/v2/workspaces/${encodeURIComponent(String(workspace))}/model/${encodeURIComponent(String(name))}/-/${encodeURIComponent(String(trailingUri))}`, - method: 'GET', - signal, - }); -}; - -export const getGatewayProxyGetQueryKey = ( - workspace: string, - name: string, - trailingUri: string -) => { - return [ - `/apis/inference-gateway/v2/workspaces/${workspace}/model/${name}/-/${trailingUri}`, - ] as const; -}; - -export const getGatewayProxyGetQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - trailingUri: string, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getGatewayProxyGetQueryKey(workspace, name, trailingUri); - - const queryFn: QueryFunction>> = ({ signal }) => - gatewayProxyGet(workspace, name, trailingUri, signal); - - return { - queryKey, - queryFn, - enabled: !!(workspace && name && trailingUri), - ...queryOptions, - } as UseQueryOptions>, TError, TData> & { - queryKey: DataTag; - }; -}; - -export type GatewayProxyGetQueryResult = NonNullable>>; -export type GatewayProxyGetQueryError = ErrorType; - -export function useGatewayProxyGet< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - trailingUri: string, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useGatewayProxyGet< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - trailingUri: string, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useGatewayProxyGet< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - trailingUri: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Model Inference Proxy GET - */ - -export function useGatewayProxyGet< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - trailingUri: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getGatewayProxyGetQueryOptions(workspace, name, trailingUri, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getGatewayProxyGetSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - trailingUri: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getGatewayProxyGetQueryKey(workspace, name, trailingUri); - - const queryFn: QueryFunction>> = ({ signal }) => - gatewayProxyGet(workspace, name, trailingUri, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type GatewayProxyGetSuspenseQueryResult = NonNullable< - Awaited> ->; -export type GatewayProxyGetSuspenseQueryError = ErrorType; - -export function useGatewayProxyGetSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - trailingUri: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useGatewayProxyGetSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - trailingUri: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useGatewayProxyGetSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - trailingUri: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Model Inference Proxy GET - */ - -export function useGatewayProxyGetSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - trailingUri: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getGatewayProxyGetSuspenseQueryOptions( - workspace, - name, - trailingUri, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * This endpoint aggregates models from all model entities and returns them -in OpenAI's list models format. Each model ID is the model entity identifier -in format workspace/model_entity_name. - * @summary OpenAI List Models - */ -export const openaiProxyListModels = (workspace: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/inference-gateway/v2/workspaces/${encodeURIComponent(String(workspace))}/openai/-/v1/models`, - method: 'GET', - signal, - }); -}; - -export const getOpenaiProxyListModelsQueryKey = (workspace: string) => { - return [`/apis/inference-gateway/v2/workspaces/${workspace}/openai/-/v1/models`] as const; -}; - -export const getOpenaiProxyListModelsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getOpenaiProxyListModelsQueryKey(workspace); - - const queryFn: QueryFunction>> = ({ signal }) => - openaiProxyListModels(workspace, signal); - - return { queryKey, queryFn, enabled: !!workspace, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type OpenaiProxyListModelsQueryResult = NonNullable< - Awaited> ->; -export type OpenaiProxyListModelsQueryError = ErrorType; - -export function useOpenaiProxyListModels< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useOpenaiProxyListModels< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useOpenaiProxyListModels< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary OpenAI List Models - */ - -export function useOpenaiProxyListModels< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getOpenaiProxyListModelsQueryOptions(workspace, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getOpenaiProxyListModelsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getOpenaiProxyListModelsQueryKey(workspace); - - const queryFn: QueryFunction>> = ({ signal }) => - openaiProxyListModels(workspace, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type OpenaiProxyListModelsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type OpenaiProxyListModelsSuspenseQueryError = ErrorType; - -export function useOpenaiProxyListModelsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useOpenaiProxyListModelsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useOpenaiProxyListModelsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary OpenAI List Models - */ - -export function useOpenaiProxyListModelsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getOpenaiProxyListModelsSuspenseQueryOptions(workspace, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Retrieve information about a specific OpenAI-compatible model. -Workspace is always taken from the URL path; name may be model_entity_name -or workspace/model_entity_name (workspace prefix is ignored). - * @summary OpenAI Get Model - */ -export const openaiProxyGetModel = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/inference-gateway/v2/workspaces/${encodeURIComponent(String(workspace))}/openai/-/v1/models/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getOpenaiProxyGetModelQueryKey = (workspace: string, name: string) => { - return [`/apis/inference-gateway/v2/workspaces/${workspace}/openai/-/v1/models/${name}`] as const; -}; - -export const getOpenaiProxyGetModelQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getOpenaiProxyGetModelQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - openaiProxyGetModel(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type OpenaiProxyGetModelQueryResult = NonNullable< - Awaited> ->; -export type OpenaiProxyGetModelQueryError = ErrorType; - -export function useOpenaiProxyGetModel< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useOpenaiProxyGetModel< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useOpenaiProxyGetModel< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary OpenAI Get Model - */ - -export function useOpenaiProxyGetModel< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getOpenaiProxyGetModelQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getOpenaiProxyGetModelSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getOpenaiProxyGetModelQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - openaiProxyGetModel(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type OpenaiProxyGetModelSuspenseQueryResult = NonNullable< - Awaited> ->; -export type OpenaiProxyGetModelSuspenseQueryError = ErrorType; - -export function useOpenaiProxyGetModelSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useOpenaiProxyGetModelSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useOpenaiProxyGetModelSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary OpenAI Get Model - */ - -export function useOpenaiProxyGetModelSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getOpenaiProxyGetModelSuspenseQueryOptions(workspace, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Proxy requests to OpenAI-compatible inference endpoints. - -All inference requests must resolve to a `VirtualModel`. The platform's -provider reconciler auto-creates an implicit `autoprovisioned` VirtualModel -for every served model entity (named after the entity, with -`default_model_entity` set to the entity ref) so this is the typical case; -operators can also create custom VirtualModels for routing, plugin chains, -LoRA escape-hatches, etc. Requests for which no VirtualModel can be found -return `404`. - * @summary OpenAI Inference Proxy PATCH - */ -export const openaiProxyPatch = ( - workspace: string, - trailingUri: string, - openaiProxyPatchBody?: OpenaiProxyPatchBody, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/inference-gateway/v2/workspaces/${encodeURIComponent(String(workspace))}/openai/-/${encodeURIComponent(String(trailingUri))}`, - method: 'PATCH', - headers: { 'Content-Type': 'application/json' }, - data: openaiProxyPatchBody, - signal, - }); -}; - -export const getOpenaiProxyPatchMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; trailingUri: string; data: OpenaiProxyPatchBody }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; trailingUri: string; data: OpenaiProxyPatchBody }, - TContext -> => { - const mutationKey = ['openaiProxyPatch']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; trailingUri: string; data: OpenaiProxyPatchBody } - > = (props) => { - const { workspace, trailingUri, data } = props ?? {}; - - return openaiProxyPatch(workspace, trailingUri, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type OpenaiProxyPatchMutationResult = NonNullable< - Awaited> ->; -export type OpenaiProxyPatchMutationBody = OpenaiProxyPatchBody; -export type OpenaiProxyPatchMutationError = ErrorType; - -/** - * @summary OpenAI Inference Proxy PATCH - */ -export const useOpenaiProxyPatch = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; trailingUri: string; data: OpenaiProxyPatchBody }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; trailingUri: string; data: OpenaiProxyPatchBody }, - TContext -> => { - return useMutation(getOpenaiProxyPatchMutationOptions(options), queryClient); -}; - -/** - * Proxy requests to OpenAI-compatible inference endpoints. - -All inference requests must resolve to a `VirtualModel`. The platform's -provider reconciler auto-creates an implicit `autoprovisioned` VirtualModel -for every served model entity (named after the entity, with -`default_model_entity` set to the entity ref) so this is the typical case; -operators can also create custom VirtualModels for routing, plugin chains, -LoRA escape-hatches, etc. Requests for which no VirtualModel can be found -return `404`. - * @summary OpenAI Inference Proxy DELETE - */ -export const openaiProxyDelete = (workspace: string, trailingUri: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/inference-gateway/v2/workspaces/${encodeURIComponent(String(workspace))}/openai/-/${encodeURIComponent(String(trailingUri))}`, - method: 'DELETE', - signal, - }); -}; - -export const getOpenaiProxyDeleteMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; trailingUri: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; trailingUri: string }, - TContext -> => { - const mutationKey = ['openaiProxyDelete']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; trailingUri: string } - > = (props) => { - const { workspace, trailingUri } = props ?? {}; - - return openaiProxyDelete(workspace, trailingUri); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type OpenaiProxyDeleteMutationResult = NonNullable< - Awaited> ->; - -export type OpenaiProxyDeleteMutationError = ErrorType; - -/** - * @summary OpenAI Inference Proxy DELETE - */ -export const useOpenaiProxyDelete = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; trailingUri: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; trailingUri: string }, - TContext -> => { - return useMutation(getOpenaiProxyDeleteMutationOptions(options), queryClient); -}; - -/** - * Proxy requests to OpenAI-compatible inference endpoints. - -All inference requests must resolve to a `VirtualModel`. The platform's -provider reconciler auto-creates an implicit `autoprovisioned` VirtualModel -for every served model entity (named after the entity, with -`default_model_entity` set to the entity ref) so this is the typical case; -operators can also create custom VirtualModels for routing, plugin chains, -LoRA escape-hatches, etc. Requests for which no VirtualModel can be found -return `404`. - * @summary OpenAI Inference Proxy PUT - */ -export const openaiProxyPut = ( - workspace: string, - trailingUri: string, - openaiProxyPutBody?: OpenaiProxyPutBody, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/inference-gateway/v2/workspaces/${encodeURIComponent(String(workspace))}/openai/-/${encodeURIComponent(String(trailingUri))}`, - method: 'PUT', - headers: { 'Content-Type': 'application/json' }, - data: openaiProxyPutBody, - signal, - }); -}; - -export const getOpenaiProxyPutMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; trailingUri: string; data: OpenaiProxyPutBody }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; trailingUri: string; data: OpenaiProxyPutBody }, - TContext -> => { - const mutationKey = ['openaiProxyPut']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; trailingUri: string; data: OpenaiProxyPutBody } - > = (props) => { - const { workspace, trailingUri, data } = props ?? {}; - - return openaiProxyPut(workspace, trailingUri, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type OpenaiProxyPutMutationResult = NonNullable>>; -export type OpenaiProxyPutMutationBody = OpenaiProxyPutBody; -export type OpenaiProxyPutMutationError = ErrorType; - -/** - * @summary OpenAI Inference Proxy PUT - */ -export const useOpenaiProxyPut = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; trailingUri: string; data: OpenaiProxyPutBody }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; trailingUri: string; data: OpenaiProxyPutBody }, - TContext -> => { - return useMutation(getOpenaiProxyPutMutationOptions(options), queryClient); -}; - -/** - * Proxy requests to OpenAI-compatible inference endpoints. - -All inference requests must resolve to a `VirtualModel`. The platform's -provider reconciler auto-creates an implicit `autoprovisioned` VirtualModel -for every served model entity (named after the entity, with -`default_model_entity` set to the entity ref) so this is the typical case; -operators can also create custom VirtualModels for routing, plugin chains, -LoRA escape-hatches, etc. Requests for which no VirtualModel can be found -return `404`. - * @summary OpenAI Inference Proxy POST - */ -export const openaiProxyPost = ( - workspace: string, - trailingUri: string, - openaiProxyPostBody?: OpenaiProxyPostBody, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/inference-gateway/v2/workspaces/${encodeURIComponent(String(workspace))}/openai/-/${encodeURIComponent(String(trailingUri))}`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: openaiProxyPostBody, - signal, - }); -}; - -export const getOpenaiProxyPostMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; trailingUri: string; data: OpenaiProxyPostBody }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; trailingUri: string; data: OpenaiProxyPostBody }, - TContext -> => { - const mutationKey = ['openaiProxyPost']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; trailingUri: string; data: OpenaiProxyPostBody } - > = (props) => { - const { workspace, trailingUri, data } = props ?? {}; - - return openaiProxyPost(workspace, trailingUri, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type OpenaiProxyPostMutationResult = NonNullable< - Awaited> ->; -export type OpenaiProxyPostMutationBody = OpenaiProxyPostBody; -export type OpenaiProxyPostMutationError = ErrorType; - -/** - * @summary OpenAI Inference Proxy POST - */ -export const useOpenaiProxyPost = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; trailingUri: string; data: OpenaiProxyPostBody }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; trailingUri: string; data: OpenaiProxyPostBody }, - TContext -> => { - return useMutation(getOpenaiProxyPostMutationOptions(options), queryClient); -}; - -/** - * Proxy requests to OpenAI-compatible inference endpoints. - -All inference requests must resolve to a `VirtualModel`. The platform's -provider reconciler auto-creates an implicit `autoprovisioned` VirtualModel -for every served model entity (named after the entity, with -`default_model_entity` set to the entity ref) so this is the typical case; -operators can also create custom VirtualModels for routing, plugin chains, -LoRA escape-hatches, etc. Requests for which no VirtualModel can be found -return `404`. - * @summary OpenAI Inference Proxy GET - */ -export const openaiProxyGet = (workspace: string, trailingUri: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/inference-gateway/v2/workspaces/${encodeURIComponent(String(workspace))}/openai/-/${encodeURIComponent(String(trailingUri))}`, - method: 'GET', - signal, - }); -}; - -export const getOpenaiProxyGetQueryKey = (workspace: string, trailingUri: string) => { - return [`/apis/inference-gateway/v2/workspaces/${workspace}/openai/-/${trailingUri}`] as const; -}; - -export const getOpenaiProxyGetQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - trailingUri: string, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getOpenaiProxyGetQueryKey(workspace, trailingUri); - - const queryFn: QueryFunction>> = ({ signal }) => - openaiProxyGet(workspace, trailingUri, signal); - - return { - queryKey, - queryFn, - enabled: !!(workspace && trailingUri), - ...queryOptions, - } as UseQueryOptions>, TError, TData> & { - queryKey: DataTag; - }; -}; - -export type OpenaiProxyGetQueryResult = NonNullable>>; -export type OpenaiProxyGetQueryError = ErrorType; - -export function useOpenaiProxyGet< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - trailingUri: string, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useOpenaiProxyGet< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - trailingUri: string, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useOpenaiProxyGet< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - trailingUri: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary OpenAI Inference Proxy GET - */ - -export function useOpenaiProxyGet< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - trailingUri: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getOpenaiProxyGetQueryOptions(workspace, trailingUri, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getOpenaiProxyGetSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - trailingUri: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getOpenaiProxyGetQueryKey(workspace, trailingUri); - - const queryFn: QueryFunction>> = ({ signal }) => - openaiProxyGet(workspace, trailingUri, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type OpenaiProxyGetSuspenseQueryResult = NonNullable< - Awaited> ->; -export type OpenaiProxyGetSuspenseQueryError = ErrorType; - -export function useOpenaiProxyGetSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - trailingUri: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useOpenaiProxyGetSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - trailingUri: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useOpenaiProxyGetSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - trailingUri: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary OpenAI Inference Proxy GET - */ - -export function useOpenaiProxyGetSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - trailingUri: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getOpenaiProxyGetSuspenseQueryOptions(workspace, trailingUri, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Proxy requests to provider inference endpoints. - * @summary Provider Inference Proxy PATCH - */ -export const providerProxyPatch = ( - workspace: string, - name: string, - trailingUri: string, - providerProxyPatchBody?: ProviderProxyPatchBody, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/inference-gateway/v2/workspaces/${encodeURIComponent(String(workspace))}/provider/${encodeURIComponent(String(name))}/-/${encodeURIComponent(String(trailingUri))}`, - method: 'PATCH', - headers: { 'Content-Type': 'application/json' }, - data: providerProxyPatchBody, - signal, - }); -}; - -export const getProviderProxyPatchMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; trailingUri: string; data: ProviderProxyPatchBody }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; trailingUri: string; data: ProviderProxyPatchBody }, - TContext -> => { - const mutationKey = ['providerProxyPatch']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string; trailingUri: string; data: ProviderProxyPatchBody } - > = (props) => { - const { workspace, name, trailingUri, data } = props ?? {}; - - return providerProxyPatch(workspace, name, trailingUri, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type ProviderProxyPatchMutationResult = NonNullable< - Awaited> ->; -export type ProviderProxyPatchMutationBody = ProviderProxyPatchBody; -export type ProviderProxyPatchMutationError = ErrorType; - -/** - * @summary Provider Inference Proxy PATCH - */ -export const useProviderProxyPatch = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; trailingUri: string; data: ProviderProxyPatchBody }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string; trailingUri: string; data: ProviderProxyPatchBody }, - TContext -> => { - return useMutation(getProviderProxyPatchMutationOptions(options), queryClient); -}; - -/** - * Proxy requests to provider inference endpoints. - * @summary Provider Inference Proxy DELETE - */ -export const providerProxyDelete = ( - workspace: string, - name: string, - trailingUri: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/inference-gateway/v2/workspaces/${encodeURIComponent(String(workspace))}/provider/${encodeURIComponent(String(name))}/-/${encodeURIComponent(String(trailingUri))}`, - method: 'DELETE', - signal, - }); -}; - -export const getProviderProxyDeleteMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; trailingUri: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; trailingUri: string }, - TContext -> => { - const mutationKey = ['providerProxyDelete']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string; trailingUri: string } - > = (props) => { - const { workspace, name, trailingUri } = props ?? {}; - - return providerProxyDelete(workspace, name, trailingUri); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type ProviderProxyDeleteMutationResult = NonNullable< - Awaited> ->; - -export type ProviderProxyDeleteMutationError = ErrorType; - -/** - * @summary Provider Inference Proxy DELETE - */ -export const useProviderProxyDelete = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; trailingUri: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string; trailingUri: string }, - TContext -> => { - return useMutation(getProviderProxyDeleteMutationOptions(options), queryClient); -}; - -/** - * Proxy requests to provider inference endpoints. - * @summary Provider Inference Proxy PUT - */ -export const providerProxyPut = ( - workspace: string, - name: string, - trailingUri: string, - providerProxyPutBody?: ProviderProxyPutBody, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/inference-gateway/v2/workspaces/${encodeURIComponent(String(workspace))}/provider/${encodeURIComponent(String(name))}/-/${encodeURIComponent(String(trailingUri))}`, - method: 'PUT', - headers: { 'Content-Type': 'application/json' }, - data: providerProxyPutBody, - signal, - }); -}; - -export const getProviderProxyPutMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; trailingUri: string; data: ProviderProxyPutBody }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; trailingUri: string; data: ProviderProxyPutBody }, - TContext -> => { - const mutationKey = ['providerProxyPut']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string; trailingUri: string; data: ProviderProxyPutBody } - > = (props) => { - const { workspace, name, trailingUri, data } = props ?? {}; - - return providerProxyPut(workspace, name, trailingUri, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type ProviderProxyPutMutationResult = NonNullable< - Awaited> ->; -export type ProviderProxyPutMutationBody = ProviderProxyPutBody; -export type ProviderProxyPutMutationError = ErrorType; - -/** - * @summary Provider Inference Proxy PUT - */ -export const useProviderProxyPut = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; trailingUri: string; data: ProviderProxyPutBody }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string; trailingUri: string; data: ProviderProxyPutBody }, - TContext -> => { - return useMutation(getProviderProxyPutMutationOptions(options), queryClient); -}; - -/** - * Proxy requests to provider inference endpoints. - * @summary Provider Inference Proxy POST - */ -export const providerProxyPost = ( - workspace: string, - name: string, - trailingUri: string, - providerProxyPostBody?: ProviderProxyPostBody, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/inference-gateway/v2/workspaces/${encodeURIComponent(String(workspace))}/provider/${encodeURIComponent(String(name))}/-/${encodeURIComponent(String(trailingUri))}`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: providerProxyPostBody, - signal, - }); -}; - -export const getProviderProxyPostMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; trailingUri: string; data: ProviderProxyPostBody }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; trailingUri: string; data: ProviderProxyPostBody }, - TContext -> => { - const mutationKey = ['providerProxyPost']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string; trailingUri: string; data: ProviderProxyPostBody } - > = (props) => { - const { workspace, name, trailingUri, data } = props ?? {}; - - return providerProxyPost(workspace, name, trailingUri, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type ProviderProxyPostMutationResult = NonNullable< - Awaited> ->; -export type ProviderProxyPostMutationBody = ProviderProxyPostBody; -export type ProviderProxyPostMutationError = ErrorType; - -/** - * @summary Provider Inference Proxy POST - */ -export const useProviderProxyPost = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; trailingUri: string; data: ProviderProxyPostBody }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string; trailingUri: string; data: ProviderProxyPostBody }, - TContext -> => { - return useMutation(getProviderProxyPostMutationOptions(options), queryClient); -}; - -/** - * Proxy requests to provider inference endpoints. - * @summary Provider Inference Proxy GET - */ -export const providerProxyGet = ( - workspace: string, - name: string, - trailingUri: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/inference-gateway/v2/workspaces/${encodeURIComponent(String(workspace))}/provider/${encodeURIComponent(String(name))}/-/${encodeURIComponent(String(trailingUri))}`, - method: 'GET', - signal, - }); -}; - -export const getProviderProxyGetQueryKey = ( - workspace: string, - name: string, - trailingUri: string -) => { - return [ - `/apis/inference-gateway/v2/workspaces/${workspace}/provider/${name}/-/${trailingUri}`, - ] as const; -}; - -export const getProviderProxyGetQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - trailingUri: string, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getProviderProxyGetQueryKey(workspace, name, trailingUri); - - const queryFn: QueryFunction>> = ({ signal }) => - providerProxyGet(workspace, name, trailingUri, signal); - - return { - queryKey, - queryFn, - enabled: !!(workspace && name && trailingUri), - ...queryOptions, - } as UseQueryOptions>, TError, TData> & { - queryKey: DataTag; - }; -}; - -export type ProviderProxyGetQueryResult = NonNullable>>; -export type ProviderProxyGetQueryError = ErrorType; - -export function useProviderProxyGet< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - trailingUri: string, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useProviderProxyGet< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - trailingUri: string, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useProviderProxyGet< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - trailingUri: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Provider Inference Proxy GET - */ - -export function useProviderProxyGet< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - trailingUri: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getProviderProxyGetQueryOptions(workspace, name, trailingUri, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getProviderProxyGetSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - trailingUri: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getProviderProxyGetQueryKey(workspace, name, trailingUri); - - const queryFn: QueryFunction>> = ({ signal }) => - providerProxyGet(workspace, name, trailingUri, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ProviderProxyGetSuspenseQueryResult = NonNullable< - Awaited> ->; -export type ProviderProxyGetSuspenseQueryError = ErrorType; - -export function useProviderProxyGetSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - trailingUri: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useProviderProxyGetSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - trailingUri: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useProviderProxyGetSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - trailingUri: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Provider Inference Proxy GET - */ - -export function useProviderProxyGetSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - trailingUri: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getProviderProxyGetSuspenseQueryOptions( - workspace, - name, - trailingUri, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Check if a model provider is registered in the gateway's cache. - -This is a lightweight endpoint that only checks the gateway's internal state, -without making any requests to the actual provider backend. Use this to verify -the gateway is ready to route requests to a provider after deployment. - -Returns: - 200 OK with provider info if the provider is registered - 404 Not Found if the provider is not yet in the gateway's cache - * @summary Check Provider Readiness - */ -export const providerReady = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/inference-gateway/v2/workspaces/${encodeURIComponent(String(workspace))}/provider/${encodeURIComponent(String(name))}/ready`, - method: 'GET', - signal, - }); -}; - -export const getProviderReadyQueryKey = (workspace: string, name: string) => { - return [`/apis/inference-gateway/v2/workspaces/${workspace}/provider/${name}/ready`] as const; -}; - -export const getProviderReadyQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getProviderReadyQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - providerReady(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ProviderReadyQueryResult = NonNullable>>; -export type ProviderReadyQueryError = ErrorType; - -export function useProviderReady< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useProviderReady< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useProviderReady< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Check Provider Readiness - */ - -export function useProviderReady< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getProviderReadyQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getProviderReadySuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getProviderReadyQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - providerReady(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ProviderReadySuspenseQueryResult = NonNullable< - Awaited> ->; -export type ProviderReadySuspenseQueryError = ErrorType; - -export function useProviderReadySuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useProviderReadySuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useProviderReadySuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Check Provider Readiness - */ - -export function useProviderReadySuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getProviderReadySuspenseQueryOptions(workspace, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Create a new VirtualModel in the given workspace. - -A VirtualModel defines an ordered middleware pipeline that IGW executes -when an inference request arrives with ``model: "workspace/name"`` matching -this entity. - * @summary Create VirtualModel - */ -export const createVirtualModel = ( - workspace: string, - createVirtualModelRequest: CreateVirtualModelRequest, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/inference-gateway/v2/workspaces/${encodeURIComponent(String(workspace))}/virtual-models`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: createVirtualModelRequest, - signal, - }); -}; - -export const getCreateVirtualModelMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: CreateVirtualModelRequest }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: CreateVirtualModelRequest }, - TContext -> => { - const mutationKey = ['createVirtualModel']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; data: CreateVirtualModelRequest } - > = (props) => { - const { workspace, data } = props ?? {}; - - return createVirtualModel(workspace, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type CreateVirtualModelMutationResult = NonNullable< - Awaited> ->; -export type CreateVirtualModelMutationBody = CreateVirtualModelRequest; -export type CreateVirtualModelMutationError = ErrorType; - -/** - * @summary Create VirtualModel - */ -export const useCreateVirtualModel = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: CreateVirtualModelRequest }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; data: CreateVirtualModelRequest }, - TContext -> => { - return useMutation(getCreateVirtualModelMutationOptions(options), queryClient); -}; - -/** - * List VirtualModels for the given workspace. - -Use ``workspace=-`` to list across all workspaces accessible to the caller. - * @summary List VirtualModels - */ -export const listVirtualModels = ( - workspace: string, - params?: ListVirtualModelsParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/inference-gateway/v2/workspaces/${encodeURIComponent(String(workspace))}/virtual-models`, - method: 'GET', - params, - signal, - }); -}; - -export const getListVirtualModelsQueryKey = ( - workspace: string, - params?: ListVirtualModelsParams -) => { - return [ - `/apis/inference-gateway/v2/workspaces/${workspace}/virtual-models`, - ...(params ? [params] : []), - ] as const; -}; - -export const getListVirtualModelsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListVirtualModelsParams, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getListVirtualModelsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - listVirtualModels(workspace, params, signal); - - return { queryKey, queryFn, enabled: !!workspace, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ListVirtualModelsQueryResult = NonNullable< - Awaited> ->; -export type ListVirtualModelsQueryError = ErrorType; - -export function useListVirtualModels< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | ListVirtualModelsParams, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useListVirtualModels< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListVirtualModelsParams, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useListVirtualModels< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListVirtualModelsParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List VirtualModels - */ - -export function useListVirtualModels< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListVirtualModelsParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getListVirtualModelsQueryOptions(workspace, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getListVirtualModelsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListVirtualModelsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getListVirtualModelsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - listVirtualModels(workspace, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ListVirtualModelsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type ListVirtualModelsSuspenseQueryError = ErrorType; - -export function useListVirtualModelsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | ListVirtualModelsParams, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useListVirtualModelsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListVirtualModelsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useListVirtualModelsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListVirtualModelsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List VirtualModels - */ - -export function useListVirtualModelsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListVirtualModelsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getListVirtualModelsSuspenseQueryOptions(workspace, params, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Get a VirtualModel by workspace and name. - * @summary Get VirtualModel - */ -export const getVirtualModel = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/inference-gateway/v2/workspaces/${encodeURIComponent(String(workspace))}/virtual-models/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getGetVirtualModelQueryKey = (workspace: string, name: string) => { - return [`/apis/inference-gateway/v2/workspaces/${workspace}/virtual-models/${name}`] as const; -}; - -export const getGetVirtualModelQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getGetVirtualModelQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - getVirtualModel(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type GetVirtualModelQueryResult = NonNullable>>; -export type GetVirtualModelQueryError = ErrorType; - -export function useGetVirtualModel< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useGetVirtualModel< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useGetVirtualModel< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get VirtualModel - */ - -export function useGetVirtualModel< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getGetVirtualModelQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getGetVirtualModelSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getGetVirtualModelQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - getVirtualModel(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type GetVirtualModelSuspenseQueryResult = NonNullable< - Awaited> ->; -export type GetVirtualModelSuspenseQueryError = ErrorType; - -export function useGetVirtualModelSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useGetVirtualModelSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useGetVirtualModelSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get VirtualModel - */ - -export function useGetVirtualModelSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getGetVirtualModelSuspenseQueryOptions(workspace, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Partially update a VirtualModel. - -Only fields present in the request body are modified. Fields absent from -the request body retain their current values. - * @summary Update VirtualModel - */ -export const updateVirtualModel = ( - workspace: string, - name: string, - updateVirtualModelRequest: UpdateVirtualModelRequest, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/inference-gateway/v2/workspaces/${encodeURIComponent(String(workspace))}/virtual-models/${encodeURIComponent(String(name))}`, - method: 'PATCH', - headers: { 'Content-Type': 'application/json' }, - data: updateVirtualModelRequest, - signal, - }); -}; - -export const getUpdateVirtualModelMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: UpdateVirtualModelRequest }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: UpdateVirtualModelRequest }, - TContext -> => { - const mutationKey = ['updateVirtualModel']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string; data: UpdateVirtualModelRequest } - > = (props) => { - const { workspace, name, data } = props ?? {}; - - return updateVirtualModel(workspace, name, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type UpdateVirtualModelMutationResult = NonNullable< - Awaited> ->; -export type UpdateVirtualModelMutationBody = UpdateVirtualModelRequest; -export type UpdateVirtualModelMutationError = ErrorType; - -/** - * @summary Update VirtualModel - */ -export const useUpdateVirtualModel = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: UpdateVirtualModelRequest }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string; data: UpdateVirtualModelRequest }, - TContext -> => { - return useMutation(getUpdateVirtualModelMutationOptions(options), queryClient); -}; - -/** - * Permanently delete a VirtualModel. - -This does not affect any in-flight requests already being routed through -this VirtualModel. IGW's model cache is refreshed on its next polling cycle. - * @summary Delete VirtualModel - */ -export const deleteVirtualModel = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/inference-gateway/v2/workspaces/${encodeURIComponent(String(workspace))}/virtual-models/${encodeURIComponent(String(name))}`, - method: 'DELETE', - signal, - }); -}; - -export const getDeleteVirtualModelMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - const mutationKey = ['deleteVirtualModel']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string } - > = (props) => { - const { workspace, name } = props ?? {}; - - return deleteVirtualModel(workspace, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type DeleteVirtualModelMutationResult = NonNullable< - Awaited> ->; - -export type DeleteVirtualModelMutationError = ErrorType; - -/** - * @summary Delete VirtualModel - */ -export const useDeleteVirtualModel = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - return useMutation(getDeleteVirtualModelMutationOptions(options), queryClient); -}; - -/** - * List all apps with filtering capabilities. - * @summary List Apps - */ -export const listApps = (workspace: string, params?: ListAppsParams, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/intake/v2/workspaces/${encodeURIComponent(String(workspace))}/apps`, - method: 'GET', - params, - signal, - }); -}; - -export const getListAppsQueryKey = (workspace: string, params?: ListAppsParams) => { - return [`/apis/intake/v2/workspaces/${workspace}/apps`, ...(params ? [params] : [])] as const; -}; - -export const getListAppsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListAppsParams, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getListAppsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - listApps(workspace, params, signal); - - return { queryKey, queryFn, enabled: !!workspace, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ListAppsQueryResult = NonNullable>>; -export type ListAppsQueryError = ErrorType; - -export function useListApps< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | ListAppsParams, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useListApps< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListAppsParams, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useListApps< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListAppsParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List Apps - */ - -export function useListApps< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListAppsParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getListAppsQueryOptions(workspace, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getListAppsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListAppsParams, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getListAppsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - listApps(workspace, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ListAppsSuspenseQueryResult = NonNullable>>; -export type ListAppsSuspenseQueryError = ErrorType; - -export function useListAppsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | ListAppsParams, - options: { - query: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useListAppsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListAppsParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useListAppsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListAppsParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List Apps - */ - -export function useListAppsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListAppsParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getListAppsSuspenseQueryOptions(workspace, params, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Create a new app. - * @summary Create App - */ -export const createApp = (workspace: string, appInput: AppInput, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/intake/v2/workspaces/${encodeURIComponent(String(workspace))}/apps`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: appInput, - signal, - }); -}; - -export const getCreateAppMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: AppInput }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: AppInput }, - TContext -> => { - const mutationKey = ['createApp']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; data: AppInput } - > = (props) => { - const { workspace, data } = props ?? {}; - - return createApp(workspace, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type CreateAppMutationResult = NonNullable>>; -export type CreateAppMutationBody = AppInput; -export type CreateAppMutationError = ErrorType; - -/** - * @summary Create App - */ -export const useCreateApp = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: AppInput }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; data: AppInput }, - TContext -> => { - return useMutation(getCreateAppMutationOptions(options), queryClient); -}; - -/** - * Get a specific task. - * @summary Get Task - */ -export const getTask = (workspace: string, app: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/intake/v2/workspaces/${encodeURIComponent(String(workspace))}/apps/${encodeURIComponent(String(app))}/tasks/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getGetTaskQueryKey = (workspace: string, app: string, name: string) => { - return [`/apis/intake/v2/workspaces/${workspace}/apps/${app}/tasks/${name}`] as const; -}; - -export const getGetTaskQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - app: string, - name: string, - options?: { query?: Partial>, TError, TData>> } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getGetTaskQueryKey(workspace, app, name); - - const queryFn: QueryFunction>> = ({ signal }) => - getTask(workspace, app, name, signal); - - return { - queryKey, - queryFn, - enabled: !!(workspace && app && name), - ...queryOptions, - } as UseQueryOptions>, TError, TData> & { - queryKey: DataTag; - }; -}; - -export type GetTaskQueryResult = NonNullable>>; -export type GetTaskQueryError = ErrorType; - -export function useGetTask< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - app: string, - name: string, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useGetTask< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - app: string, - name: string, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useGetTask< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - app: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Task - */ - -export function useGetTask< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - app: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getGetTaskQueryOptions(workspace, app, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getGetTaskSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - app: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getGetTaskQueryKey(workspace, app, name); - - const queryFn: QueryFunction>> = ({ signal }) => - getTask(workspace, app, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type GetTaskSuspenseQueryResult = NonNullable>>; -export type GetTaskSuspenseQueryError = ErrorType; - -export function useGetTaskSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - app: string, - name: string, - options: { - query: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useGetTaskSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - app: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useGetTaskSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - app: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Task - */ - -export function useGetTaskSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - app: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getGetTaskSuspenseQueryOptions(workspace, app, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Update an existing task. - * @summary Update Task - */ -export const updateTask = ( - workspace: string, - app: string, - name: string, - taskUpdate: TaskUpdate, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/intake/v2/workspaces/${encodeURIComponent(String(workspace))}/apps/${encodeURIComponent(String(app))}/tasks/${encodeURIComponent(String(name))}`, - method: 'PATCH', - headers: { 'Content-Type': 'application/json' }, - data: taskUpdate, - signal, - }); -}; - -export const getUpdateTaskMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; app: string; name: string; data: TaskUpdate }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; app: string; name: string; data: TaskUpdate }, - TContext -> => { - const mutationKey = ['updateTask']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; app: string; name: string; data: TaskUpdate } - > = (props) => { - const { workspace, app, name, data } = props ?? {}; - - return updateTask(workspace, app, name, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type UpdateTaskMutationResult = NonNullable>>; -export type UpdateTaskMutationBody = TaskUpdate; -export type UpdateTaskMutationError = ErrorType; - -/** - * @summary Update Task - */ -export const useUpdateTask = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; app: string; name: string; data: TaskUpdate }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; app: string; name: string; data: TaskUpdate }, - TContext -> => { - return useMutation(getUpdateTaskMutationOptions(options), queryClient); -}; - -/** - * Delete a task. - * @summary Delete Task - */ -export const deleteTask = (workspace: string, app: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/intake/v2/workspaces/${encodeURIComponent(String(workspace))}/apps/${encodeURIComponent(String(app))}/tasks/${encodeURIComponent(String(name))}`, - method: 'DELETE', - signal, - }); -}; - -export const getDeleteTaskMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; app: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; app: string; name: string }, - TContext -> => { - const mutationKey = ['deleteTask']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; app: string; name: string } - > = (props) => { - const { workspace, app, name } = props ?? {}; - - return deleteTask(workspace, app, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type DeleteTaskMutationResult = NonNullable>>; - -export type DeleteTaskMutationError = ErrorType; - -/** - * @summary Delete Task - */ -export const useDeleteTask = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; app: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; app: string; name: string }, - TContext -> => { - return useMutation(getDeleteTaskMutationOptions(options), queryClient); -}; - -/** - * Get a specific app by workspace and name. - * @summary Get App - */ -export const getApp = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/intake/v2/workspaces/${encodeURIComponent(String(workspace))}/apps/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getGetAppQueryKey = (workspace: string, name: string) => { - return [`/apis/intake/v2/workspaces/${workspace}/apps/${name}`] as const; -}; - -export const getGetAppQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { query?: Partial>, TError, TData>> } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getGetAppQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - getApp(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type GetAppQueryResult = NonNullable>>; -export type GetAppQueryError = ErrorType; - -export function useGetApp< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useGetApp< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useGetApp< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { query?: Partial>, TError, TData>> }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get App - */ - -export function useGetApp< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { query?: Partial>, TError, TData>> }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getGetAppQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getGetAppSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getGetAppQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - getApp(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type GetAppSuspenseQueryResult = NonNullable>>; -export type GetAppSuspenseQueryError = ErrorType; - -export function useGetAppSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useGetAppSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useGetAppSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get App - */ - -export function useGetAppSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getGetAppSuspenseQueryOptions(workspace, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Update an existing app. - * @summary Update App - */ -export const updateApp = ( - workspace: string, - name: string, - appUpdate: AppUpdate, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/intake/v2/workspaces/${encodeURIComponent(String(workspace))}/apps/${encodeURIComponent(String(name))}`, - method: 'PATCH', - headers: { 'Content-Type': 'application/json' }, - data: appUpdate, - signal, - }); -}; - -export const getUpdateAppMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: AppUpdate }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: AppUpdate }, - TContext -> => { - const mutationKey = ['updateApp']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string; data: AppUpdate } - > = (props) => { - const { workspace, name, data } = props ?? {}; - - return updateApp(workspace, name, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type UpdateAppMutationResult = NonNullable>>; -export type UpdateAppMutationBody = AppUpdate; -export type UpdateAppMutationError = ErrorType; - -/** - * @summary Update App - */ -export const useUpdateApp = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: AppUpdate }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string; data: AppUpdate }, - TContext -> => { - return useMutation(getUpdateAppMutationOptions(options), queryClient); -}; - -/** - * Delete an app. - * @summary Delete App - */ -export const deleteApp = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/intake/v2/workspaces/${encodeURIComponent(String(workspace))}/apps/${encodeURIComponent(String(name))}`, - method: 'DELETE', - signal, - }); -}; - -export const getDeleteAppMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - const mutationKey = ['deleteApp']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string } - > = (props) => { - const { workspace, name } = props ?? {}; - - return deleteApp(workspace, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type DeleteAppMutationResult = NonNullable>>; - -export type DeleteAppMutationError = ErrorType; - -/** - * @summary Delete App - */ -export const useDeleteApp = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - return useMutation(getDeleteAppMutationOptions(options), queryClient); -}; - -/** - * List all tasks for a specific app. - * @summary List Tasks - */ -export const listTasks = ( - workspace: string, - name: string, - params?: ListTasksParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/intake/v2/workspaces/${encodeURIComponent(String(workspace))}/apps/${encodeURIComponent(String(name))}/tasks`, - method: 'GET', - params, - signal, - }); -}; - -export const getListTasksQueryKey = (workspace: string, name: string, params?: ListTasksParams) => { - return [ - `/apis/intake/v2/workspaces/${workspace}/apps/${name}/tasks`, - ...(params ? [params] : []), - ] as const; -}; - -export const getListTasksQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: ListTasksParams, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getListTasksQueryKey(workspace, name, params); - - const queryFn: QueryFunction>> = ({ signal }) => - listTasks(workspace, name, params, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ListTasksQueryResult = NonNullable>>; -export type ListTasksQueryError = ErrorType; - -export function useListTasks< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params: undefined | ListTasksParams, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useListTasks< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: ListTasksParams, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useListTasks< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: ListTasksParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List Tasks - */ - -export function useListTasks< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: ListTasksParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getListTasksQueryOptions(workspace, name, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getListTasksSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: ListTasksParams, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getListTasksQueryKey(workspace, name, params); - - const queryFn: QueryFunction>> = ({ signal }) => - listTasks(workspace, name, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ListTasksSuspenseQueryResult = NonNullable>>; -export type ListTasksSuspenseQueryError = ErrorType; - -export function useListTasksSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params: undefined | ListTasksParams, - options: { - query: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useListTasksSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: ListTasksParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useListTasksSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: ListTasksParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List Tasks - */ - -export function useListTasksSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: ListTasksParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getListTasksSuspenseQueryOptions(workspace, name, params, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Create a new task. - * @summary Create Task - */ -export const createTask = ( - workspace: string, - name: string, - taskInput: TaskInput, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/intake/v2/workspaces/${encodeURIComponent(String(workspace))}/apps/${encodeURIComponent(String(name))}/tasks`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: taskInput, - signal, - }); -}; - -export const getCreateTaskMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: TaskInput }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: TaskInput }, - TContext -> => { - const mutationKey = ['createTask']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string; data: TaskInput } - > = (props) => { - const { workspace, name, data } = props ?? {}; - - return createTask(workspace, name, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type CreateTaskMutationResult = NonNullable>>; -export type CreateTaskMutationBody = TaskInput; -export type CreateTaskMutationError = ErrorType; - -/** - * @summary Create Task - */ -export const useCreateTask = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: TaskInput }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string; data: TaskInput }, - TContext -> => { - return useMutation(getCreateTaskMutationOptions(options), queryClient); -}; - -/** - * List all entries with filtering capabilities. - -When longest_per_thread=true is set in filters, returns only the longest entry -(by message count) for each unique thread_id. - * @summary List Entries - */ -export const listEntries = ( - workspace: string, - params?: ListEntriesParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/intake/v2/workspaces/${encodeURIComponent(String(workspace))}/entries`, - method: 'GET', - params, - signal, - }); -}; - -export const getListEntriesQueryKey = (workspace: string, params?: ListEntriesParams) => { - return [`/apis/intake/v2/workspaces/${workspace}/entries`, ...(params ? [params] : [])] as const; -}; - -export const getListEntriesQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListEntriesParams, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getListEntriesQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - listEntries(workspace, params, signal); - - return { queryKey, queryFn, enabled: !!workspace, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ListEntriesQueryResult = NonNullable>>; -export type ListEntriesQueryError = ErrorType; - -export function useListEntries< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | ListEntriesParams, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useListEntries< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListEntriesParams, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useListEntries< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListEntriesParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List Entries - */ - -export function useListEntries< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListEntriesParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getListEntriesQueryOptions(workspace, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getListEntriesSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListEntriesParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getListEntriesQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - listEntries(workspace, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ListEntriesSuspenseQueryResult = NonNullable>>; -export type ListEntriesSuspenseQueryError = ErrorType; - -export function useListEntriesSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | ListEntriesParams, - options: { - query: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useListEntriesSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListEntriesParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useListEntriesSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListEntriesParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List Entries - */ - -export function useListEntriesSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListEntriesParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getListEntriesSuspenseQueryOptions(workspace, params, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Create a new entry. - -Apps and tasks referenced in the entry context will be auto-created if they don't exist. - * @summary Create Entry - */ -export const createEntry = (workspace: string, entryInput: EntryInput, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/intake/v2/workspaces/${encodeURIComponent(String(workspace))}/entries`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: entryInput, - signal, - }); -}; - -export const getCreateEntryMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: EntryInput }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: EntryInput }, - TContext -> => { - const mutationKey = ['createEntry']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; data: EntryInput } - > = (props) => { - const { workspace, data } = props ?? {}; - - return createEntry(workspace, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type CreateEntryMutationResult = NonNullable>>; -export type CreateEntryMutationBody = EntryInput; -export type CreateEntryMutationError = ErrorType; - -/** - * @summary Create Entry - */ -export const useCreateEntry = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: EntryInput }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; data: EntryInput }, - TContext -> => { - return useMutation(getCreateEntryMutationOptions(options), queryClient); -}; - -/** - * Delete a specific event from an entry. - -Entry can be referenced by ID or external_id using `external:{external_id}` prefix. - * @summary Delete Event - */ -export const deleteEvent = ( - workspace: string, - entry: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/intake/v2/workspaces/${encodeURIComponent(String(workspace))}/entries/${encodeURIComponent(String(entry))}/events/${encodeURIComponent(String(name))}`, - method: 'DELETE', - signal, - }); -}; - -export const getDeleteEventMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; entry: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; entry: string; name: string }, - TContext -> => { - const mutationKey = ['deleteEvent']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; entry: string; name: string } - > = (props) => { - const { workspace, entry, name } = props ?? {}; - - return deleteEvent(workspace, entry, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type DeleteEventMutationResult = NonNullable>>; - -export type DeleteEventMutationError = ErrorType; - -/** - * @summary Delete Event - */ -export const useDeleteEvent = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; entry: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; entry: string; name: string }, - TContext -> => { - return useMutation(getDeleteEventMutationOptions(options), queryClient); -}; - -/** - * Get a specific entry by ID or external_id. - -Use `external:{external_id}` to get by external_id. -Example: `/v2/workspaces/{workspace}/entries/external:chatcmpl-abc123` - * @summary Get Entry - */ -export const getEntry = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/intake/v2/workspaces/${encodeURIComponent(String(workspace))}/entries/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getGetEntryQueryKey = (workspace: string, name: string) => { - return [`/apis/intake/v2/workspaces/${workspace}/entries/${name}`] as const; -}; - -export const getGetEntryQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getGetEntryQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - getEntry(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type GetEntryQueryResult = NonNullable>>; -export type GetEntryQueryError = ErrorType; - -export function useGetEntry< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useGetEntry< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useGetEntry< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Entry - */ - -export function useGetEntry< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getGetEntryQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getGetEntrySuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getGetEntryQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - getEntry(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type GetEntrySuspenseQueryResult = NonNullable>>; -export type GetEntrySuspenseQueryError = ErrorType; - -export function useGetEntrySuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useGetEntrySuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useGetEntrySuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Entry - */ - -export function useGetEntrySuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getGetEntrySuspenseQueryOptions(workspace, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Update an existing entry by ID or external_id. - -Use `external:{external_id}` to update by external_id. -Example: `/v2/workspaces/{workspace}/entries/external:chatcmpl-abc123` - * @summary Update Entry - */ -export const updateEntry = ( - workspace: string, - name: string, - entryUpdate: EntryUpdate, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/intake/v2/workspaces/${encodeURIComponent(String(workspace))}/entries/${encodeURIComponent(String(name))}`, - method: 'PATCH', - headers: { 'Content-Type': 'application/json' }, - data: entryUpdate, - signal, - }); -}; - -export const getUpdateEntryMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: EntryUpdate }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: EntryUpdate }, - TContext -> => { - const mutationKey = ['updateEntry']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string; data: EntryUpdate } - > = (props) => { - const { workspace, name, data } = props ?? {}; - - return updateEntry(workspace, name, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type UpdateEntryMutationResult = NonNullable>>; -export type UpdateEntryMutationBody = EntryUpdate; -export type UpdateEntryMutationError = ErrorType; - -/** - * @summary Update Entry - */ -export const useUpdateEntry = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: EntryUpdate }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string; data: EntryUpdate }, - TContext -> => { - return useMutation(getUpdateEntryMutationOptions(options), queryClient); -}; - -/** - * Delete an entry by ID or external_id. - -Use `external:{external_id}` to delete by external_id. -Example: `/v2/workspaces/{workspace}/entries/external:chatcmpl-abc123` - * @summary Delete Entry - */ -export const deleteEntry = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/intake/v2/workspaces/${encodeURIComponent(String(workspace))}/entries/${encodeURIComponent(String(name))}`, - method: 'DELETE', - signal, - }); -}; - -export const getDeleteEntryMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - const mutationKey = ['deleteEntry']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string } - > = (props) => { - const { workspace, name } = props ?? {}; - - return deleteEntry(workspace, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type DeleteEntryMutationResult = NonNullable>>; - -export type DeleteEntryMutationError = ErrorType; - -/** - * @summary Delete Entry - */ -export const useDeleteEntry = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - return useMutation(getDeleteEntryMutationOptions(options), queryClient); -}; - -/** - * Add events to an entry by ID or external_id. - -Use `external:{external_id}` to add events by external_id. -Example: `/v2/workspaces/{workspace}/entries/external:chatcmpl-abc123/events` - * @summary Add Events - */ -export const addEvents = ( - workspace: string, - name: string, - eventsCreateRequest: EventsCreateRequest, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/intake/v2/workspaces/${encodeURIComponent(String(workspace))}/entries/${encodeURIComponent(String(name))}/events`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: eventsCreateRequest, - signal, - }); -}; - -export const getAddEventsMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: EventsCreateRequest }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: EventsCreateRequest }, - TContext -> => { - const mutationKey = ['addEvents']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string; data: EventsCreateRequest } - > = (props) => { - const { workspace, name, data } = props ?? {}; - - return addEvents(workspace, name, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type AddEventsMutationResult = NonNullable>>; -export type AddEventsMutationBody = EventsCreateRequest; -export type AddEventsMutationError = ErrorType; - -/** - * @summary Add Events - */ -export const useAddEvents = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: EventsCreateRequest }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string; data: EventsCreateRequest }, - TContext -> => { - return useMutation(getAddEventsMutationOptions(options), queryClient); -}; - -/** - * @summary Create Evaluator Result - */ -export const createEvaluatorResult = ( - workspace: string, - evaluatorResultInput: EvaluatorResultInput, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/intake/v2/workspaces/${encodeURIComponent(String(workspace))}/evaluator-results`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: evaluatorResultInput, - signal, - }); -}; - -export const getCreateEvaluatorResultMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: EvaluatorResultInput }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: EvaluatorResultInput }, - TContext -> => { - const mutationKey = ['createEvaluatorResult']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; data: EvaluatorResultInput } - > = (props) => { - const { workspace, data } = props ?? {}; - - return createEvaluatorResult(workspace, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type CreateEvaluatorResultMutationResult = NonNullable< - Awaited> ->; -export type CreateEvaluatorResultMutationBody = EvaluatorResultInput; -export type CreateEvaluatorResultMutationError = ErrorType; - -/** - * @summary Create Evaluator Result - */ -export const useCreateEvaluatorResult = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: EvaluatorResultInput }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; data: EvaluatorResultInput }, - TContext -> => { - return useMutation(getCreateEvaluatorResultMutationOptions(options), queryClient); -}; - -/** - * @summary List Evaluator Results - */ -export const listEvaluatorResults = ( - workspace: string, - params?: ListEvaluatorResultsParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/intake/v2/workspaces/${encodeURIComponent(String(workspace))}/evaluator-results`, - method: 'GET', - params, - signal, - }); -}; - -export const getListEvaluatorResultsQueryKey = ( - workspace: string, - params?: ListEvaluatorResultsParams -) => { - return [ - `/apis/intake/v2/workspaces/${workspace}/evaluator-results`, - ...(params ? [params] : []), - ] as const; -}; - -export const getListEvaluatorResultsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListEvaluatorResultsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getListEvaluatorResultsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - listEvaluatorResults(workspace, params, signal); - - return { queryKey, queryFn, enabled: !!workspace, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ListEvaluatorResultsQueryResult = NonNullable< - Awaited> ->; -export type ListEvaluatorResultsQueryError = ErrorType; - -export function useListEvaluatorResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | ListEvaluatorResultsParams, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useListEvaluatorResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListEvaluatorResultsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useListEvaluatorResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListEvaluatorResultsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List Evaluator Results - */ - -export function useListEvaluatorResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListEvaluatorResultsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getListEvaluatorResultsQueryOptions(workspace, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getListEvaluatorResultsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListEvaluatorResultsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getListEvaluatorResultsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - listEvaluatorResults(workspace, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ListEvaluatorResultsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type ListEvaluatorResultsSuspenseQueryError = ErrorType; - -export function useListEvaluatorResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | ListEvaluatorResultsParams, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useListEvaluatorResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListEvaluatorResultsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useListEvaluatorResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListEvaluatorResultsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List Evaluator Results - */ - -export function useListEvaluatorResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListEvaluatorResultsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getListEvaluatorResultsSuspenseQueryOptions(workspace, params, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Get Evaluator Result - */ -export const getEvaluatorResult = ( - workspace: string, - evaluatorResultId: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/intake/v2/workspaces/${encodeURIComponent(String(workspace))}/evaluator-results/${encodeURIComponent(String(evaluatorResultId))}`, - method: 'GET', - signal, - }); -}; - -export const getGetEvaluatorResultQueryKey = (workspace: string, evaluatorResultId: string) => { - return [ - `/apis/intake/v2/workspaces/${workspace}/evaluator-results/${evaluatorResultId}`, - ] as const; -}; - -export const getGetEvaluatorResultQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - evaluatorResultId: string, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getGetEvaluatorResultQueryKey(workspace, evaluatorResultId); - - const queryFn: QueryFunction>> = ({ signal }) => - getEvaluatorResult(workspace, evaluatorResultId, signal); - - return { - queryKey, - queryFn, - enabled: !!(workspace && evaluatorResultId), - ...queryOptions, - } as UseQueryOptions>, TError, TData> & { - queryKey: DataTag; - }; -}; - -export type GetEvaluatorResultQueryResult = NonNullable< - Awaited> ->; -export type GetEvaluatorResultQueryError = ErrorType; - -export function useGetEvaluatorResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - evaluatorResultId: string, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useGetEvaluatorResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - evaluatorResultId: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useGetEvaluatorResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - evaluatorResultId: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Evaluator Result - */ - -export function useGetEvaluatorResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - evaluatorResultId: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getGetEvaluatorResultQueryOptions(workspace, evaluatorResultId, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getGetEvaluatorResultSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - evaluatorResultId: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getGetEvaluatorResultQueryKey(workspace, evaluatorResultId); - - const queryFn: QueryFunction>> = ({ signal }) => - getEvaluatorResult(workspace, evaluatorResultId, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type GetEvaluatorResultSuspenseQueryResult = NonNullable< - Awaited> ->; -export type GetEvaluatorResultSuspenseQueryError = ErrorType; - -export function useGetEvaluatorResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - evaluatorResultId: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useGetEvaluatorResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - evaluatorResultId: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useGetEvaluatorResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - evaluatorResultId: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Evaluator Result - */ - -export function useGetEvaluatorResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - evaluatorResultId: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getGetEvaluatorResultSuspenseQueryOptions( - workspace, - evaluatorResultId, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * List all export jobs with filtering capabilities. - -Use `workspace=-` for cross-workspace listing. - * @summary List Export Jobs - */ -export const listExportJobs = ( - workspace: string, - params?: ListExportJobsParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/intake/v2/workspaces/${encodeURIComponent(String(workspace))}/export/jobs`, - method: 'GET', - params, - signal, - }); -}; - -export const getListExportJobsQueryKey = (workspace: string, params?: ListExportJobsParams) => { - return [ - `/apis/intake/v2/workspaces/${workspace}/export/jobs`, - ...(params ? [params] : []), - ] as const; -}; - -export const getListExportJobsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListExportJobsParams, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getListExportJobsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - listExportJobs(workspace, params, signal); - - return { queryKey, queryFn, enabled: !!workspace, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ListExportJobsQueryResult = NonNullable>>; -export type ListExportJobsQueryError = ErrorType; - -export function useListExportJobs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | ListExportJobsParams, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useListExportJobs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListExportJobsParams, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useListExportJobs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListExportJobsParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List Export Jobs - */ - -export function useListExportJobs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListExportJobsParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getListExportJobsQueryOptions(workspace, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getListExportJobsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListExportJobsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getListExportJobsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - listExportJobs(workspace, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ListExportJobsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type ListExportJobsSuspenseQueryError = ErrorType; - -export function useListExportJobsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | ListExportJobsParams, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useListExportJobsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListExportJobsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useListExportJobsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListExportJobsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List Export Jobs - */ - -export function useListExportJobsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListExportJobsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getListExportJobsSuspenseQueryOptions(workspace, params, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Export entries to an external file. - -Use the `longest_per_thread` filter to export only the longest entry per thread, -which is useful for thread-based exports. - -Supported output file URLs: - -- NeMo Datastore: nds://workspace/dataset_name -- HuggingFace Dataset: hf://datasets/org/name/path/to/file -- Local filesystem: file:///path/to/export (for development) - * @summary Create Export Job - */ -export const createExportJob = ( - workspace: string, - exportJobInput: ExportJobInput, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/intake/v2/workspaces/${encodeURIComponent(String(workspace))}/export/jobs`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: exportJobInput, - signal, - }); -}; - -export const getCreateExportJobMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: ExportJobInput }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: ExportJobInput }, - TContext -> => { - const mutationKey = ['createExportJob']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; data: ExportJobInput } - > = (props) => { - const { workspace, data } = props ?? {}; - - return createExportJob(workspace, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type CreateExportJobMutationResult = NonNullable< - Awaited> ->; -export type CreateExportJobMutationBody = ExportJobInput; -export type CreateExportJobMutationError = ErrorType; - -/** - * @summary Create Export Job - */ -export const useCreateExportJob = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: ExportJobInput }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; data: ExportJobInput }, - TContext -> => { - return useMutation(getCreateExportJobMutationOptions(options), queryClient); -}; - -/** - * Check the status of an export job. - * @summary Get Export Job Status - */ -export const getExportJobStatus = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/intake/v2/workspaces/${encodeURIComponent(String(workspace))}/export/jobs/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getGetExportJobStatusQueryKey = (workspace: string, name: string) => { - return [`/apis/intake/v2/workspaces/${workspace}/export/jobs/${name}`] as const; -}; - -export const getGetExportJobStatusQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getGetExportJobStatusQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - getExportJobStatus(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type GetExportJobStatusQueryResult = NonNullable< - Awaited> ->; -export type GetExportJobStatusQueryError = ErrorType; - -export function useGetExportJobStatus< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useGetExportJobStatus< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useGetExportJobStatus< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Export Job Status - */ - -export function useGetExportJobStatus< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getGetExportJobStatusQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getGetExportJobStatusSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getGetExportJobStatusQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - getExportJobStatus(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type GetExportJobStatusSuspenseQueryResult = NonNullable< - Awaited> ->; -export type GetExportJobStatusSuspenseQueryError = ErrorType; - -export function useGetExportJobStatusSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useGetExportJobStatusSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useGetExportJobStatusSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Export Job Status - */ - -export function useGetExportJobStatusSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getGetExportJobStatusSuspenseQueryOptions(workspace, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Preview export data without writing to a file (max 100 records). - * @summary Preview Export - */ -export const previewExport = ( - workspace: string, - exportPreviewRequest: ExportPreviewRequest, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/intake/v2/workspaces/${encodeURIComponent(String(workspace))}/export/preview`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: exportPreviewRequest, - signal, - }); -}; - -export const getPreviewExportMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: ExportPreviewRequest }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: ExportPreviewRequest }, - TContext -> => { - const mutationKey = ['previewExport']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; data: ExportPreviewRequest } - > = (props) => { - const { workspace, data } = props ?? {}; - - return previewExport(workspace, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type PreviewExportMutationResult = NonNullable>>; -export type PreviewExportMutationBody = ExportPreviewRequest; -export type PreviewExportMutationError = ErrorType; - -/** - * @summary Preview Export - */ -export const usePreviewExport = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: ExportPreviewRequest }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; data: ExportPreviewRequest }, - TContext -> => { - return useMutation(getPreviewExportMutationOptions(options), queryClient); -}; - -/** - * @summary Ingest Atif - */ -export const ingestAtif = ( - workspace: string, - atifIngestRequest: AtifIngestRequest, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/intake/v2/workspaces/${encodeURIComponent(String(workspace))}/ingest/atif`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: atifIngestRequest, - signal, - }); -}; - -export const getIngestAtifMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: AtifIngestRequest }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: AtifIngestRequest }, - TContext -> => { - const mutationKey = ['ingestAtif']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; data: AtifIngestRequest } - > = (props) => { - const { workspace, data } = props ?? {}; - - return ingestAtif(workspace, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type IngestAtifMutationResult = NonNullable>>; -export type IngestAtifMutationBody = AtifIngestRequest; -export type IngestAtifMutationError = ErrorType; - -/** - * @summary Ingest Atif - */ -export const useIngestAtif = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: AtifIngestRequest }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; data: AtifIngestRequest }, - TContext -> => { - return useMutation(getIngestAtifMutationOptions(options), queryClient); -}; - -/** - * @summary Ingest Chat Completion - */ -export const ingestChatCompletion = ( - workspace: string, - chatCompletionsIngestRequest: ChatCompletionsIngestRequest, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/intake/v2/workspaces/${encodeURIComponent(String(workspace))}/ingest/chat-completions`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: chatCompletionsIngestRequest, - signal, - }); -}; - -export const getIngestChatCompletionMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: ChatCompletionsIngestRequest }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: ChatCompletionsIngestRequest }, - TContext -> => { - const mutationKey = ['ingestChatCompletion']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; data: ChatCompletionsIngestRequest } - > = (props) => { - const { workspace, data } = props ?? {}; - - return ingestChatCompletion(workspace, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type IngestChatCompletionMutationResult = NonNullable< - Awaited> ->; -export type IngestChatCompletionMutationBody = ChatCompletionsIngestRequest; -export type IngestChatCompletionMutationError = ErrorType; - -/** - * @summary Ingest Chat Completion - */ -export const useIngestChatCompletion = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: ChatCompletionsIngestRequest }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; data: ChatCompletionsIngestRequest }, - TContext -> => { - return useMutation(getIngestChatCompletionMutationOptions(options), queryClient); -}; - -/** - * @summary Ingest Otlp Traces - */ -export const ingestOtlpTraces = (workspace: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/intake/v2/workspaces/${encodeURIComponent(String(workspace))}/ingest/otlp/v1/traces`, - method: 'POST', - signal, - }); -}; - -export const getIngestOtlpTracesMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string }, - TContext -> => { - const mutationKey = ['ingestOtlpTraces']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string } - > = (props) => { - const { workspace } = props ?? {}; - - return ingestOtlpTraces(workspace); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type IngestOtlpTracesMutationResult = NonNullable< - Awaited> ->; - -export type IngestOtlpTracesMutationError = ErrorType; - -/** - * @summary Ingest Otlp Traces - */ -export const useIngestOtlpTraces = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string }, - TContext -> => { - return useMutation(getIngestOtlpTracesMutationOptions(options), queryClient); -}; - -/** - * @summary List Spans - */ -export const listSpans = (workspace: string, params?: ListSpansParams, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/intake/v2/workspaces/${encodeURIComponent(String(workspace))}/spans`, - method: 'GET', - params, - signal, - }); -}; - -export const getListSpansQueryKey = (workspace: string, params?: ListSpansParams) => { - return [`/apis/intake/v2/workspaces/${workspace}/spans`, ...(params ? [params] : [])] as const; -}; - -export const getListSpansQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListSpansParams, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getListSpansQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - listSpans(workspace, params, signal); - - return { queryKey, queryFn, enabled: !!workspace, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ListSpansQueryResult = NonNullable>>; -export type ListSpansQueryError = ErrorType; - -export function useListSpans< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | ListSpansParams, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useListSpans< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListSpansParams, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useListSpans< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListSpansParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List Spans - */ - -export function useListSpans< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListSpansParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getListSpansQueryOptions(workspace, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getListSpansSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListSpansParams, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getListSpansQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - listSpans(workspace, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ListSpansSuspenseQueryResult = NonNullable>>; -export type ListSpansSuspenseQueryError = ErrorType; - -export function useListSpansSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | ListSpansParams, - options: { - query: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useListSpansSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListSpansParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useListSpansSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListSpansParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List Spans - */ - -export function useListSpansSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListSpansParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getListSpansSuspenseQueryOptions(workspace, params, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Get Span - */ -export const getSpan = (workspace: string, spanId: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/intake/v2/workspaces/${encodeURIComponent(String(workspace))}/spans/${encodeURIComponent(String(spanId))}`, - method: 'GET', - signal, - }); -}; - -export const getGetSpanQueryKey = (workspace: string, spanId: string) => { - return [`/apis/intake/v2/workspaces/${workspace}/spans/${spanId}`] as const; -}; - -export const getGetSpanQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - spanId: string, - options?: { query?: Partial>, TError, TData>> } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getGetSpanQueryKey(workspace, spanId); - - const queryFn: QueryFunction>> = ({ signal }) => - getSpan(workspace, spanId, signal); - - return { - queryKey, - queryFn, - enabled: !!(workspace && spanId), - ...queryOptions, - } as UseQueryOptions>, TError, TData> & { - queryKey: DataTag; - }; -}; - -export type GetSpanQueryResult = NonNullable>>; -export type GetSpanQueryError = ErrorType; - -export function useGetSpan< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - spanId: string, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useGetSpan< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - spanId: string, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useGetSpan< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - spanId: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Span - */ - -export function useGetSpan< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - spanId: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getGetSpanQueryOptions(workspace, spanId, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getGetSpanSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - spanId: string, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getGetSpanQueryKey(workspace, spanId); - - const queryFn: QueryFunction>> = ({ signal }) => - getSpan(workspace, spanId, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type GetSpanSuspenseQueryResult = NonNullable>>; -export type GetSpanSuspenseQueryError = ErrorType; - -export function useGetSpanSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - spanId: string, - options: { - query: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useGetSpanSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - spanId: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useGetSpanSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - spanId: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Span - */ - -export function useGetSpanSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - spanId: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getGetSpanSuspenseQueryOptions(workspace, spanId, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary List Evaluator Results For Span - */ -export const listEvaluatorResultsForSpan = ( - workspace: string, - spanId: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/intake/v2/workspaces/${encodeURIComponent(String(workspace))}/spans/${encodeURIComponent(String(spanId))}/evaluator-results`, - method: 'GET', - signal, - }); -}; - -export const getListEvaluatorResultsForSpanQueryKey = (workspace: string, spanId: string) => { - return [`/apis/intake/v2/workspaces/${workspace}/spans/${spanId}/evaluator-results`] as const; -}; - -export const getListEvaluatorResultsForSpanQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - spanId: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getListEvaluatorResultsForSpanQueryKey(workspace, spanId); - - const queryFn: QueryFunction>> = ({ - signal, - }) => listEvaluatorResultsForSpan(workspace, spanId, signal); - - return { - queryKey, - queryFn, - enabled: !!(workspace && spanId), - ...queryOptions, - } as UseQueryOptions>, TError, TData> & { - queryKey: DataTag; - }; -}; - -export type ListEvaluatorResultsForSpanQueryResult = NonNullable< - Awaited> ->; -export type ListEvaluatorResultsForSpanQueryError = ErrorType; - -export function useListEvaluatorResultsForSpan< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - spanId: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useListEvaluatorResultsForSpan< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - spanId: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useListEvaluatorResultsForSpan< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - spanId: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List Evaluator Results For Span - */ - -export function useListEvaluatorResultsForSpan< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - spanId: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getListEvaluatorResultsForSpanQueryOptions(workspace, spanId, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getListEvaluatorResultsForSpanSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - spanId: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getListEvaluatorResultsForSpanQueryKey(workspace, spanId); - - const queryFn: QueryFunction>> = ({ - signal, - }) => listEvaluatorResultsForSpan(workspace, spanId, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ListEvaluatorResultsForSpanSuspenseQueryResult = NonNullable< - Awaited> ->; -export type ListEvaluatorResultsForSpanSuspenseQueryError = ErrorType; - -export function useListEvaluatorResultsForSpanSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - spanId: string, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useListEvaluatorResultsForSpanSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - spanId: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useListEvaluatorResultsForSpanSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - spanId: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List Evaluator Results For Span - */ - -export function useListEvaluatorResultsForSpanSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - spanId: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getListEvaluatorResultsForSpanSuspenseQueryOptions( - workspace, - spanId, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary List Traces - */ -export const listTraces = (workspace: string, params?: ListTracesParams, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/intake/v2/workspaces/${encodeURIComponent(String(workspace))}/traces`, - method: 'GET', - params, - signal, - }); -}; - -export const getListTracesQueryKey = (workspace: string, params?: ListTracesParams) => { - return [`/apis/intake/v2/workspaces/${workspace}/traces`, ...(params ? [params] : [])] as const; -}; - -export const getListTracesQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListTracesParams, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getListTracesQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - listTraces(workspace, params, signal); - - return { queryKey, queryFn, enabled: !!workspace, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ListTracesQueryResult = NonNullable>>; -export type ListTracesQueryError = ErrorType; - -export function useListTraces< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | ListTracesParams, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useListTraces< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListTracesParams, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useListTraces< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListTracesParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List Traces - */ - -export function useListTraces< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListTracesParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getListTracesQueryOptions(workspace, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getListTracesSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListTracesParams, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getListTracesQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - listTraces(workspace, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ListTracesSuspenseQueryResult = NonNullable>>; -export type ListTracesSuspenseQueryError = ErrorType; - -export function useListTracesSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | ListTracesParams, - options: { - query: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useListTracesSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListTracesParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useListTracesSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListTracesParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List Traces - */ - -export function useListTracesSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ListTracesParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getListTracesSuspenseQueryOptions(workspace, params, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Get Trace - */ -export const getTrace = ( - workspace: string, - id: string, - params?: GetTraceParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/intake/v2/workspaces/${encodeURIComponent(String(workspace))}/traces/${encodeURIComponent(String(id))}`, - method: 'GET', - params, - signal, - }); -}; - -export const getGetTraceQueryKey = (workspace: string, id: string, params?: GetTraceParams) => { - return [ - `/apis/intake/v2/workspaces/${workspace}/traces/${id}`, - ...(params ? [params] : []), - ] as const; -}; - -export const getGetTraceQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - id: string, - params?: GetTraceParams, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getGetTraceQueryKey(workspace, id, params); - - const queryFn: QueryFunction>> = ({ signal }) => - getTrace(workspace, id, params, signal); - - return { queryKey, queryFn, enabled: !!(workspace && id), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type GetTraceQueryResult = NonNullable>>; -export type GetTraceQueryError = ErrorType; - -export function useGetTrace< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - id: string, - params: undefined | GetTraceParams, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useGetTrace< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - id: string, - params?: GetTraceParams, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useGetTrace< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - id: string, - params?: GetTraceParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Trace - */ - -export function useGetTrace< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - id: string, - params?: GetTraceParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getGetTraceQueryOptions(workspace, id, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getGetTraceSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - id: string, - params?: GetTraceParams, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getGetTraceQueryKey(workspace, id, params); - - const queryFn: QueryFunction>> = ({ signal }) => - getTrace(workspace, id, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type GetTraceSuspenseQueryResult = NonNullable>>; -export type GetTraceSuspenseQueryError = ErrorType; - -export function useGetTraceSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - id: string, - params: undefined | GetTraceParams, - options: { - query: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useGetTraceSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - id: string, - params?: GetTraceParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useGetTraceSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - id: string, - params?: GetTraceParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Trace - */ - -export function useGetTraceSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - id: string, - params?: GetTraceParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getGetTraceSuspenseQueryOptions(workspace, id, params, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Get all currently configured execution profiles. - * @summary Get Execution Profiles - */ -export const jobsGetExecutionProfiles = (signal?: AbortSignal) => { - return customFetch< - ( - | DockerJobExecutionProfile - | KubernetesJobExecutionProfile - | VolcanoJobExecutionProfile - | SubprocessJobExecutionProfile - | E2EJobExecutionProfile - )[] - >({ url: `/apis/jobs/v2/execution-profiles`, method: 'GET', signal }); -}; - -export const getJobsGetExecutionProfilesQueryKey = () => { - return [`/apis/jobs/v2/execution-profiles`] as const; -}; - -export const getJobsGetExecutionProfilesQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->(options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; -}) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getJobsGetExecutionProfilesQueryKey(); - - const queryFn: QueryFunction>> = ({ - signal, - }) => jobsGetExecutionProfiles(signal); - - return { queryKey, queryFn, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type JobsGetExecutionProfilesQueryResult = NonNullable< - Awaited> ->; -export type JobsGetExecutionProfilesQueryError = ErrorType; - -export function useJobsGetExecutionProfiles< - TData = Awaited>, - TError = ErrorType, ->( - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useJobsGetExecutionProfiles< - TData = Awaited>, - TError = ErrorType, ->( - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useJobsGetExecutionProfiles< - TData = Awaited>, - TError = ErrorType, ->( - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Execution Profiles - */ - -export function useJobsGetExecutionProfiles< - TData = Awaited>, - TError = ErrorType, ->( - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getJobsGetExecutionProfilesQueryOptions(options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getJobsGetExecutionProfilesSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->(options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; -}) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getJobsGetExecutionProfilesQueryKey(); - - const queryFn: QueryFunction>> = ({ - signal, - }) => jobsGetExecutionProfiles(signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type JobsGetExecutionProfilesSuspenseQueryResult = NonNullable< - Awaited> ->; -export type JobsGetExecutionProfilesSuspenseQueryError = ErrorType; - -export function useJobsGetExecutionProfilesSuspense< - TData = Awaited>, - TError = ErrorType, ->( - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useJobsGetExecutionProfilesSuspense< - TData = Awaited>, - TError = ErrorType, ->( - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useJobsGetExecutionProfilesSuspense< - TData = Awaited>, - TError = ErrorType, ->( - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Execution Profiles - */ - -export function useJobsGetExecutionProfilesSuspense< - TData = Awaited>, - TError = ErrorType, ->( - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getJobsGetExecutionProfilesSuspenseQueryOptions(options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Create a new platform job. - * @summary Create Job - */ -export const jobsCreateJob = ( - workspace: string, - createPlatformJobRequest: CreatePlatformJobRequest, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/jobs/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: createPlatformJobRequest, - signal, - }); -}; - -export const getJobsCreateJobMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: CreatePlatformJobRequest }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: CreatePlatformJobRequest }, - TContext -> => { - const mutationKey = ['jobsCreateJob']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; data: CreatePlatformJobRequest } - > = (props) => { - const { workspace, data } = props ?? {}; - - return jobsCreateJob(workspace, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type JobsCreateJobMutationResult = NonNullable>>; -export type JobsCreateJobMutationBody = CreatePlatformJobRequest; -export type JobsCreateJobMutationError = ErrorType; - -/** - * @summary Create Job - */ -export const useJobsCreateJob = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: CreatePlatformJobRequest }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; data: CreatePlatformJobRequest }, - TContext -> => { - return useMutation(getJobsCreateJobMutationOptions(options), queryClient); -}; - -/** - * List platform jobs with filtering and pagination. - * @summary List Jobs - */ -export const jobsListJobs = ( - workspace: string, - params?: JobsListJobsParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/jobs/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs`, - method: 'GET', - params, - signal, - }); -}; - -export const getJobsListJobsQueryKey = (workspace: string, params?: JobsListJobsParams) => { - return [`/apis/jobs/v2/workspaces/${workspace}/jobs`, ...(params ? [params] : [])] as const; -}; - -export const getJobsListJobsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: JobsListJobsParams, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getJobsListJobsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - jobsListJobs(workspace, params, signal); - - return { queryKey, queryFn, enabled: !!workspace, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type JobsListJobsQueryResult = NonNullable>>; -export type JobsListJobsQueryError = ErrorType; - -export function useJobsListJobs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | JobsListJobsParams, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useJobsListJobs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: JobsListJobsParams, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useJobsListJobs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: JobsListJobsParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List Jobs - */ - -export function useJobsListJobs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: JobsListJobsParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getJobsListJobsQueryOptions(workspace, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getJobsListJobsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: JobsListJobsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getJobsListJobsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - jobsListJobs(workspace, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type JobsListJobsSuspenseQueryResult = NonNullable>>; -export type JobsListJobsSuspenseQueryError = ErrorType; - -export function useJobsListJobsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | JobsListJobsParams, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useJobsListJobsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: JobsListJobsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useJobsListJobsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: JobsListJobsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List Jobs - */ - -export function useJobsListJobsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: JobsListJobsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getJobsListJobsSuspenseQueryOptions(workspace, params, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Create a new result for a job. - * @summary Create Job Result - */ -export const jobsCreateJobResult = ( - workspace: string, - job: string, - name: string, - platformJobResultCreateRequest: PlatformJobResultCreateRequest, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/jobs/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/${encodeURIComponent(String(job))}/results/${encodeURIComponent(String(name))}`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: platformJobResultCreateRequest, - signal, - }); -}; - -export const getJobsCreateJobResultMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; job: string; name: string; data: PlatformJobResultCreateRequest }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; job: string; name: string; data: PlatformJobResultCreateRequest }, - TContext -> => { - const mutationKey = ['jobsCreateJobResult']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; job: string; name: string; data: PlatformJobResultCreateRequest } - > = (props) => { - const { workspace, job, name, data } = props ?? {}; - - return jobsCreateJobResult(workspace, job, name, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type JobsCreateJobResultMutationResult = NonNullable< - Awaited> ->; -export type JobsCreateJobResultMutationBody = PlatformJobResultCreateRequest; -export type JobsCreateJobResultMutationError = ErrorType; - -/** - * @summary Create Job Result - */ -export const useJobsCreateJobResult = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; job: string; name: string; data: PlatformJobResultCreateRequest }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; job: string; name: string; data: PlatformJobResultCreateRequest }, - TContext -> => { - return useMutation(getJobsCreateJobResultMutationOptions(options), queryClient); -}; - -/** - * Get a specific job result. - * @summary Get Job Result - */ -export const jobsGetJobResult = ( - workspace: string, - job: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/jobs/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/${encodeURIComponent(String(job))}/results/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getJobsGetJobResultQueryKey = (workspace: string, job: string, name: string) => { - return [`/apis/jobs/v2/workspaces/${workspace}/jobs/${job}/results/${name}`] as const; -}; - -export const getJobsGetJobResultQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getJobsGetJobResultQueryKey(workspace, job, name); - - const queryFn: QueryFunction>> = ({ signal }) => - jobsGetJobResult(workspace, job, name, signal); - - return { - queryKey, - queryFn, - enabled: !!(workspace && job && name), - ...queryOptions, - } as UseQueryOptions>, TError, TData> & { - queryKey: DataTag; - }; -}; - -export type JobsGetJobResultQueryResult = NonNullable>>; -export type JobsGetJobResultQueryError = ErrorType; - -export function useJobsGetJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useJobsGetJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useJobsGetJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Result - */ - -export function useJobsGetJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getJobsGetJobResultQueryOptions(workspace, job, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getJobsGetJobResultSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getJobsGetJobResultQueryKey(workspace, job, name); - - const queryFn: QueryFunction>> = ({ signal }) => - jobsGetJobResult(workspace, job, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type JobsGetJobResultSuspenseQueryResult = NonNullable< - Awaited> ->; -export type JobsGetJobResultSuspenseQueryError = ErrorType; - -export function useJobsGetJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useJobsGetJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useJobsGetJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Result - */ - -export function useJobsGetJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getJobsGetJobResultSuspenseQueryOptions(workspace, job, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Download a job result file. - * @summary Download Job Result - */ -export const jobsDownloadJobResult = ( - workspace: string, - job: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/jobs/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/${encodeURIComponent(String(job))}/results/${encodeURIComponent(String(name))}/download`, - method: 'GET', - responseType: 'blob', - signal, - }); -}; - -export const getJobsDownloadJobResultQueryKey = (workspace: string, job: string, name: string) => { - return [`/apis/jobs/v2/workspaces/${workspace}/jobs/${job}/results/${name}/download`] as const; -}; - -export const getJobsDownloadJobResultQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getJobsDownloadJobResultQueryKey(workspace, job, name); - - const queryFn: QueryFunction>> = ({ signal }) => - jobsDownloadJobResult(workspace, job, name, signal); - - return { - queryKey, - queryFn, - enabled: !!(workspace && job && name), - ...queryOptions, - } as UseQueryOptions>, TError, TData> & { - queryKey: DataTag; - }; -}; - -export type JobsDownloadJobResultQueryResult = NonNullable< - Awaited> ->; -export type JobsDownloadJobResultQueryError = ErrorType; - -export function useJobsDownloadJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useJobsDownloadJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useJobsDownloadJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Download Job Result - */ - -export function useJobsDownloadJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getJobsDownloadJobResultQueryOptions(workspace, job, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getJobsDownloadJobResultSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getJobsDownloadJobResultQueryKey(workspace, job, name); - - const queryFn: QueryFunction>> = ({ signal }) => - jobsDownloadJobResult(workspace, job, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type JobsDownloadJobResultSuspenseQueryResult = NonNullable< - Awaited> ->; -export type JobsDownloadJobResultSuspenseQueryError = ErrorType; - -export function useJobsDownloadJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useJobsDownloadJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useJobsDownloadJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Download Job Result - */ - -export function useJobsDownloadJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getJobsDownloadJobResultSuspenseQueryOptions(workspace, job, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Get a specific job step. - * @summary Get Job Step - */ -export const jobsGetJobStep = ( - workspace: string, - job: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/jobs/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/${encodeURIComponent(String(job))}/steps/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getJobsGetJobStepQueryKey = (workspace: string, job: string, name: string) => { - return [`/apis/jobs/v2/workspaces/${workspace}/jobs/${job}/steps/${name}`] as const; -}; - -export const getJobsGetJobStepQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getJobsGetJobStepQueryKey(workspace, job, name); - - const queryFn: QueryFunction>> = ({ signal }) => - jobsGetJobStep(workspace, job, name, signal); - - return { - queryKey, - queryFn, - enabled: !!(workspace && job && name), - ...queryOptions, - } as UseQueryOptions>, TError, TData> & { - queryKey: DataTag; - }; -}; - -export type JobsGetJobStepQueryResult = NonNullable>>; -export type JobsGetJobStepQueryError = ErrorType; - -export function useJobsGetJobStep< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useJobsGetJobStep< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useJobsGetJobStep< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Step - */ - -export function useJobsGetJobStep< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getJobsGetJobStepQueryOptions(workspace, job, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getJobsGetJobStepSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getJobsGetJobStepQueryKey(workspace, job, name); - - const queryFn: QueryFunction>> = ({ signal }) => - jobsGetJobStep(workspace, job, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type JobsGetJobStepSuspenseQueryResult = NonNullable< - Awaited> ->; -export type JobsGetJobStepSuspenseQueryError = ErrorType; - -export function useJobsGetJobStepSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useJobsGetJobStepSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useJobsGetJobStepSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Step - */ - -export function useJobsGetJobStepSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getJobsGetJobStepSuspenseQueryOptions(workspace, job, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Update a job step status. - * @summary Update Job Step Status - */ -export const jobsUpdateJobStepStatus = ( - workspace: string, - job: string, - name: string, - platformJobStatusUpdateRequest: PlatformJobStatusUpdateRequest, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/jobs/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/${encodeURIComponent(String(job))}/steps/${encodeURIComponent(String(name))}/status`, - method: 'PATCH', - headers: { 'Content-Type': 'application/json' }, - data: platformJobStatusUpdateRequest, - signal, - }); -}; - -export const getJobsUpdateJobStepStatusMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; job: string; name: string; data: PlatformJobStatusUpdateRequest }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; job: string; name: string; data: PlatformJobStatusUpdateRequest }, - TContext -> => { - const mutationKey = ['jobsUpdateJobStepStatus']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; job: string; name: string; data: PlatformJobStatusUpdateRequest } - > = (props) => { - const { workspace, job, name, data } = props ?? {}; - - return jobsUpdateJobStepStatus(workspace, job, name, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type JobsUpdateJobStepStatusMutationResult = NonNullable< - Awaited> ->; -export type JobsUpdateJobStepStatusMutationBody = PlatformJobStatusUpdateRequest; -export type JobsUpdateJobStepStatusMutationError = ErrorType; - -/** - * @summary Update Job Step Status - */ -export const useJobsUpdateJobStepStatus = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; job: string; name: string; data: PlatformJobStatusUpdateRequest }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; job: string; name: string; data: PlatformJobStatusUpdateRequest }, - TContext -> => { - return useMutation(getJobsUpdateJobStepStatusMutationOptions(options), queryClient); -}; - -/** - * List tasks for a job step. - * @summary List Job Step Tasks - */ -export const jobsListJobStepTasks = ( - workspace: string, - job: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/jobs/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/${encodeURIComponent(String(job))}/steps/${encodeURIComponent(String(name))}/tasks`, - method: 'GET', - signal, - }); -}; - -export const getJobsListJobStepTasksQueryKey = (workspace: string, job: string, name: string) => { - return [`/apis/jobs/v2/workspaces/${workspace}/jobs/${job}/steps/${name}/tasks`] as const; -}; - -export const getJobsListJobStepTasksQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getJobsListJobStepTasksQueryKey(workspace, job, name); - - const queryFn: QueryFunction>> = ({ signal }) => - jobsListJobStepTasks(workspace, job, name, signal); - - return { - queryKey, - queryFn, - enabled: !!(workspace && job && name), - ...queryOptions, - } as UseQueryOptions>, TError, TData> & { - queryKey: DataTag; - }; -}; - -export type JobsListJobStepTasksQueryResult = NonNullable< - Awaited> ->; -export type JobsListJobStepTasksQueryError = ErrorType; - -export function useJobsListJobStepTasks< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useJobsListJobStepTasks< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useJobsListJobStepTasks< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List Job Step Tasks - */ - -export function useJobsListJobStepTasks< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getJobsListJobStepTasksQueryOptions(workspace, job, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getJobsListJobStepTasksSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getJobsListJobStepTasksQueryKey(workspace, job, name); - - const queryFn: QueryFunction>> = ({ signal }) => - jobsListJobStepTasks(workspace, job, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type JobsListJobStepTasksSuspenseQueryResult = NonNullable< - Awaited> ->; -export type JobsListJobStepTasksSuspenseQueryError = ErrorType; - -export function useJobsListJobStepTasksSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useJobsListJobStepTasksSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useJobsListJobStepTasksSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List Job Step Tasks - */ - -export function useJobsListJobStepTasksSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getJobsListJobStepTasksSuspenseQueryOptions(workspace, job, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Update a job step task. - * @summary Update Job Step Task - */ -export const jobsUpdateJobStepTask = ( - workspace: string, - job: string, - step: string, - name: string, - platformJobTaskUpdate: PlatformJobTaskUpdate, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/jobs/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/${encodeURIComponent(String(job))}/steps/${encodeURIComponent(String(step))}/tasks/${encodeURIComponent(String(name))}`, - method: 'PUT', - headers: { 'Content-Type': 'application/json' }, - data: platformJobTaskUpdate, - signal, - }); -}; - -export const getJobsUpdateJobStepTaskMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; job: string; step: string; name: string; data: PlatformJobTaskUpdate }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; job: string; step: string; name: string; data: PlatformJobTaskUpdate }, - TContext -> => { - const mutationKey = ['jobsUpdateJobStepTask']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; job: string; step: string; name: string; data: PlatformJobTaskUpdate } - > = (props) => { - const { workspace, job, step, name, data } = props ?? {}; - - return jobsUpdateJobStepTask(workspace, job, step, name, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type JobsUpdateJobStepTaskMutationResult = NonNullable< - Awaited> ->; -export type JobsUpdateJobStepTaskMutationBody = PlatformJobTaskUpdate; -export type JobsUpdateJobStepTaskMutationError = ErrorType; - -/** - * @summary Update Job Step Task - */ -export const useJobsUpdateJobStepTask = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; job: string; step: string; name: string; data: PlatformJobTaskUpdate }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; job: string; step: string; name: string; data: PlatformJobTaskUpdate }, - TContext -> => { - return useMutation(getJobsUpdateJobStepTaskMutationOptions(options), queryClient); -}; - -/** - * Get a specific job step task. - * @summary Get Job Step Task - */ -export const jobsGetJobStepTask = ( - workspace: string, - job: string, - step: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/jobs/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/${encodeURIComponent(String(job))}/steps/${encodeURIComponent(String(step))}/tasks/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getJobsGetJobStepTaskQueryKey = ( - workspace: string, - job: string, - step: string, - name: string -) => { - return [`/apis/jobs/v2/workspaces/${workspace}/jobs/${job}/steps/${step}/tasks/${name}`] as const; -}; - -export const getJobsGetJobStepTaskQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - step: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getJobsGetJobStepTaskQueryKey(workspace, job, step, name); - - const queryFn: QueryFunction>> = ({ signal }) => - jobsGetJobStepTask(workspace, job, step, name, signal); - - return { - queryKey, - queryFn, - enabled: !!(workspace && job && step && name), - ...queryOptions, - } as UseQueryOptions>, TError, TData> & { - queryKey: DataTag; - }; -}; - -export type JobsGetJobStepTaskQueryResult = NonNullable< - Awaited> ->; -export type JobsGetJobStepTaskQueryError = ErrorType; - -export function useJobsGetJobStepTask< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - step: string, - name: string, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useJobsGetJobStepTask< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - step: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useJobsGetJobStepTask< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - step: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Step Task - */ - -export function useJobsGetJobStepTask< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - step: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getJobsGetJobStepTaskQueryOptions(workspace, job, step, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getJobsGetJobStepTaskSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - step: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getJobsGetJobStepTaskQueryKey(workspace, job, step, name); - - const queryFn: QueryFunction>> = ({ signal }) => - jobsGetJobStepTask(workspace, job, step, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type JobsGetJobStepTaskSuspenseQueryResult = NonNullable< - Awaited> ->; -export type JobsGetJobStepTaskSuspenseQueryError = ErrorType; - -export function useJobsGetJobStepTaskSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - step: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useJobsGetJobStepTaskSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - step: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useJobsGetJobStepTaskSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - step: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Step Task - */ - -export function useJobsGetJobStepTaskSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - step: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getJobsGetJobStepTaskSuspenseQueryOptions( - workspace, - job, - step, - name, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Get a platform job by name. - * @summary Get Job - */ -export const jobsGetJob = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/jobs/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getJobsGetJobQueryKey = (workspace: string, name: string) => { - return [`/apis/jobs/v2/workspaces/${workspace}/jobs/${name}`] as const; -}; - -export const getJobsGetJobQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getJobsGetJobQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - jobsGetJob(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type JobsGetJobQueryResult = NonNullable>>; -export type JobsGetJobQueryError = ErrorType; - -export function useJobsGetJob< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useJobsGetJob< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useJobsGetJob< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job - */ - -export function useJobsGetJob< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getJobsGetJobQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getJobsGetJobSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getJobsGetJobQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - jobsGetJob(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type JobsGetJobSuspenseQueryResult = NonNullable>>; -export type JobsGetJobSuspenseQueryError = ErrorType; - -export function useJobsGetJobSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useJobsGetJobSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useJobsGetJobSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job - */ - -export function useJobsGetJobSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getJobsGetJobSuspenseQueryOptions(workspace, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Delete a platform job. - * @summary Delete Job - */ -export const jobsDeleteJob = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/jobs/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/${encodeURIComponent(String(name))}`, - method: 'DELETE', - signal, - }); -}; - -export const getJobsDeleteJobMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - const mutationKey = ['jobsDeleteJob']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string } - > = (props) => { - const { workspace, name } = props ?? {}; - - return jobsDeleteJob(workspace, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type JobsDeleteJobMutationResult = NonNullable>>; - -export type JobsDeleteJobMutationError = ErrorType; - -/** - * @summary Delete Job - */ -export const useJobsDeleteJob = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - return useMutation(getJobsDeleteJobMutationOptions(options), queryClient); -}; - -/** - * Cancel a platform job. - * @summary Cancel Job - */ -export const jobsCancelJob = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/jobs/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/${encodeURIComponent(String(name))}/cancel`, - method: 'POST', - signal, - }); -}; - -export const getJobsCancelJobMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - const mutationKey = ['jobsCancelJob']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string } - > = (props) => { - const { workspace, name } = props ?? {}; - - return jobsCancelJob(workspace, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type JobsCancelJobMutationResult = NonNullable>>; - -export type JobsCancelJobMutationError = ErrorType; - -/** - * @summary Cancel Job - */ -export const useJobsCancelJob = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - return useMutation(getJobsCancelJobMutationOptions(options), queryClient); -}; - -/** - * Get paginated logs for a platform job. - * @summary Page Job Logs - */ -export const jobsPageJobLogs = ( - workspace: string, - name: string, - params?: JobsPageJobLogsParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/jobs/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/${encodeURIComponent(String(name))}/logs`, - method: 'GET', - params, - signal, - }); -}; - -export const getJobsPageJobLogsQueryKey = ( - workspace: string, - name: string, - params?: JobsPageJobLogsParams -) => { - return [ - `/apis/jobs/v2/workspaces/${workspace}/jobs/${name}/logs`, - ...(params ? [params] : []), - ] as const; -}; - -export const getJobsPageJobLogsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: JobsPageJobLogsParams, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getJobsPageJobLogsQueryKey(workspace, name, params); - - const queryFn: QueryFunction>> = ({ signal }) => - jobsPageJobLogs(workspace, name, params, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type JobsPageJobLogsQueryResult = NonNullable>>; -export type JobsPageJobLogsQueryError = ErrorType; - -export function useJobsPageJobLogs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params: undefined | JobsPageJobLogsParams, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useJobsPageJobLogs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: JobsPageJobLogsParams, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useJobsPageJobLogs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: JobsPageJobLogsParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Page Job Logs - */ - -export function useJobsPageJobLogs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: JobsPageJobLogsParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getJobsPageJobLogsQueryOptions(workspace, name, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getJobsPageJobLogsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: JobsPageJobLogsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getJobsPageJobLogsQueryKey(workspace, name, params); - - const queryFn: QueryFunction>> = ({ signal }) => - jobsPageJobLogs(workspace, name, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type JobsPageJobLogsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type JobsPageJobLogsSuspenseQueryError = ErrorType; - -export function useJobsPageJobLogsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params: undefined | JobsPageJobLogsParams, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useJobsPageJobLogsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: JobsPageJobLogsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useJobsPageJobLogsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: JobsPageJobLogsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Page Job Logs - */ - -export function useJobsPageJobLogsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: JobsPageJobLogsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getJobsPageJobLogsSuspenseQueryOptions(workspace, name, params, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Pause a platform job. - * @summary Pause Job - */ -export const jobsPauseJob = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/jobs/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/${encodeURIComponent(String(name))}/pause`, - method: 'POST', - signal, - }); -}; - -export const getJobsPauseJobMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - const mutationKey = ['jobsPauseJob']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string } - > = (props) => { - const { workspace, name } = props ?? {}; - - return jobsPauseJob(workspace, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type JobsPauseJobMutationResult = NonNullable>>; - -export type JobsPauseJobMutationError = ErrorType; - -/** - * @summary Pause Job - */ -export const useJobsPauseJob = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - return useMutation(getJobsPauseJobMutationOptions(options), queryClient); -}; - -/** - * List results for a job. - * @summary List Job Results - */ -export const jobsListJobResults = ( - workspace: string, - name: string, - params?: JobsListJobResultsParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/jobs/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/${encodeURIComponent(String(name))}/results`, - method: 'GET', - params, - signal, - }); -}; - -export const getJobsListJobResultsQueryKey = ( - workspace: string, - name: string, - params?: JobsListJobResultsParams -) => { - return [ - `/apis/jobs/v2/workspaces/${workspace}/jobs/${name}/results`, - ...(params ? [params] : []), - ] as const; -}; - -export const getJobsListJobResultsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: JobsListJobResultsParams, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getJobsListJobResultsQueryKey(workspace, name, params); - - const queryFn: QueryFunction>> = ({ signal }) => - jobsListJobResults(workspace, name, params, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type JobsListJobResultsQueryResult = NonNullable< - Awaited> ->; -export type JobsListJobResultsQueryError = ErrorType; - -export function useJobsListJobResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params: undefined | JobsListJobResultsParams, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useJobsListJobResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: JobsListJobResultsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useJobsListJobResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: JobsListJobResultsParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List Job Results - */ - -export function useJobsListJobResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: JobsListJobResultsParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getJobsListJobResultsQueryOptions(workspace, name, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getJobsListJobResultsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: JobsListJobResultsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getJobsListJobResultsQueryKey(workspace, name, params); - - const queryFn: QueryFunction>> = ({ signal }) => - jobsListJobResults(workspace, name, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type JobsListJobResultsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type JobsListJobResultsSuspenseQueryError = ErrorType; - -export function useJobsListJobResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params: undefined | JobsListJobResultsParams, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useJobsListJobResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: JobsListJobResultsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useJobsListJobResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: JobsListJobResultsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List Job Results - */ - -export function useJobsListJobResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: JobsListJobResultsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getJobsListJobResultsSuspenseQueryOptions(workspace, name, params, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Resume a paused platform job. - * @summary Resume Job - */ -export const jobsResumeJob = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/jobs/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/${encodeURIComponent(String(name))}/resume`, - method: 'POST', - signal, - }); -}; - -export const getJobsResumeJobMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - const mutationKey = ['jobsResumeJob']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string } - > = (props) => { - const { workspace, name } = props ?? {}; - - return jobsResumeJob(workspace, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type JobsResumeJobMutationResult = NonNullable>>; - -export type JobsResumeJobMutationError = ErrorType; - -/** - * @summary Resume Job - */ -export const useJobsResumeJob = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - return useMutation(getJobsResumeJobMutationOptions(options), queryClient); -}; - -/** - * Get the status of a platform job. - * @summary Get Job Status - */ -export const jobsGetJobStatus = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/jobs/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/${encodeURIComponent(String(name))}/status`, - method: 'GET', - signal, - }); -}; - -export const getJobsGetJobStatusQueryKey = (workspace: string, name: string) => { - return [`/apis/jobs/v2/workspaces/${workspace}/jobs/${name}/status`] as const; -}; - -export const getJobsGetJobStatusQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getJobsGetJobStatusQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - jobsGetJobStatus(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type JobsGetJobStatusQueryResult = NonNullable>>; -export type JobsGetJobStatusQueryError = ErrorType; - -export function useJobsGetJobStatus< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useJobsGetJobStatus< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useJobsGetJobStatus< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Status - */ - -export function useJobsGetJobStatus< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getJobsGetJobStatusQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getJobsGetJobStatusSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getJobsGetJobStatusQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - jobsGetJobStatus(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type JobsGetJobStatusSuspenseQueryResult = NonNullable< - Awaited> ->; -export type JobsGetJobStatusSuspenseQueryError = ErrorType; - -export function useJobsGetJobStatusSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useJobsGetJobStatusSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useJobsGetJobStatusSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Status - */ - -export function useJobsGetJobStatusSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getJobsGetJobStatusSuspenseQueryOptions(workspace, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Update the status details of a platform job. - * @summary Update Job Status Details - */ -export const jobsUpdateJobStatusDetails = ( - workspace: string, - name: string, - jobsUpdateJobStatusDetailsBody: JobsUpdateJobStatusDetailsBody, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/jobs/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/${encodeURIComponent(String(name))}/status-details`, - method: 'PATCH', - headers: { 'Content-Type': 'application/json' }, - data: jobsUpdateJobStatusDetailsBody, - signal, - }); -}; - -export const getJobsUpdateJobStatusDetailsMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: JobsUpdateJobStatusDetailsBody }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: JobsUpdateJobStatusDetailsBody }, - TContext -> => { - const mutationKey = ['jobsUpdateJobStatusDetails']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string; data: JobsUpdateJobStatusDetailsBody } - > = (props) => { - const { workspace, name, data } = props ?? {}; - - return jobsUpdateJobStatusDetails(workspace, name, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type JobsUpdateJobStatusDetailsMutationResult = NonNullable< - Awaited> ->; -export type JobsUpdateJobStatusDetailsMutationBody = JobsUpdateJobStatusDetailsBody; -export type JobsUpdateJobStatusDetailsMutationError = ErrorType; - -/** - * @summary Update Job Status Details - */ -export const useJobsUpdateJobStatusDetails = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: JobsUpdateJobStatusDetailsBody }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string; data: JobsUpdateJobStatusDetailsBody }, - TContext -> => { - return useMutation(getJobsUpdateJobStatusDetailsMutationOptions(options), queryClient); -}; - -/** - * List job steps with pagination and filtering. - * @summary List Steps - */ -export const jobsListSteps = ( - workspace: string, - name: string, - params?: JobsListStepsParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/jobs/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/${encodeURIComponent(String(name))}/steps`, - method: 'GET', - params, - signal, - }); -}; - -export const getJobsListStepsQueryKey = ( - workspace: string, - name: string, - params?: JobsListStepsParams -) => { - return [ - `/apis/jobs/v2/workspaces/${workspace}/jobs/${name}/steps`, - ...(params ? [params] : []), - ] as const; -}; - -export const getJobsListStepsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: JobsListStepsParams, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getJobsListStepsQueryKey(workspace, name, params); - - const queryFn: QueryFunction>> = ({ signal }) => - jobsListSteps(workspace, name, params, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type JobsListStepsQueryResult = NonNullable>>; -export type JobsListStepsQueryError = ErrorType; - -export function useJobsListSteps< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params: undefined | JobsListStepsParams, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useJobsListSteps< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: JobsListStepsParams, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useJobsListSteps< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: JobsListStepsParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List Steps - */ - -export function useJobsListSteps< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: JobsListStepsParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getJobsListStepsQueryOptions(workspace, name, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getJobsListStepsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: JobsListStepsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getJobsListStepsQueryKey(workspace, name, params); - - const queryFn: QueryFunction>> = ({ signal }) => - jobsListSteps(workspace, name, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type JobsListStepsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type JobsListStepsSuspenseQueryError = ErrorType; - -export function useJobsListStepsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params: undefined | JobsListStepsParams, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useJobsListStepsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: JobsListStepsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useJobsListStepsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: JobsListStepsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List Steps - */ - -export function useJobsListStepsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: JobsListStepsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getJobsListStepsSuspenseQueryOptions(workspace, name, params, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Create an adapter under a base model specified by the "model" field in the body. - * @summary Create Adapter - */ -export const modelsCreateAdapter = ( - workspace: string, - createAdapterRequest: CreateAdapterRequest, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/adapters`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: createAdapterRequest, - signal, - }); -}; - -export const getModelsCreateAdapterMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: CreateAdapterRequest }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: CreateAdapterRequest }, - TContext -> => { - const mutationKey = ['modelsCreateAdapter']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; data: CreateAdapterRequest } - > = (props) => { - const { workspace, data } = props ?? {}; - - return modelsCreateAdapter(workspace, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type ModelsCreateAdapterMutationResult = NonNullable< - Awaited> ->; -export type ModelsCreateAdapterMutationBody = CreateAdapterRequest; -export type ModelsCreateAdapterMutationError = ErrorType; - -/** - * @summary Create Adapter - */ -export const useModelsCreateAdapter = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: CreateAdapterRequest }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; data: CreateAdapterRequest }, - TContext -> => { - return useMutation(getModelsCreateAdapterMutationOptions(options), queryClient); -}; - -/** - * @summary List Adapters - */ -export const modelsListAdapters = ( - workspace: string, - params?: ModelsListAdaptersParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/adapters`, - method: 'GET', - params, - signal, - }); -}; - -export const getModelsListAdaptersQueryKey = ( - workspace: string, - params?: ModelsListAdaptersParams -) => { - return [`/apis/models/v2/workspaces/${workspace}/adapters`, ...(params ? [params] : [])] as const; -}; - -export const getModelsListAdaptersQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListAdaptersParams, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getModelsListAdaptersQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - modelsListAdapters(workspace, params, signal); - - return { queryKey, queryFn, enabled: !!workspace, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ModelsListAdaptersQueryResult = NonNullable< - Awaited> ->; -export type ModelsListAdaptersQueryError = ErrorType; - -export function useModelsListAdapters< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | ModelsListAdaptersParams, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useModelsListAdapters< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListAdaptersParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useModelsListAdapters< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListAdaptersParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List Adapters - */ - -export function useModelsListAdapters< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListAdaptersParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getModelsListAdaptersQueryOptions(workspace, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getModelsListAdaptersSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListAdaptersParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getModelsListAdaptersQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - modelsListAdapters(workspace, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ModelsListAdaptersSuspenseQueryResult = NonNullable< - Awaited> ->; -export type ModelsListAdaptersSuspenseQueryError = ErrorType; - -export function useModelsListAdaptersSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | ModelsListAdaptersParams, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useModelsListAdaptersSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListAdaptersParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useModelsListAdaptersSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListAdaptersParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List Adapters - */ - -export function useModelsListAdaptersSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListAdaptersParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getModelsListAdaptersSuspenseQueryOptions(workspace, params, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Get Adapter - */ -export const modelsGetAdapter = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/adapters/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getModelsGetAdapterQueryKey = (workspace: string, name: string) => { - return [`/apis/models/v2/workspaces/${workspace}/adapters/${name}`] as const; -}; - -export const getModelsGetAdapterQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getModelsGetAdapterQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - modelsGetAdapter(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ModelsGetAdapterQueryResult = NonNullable>>; -export type ModelsGetAdapterQueryError = ErrorType; - -export function useModelsGetAdapter< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useModelsGetAdapter< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useModelsGetAdapter< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Adapter - */ - -export function useModelsGetAdapter< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getModelsGetAdapterQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getModelsGetAdapterSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getModelsGetAdapterQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - modelsGetAdapter(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ModelsGetAdapterSuspenseQueryResult = NonNullable< - Awaited> ->; -export type ModelsGetAdapterSuspenseQueryError = ErrorType; - -export function useModelsGetAdapterSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useModelsGetAdapterSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useModelsGetAdapterSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Adapter - */ - -export function useModelsGetAdapterSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getModelsGetAdapterSuspenseQueryOptions(workspace, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Delete Adapter - */ -export const modelsDeleteAdapter = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/adapters/${encodeURIComponent(String(name))}`, - method: 'DELETE', - signal, - }); -}; - -export const getModelsDeleteAdapterMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - const mutationKey = ['modelsDeleteAdapter']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string } - > = (props) => { - const { workspace, name } = props ?? {}; - - return modelsDeleteAdapter(workspace, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type ModelsDeleteAdapterMutationResult = NonNullable< - Awaited> ->; - -export type ModelsDeleteAdapterMutationError = ErrorType; - -/** - * @summary Delete Adapter - */ -export const useModelsDeleteAdapter = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - return useMutation(getModelsDeleteAdapterMutationOptions(options), queryClient); -}; - -/** - * @summary Update Adapter - */ -export const modelsUpdateAdapter = ( - workspace: string, - name: string, - updateAdapterRequest: UpdateAdapterRequest, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/adapters/${encodeURIComponent(String(name))}`, - method: 'PATCH', - headers: { 'Content-Type': 'application/json' }, - data: updateAdapterRequest, - signal, - }); -}; - -export const getModelsUpdateAdapterMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: UpdateAdapterRequest }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: UpdateAdapterRequest }, - TContext -> => { - const mutationKey = ['modelsUpdateAdapter']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string; data: UpdateAdapterRequest } - > = (props) => { - const { workspace, name, data } = props ?? {}; - - return modelsUpdateAdapter(workspace, name, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type ModelsUpdateAdapterMutationResult = NonNullable< - Awaited> ->; -export type ModelsUpdateAdapterMutationBody = UpdateAdapterRequest; -export type ModelsUpdateAdapterMutationError = ErrorType; - -/** - * @summary Update Adapter - */ -export const useModelsUpdateAdapter = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: UpdateAdapterRequest }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string; data: UpdateAdapterRequest }, - TContext -> => { - return useMutation(getModelsUpdateAdapterMutationOptions(options), queryClient); -}; - -/** - * List ModelDeploymentConfigs for a specific workspace. -Returns only the latest version of each config. - * @summary List ModelDeploymentConfigs By Workspace - */ -export const modelsListDeploymentConfigs = ( - workspace: string, - params?: ModelsListDeploymentConfigsParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/deployment-configs`, - method: 'GET', - params, - signal, - }); -}; - -export const getModelsListDeploymentConfigsQueryKey = ( - workspace: string, - params?: ModelsListDeploymentConfigsParams -) => { - return [ - `/apis/models/v2/workspaces/${workspace}/deployment-configs`, - ...(params ? [params] : []), - ] as const; -}; - -export const getModelsListDeploymentConfigsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListDeploymentConfigsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getModelsListDeploymentConfigsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ - signal, - }) => modelsListDeploymentConfigs(workspace, params, signal); - - return { queryKey, queryFn, enabled: !!workspace, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ModelsListDeploymentConfigsQueryResult = NonNullable< - Awaited> ->; -export type ModelsListDeploymentConfigsQueryError = ErrorType; - -export function useModelsListDeploymentConfigs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | ModelsListDeploymentConfigsParams, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useModelsListDeploymentConfigs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListDeploymentConfigsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useModelsListDeploymentConfigs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListDeploymentConfigsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List ModelDeploymentConfigs By Workspace - */ - -export function useModelsListDeploymentConfigs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListDeploymentConfigsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getModelsListDeploymentConfigsQueryOptions(workspace, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getModelsListDeploymentConfigsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListDeploymentConfigsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getModelsListDeploymentConfigsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ - signal, - }) => modelsListDeploymentConfigs(workspace, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ModelsListDeploymentConfigsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type ModelsListDeploymentConfigsSuspenseQueryError = ErrorType; - -export function useModelsListDeploymentConfigsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | ModelsListDeploymentConfigsParams, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useModelsListDeploymentConfigsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListDeploymentConfigsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useModelsListDeploymentConfigsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListDeploymentConfigsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List ModelDeploymentConfigs By Workspace - */ - -export function useModelsListDeploymentConfigsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListDeploymentConfigsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getModelsListDeploymentConfigsSuspenseQueryOptions( - workspace, - params, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Create a new ModelDeploymentConfig (version 1). - * @summary Create ModelDeploymentConfig - */ -export const modelsCreateDeploymentConfig = ( - workspace: string, - createModelDeploymentConfigRequest: CreateModelDeploymentConfigRequest, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/deployment-configs`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: createModelDeploymentConfigRequest, - signal, - }); -}; - -export const getModelsCreateDeploymentConfigMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: CreateModelDeploymentConfigRequest }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: CreateModelDeploymentConfigRequest }, - TContext -> => { - const mutationKey = ['modelsCreateDeploymentConfig']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; data: CreateModelDeploymentConfigRequest } - > = (props) => { - const { workspace, data } = props ?? {}; - - return modelsCreateDeploymentConfig(workspace, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type ModelsCreateDeploymentConfigMutationResult = NonNullable< - Awaited> ->; -export type ModelsCreateDeploymentConfigMutationBody = CreateModelDeploymentConfigRequest; -export type ModelsCreateDeploymentConfigMutationError = ErrorType; - -/** - * @summary Create ModelDeploymentConfig - */ -export const useModelsCreateDeploymentConfig = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: CreateModelDeploymentConfigRequest }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; data: CreateModelDeploymentConfigRequest }, - TContext -> => { - return useMutation(getModelsCreateDeploymentConfigMutationOptions(options), queryClient); -}; - -/** - * Get a specific version of a ModelDeploymentConfig. - * @summary Get Specific ModelDeploymentConfig Version - */ -export const modelsGetDeploymentConfigVersion = ( - workspace: string, - config: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/deployment-configs/${encodeURIComponent(String(config))}/versions/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getModelsGetDeploymentConfigVersionQueryKey = ( - workspace: string, - config: string, - name: string -) => { - return [ - `/apis/models/v2/workspaces/${workspace}/deployment-configs/${config}/versions/${name}`, - ] as const; -}; - -export const getModelsGetDeploymentConfigVersionQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - config: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getModelsGetDeploymentConfigVersionQueryKey(workspace, config, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => modelsGetDeploymentConfigVersion(workspace, config, name, signal); - - return { - queryKey, - queryFn, - enabled: !!(workspace && config && name), - ...queryOptions, - } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ModelsGetDeploymentConfigVersionQueryResult = NonNullable< - Awaited> ->; -export type ModelsGetDeploymentConfigVersionQueryError = ErrorType; - -export function useModelsGetDeploymentConfigVersion< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - config: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useModelsGetDeploymentConfigVersion< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - config: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useModelsGetDeploymentConfigVersion< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - config: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Specific ModelDeploymentConfig Version - */ - -export function useModelsGetDeploymentConfigVersion< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - config: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getModelsGetDeploymentConfigVersionQueryOptions( - workspace, - config, - name, - options - ); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getModelsGetDeploymentConfigVersionSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - config: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getModelsGetDeploymentConfigVersionQueryKey(workspace, config, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => modelsGetDeploymentConfigVersion(workspace, config, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ModelsGetDeploymentConfigVersionSuspenseQueryResult = NonNullable< - Awaited> ->; -export type ModelsGetDeploymentConfigVersionSuspenseQueryError = ErrorType; - -export function useModelsGetDeploymentConfigVersionSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - config: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useModelsGetDeploymentConfigVersionSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - config: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useModelsGetDeploymentConfigVersionSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - config: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Specific ModelDeploymentConfig Version - */ - -export function useModelsGetDeploymentConfigVersionSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - config: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getModelsGetDeploymentConfigVersionSuspenseQueryOptions( - workspace, - config, - name, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Delete a specific version of a ModelDeploymentConfig. - -This operation will fail with 409 Conflict if any ModelDeployments currently -reference this specific version and are not in DELETED status. Delete or wait for -dependent deployments to reach DELETED status before deleting the config version. - * @summary Delete Specific ModelDeploymentConfig Version - */ -export const modelsDeleteDeploymentConfigVersion = ( - workspace: string, - config: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/deployment-configs/${encodeURIComponent(String(config))}/versions/${encodeURIComponent(String(name))}`, - method: 'DELETE', - signal, - }); -}; - -export const getModelsDeleteDeploymentConfigVersionMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; config: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; config: string; name: string }, - TContext -> => { - const mutationKey = ['modelsDeleteDeploymentConfigVersion']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; config: string; name: string } - > = (props) => { - const { workspace, config, name } = props ?? {}; - - return modelsDeleteDeploymentConfigVersion(workspace, config, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type ModelsDeleteDeploymentConfigVersionMutationResult = NonNullable< - Awaited> ->; - -export type ModelsDeleteDeploymentConfigVersionMutationError = - ErrorType; - -/** - * @summary Delete Specific ModelDeploymentConfig Version - */ -export const useModelsDeleteDeploymentConfigVersion = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; config: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; config: string; name: string }, - TContext -> => { - return useMutation(getModelsDeleteDeploymentConfigVersionMutationOptions(options), queryClient); -}; - -/** - * Get the latest version of a ModelDeploymentConfig. - * @summary Get Latest ModelDeploymentConfig Version - */ -export const modelsGetLatestDeploymentConfig = ( - workspace: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/deployment-configs/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getModelsGetLatestDeploymentConfigQueryKey = (workspace: string, name: string) => { - return [`/apis/models/v2/workspaces/${workspace}/deployment-configs/${name}`] as const; -}; - -export const getModelsGetLatestDeploymentConfigQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getModelsGetLatestDeploymentConfigQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => modelsGetLatestDeploymentConfig(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ModelsGetLatestDeploymentConfigQueryResult = NonNullable< - Awaited> ->; -export type ModelsGetLatestDeploymentConfigQueryError = ErrorType; - -export function useModelsGetLatestDeploymentConfig< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useModelsGetLatestDeploymentConfig< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useModelsGetLatestDeploymentConfig< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Latest ModelDeploymentConfig Version - */ - -export function useModelsGetLatestDeploymentConfig< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getModelsGetLatestDeploymentConfigQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getModelsGetLatestDeploymentConfigSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getModelsGetLatestDeploymentConfigQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => modelsGetLatestDeploymentConfig(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ModelsGetLatestDeploymentConfigSuspenseQueryResult = NonNullable< - Awaited> ->; -export type ModelsGetLatestDeploymentConfigSuspenseQueryError = ErrorType; - -export function useModelsGetLatestDeploymentConfigSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useModelsGetLatestDeploymentConfigSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useModelsGetLatestDeploymentConfigSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Latest ModelDeploymentConfig Version - */ - -export function useModelsGetLatestDeploymentConfigSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getModelsGetLatestDeploymentConfigSuspenseQueryOptions( - workspace, - name, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Update a ModelDeploymentConfig (creates a new immutable version). - * @summary Update ModelDeploymentConfig - */ -export const modelsUpdateDeploymentConfig = ( - workspace: string, - name: string, - updateModelDeploymentConfigRequest: UpdateModelDeploymentConfigRequest, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/deployment-configs/${encodeURIComponent(String(name))}`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: updateModelDeploymentConfigRequest, - signal, - }); -}; - -export const getModelsUpdateDeploymentConfigMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: UpdateModelDeploymentConfigRequest }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: UpdateModelDeploymentConfigRequest }, - TContext -> => { - const mutationKey = ['modelsUpdateDeploymentConfig']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string; data: UpdateModelDeploymentConfigRequest } - > = (props) => { - const { workspace, name, data } = props ?? {}; - - return modelsUpdateDeploymentConfig(workspace, name, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type ModelsUpdateDeploymentConfigMutationResult = NonNullable< - Awaited> ->; -export type ModelsUpdateDeploymentConfigMutationBody = UpdateModelDeploymentConfigRequest; -export type ModelsUpdateDeploymentConfigMutationError = ErrorType; - -/** - * @summary Update ModelDeploymentConfig - */ -export const useModelsUpdateDeploymentConfig = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: UpdateModelDeploymentConfigRequest }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string; data: UpdateModelDeploymentConfigRequest }, - TContext -> => { - return useMutation(getModelsUpdateDeploymentConfigMutationOptions(options), queryClient); -}; - -/** - * Delete all versions of a ModelDeploymentConfig. - -This operation will fail with 409 Conflict if any ModelDeployments currently -reference this config and are not in DELETED status. Delete or wait for -dependent deployments to reach DELETED status before deleting the config. - * @summary Delete All ModelDeploymentConfig Versions - */ -export const modelsDeleteAllDeploymentConfigVersions = ( - workspace: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/deployment-configs/${encodeURIComponent(String(name))}`, - method: 'DELETE', - signal, - }); -}; - -export const getModelsDeleteAllDeploymentConfigVersionsMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - const mutationKey = ['modelsDeleteAllDeploymentConfigVersions']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string } - > = (props) => { - const { workspace, name } = props ?? {}; - - return modelsDeleteAllDeploymentConfigVersions(workspace, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type ModelsDeleteAllDeploymentConfigVersionsMutationResult = NonNullable< - Awaited> ->; - -export type ModelsDeleteAllDeploymentConfigVersionsMutationError = - ErrorType; - -/** - * @summary Delete All ModelDeploymentConfig Versions - */ -export const useModelsDeleteAllDeploymentConfigVersions = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - return useMutation( - getModelsDeleteAllDeploymentConfigVersionsMutationOptions(options), - queryClient - ); -}; - -/** - * List all versions of a ModelDeploymentConfig. - * @summary List ModelDeploymentConfig Versions - */ -export const modelsListDeploymentConfigVersions = ( - workspace: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/deployment-configs/${encodeURIComponent(String(name))}/versions`, - method: 'GET', - signal, - }); -}; - -export const getModelsListDeploymentConfigVersionsQueryKey = (workspace: string, name: string) => { - return [`/apis/models/v2/workspaces/${workspace}/deployment-configs/${name}/versions`] as const; -}; - -export const getModelsListDeploymentConfigVersionsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getModelsListDeploymentConfigVersionsQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => modelsListDeploymentConfigVersions(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ModelsListDeploymentConfigVersionsQueryResult = NonNullable< - Awaited> ->; -export type ModelsListDeploymentConfigVersionsQueryError = ErrorType; - -export function useModelsListDeploymentConfigVersions< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useModelsListDeploymentConfigVersions< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useModelsListDeploymentConfigVersions< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List ModelDeploymentConfig Versions - */ - -export function useModelsListDeploymentConfigVersions< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getModelsListDeploymentConfigVersionsQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getModelsListDeploymentConfigVersionsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getModelsListDeploymentConfigVersionsQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => modelsListDeploymentConfigVersions(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ModelsListDeploymentConfigVersionsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type ModelsListDeploymentConfigVersionsSuspenseQueryError = ErrorType; - -export function useModelsListDeploymentConfigVersionsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useModelsListDeploymentConfigVersionsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useModelsListDeploymentConfigVersionsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List ModelDeploymentConfig Versions - */ - -export function useModelsListDeploymentConfigVersionsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getModelsListDeploymentConfigVersionsSuspenseQueryOptions( - workspace, - name, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * List ModelDeployments for a specific workspace. - -By default, returns only the latest version of each deployment. - * @summary List ModelDeployments - */ -export const modelsListDeployments = ( - workspace: string, - params?: ModelsListDeploymentsParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/deployments`, - method: 'GET', - params, - signal, - }); -}; - -export const getModelsListDeploymentsQueryKey = ( - workspace: string, - params?: ModelsListDeploymentsParams -) => { - return [ - `/apis/models/v2/workspaces/${workspace}/deployments`, - ...(params ? [params] : []), - ] as const; -}; - -export const getModelsListDeploymentsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListDeploymentsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getModelsListDeploymentsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - modelsListDeployments(workspace, params, signal); - - return { queryKey, queryFn, enabled: !!workspace, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ModelsListDeploymentsQueryResult = NonNullable< - Awaited> ->; -export type ModelsListDeploymentsQueryError = ErrorType; - -export function useModelsListDeployments< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | ModelsListDeploymentsParams, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useModelsListDeployments< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListDeploymentsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useModelsListDeployments< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListDeploymentsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List ModelDeployments - */ - -export function useModelsListDeployments< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListDeploymentsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getModelsListDeploymentsQueryOptions(workspace, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getModelsListDeploymentsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListDeploymentsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getModelsListDeploymentsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - modelsListDeployments(workspace, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ModelsListDeploymentsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type ModelsListDeploymentsSuspenseQueryError = ErrorType; - -export function useModelsListDeploymentsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | ModelsListDeploymentsParams, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useModelsListDeploymentsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListDeploymentsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useModelsListDeploymentsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListDeploymentsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List ModelDeployments - */ - -export function useModelsListDeploymentsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListDeploymentsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getModelsListDeploymentsSuspenseQueryOptions(workspace, params, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Create a new ModelDeployment (version 1). - * @summary Create ModelDeployment - */ -export const modelsCreateDeployment = ( - workspace: string, - createModelDeploymentRequest: CreateModelDeploymentRequest, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/deployments`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: createModelDeploymentRequest, - signal, - }); -}; - -export const getModelsCreateDeploymentMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: CreateModelDeploymentRequest }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: CreateModelDeploymentRequest }, - TContext -> => { - const mutationKey = ['modelsCreateDeployment']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; data: CreateModelDeploymentRequest } - > = (props) => { - const { workspace, data } = props ?? {}; - - return modelsCreateDeployment(workspace, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type ModelsCreateDeploymentMutationResult = NonNullable< - Awaited> ->; -export type ModelsCreateDeploymentMutationBody = CreateModelDeploymentRequest; -export type ModelsCreateDeploymentMutationError = ErrorType; - -/** - * @summary Create ModelDeployment - */ -export const useModelsCreateDeployment = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: CreateModelDeploymentRequest }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; data: CreateModelDeploymentRequest }, - TContext -> => { - return useMutation(getModelsCreateDeploymentMutationOptions(options), queryClient); -}; - -/** - * Get a specific version of a ModelDeployment. - * @summary Get Specific ModelDeployment Version - */ -export const modelsGetDeploymentVersion = ( - workspace: string, - deployment: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/deployments/${encodeURIComponent(String(deployment))}/versions/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getModelsGetDeploymentVersionQueryKey = ( - workspace: string, - deployment: string, - name: string -) => { - return [ - `/apis/models/v2/workspaces/${workspace}/deployments/${deployment}/versions/${name}`, - ] as const; -}; - -export const getModelsGetDeploymentVersionQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - deployment: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getModelsGetDeploymentVersionQueryKey(workspace, deployment, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => modelsGetDeploymentVersion(workspace, deployment, name, signal); - - return { - queryKey, - queryFn, - enabled: !!(workspace && deployment && name), - ...queryOptions, - } as UseQueryOptions>, TError, TData> & { - queryKey: DataTag; - }; -}; - -export type ModelsGetDeploymentVersionQueryResult = NonNullable< - Awaited> ->; -export type ModelsGetDeploymentVersionQueryError = ErrorType; - -export function useModelsGetDeploymentVersion< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - deployment: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useModelsGetDeploymentVersion< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - deployment: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useModelsGetDeploymentVersion< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - deployment: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Specific ModelDeployment Version - */ - -export function useModelsGetDeploymentVersion< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - deployment: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getModelsGetDeploymentVersionQueryOptions( - workspace, - deployment, - name, - options - ); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getModelsGetDeploymentVersionSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - deployment: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getModelsGetDeploymentVersionQueryKey(workspace, deployment, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => modelsGetDeploymentVersion(workspace, deployment, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ModelsGetDeploymentVersionSuspenseQueryResult = NonNullable< - Awaited> ->; -export type ModelsGetDeploymentVersionSuspenseQueryError = ErrorType; - -export function useModelsGetDeploymentVersionSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - deployment: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useModelsGetDeploymentVersionSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - deployment: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useModelsGetDeploymentVersionSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - deployment: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Specific ModelDeployment Version - */ - -export function useModelsGetDeploymentVersionSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - deployment: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getModelsGetDeploymentVersionSuspenseQueryOptions( - workspace, - deployment, - name, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Delete a specific version of a ModelDeployment. - -If the deployment is in any state other than DELETED, this will set its status to DELETING. -The models controller will then: -1. Delete the infrastructure (e.g., K8s NimService) -2. Update the status to DELETED - -If the deployment is already in DELETED status, calling delete again will permanently -remove it from the database. - -Returns: -- 202 Accepted: Deployment version marked for deletion (status set to DELETING) -- 204 No Content: Deployment version permanently removed from database (was already DELETED) -- 404 Not Found: Deployment version doesn't exist - * @summary Delete Specific ModelDeployment Version - */ -export const modelsDeleteDeploymentVersion = ( - workspace: string, - deployment: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/deployments/${encodeURIComponent(String(deployment))}/versions/${encodeURIComponent(String(name))}`, - method: 'DELETE', - signal, - }); -}; - -export const getModelsDeleteDeploymentVersionMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; deployment: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; deployment: string; name: string }, - TContext -> => { - const mutationKey = ['modelsDeleteDeploymentVersion']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; deployment: string; name: string } - > = (props) => { - const { workspace, deployment, name } = props ?? {}; - - return modelsDeleteDeploymentVersion(workspace, deployment, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type ModelsDeleteDeploymentVersionMutationResult = NonNullable< - Awaited> ->; - -export type ModelsDeleteDeploymentVersionMutationError = ErrorType; - -/** - * @summary Delete Specific ModelDeployment Version - */ -export const useModelsDeleteDeploymentVersion = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; deployment: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; deployment: string; name: string }, - TContext -> => { - return useMutation(getModelsDeleteDeploymentVersionMutationOptions(options), queryClient); -}; - -/** - * Get the latest version of a ModelDeployment. - * @summary Get Latest ModelDeployment - */ -export const modelsGetLatestDeployment = ( - workspace: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/deployments/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getModelsGetLatestDeploymentQueryKey = (workspace: string, name: string) => { - return [`/apis/models/v2/workspaces/${workspace}/deployments/${name}`] as const; -}; - -export const getModelsGetLatestDeploymentQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getModelsGetLatestDeploymentQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => modelsGetLatestDeployment(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ModelsGetLatestDeploymentQueryResult = NonNullable< - Awaited> ->; -export type ModelsGetLatestDeploymentQueryError = ErrorType; - -export function useModelsGetLatestDeployment< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useModelsGetLatestDeployment< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useModelsGetLatestDeployment< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Latest ModelDeployment - */ - -export function useModelsGetLatestDeployment< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getModelsGetLatestDeploymentQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getModelsGetLatestDeploymentSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getModelsGetLatestDeploymentQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => modelsGetLatestDeployment(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ModelsGetLatestDeploymentSuspenseQueryResult = NonNullable< - Awaited> ->; -export type ModelsGetLatestDeploymentSuspenseQueryError = ErrorType; - -export function useModelsGetLatestDeploymentSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useModelsGetLatestDeploymentSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useModelsGetLatestDeploymentSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Latest ModelDeployment - */ - -export function useModelsGetLatestDeploymentSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getModelsGetLatestDeploymentSuspenseQueryOptions(workspace, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Update a ModelDeployment (creates a new immutable version). - * @summary Update ModelDeployment - */ -export const modelsUpdateDeployment = ( - workspace: string, - name: string, - updateModelDeploymentRequest: UpdateModelDeploymentRequest, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/deployments/${encodeURIComponent(String(name))}`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: updateModelDeploymentRequest, - signal, - }); -}; - -export const getModelsUpdateDeploymentMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: UpdateModelDeploymentRequest }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: UpdateModelDeploymentRequest }, - TContext -> => { - const mutationKey = ['modelsUpdateDeployment']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string; data: UpdateModelDeploymentRequest } - > = (props) => { - const { workspace, name, data } = props ?? {}; - - return modelsUpdateDeployment(workspace, name, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type ModelsUpdateDeploymentMutationResult = NonNullable< - Awaited> ->; -export type ModelsUpdateDeploymentMutationBody = UpdateModelDeploymentRequest; -export type ModelsUpdateDeploymentMutationError = ErrorType; - -/** - * @summary Update ModelDeployment - */ -export const useModelsUpdateDeployment = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: UpdateModelDeploymentRequest }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string; data: UpdateModelDeploymentRequest }, - TContext -> => { - return useMutation(getModelsUpdateDeploymentMutationOptions(options), queryClient); -}; - -/** - * Delete all versions of a ModelDeployment. - -If the deployment is in any state other than DELETED, this will set its status to DELETING. -The models controller will then: -1. Delete the infrastructure (e.g., K8s NimService) -2. Update the status to DELETED - -If the deployment is already in DELETED status, calling delete again will permanently -remove it from the database. - -Returns: -- 202 Accepted: Deployment marked for deletion (status set to DELETING) -- 204 No Content: Deployment permanently removed from database (was already DELETED) -- 404 Not Found: Deployment doesn't exist - * @summary Delete All ModelDeployment Versions - */ -export const modelsDeleteAllDeploymentVersions = ( - workspace: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/deployments/${encodeURIComponent(String(name))}`, - method: 'DELETE', - signal, - }); -}; - -export const getModelsDeleteAllDeploymentVersionsMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - const mutationKey = ['modelsDeleteAllDeploymentVersions']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string } - > = (props) => { - const { workspace, name } = props ?? {}; - - return modelsDeleteAllDeploymentVersions(workspace, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type ModelsDeleteAllDeploymentVersionsMutationResult = NonNullable< - Awaited> ->; - -export type ModelsDeleteAllDeploymentVersionsMutationError = ErrorType; - -/** - * @summary Delete All ModelDeployment Versions - */ -export const useModelsDeleteAllDeploymentVersions = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - return useMutation(getModelsDeleteAllDeploymentVersionsMutationOptions(options), queryClient); -}; - -/** - * Get Latest ModelDeployment's Model Entities from Entity Store. -This provides the API contract that NIMs expect from Entity Store today, for pulling LoRAs, -but enables us to enforce AuthZ boundaries. - -TODO: Implement model entity retrieval based on deployment config. - * @summary Get Latest ModelDeployment's Model Entities - */ -export const modelsGetDeploymentModels = ( - workspace: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/deployments/${encodeURIComponent(String(name))}/models`, - method: 'GET', - signal, - }); -}; - -export const getModelsGetDeploymentModelsQueryKey = (workspace: string, name: string) => { - return [`/apis/models/v2/workspaces/${workspace}/deployments/${name}/models`] as const; -}; - -export const getModelsGetDeploymentModelsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getModelsGetDeploymentModelsQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => modelsGetDeploymentModels(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ModelsGetDeploymentModelsQueryResult = NonNullable< - Awaited> ->; -export type ModelsGetDeploymentModelsQueryError = ErrorType; - -export function useModelsGetDeploymentModels< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useModelsGetDeploymentModels< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useModelsGetDeploymentModels< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Latest ModelDeployment's Model Entities - */ - -export function useModelsGetDeploymentModels< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getModelsGetDeploymentModelsQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getModelsGetDeploymentModelsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getModelsGetDeploymentModelsQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => modelsGetDeploymentModels(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ModelsGetDeploymentModelsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type ModelsGetDeploymentModelsSuspenseQueryError = ErrorType; - -export function useModelsGetDeploymentModelsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useModelsGetDeploymentModelsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useModelsGetDeploymentModelsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Latest ModelDeployment's Model Entities - */ - -export function useModelsGetDeploymentModelsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getModelsGetDeploymentModelsSuspenseQueryOptions(workspace, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Update the status of a ModelDeployment (mutable operation). -If version is not specified, updates the latest version. - * @summary Update ModelDeployment Status - */ -export const modelsUpdateDeploymentStatus = ( - workspace: string, - name: string, - updateModelDeploymentStatusRequest: UpdateModelDeploymentStatusRequest, - params?: ModelsUpdateDeploymentStatusParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/deployments/${encodeURIComponent(String(name))}/status`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: updateModelDeploymentStatusRequest, - params, - signal, - }); -}; - -export const getModelsUpdateDeploymentStatusMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { - workspace: string; - name: string; - data: UpdateModelDeploymentStatusRequest; - params?: ModelsUpdateDeploymentStatusParams; - }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { - workspace: string; - name: string; - data: UpdateModelDeploymentStatusRequest; - params?: ModelsUpdateDeploymentStatusParams; - }, - TContext -> => { - const mutationKey = ['modelsUpdateDeploymentStatus']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { - workspace: string; - name: string; - data: UpdateModelDeploymentStatusRequest; - params?: ModelsUpdateDeploymentStatusParams; - } - > = (props) => { - const { workspace, name, data, params } = props ?? {}; - - return modelsUpdateDeploymentStatus(workspace, name, data, params); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type ModelsUpdateDeploymentStatusMutationResult = NonNullable< - Awaited> ->; -export type ModelsUpdateDeploymentStatusMutationBody = UpdateModelDeploymentStatusRequest; -export type ModelsUpdateDeploymentStatusMutationError = ErrorType; - -/** - * @summary Update ModelDeployment Status - */ -export const useModelsUpdateDeploymentStatus = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { - workspace: string; - name: string; - data: UpdateModelDeploymentStatusRequest; - params?: ModelsUpdateDeploymentStatusParams; - }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { - workspace: string; - name: string; - data: UpdateModelDeploymentStatusRequest; - params?: ModelsUpdateDeploymentStatusParams; - }, - TContext -> => { - return useMutation(getModelsUpdateDeploymentStatusMutationOptions(options), queryClient); -}; - -/** - * List all versions of a ModelDeployment. - * @summary List ModelDeployment Versions - */ -export const modelsListDeploymentVersions = ( - workspace: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/deployments/${encodeURIComponent(String(name))}/versions`, - method: 'GET', - signal, - }); -}; - -export const getModelsListDeploymentVersionsQueryKey = (workspace: string, name: string) => { - return [`/apis/models/v2/workspaces/${workspace}/deployments/${name}/versions`] as const; -}; - -export const getModelsListDeploymentVersionsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getModelsListDeploymentVersionsQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => modelsListDeploymentVersions(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ModelsListDeploymentVersionsQueryResult = NonNullable< - Awaited> ->; -export type ModelsListDeploymentVersionsQueryError = ErrorType; - -export function useModelsListDeploymentVersions< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useModelsListDeploymentVersions< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useModelsListDeploymentVersions< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List ModelDeployment Versions - */ - -export function useModelsListDeploymentVersions< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getModelsListDeploymentVersionsQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getModelsListDeploymentVersionsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getModelsListDeploymentVersionsQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => modelsListDeploymentVersions(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ModelsListDeploymentVersionsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type ModelsListDeploymentVersionsSuspenseQueryError = ErrorType; - -export function useModelsListDeploymentVersionsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useModelsListDeploymentVersionsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useModelsListDeploymentVersionsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List ModelDeployment Versions - */ - -export function useModelsListDeploymentVersionsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getModelsListDeploymentVersionsSuspenseQueryOptions( - workspace, - name, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Create a new model entity. - -This endpoint creates a new Model Entity in the Models service database. -The Model Entity will be registered for use within the platform. - * @summary Create Model - */ -export const modelsCreateModel = ( - workspace: string, - createModelEntityRequest: CreateModelEntityRequest, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/models`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: createModelEntityRequest, - signal, - }); -}; - -export const getModelsCreateModelMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: CreateModelEntityRequest }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: CreateModelEntityRequest }, - TContext -> => { - const mutationKey = ['modelsCreateModel']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; data: CreateModelEntityRequest } - > = (props) => { - const { workspace, data } = props ?? {}; - - return modelsCreateModel(workspace, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type ModelsCreateModelMutationResult = NonNullable< - Awaited> ->; -export type ModelsCreateModelMutationBody = CreateModelEntityRequest; -export type ModelsCreateModelMutationError = ErrorType; - -/** - * @summary Create Model - */ -export const useModelsCreateModel = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: CreateModelEntityRequest }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; data: CreateModelEntityRequest }, - TContext -> => { - return useMutation(getModelsCreateModelMutationOptions(options), queryClient); -}; - -/** - * List Models endpoint with filtering, pagination, and sorting. - -Supports filter parameters for various criteria (including peft, custom fields), -pagination (page, page_size), sorting, and workspace filtering via query parameter. - * @summary List Models - */ -export const modelsListModels = ( - workspace: string, - params?: ModelsListModelsParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/models`, - method: 'GET', - params, - signal, - }); -}; - -export const getModelsListModelsQueryKey = (workspace: string, params?: ModelsListModelsParams) => { - return [`/apis/models/v2/workspaces/${workspace}/models`, ...(params ? [params] : [])] as const; -}; - -export const getModelsListModelsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListModelsParams, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getModelsListModelsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - modelsListModels(workspace, params, signal); - - return { queryKey, queryFn, enabled: !!workspace, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ModelsListModelsQueryResult = NonNullable>>; -export type ModelsListModelsQueryError = ErrorType; - -export function useModelsListModels< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | ModelsListModelsParams, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useModelsListModels< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListModelsParams, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useModelsListModels< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListModelsParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List Models - */ - -export function useModelsListModels< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListModelsParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getModelsListModelsQueryOptions(workspace, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getModelsListModelsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListModelsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getModelsListModelsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - modelsListModels(workspace, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ModelsListModelsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type ModelsListModelsSuspenseQueryError = ErrorType; - -export function useModelsListModelsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | ModelsListModelsParams, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useModelsListModelsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListModelsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useModelsListModelsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListModelsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List Models - */ - -export function useModelsListModelsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListModelsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getModelsListModelsSuspenseQueryOptions(workspace, params, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Adds an Adapter to the Model - * @summary Add Model Adapter - */ -export const modelsCreateModelAdapter = ( - workspace: string, - modelName: string, - createModelAdapterRequest: CreateModelAdapterRequest, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/models/${encodeURIComponent(String(modelName))}/adapters`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: createModelAdapterRequest, - signal, - }); -}; - -export const getModelsCreateModelAdapterMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; modelName: string; data: CreateModelAdapterRequest }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; modelName: string; data: CreateModelAdapterRequest }, - TContext -> => { - const mutationKey = ['modelsCreateModelAdapter']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; modelName: string; data: CreateModelAdapterRequest } - > = (props) => { - const { workspace, modelName, data } = props ?? {}; - - return modelsCreateModelAdapter(workspace, modelName, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type ModelsCreateModelAdapterMutationResult = NonNullable< - Awaited> ->; -export type ModelsCreateModelAdapterMutationBody = CreateModelAdapterRequest; -export type ModelsCreateModelAdapterMutationError = ErrorType; - -/** - * @summary Add Model Adapter - */ -export const useModelsCreateModelAdapter = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; modelName: string; data: CreateModelAdapterRequest }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; modelName: string; data: CreateModelAdapterRequest }, - TContext -> => { - return useMutation(getModelsCreateModelAdapterMutationOptions(options), queryClient); -}; - -/** - * Delete Adapter from Model entity. - -Permanently deletes an adapter from a model entity, if it was deployed, it will be cleaned up automatically. - * @summary Delete Model Adapter - */ -export const modelsDeleteModelAdapter = ( - workspace: string, - modelName: string, - adapter: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/models/${encodeURIComponent(String(modelName))}/adapters/${encodeURIComponent(String(adapter))}`, - method: 'DELETE', - signal, - }); -}; - -export const getModelsDeleteModelAdapterMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; modelName: string; adapter: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; modelName: string; adapter: string }, - TContext -> => { - const mutationKey = ['modelsDeleteModelAdapter']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; modelName: string; adapter: string } - > = (props) => { - const { workspace, modelName, adapter } = props ?? {}; - - return modelsDeleteModelAdapter(workspace, modelName, adapter); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type ModelsDeleteModelAdapterMutationResult = NonNullable< - Awaited> ->; - -export type ModelsDeleteModelAdapterMutationError = ErrorType; - -/** - * @summary Delete Model Adapter - */ -export const useModelsDeleteModelAdapter = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; modelName: string; adapter: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; modelName: string; adapter: string }, - TContext -> => { - return useMutation(getModelsDeleteModelAdapterMutationOptions(options), queryClient); -}; - -/** - * Update Adapter deployment or description. - * @summary Update Adapter - */ -export const modelsUpdateModelAdapter = ( - workspace: string, - modelName: string, - adapter: string, - updateAdapterRequest: UpdateAdapterRequest, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/models/${encodeURIComponent(String(modelName))}/adapters/${encodeURIComponent(String(adapter))}`, - method: 'PATCH', - headers: { 'Content-Type': 'application/json' }, - data: updateAdapterRequest, - signal, - }); -}; - -export const getModelsUpdateModelAdapterMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; modelName: string; adapter: string; data: UpdateAdapterRequest }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; modelName: string; adapter: string; data: UpdateAdapterRequest }, - TContext -> => { - const mutationKey = ['modelsUpdateModelAdapter']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; modelName: string; adapter: string; data: UpdateAdapterRequest } - > = (props) => { - const { workspace, modelName, adapter, data } = props ?? {}; - - return modelsUpdateModelAdapter(workspace, modelName, adapter, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type ModelsUpdateModelAdapterMutationResult = NonNullable< - Awaited> ->; -export type ModelsUpdateModelAdapterMutationBody = UpdateAdapterRequest; -export type ModelsUpdateModelAdapterMutationError = ErrorType; - -/** - * @summary Update Adapter - */ -export const useModelsUpdateModelAdapter = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; modelName: string; adapter: string; data: UpdateAdapterRequest }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; modelName: string; adapter: string; data: UpdateAdapterRequest }, - TContext -> => { - return useMutation(getModelsUpdateModelAdapterMutationOptions(options), queryClient); -}; - -/** - * Get Model by Workspace and Name. - -Returns the details of a specific model entity identified by its workspace and name. - * @summary Get Model by Workspace and Name - */ -export const modelsGetModel = ( - workspace: string, - name: string, - params?: ModelsGetModelParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/models/${encodeURIComponent(String(name))}`, - method: 'GET', - params, - signal, - }); -}; - -export const getModelsGetModelQueryKey = ( - workspace: string, - name: string, - params?: ModelsGetModelParams -) => { - return [ - `/apis/models/v2/workspaces/${workspace}/models/${name}`, - ...(params ? [params] : []), - ] as const; -}; - -export const getModelsGetModelQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: ModelsGetModelParams, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getModelsGetModelQueryKey(workspace, name, params); - - const queryFn: QueryFunction>> = ({ signal }) => - modelsGetModel(workspace, name, params, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ModelsGetModelQueryResult = NonNullable>>; -export type ModelsGetModelQueryError = ErrorType; - -export function useModelsGetModel< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params: undefined | ModelsGetModelParams, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useModelsGetModel< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: ModelsGetModelParams, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useModelsGetModel< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: ModelsGetModelParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Model by Workspace and Name - */ - -export function useModelsGetModel< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: ModelsGetModelParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getModelsGetModelQueryOptions(workspace, name, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getModelsGetModelSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: ModelsGetModelParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getModelsGetModelQueryKey(workspace, name, params); - - const queryFn: QueryFunction>> = ({ signal }) => - modelsGetModel(workspace, name, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ModelsGetModelSuspenseQueryResult = NonNullable< - Awaited> ->; -export type ModelsGetModelSuspenseQueryError = ErrorType; - -export function useModelsGetModelSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params: undefined | ModelsGetModelParams, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useModelsGetModelSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: ModelsGetModelParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useModelsGetModelSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: ModelsGetModelParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Model by Workspace and Name - */ - -export function useModelsGetModelSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: ModelsGetModelParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getModelsGetModelSuspenseQueryOptions(workspace, name, params, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Update Model metadata. - -Updates the metadata of an existing model entity. If the request body has an empty field, -the old value is kept. - * @summary Update Model - */ -export const modelsUpdateModel = ( - workspace: string, - name: string, - updateModelEntityRequest: UpdateModelEntityRequest, - params?: ModelsUpdateModelParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/models/${encodeURIComponent(String(name))}`, - method: 'PATCH', - headers: { 'Content-Type': 'application/json' }, - data: updateModelEntityRequest, - params, - signal, - }); -}; - -export const getModelsUpdateModelMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { - workspace: string; - name: string; - data: UpdateModelEntityRequest; - params?: ModelsUpdateModelParams; - }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { - workspace: string; - name: string; - data: UpdateModelEntityRequest; - params?: ModelsUpdateModelParams; - }, - TContext -> => { - const mutationKey = ['modelsUpdateModel']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { - workspace: string; - name: string; - data: UpdateModelEntityRequest; - params?: ModelsUpdateModelParams; - } - > = (props) => { - const { workspace, name, data, params } = props ?? {}; - - return modelsUpdateModel(workspace, name, data, params); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type ModelsUpdateModelMutationResult = NonNullable< - Awaited> ->; -export type ModelsUpdateModelMutationBody = UpdateModelEntityRequest; -export type ModelsUpdateModelMutationError = ErrorType; - -/** - * @summary Update Model - */ -export const useModelsUpdateModel = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { - workspace: string; - name: string; - data: UpdateModelEntityRequest; - params?: ModelsUpdateModelParams; - }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { - workspace: string; - name: string; - data: UpdateModelEntityRequest; - params?: ModelsUpdateModelParams; - }, - TContext -> => { - return useMutation(getModelsUpdateModelMutationOptions(options), queryClient); -}; - -/** - * Delete Model entity. - -Permanently deletes a model entity from the platform. - * @summary Delete Model - */ -export const modelsDeleteModel = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/models/${encodeURIComponent(String(name))}`, - method: 'DELETE', - signal, - }); -}; - -export const getModelsDeleteModelMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - const mutationKey = ['modelsDeleteModel']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string } - > = (props) => { - const { workspace, name } = props ?? {}; - - return modelsDeleteModel(workspace, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type ModelsDeleteModelMutationResult = NonNullable< - Awaited> ->; - -export type ModelsDeleteModelMutationError = ErrorType; - -/** - * @summary Delete Model - */ -export const useModelsDeleteModel = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - return useMutation(getModelsDeleteModelMutationOptions(options), queryClient); -}; - -/** - * List model providers for a specific workspace. - * @summary List ModelProviders By Workspace - */ -export const modelsListProviders = ( - workspace: string, - params?: ModelsListProvidersParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/providers`, - method: 'GET', - params, - signal, - }); -}; - -export const getModelsListProvidersQueryKey = ( - workspace: string, - params?: ModelsListProvidersParams -) => { - return [ - `/apis/models/v2/workspaces/${workspace}/providers`, - ...(params ? [params] : []), - ] as const; -}; - -export const getModelsListProvidersQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListProvidersParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getModelsListProvidersQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - modelsListProviders(workspace, params, signal); - - return { queryKey, queryFn, enabled: !!workspace, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ModelsListProvidersQueryResult = NonNullable< - Awaited> ->; -export type ModelsListProvidersQueryError = ErrorType; - -export function useModelsListProviders< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | ModelsListProvidersParams, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useModelsListProviders< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListProvidersParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useModelsListProviders< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListProvidersParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List ModelProviders By Workspace - */ - -export function useModelsListProviders< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListProvidersParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getModelsListProvidersQueryOptions(workspace, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getModelsListProvidersSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListProvidersParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getModelsListProvidersQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - modelsListProviders(workspace, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ModelsListProvidersSuspenseQueryResult = NonNullable< - Awaited> ->; -export type ModelsListProvidersSuspenseQueryError = ErrorType; - -export function useModelsListProvidersSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | ModelsListProvidersParams, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useModelsListProvidersSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListProvidersParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useModelsListProvidersSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListProvidersParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List ModelProviders By Workspace - */ - -export function useModelsListProvidersSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: ModelsListProvidersParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getModelsListProvidersSuspenseQueryOptions(workspace, params, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Create a new model provider. - * @summary Create ModelProvider - */ -export const modelsCreateProvider = ( - workspace: string, - createModelProviderRequest: CreateModelProviderRequest, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/providers`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: createModelProviderRequest, - signal, - }); -}; - -export const getModelsCreateProviderMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: CreateModelProviderRequest }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: CreateModelProviderRequest }, - TContext -> => { - const mutationKey = ['modelsCreateProvider']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; data: CreateModelProviderRequest } - > = (props) => { - const { workspace, data } = props ?? {}; - - return modelsCreateProvider(workspace, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type ModelsCreateProviderMutationResult = NonNullable< - Awaited> ->; -export type ModelsCreateProviderMutationBody = CreateModelProviderRequest; -export type ModelsCreateProviderMutationError = ErrorType; - -/** - * @summary Create ModelProvider - */ -export const useModelsCreateProvider = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: CreateModelProviderRequest }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; data: CreateModelProviderRequest }, - TContext -> => { - return useMutation(getModelsCreateProviderMutationOptions(options), queryClient); -}; - -/** - * Create or update a model provider. - * @summary Upsert ModelProvider - */ -export const modelsUpsertProvider = ( - workspace: string, - name: string, - upsertModelProviderRequest: UpsertModelProviderRequest, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/providers/${encodeURIComponent(String(name))}`, - method: 'PUT', - headers: { 'Content-Type': 'application/json' }, - data: upsertModelProviderRequest, - signal, - }); -}; - -export const getModelsUpsertProviderMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: UpsertModelProviderRequest }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: UpsertModelProviderRequest }, - TContext -> => { - const mutationKey = ['modelsUpsertProvider']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string; data: UpsertModelProviderRequest } - > = (props) => { - const { workspace, name, data } = props ?? {}; - - return modelsUpsertProvider(workspace, name, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type ModelsUpsertProviderMutationResult = NonNullable< - Awaited> ->; -export type ModelsUpsertProviderMutationBody = UpsertModelProviderRequest; -export type ModelsUpsertProviderMutationError = ErrorType; - -/** - * @summary Upsert ModelProvider - */ -export const useModelsUpsertProvider = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: UpsertModelProviderRequest }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string; data: UpsertModelProviderRequest }, - TContext -> => { - return useMutation(getModelsUpsertProviderMutationOptions(options), queryClient); -}; - -/** - * Get a model provider by workspace and name. - * @summary Get ModelProvider - */ -export const modelsGetProvider = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/providers/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getModelsGetProviderQueryKey = (workspace: string, name: string) => { - return [`/apis/models/v2/workspaces/${workspace}/providers/${name}`] as const; -}; - -export const getModelsGetProviderQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getModelsGetProviderQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - modelsGetProvider(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ModelsGetProviderQueryResult = NonNullable< - Awaited> ->; -export type ModelsGetProviderQueryError = ErrorType; - -export function useModelsGetProvider< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useModelsGetProvider< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useModelsGetProvider< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get ModelProvider - */ - -export function useModelsGetProvider< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getModelsGetProviderQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getModelsGetProviderSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getModelsGetProviderQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - modelsGetProvider(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type ModelsGetProviderSuspenseQueryResult = NonNullable< - Awaited> ->; -export type ModelsGetProviderSuspenseQueryError = ErrorType; - -export function useModelsGetProviderSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useModelsGetProviderSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useModelsGetProviderSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get ModelProvider - */ - -export function useModelsGetProviderSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getModelsGetProviderSuspenseQueryOptions(workspace, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Delete a model provider by workspace and name. - * @summary Delete ModelProvider - */ -export const modelsDeleteProvider = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/providers/${encodeURIComponent(String(name))}`, - method: 'DELETE', - signal, - }); -}; - -export const getModelsDeleteProviderMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - const mutationKey = ['modelsDeleteProvider']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string } - > = (props) => { - const { workspace, name } = props ?? {}; - - return modelsDeleteProvider(workspace, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type ModelsDeleteProviderMutationResult = NonNullable< - Awaited> ->; - -export type ModelsDeleteProviderMutationError = ErrorType; - -/** - * @summary Delete ModelProvider - */ -export const useModelsDeleteProvider = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - return useMutation(getModelsDeleteProviderMutationOptions(options), queryClient); -}; - -/** - * Update status-related fields of a model provider. - -This endpoint supports partial updates for fields managed by Models Controller: -- model_deployment_id -- served_models -- status -- status_message - -If status is provided without status_message, status_message will be set to empty string. - * @summary Update ModelProvider Status Fields - */ -export const modelsUpdateProviderStatus = ( - workspace: string, - name: string, - updateModelProviderStatusRequest: UpdateModelProviderStatusRequest, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/models/v2/workspaces/${encodeURIComponent(String(workspace))}/providers/${encodeURIComponent(String(name))}/status`, - method: 'PUT', - headers: { 'Content-Type': 'application/json' }, - data: updateModelProviderStatusRequest, - signal, - }); -}; - -export const getModelsUpdateProviderStatusMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: UpdateModelProviderStatusRequest }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: UpdateModelProviderStatusRequest }, - TContext -> => { - const mutationKey = ['modelsUpdateProviderStatus']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string; data: UpdateModelProviderStatusRequest } - > = (props) => { - const { workspace, name, data } = props ?? {}; - - return modelsUpdateProviderStatus(workspace, name, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type ModelsUpdateProviderStatusMutationResult = NonNullable< - Awaited> ->; -export type ModelsUpdateProviderStatusMutationBody = UpdateModelProviderStatusRequest; -export type ModelsUpdateProviderStatusMutationError = ErrorType; - -/** - * @summary Update ModelProvider Status Fields - */ -export const useModelsUpdateProviderStatus = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: UpdateModelProviderStatusRequest }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string; data: UpdateModelProviderStatusRequest }, - TContext -> => { - return useMutation(getModelsUpdateProviderStatusMutationOptions(options), queryClient); -}; - -/** - * @summary Create Job - */ -export const safeSynthesizerCreateJob = ( - workspace: string, - safeSynthesizerJobRequest: SafeSynthesizerJobRequest, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/safe-synthesizer/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: safeSynthesizerJobRequest, - signal, - }); -}; - -export const getSafeSynthesizerCreateJobMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: SafeSynthesizerJobRequest }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: SafeSynthesizerJobRequest }, - TContext -> => { - const mutationKey = ['safeSynthesizerCreateJob']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; data: SafeSynthesizerJobRequest } - > = (props) => { - const { workspace, data } = props ?? {}; - - return safeSynthesizerCreateJob(workspace, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type SafeSynthesizerCreateJobMutationResult = NonNullable< - Awaited> ->; -export type SafeSynthesizerCreateJobMutationBody = SafeSynthesizerJobRequest; -export type SafeSynthesizerCreateJobMutationError = ErrorType; - -/** - * @summary Create Job - */ -export const useSafeSynthesizerCreateJob = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: SafeSynthesizerJobRequest }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; data: SafeSynthesizerJobRequest }, - TContext -> => { - return useMutation(getSafeSynthesizerCreateJobMutationOptions(options), queryClient); -}; - -/** - * @summary List Jobs - */ -export const safeSynthesizerListJobs = ( - workspace: string, - params?: SafeSynthesizerListJobsParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/safe-synthesizer/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs`, - method: 'GET', - params, - signal, - }); -}; - -export const getSafeSynthesizerListJobsQueryKey = ( - workspace: string, - params?: SafeSynthesizerListJobsParams -) => { - return [ - `/apis/safe-synthesizer/v2/workspaces/${workspace}/jobs`, - ...(params ? [params] : []), - ] as const; -}; - -export const getSafeSynthesizerListJobsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: SafeSynthesizerListJobsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getSafeSynthesizerListJobsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ - signal, - }) => safeSynthesizerListJobs(workspace, params, signal); - - return { queryKey, queryFn, enabled: !!workspace, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type SafeSynthesizerListJobsQueryResult = NonNullable< - Awaited> ->; -export type SafeSynthesizerListJobsQueryError = ErrorType; - -export function useSafeSynthesizerListJobs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | SafeSynthesizerListJobsParams, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerListJobs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: SafeSynthesizerListJobsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerListJobs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: SafeSynthesizerListJobsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List Jobs - */ - -export function useSafeSynthesizerListJobs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: SafeSynthesizerListJobsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getSafeSynthesizerListJobsQueryOptions(workspace, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getSafeSynthesizerListJobsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: SafeSynthesizerListJobsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getSafeSynthesizerListJobsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ - signal, - }) => safeSynthesizerListJobs(workspace, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type SafeSynthesizerListJobsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type SafeSynthesizerListJobsSuspenseQueryError = ErrorType; - -export function useSafeSynthesizerListJobsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | SafeSynthesizerListJobsParams, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerListJobsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: SafeSynthesizerListJobsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerListJobsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: SafeSynthesizerListJobsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List Jobs - */ - -export function useSafeSynthesizerListJobsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: SafeSynthesizerListJobsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getSafeSynthesizerListJobsSuspenseQueryOptions(workspace, params, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Download Job Result Adapter - */ -export const safeSynthesizerDownloadJobResultAdapter = ( - workspace: string, - job: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/safe-synthesizer/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/${encodeURIComponent(String(job))}/results/adapter/download`, - method: 'GET', - responseType: 'blob', - signal, - }); -}; - -export const getSafeSynthesizerDownloadJobResultAdapterQueryKey = ( - workspace: string, - job: string -) => { - return [ - `/apis/safe-synthesizer/v2/workspaces/${workspace}/jobs/${job}/results/adapter/download`, - ] as const; -}; - -export const getSafeSynthesizerDownloadJobResultAdapterQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getSafeSynthesizerDownloadJobResultAdapterQueryKey(workspace, job); - - const queryFn: QueryFunction< - Awaited> - > = ({ signal }) => safeSynthesizerDownloadJobResultAdapter(workspace, job, signal); - - return { queryKey, queryFn, enabled: !!(workspace && job), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type SafeSynthesizerDownloadJobResultAdapterQueryResult = NonNullable< - Awaited> ->; -export type SafeSynthesizerDownloadJobResultAdapterQueryError = - ErrorType; - -export function useSafeSynthesizerDownloadJobResultAdapter< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options: { - query: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerDownloadJobResultAdapter< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerDownloadJobResultAdapter< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Download Job Result Adapter - */ - -export function useSafeSynthesizerDownloadJobResultAdapter< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getSafeSynthesizerDownloadJobResultAdapterQueryOptions( - workspace, - job, - options - ); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getSafeSynthesizerDownloadJobResultAdapterSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getSafeSynthesizerDownloadJobResultAdapterQueryKey(workspace, job); - - const queryFn: QueryFunction< - Awaited> - > = ({ signal }) => safeSynthesizerDownloadJobResultAdapter(workspace, job, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type SafeSynthesizerDownloadJobResultAdapterSuspenseQueryResult = NonNullable< - Awaited> ->; -export type SafeSynthesizerDownloadJobResultAdapterSuspenseQueryError = - ErrorType; - -export function useSafeSynthesizerDownloadJobResultAdapterSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerDownloadJobResultAdapterSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerDownloadJobResultAdapterSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Download Job Result Adapter - */ - -export function useSafeSynthesizerDownloadJobResultAdapterSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getSafeSynthesizerDownloadJobResultAdapterSuspenseQueryOptions( - workspace, - job, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Download Job Result Evaluation-Report - */ -export const safeSynthesizerDownloadJobResultEvaluationReport = ( - workspace: string, - job: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/safe-synthesizer/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/${encodeURIComponent(String(job))}/results/evaluation-report/download`, - method: 'GET', - responseType: 'blob', - signal, - }); -}; - -export const getSafeSynthesizerDownloadJobResultEvaluationReportQueryKey = ( - workspace: string, - job: string -) => { - return [ - `/apis/safe-synthesizer/v2/workspaces/${workspace}/jobs/${job}/results/evaluation-report/download`, - ] as const; -}; - -export const getSafeSynthesizerDownloadJobResultEvaluationReportQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? - getSafeSynthesizerDownloadJobResultEvaluationReportQueryKey(workspace, job); - - const queryFn: QueryFunction< - Awaited> - > = ({ signal }) => safeSynthesizerDownloadJobResultEvaluationReport(workspace, job, signal); - - return { queryKey, queryFn, enabled: !!(workspace && job), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type SafeSynthesizerDownloadJobResultEvaluationReportQueryResult = NonNullable< - Awaited> ->; -export type SafeSynthesizerDownloadJobResultEvaluationReportQueryError = - ErrorType; - -export function useSafeSynthesizerDownloadJobResultEvaluationReport< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options: { - query: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerDownloadJobResultEvaluationReport< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerDownloadJobResultEvaluationReport< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Download Job Result Evaluation-Report - */ - -export function useSafeSynthesizerDownloadJobResultEvaluationReport< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getSafeSynthesizerDownloadJobResultEvaluationReportQueryOptions( - workspace, - job, - options - ); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getSafeSynthesizerDownloadJobResultEvaluationReportSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? - getSafeSynthesizerDownloadJobResultEvaluationReportQueryKey(workspace, job); - - const queryFn: QueryFunction< - Awaited> - > = ({ signal }) => safeSynthesizerDownloadJobResultEvaluationReport(workspace, job, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type SafeSynthesizerDownloadJobResultEvaluationReportSuspenseQueryResult = NonNullable< - Awaited> ->; -export type SafeSynthesizerDownloadJobResultEvaluationReportSuspenseQueryError = - ErrorType; - -export function useSafeSynthesizerDownloadJobResultEvaluationReportSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerDownloadJobResultEvaluationReportSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerDownloadJobResultEvaluationReportSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Download Job Result Evaluation-Report - */ - -export function useSafeSynthesizerDownloadJobResultEvaluationReportSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getSafeSynthesizerDownloadJobResultEvaluationReportSuspenseQueryOptions( - workspace, - job, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Download Job Result Summary - */ -export const safeSynthesizerDownloadJobResultSummary = ( - workspace: string, - job: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/safe-synthesizer/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/${encodeURIComponent(String(job))}/results/summary/download`, - method: 'GET', - signal, - }); -}; - -export const getSafeSynthesizerDownloadJobResultSummaryQueryKey = ( - workspace: string, - job: string -) => { - return [ - `/apis/safe-synthesizer/v2/workspaces/${workspace}/jobs/${job}/results/summary/download`, - ] as const; -}; - -export const getSafeSynthesizerDownloadJobResultSummaryQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getSafeSynthesizerDownloadJobResultSummaryQueryKey(workspace, job); - - const queryFn: QueryFunction< - Awaited> - > = ({ signal }) => safeSynthesizerDownloadJobResultSummary(workspace, job, signal); - - return { queryKey, queryFn, enabled: !!(workspace && job), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type SafeSynthesizerDownloadJobResultSummaryQueryResult = NonNullable< - Awaited> ->; -export type SafeSynthesizerDownloadJobResultSummaryQueryError = - ErrorType; - -export function useSafeSynthesizerDownloadJobResultSummary< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options: { - query: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerDownloadJobResultSummary< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerDownloadJobResultSummary< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Download Job Result Summary - */ - -export function useSafeSynthesizerDownloadJobResultSummary< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getSafeSynthesizerDownloadJobResultSummaryQueryOptions( - workspace, - job, - options - ); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getSafeSynthesizerDownloadJobResultSummarySuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getSafeSynthesizerDownloadJobResultSummaryQueryKey(workspace, job); - - const queryFn: QueryFunction< - Awaited> - > = ({ signal }) => safeSynthesizerDownloadJobResultSummary(workspace, job, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type SafeSynthesizerDownloadJobResultSummarySuspenseQueryResult = NonNullable< - Awaited> ->; -export type SafeSynthesizerDownloadJobResultSummarySuspenseQueryError = - ErrorType; - -export function useSafeSynthesizerDownloadJobResultSummarySuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerDownloadJobResultSummarySuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerDownloadJobResultSummarySuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Download Job Result Summary - */ - -export function useSafeSynthesizerDownloadJobResultSummarySuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getSafeSynthesizerDownloadJobResultSummarySuspenseQueryOptions( - workspace, - job, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Download Job Result Synthetic-Data - */ -export const safeSynthesizerDownloadJobResultSyntheticData = ( - workspace: string, - job: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/safe-synthesizer/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/${encodeURIComponent(String(job))}/results/synthetic-data/download`, - method: 'GET', - responseType: 'blob', - signal, - }); -}; - -export const getSafeSynthesizerDownloadJobResultSyntheticDataQueryKey = ( - workspace: string, - job: string -) => { - return [ - `/apis/safe-synthesizer/v2/workspaces/${workspace}/jobs/${job}/results/synthetic-data/download`, - ] as const; -}; - -export const getSafeSynthesizerDownloadJobResultSyntheticDataQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? - getSafeSynthesizerDownloadJobResultSyntheticDataQueryKey(workspace, job); - - const queryFn: QueryFunction< - Awaited> - > = ({ signal }) => safeSynthesizerDownloadJobResultSyntheticData(workspace, job, signal); - - return { queryKey, queryFn, enabled: !!(workspace && job), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type SafeSynthesizerDownloadJobResultSyntheticDataQueryResult = NonNullable< - Awaited> ->; -export type SafeSynthesizerDownloadJobResultSyntheticDataQueryError = - ErrorType; - -export function useSafeSynthesizerDownloadJobResultSyntheticData< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options: { - query: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerDownloadJobResultSyntheticData< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerDownloadJobResultSyntheticData< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Download Job Result Synthetic-Data - */ - -export function useSafeSynthesizerDownloadJobResultSyntheticData< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getSafeSynthesizerDownloadJobResultSyntheticDataQueryOptions( - workspace, - job, - options - ); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getSafeSynthesizerDownloadJobResultSyntheticDataSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? - getSafeSynthesizerDownloadJobResultSyntheticDataQueryKey(workspace, job); - - const queryFn: QueryFunction< - Awaited> - > = ({ signal }) => safeSynthesizerDownloadJobResultSyntheticData(workspace, job, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type SafeSynthesizerDownloadJobResultSyntheticDataSuspenseQueryResult = NonNullable< - Awaited> ->; -export type SafeSynthesizerDownloadJobResultSyntheticDataSuspenseQueryError = - ErrorType; - -export function useSafeSynthesizerDownloadJobResultSyntheticDataSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerDownloadJobResultSyntheticDataSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerDownloadJobResultSyntheticDataSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Download Job Result Synthetic-Data - */ - -export function useSafeSynthesizerDownloadJobResultSyntheticDataSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getSafeSynthesizerDownloadJobResultSyntheticDataSuspenseQueryOptions( - workspace, - job, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Get Job Result - */ -export const safeSynthesizerGetJobResult = ( - workspace: string, - job: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/safe-synthesizer/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/${encodeURIComponent(String(job))}/results/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getSafeSynthesizerGetJobResultQueryKey = ( - workspace: string, - job: string, - name: string -) => { - return [`/apis/safe-synthesizer/v2/workspaces/${workspace}/jobs/${job}/results/${name}`] as const; -}; - -export const getSafeSynthesizerGetJobResultQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getSafeSynthesizerGetJobResultQueryKey(workspace, job, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => safeSynthesizerGetJobResult(workspace, job, name, signal); - - return { - queryKey, - queryFn, - enabled: !!(workspace && job && name), - ...queryOptions, - } as UseQueryOptions>, TError, TData> & { - queryKey: DataTag; - }; -}; - -export type SafeSynthesizerGetJobResultQueryResult = NonNullable< - Awaited> ->; -export type SafeSynthesizerGetJobResultQueryError = ErrorType; - -export function useSafeSynthesizerGetJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerGetJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerGetJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Result - */ - -export function useSafeSynthesizerGetJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getSafeSynthesizerGetJobResultQueryOptions(workspace, job, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getSafeSynthesizerGetJobResultSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getSafeSynthesizerGetJobResultQueryKey(workspace, job, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => safeSynthesizerGetJobResult(workspace, job, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type SafeSynthesizerGetJobResultSuspenseQueryResult = NonNullable< - Awaited> ->; -export type SafeSynthesizerGetJobResultSuspenseQueryError = ErrorType; - -export function useSafeSynthesizerGetJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerGetJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerGetJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Result - */ - -export function useSafeSynthesizerGetJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getSafeSynthesizerGetJobResultSuspenseQueryOptions( - workspace, - job, - name, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Download Job Result - */ -export const safeSynthesizerDownloadJobResult = ( - workspace: string, - job: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/safe-synthesizer/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/${encodeURIComponent(String(job))}/results/${encodeURIComponent(String(name))}/download`, - method: 'GET', - responseType: 'blob', - signal, - }); -}; - -export const getSafeSynthesizerDownloadJobResultQueryKey = ( - workspace: string, - job: string, - name: string -) => { - return [ - `/apis/safe-synthesizer/v2/workspaces/${workspace}/jobs/${job}/results/${name}/download`, - ] as const; -}; - -export const getSafeSynthesizerDownloadJobResultQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getSafeSynthesizerDownloadJobResultQueryKey(workspace, job, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => safeSynthesizerDownloadJobResult(workspace, job, name, signal); - - return { - queryKey, - queryFn, - enabled: !!(workspace && job && name), - ...queryOptions, - } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type SafeSynthesizerDownloadJobResultQueryResult = NonNullable< - Awaited> ->; -export type SafeSynthesizerDownloadJobResultQueryError = ErrorType; - -export function useSafeSynthesizerDownloadJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerDownloadJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerDownloadJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Download Job Result - */ - -export function useSafeSynthesizerDownloadJobResult< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getSafeSynthesizerDownloadJobResultQueryOptions( - workspace, - job, - name, - options - ); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getSafeSynthesizerDownloadJobResultSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getSafeSynthesizerDownloadJobResultQueryKey(workspace, job, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => safeSynthesizerDownloadJobResult(workspace, job, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type SafeSynthesizerDownloadJobResultSuspenseQueryResult = NonNullable< - Awaited> ->; -export type SafeSynthesizerDownloadJobResultSuspenseQueryError = - ErrorType; - -export function useSafeSynthesizerDownloadJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerDownloadJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerDownloadJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Download Job Result - */ - -export function useSafeSynthesizerDownloadJobResultSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - job: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getSafeSynthesizerDownloadJobResultSuspenseQueryOptions( - workspace, - job, - name, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Get Job - */ -export const safeSynthesizerGetJob = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/safe-synthesizer/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getSafeSynthesizerGetJobQueryKey = (workspace: string, name: string) => { - return [`/apis/safe-synthesizer/v2/workspaces/${workspace}/jobs/${name}`] as const; -}; - -export const getSafeSynthesizerGetJobQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getSafeSynthesizerGetJobQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - safeSynthesizerGetJob(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type SafeSynthesizerGetJobQueryResult = NonNullable< - Awaited> ->; -export type SafeSynthesizerGetJobQueryError = ErrorType; - -export function useSafeSynthesizerGetJob< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerGetJob< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerGetJob< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job - */ - -export function useSafeSynthesizerGetJob< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getSafeSynthesizerGetJobQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getSafeSynthesizerGetJobSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getSafeSynthesizerGetJobQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - safeSynthesizerGetJob(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type SafeSynthesizerGetJobSuspenseQueryResult = NonNullable< - Awaited> ->; -export type SafeSynthesizerGetJobSuspenseQueryError = ErrorType; - -export function useSafeSynthesizerGetJobSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerGetJobSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerGetJobSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job - */ - -export function useSafeSynthesizerGetJobSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getSafeSynthesizerGetJobSuspenseQueryOptions(workspace, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Delete Job - */ -export const safeSynthesizerDeleteJob = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/safe-synthesizer/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/${encodeURIComponent(String(name))}`, - method: 'DELETE', - signal, - }); -}; - -export const getSafeSynthesizerDeleteJobMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - const mutationKey = ['safeSynthesizerDeleteJob']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string } - > = (props) => { - const { workspace, name } = props ?? {}; - - return safeSynthesizerDeleteJob(workspace, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type SafeSynthesizerDeleteJobMutationResult = NonNullable< - Awaited> ->; - -export type SafeSynthesizerDeleteJobMutationError = ErrorType; - -/** - * @summary Delete Job - */ -export const useSafeSynthesizerDeleteJob = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - return useMutation(getSafeSynthesizerDeleteJobMutationOptions(options), queryClient); -}; - -/** - * @summary Cancel Job - */ -export const safeSynthesizerCancelJob = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/safe-synthesizer/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/${encodeURIComponent(String(name))}/cancel`, - method: 'POST', - signal, - }); -}; - -export const getSafeSynthesizerCancelJobMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - const mutationKey = ['safeSynthesizerCancelJob']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string } - > = (props) => { - const { workspace, name } = props ?? {}; - - return safeSynthesizerCancelJob(workspace, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type SafeSynthesizerCancelJobMutationResult = NonNullable< - Awaited> ->; - -export type SafeSynthesizerCancelJobMutationError = ErrorType; - -/** - * @summary Cancel Job - */ -export const useSafeSynthesizerCancelJob = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - return useMutation(getSafeSynthesizerCancelJobMutationOptions(options), queryClient); -}; - -/** - * @summary Get Job Logs - */ -export const safeSynthesizerGetJobLogs = ( - workspace: string, - name: string, - params?: SafeSynthesizerGetJobLogsParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/safe-synthesizer/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/${encodeURIComponent(String(name))}/logs`, - method: 'GET', - params, - signal, - }); -}; - -export const getSafeSynthesizerGetJobLogsQueryKey = ( - workspace: string, - name: string, - params?: SafeSynthesizerGetJobLogsParams -) => { - return [ - `/apis/safe-synthesizer/v2/workspaces/${workspace}/jobs/${name}/logs`, - ...(params ? [params] : []), - ] as const; -}; - -export const getSafeSynthesizerGetJobLogsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: SafeSynthesizerGetJobLogsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getSafeSynthesizerGetJobLogsQueryKey(workspace, name, params); - - const queryFn: QueryFunction>> = ({ - signal, - }) => safeSynthesizerGetJobLogs(workspace, name, params, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type SafeSynthesizerGetJobLogsQueryResult = NonNullable< - Awaited> ->; -export type SafeSynthesizerGetJobLogsQueryError = ErrorType; - -export function useSafeSynthesizerGetJobLogs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params: undefined | SafeSynthesizerGetJobLogsParams, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerGetJobLogs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: SafeSynthesizerGetJobLogsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerGetJobLogs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: SafeSynthesizerGetJobLogsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Logs - */ - -export function useSafeSynthesizerGetJobLogs< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: SafeSynthesizerGetJobLogsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getSafeSynthesizerGetJobLogsQueryOptions(workspace, name, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getSafeSynthesizerGetJobLogsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: SafeSynthesizerGetJobLogsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getSafeSynthesizerGetJobLogsQueryKey(workspace, name, params); - - const queryFn: QueryFunction>> = ({ - signal, - }) => safeSynthesizerGetJobLogs(workspace, name, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type SafeSynthesizerGetJobLogsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type SafeSynthesizerGetJobLogsSuspenseQueryError = ErrorType; - -export function useSafeSynthesizerGetJobLogsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params: undefined | SafeSynthesizerGetJobLogsParams, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerGetJobLogsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: SafeSynthesizerGetJobLogsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerGetJobLogsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: SafeSynthesizerGetJobLogsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Logs - */ - -export function useSafeSynthesizerGetJobLogsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - params?: SafeSynthesizerGetJobLogsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getSafeSynthesizerGetJobLogsSuspenseQueryOptions( - workspace, - name, - params, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary List Job Results - */ -export const safeSynthesizerListJobResults = ( - workspace: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/safe-synthesizer/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/${encodeURIComponent(String(name))}/results`, - method: 'GET', - signal, - }); -}; - -export const getSafeSynthesizerListJobResultsQueryKey = (workspace: string, name: string) => { - return [`/apis/safe-synthesizer/v2/workspaces/${workspace}/jobs/${name}/results`] as const; -}; - -export const getSafeSynthesizerListJobResultsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getSafeSynthesizerListJobResultsQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => safeSynthesizerListJobResults(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type SafeSynthesizerListJobResultsQueryResult = NonNullable< - Awaited> ->; -export type SafeSynthesizerListJobResultsQueryError = ErrorType; - -export function useSafeSynthesizerListJobResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerListJobResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerListJobResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List Job Results - */ - -export function useSafeSynthesizerListJobResults< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getSafeSynthesizerListJobResultsQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getSafeSynthesizerListJobResultsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getSafeSynthesizerListJobResultsQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => safeSynthesizerListJobResults(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type SafeSynthesizerListJobResultsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type SafeSynthesizerListJobResultsSuspenseQueryError = ErrorType; - -export function useSafeSynthesizerListJobResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerListJobResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerListJobResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List Job Results - */ - -export function useSafeSynthesizerListJobResultsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getSafeSynthesizerListJobResultsSuspenseQueryOptions( - workspace, - name, - options - ); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * @summary Get Job Status - */ -export const safeSynthesizerGetJobStatus = ( - workspace: string, - name: string, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/safe-synthesizer/v2/workspaces/${encodeURIComponent(String(workspace))}/jobs/${encodeURIComponent(String(name))}/status`, - method: 'GET', - signal, - }); -}; - -export const getSafeSynthesizerGetJobStatusQueryKey = (workspace: string, name: string) => { - return [`/apis/safe-synthesizer/v2/workspaces/${workspace}/jobs/${name}/status`] as const; -}; - -export const getSafeSynthesizerGetJobStatusQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getSafeSynthesizerGetJobStatusQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => safeSynthesizerGetJobStatus(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type SafeSynthesizerGetJobStatusQueryResult = NonNullable< - Awaited> ->; -export type SafeSynthesizerGetJobStatusQueryError = ErrorType; - -export function useSafeSynthesizerGetJobStatus< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerGetJobStatus< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerGetJobStatus< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Status - */ - -export function useSafeSynthesizerGetJobStatus< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getSafeSynthesizerGetJobStatusQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getSafeSynthesizerGetJobStatusSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = - queryOptions?.queryKey ?? getSafeSynthesizerGetJobStatusQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ - signal, - }) => safeSynthesizerGetJobStatus(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type SafeSynthesizerGetJobStatusSuspenseQueryResult = NonNullable< - Awaited> ->; -export type SafeSynthesizerGetJobStatusSuspenseQueryError = ErrorType; - -export function useSafeSynthesizerGetJobStatusSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerGetJobStatusSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useSafeSynthesizerGetJobStatusSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Job Status - */ - -export function useSafeSynthesizerGetJobStatusSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getSafeSynthesizerGetJobStatusSuspenseQueryOptions(workspace, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Rotate encryption keys for all platform secrets. - * @summary Admin Rotate Encryption Keys - */ -export const secretsAdminRotateEncryptionKeys = (signal?: AbortSignal) => { - return customFetch({ - url: `/apis/secrets/v2/rotate-encryption-keys`, - method: 'POST', - signal, - }); -}; - -export const getSecretsAdminRotateEncryptionKeysMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - void, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - void, - TContext -> => { - const mutationKey = ['secretsAdminRotateEncryptionKeys']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - void - > = () => { - return secretsAdminRotateEncryptionKeys(); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type SecretsAdminRotateEncryptionKeysMutationResult = NonNullable< - Awaited> ->; - -export type SecretsAdminRotateEncryptionKeysMutationError = ErrorType; - -/** - * @summary Admin Rotate Encryption Keys - */ -export const useSecretsAdminRotateEncryptionKeys = < - TError = ErrorType, - TContext = unknown, ->( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - void, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - void, - TContext -> => { - return useMutation(getSecretsAdminRotateEncryptionKeysMutationOptions(options), queryClient); -}; - -/** - * Create a new secret. - * @summary Create Secret - */ -export const secretsCreateSecret = ( - workspace: string, - platformSecretCreateRequest: PlatformSecretCreateRequest, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/secrets/v2/workspaces/${encodeURIComponent(String(workspace))}/secrets`, - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - data: platformSecretCreateRequest, - signal, - }); -}; - -export const getSecretsCreateSecretMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: PlatformSecretCreateRequest }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: PlatformSecretCreateRequest }, - TContext -> => { - const mutationKey = ['secretsCreateSecret']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; data: PlatformSecretCreateRequest } - > = (props) => { - const { workspace, data } = props ?? {}; - - return secretsCreateSecret(workspace, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type SecretsCreateSecretMutationResult = NonNullable< - Awaited> ->; -export type SecretsCreateSecretMutationBody = PlatformSecretCreateRequest; -export type SecretsCreateSecretMutationError = ErrorType; - -/** - * @summary Create Secret - */ -export const useSecretsCreateSecret = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; data: PlatformSecretCreateRequest }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; data: PlatformSecretCreateRequest }, - TContext -> => { - return useMutation(getSecretsCreateSecretMutationOptions(options), queryClient); -}; - -/** - * List available secrets - * @summary List Secrets - */ -export const secretsListSecrets = ( - workspace: string, - params?: SecretsListSecretsParams, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/secrets/v2/workspaces/${encodeURIComponent(String(workspace))}/secrets`, - method: 'GET', - params, - signal, - }); -}; - -export const getSecretsListSecretsQueryKey = ( - workspace: string, - params?: SecretsListSecretsParams -) => { - return [`/apis/secrets/v2/workspaces/${workspace}/secrets`, ...(params ? [params] : [])] as const; -}; - -export const getSecretsListSecretsQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: SecretsListSecretsParams, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getSecretsListSecretsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - secretsListSecrets(workspace, params, signal); - - return { queryKey, queryFn, enabled: !!workspace, ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type SecretsListSecretsQueryResult = NonNullable< - Awaited> ->; -export type SecretsListSecretsQueryError = ErrorType; - -export function useSecretsListSecrets< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | SecretsListSecretsParams, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useSecretsListSecrets< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: SecretsListSecretsParams, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useSecretsListSecrets< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: SecretsListSecretsParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary List Secrets - */ - -export function useSecretsListSecrets< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: SecretsListSecretsParams, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getSecretsListSecretsQueryOptions(workspace, params, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getSecretsListSecretsSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: SecretsListSecretsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getSecretsListSecretsQueryKey(workspace, params); - - const queryFn: QueryFunction>> = ({ signal }) => - secretsListSecrets(workspace, params, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type SecretsListSecretsSuspenseQueryResult = NonNullable< - Awaited> ->; -export type SecretsListSecretsSuspenseQueryError = ErrorType; - -export function useSecretsListSecretsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params: undefined | SecretsListSecretsParams, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useSecretsListSecretsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: SecretsListSecretsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useSecretsListSecretsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: SecretsListSecretsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary List Secrets - */ - -export function useSecretsListSecretsSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - params?: SecretsListSecretsParams, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getSecretsListSecretsSuspenseQueryOptions(workspace, params, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Retrieve a secret by its name. - * @summary Get Secret - */ -export const secretsGetSecret = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/secrets/v2/workspaces/${encodeURIComponent(String(workspace))}/secrets/${encodeURIComponent(String(name))}`, - method: 'GET', - signal, - }); -}; - -export const getSecretsGetSecretQueryKey = (workspace: string, name: string) => { - return [`/apis/secrets/v2/workspaces/${workspace}/secrets/${name}`] as const; -}; - -export const getSecretsGetSecretQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getSecretsGetSecretQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - secretsGetSecret(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type SecretsGetSecretQueryResult = NonNullable>>; -export type SecretsGetSecretQueryError = ErrorType; - -export function useSecretsGetSecret< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial>, TError, TData>> & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useSecretsGetSecret< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>> & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useSecretsGetSecret< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Secret - */ - -export function useSecretsGetSecret< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial>, TError, TData>>; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getSecretsGetSecretQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getSecretsGetSecretSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getSecretsGetSecretQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - secretsGetSecret(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type SecretsGetSecretSuspenseQueryResult = NonNullable< - Awaited> ->; -export type SecretsGetSecretSuspenseQueryError = ErrorType; - -export function useSecretsGetSecretSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useSecretsGetSecretSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useSecretsGetSecretSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Get Secret - */ - -export function useSecretsGetSecretSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getSecretsGetSecretSuspenseQueryOptions(workspace, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -/** - * Update a secret's metadata. - * @summary Update Secret - */ -export const secretsUpdateSecret = ( - workspace: string, - name: string, - platformSecretUpdateRequest: PlatformSecretUpdateRequest, - signal?: AbortSignal -) => { - return customFetch({ - url: `/apis/secrets/v2/workspaces/${encodeURIComponent(String(workspace))}/secrets/${encodeURIComponent(String(name))}`, - method: 'PATCH', - headers: { 'Content-Type': 'application/json' }, - data: platformSecretUpdateRequest, - signal, - }); -}; - -export const getSecretsUpdateSecretMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: PlatformSecretUpdateRequest }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: PlatformSecretUpdateRequest }, - TContext -> => { - const mutationKey = ['secretsUpdateSecret']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string; data: PlatformSecretUpdateRequest } - > = (props) => { - const { workspace, name, data } = props ?? {}; - - return secretsUpdateSecret(workspace, name, data); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type SecretsUpdateSecretMutationResult = NonNullable< - Awaited> ->; -export type SecretsUpdateSecretMutationBody = PlatformSecretUpdateRequest; -export type SecretsUpdateSecretMutationError = ErrorType; - -/** - * @summary Update Secret - */ -export const useSecretsUpdateSecret = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string; data: PlatformSecretUpdateRequest }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string; data: PlatformSecretUpdateRequest }, - TContext -> => { - return useMutation(getSecretsUpdateSecretMutationOptions(options), queryClient); -}; - -/** - * Delete a secret. - * @summary Delete Secret - */ -export const secretsDeleteSecret = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/secrets/v2/workspaces/${encodeURIComponent(String(workspace))}/secrets/${encodeURIComponent(String(name))}`, - method: 'DELETE', - signal, - }); -}; - -export const getSecretsDeleteSecretMutationOptions = < - TError = ErrorType, - TContext = unknown, ->(options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; -}): UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - const mutationKey = ['secretsDeleteSecret']; - const { mutation: mutationOptions } = options - ? options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey - ? options - : { ...options, mutation: { ...options.mutation, mutationKey } } - : { mutation: { mutationKey } }; - - const mutationFn: MutationFunction< - Awaited>, - { workspace: string; name: string } - > = (props) => { - const { workspace, name } = props ?? {}; - - return secretsDeleteSecret(workspace, name); - }; - - return { mutationFn, ...mutationOptions }; -}; - -export type SecretsDeleteSecretMutationResult = NonNullable< - Awaited> ->; - -export type SecretsDeleteSecretMutationError = ErrorType; - -/** - * @summary Delete Secret - */ -export const useSecretsDeleteSecret = , TContext = unknown>( - options?: { - mutation?: UseMutationOptions< - Awaited>, - TError, - { workspace: string; name: string }, - TContext - >; - }, - queryClient?: QueryClient -): UseMutationResult< - Awaited>, - TError, - { workspace: string; name: string }, - TContext -> => { - return useMutation(getSecretsDeleteSecretMutationOptions(options), queryClient); -}; - -/** - * Access the value of a secret. - * @summary Access Secret - */ -export const secretsAccessSecret = (workspace: string, name: string, signal?: AbortSignal) => { - return customFetch({ - url: `/apis/secrets/v2/workspaces/${encodeURIComponent(String(workspace))}/secrets/${encodeURIComponent(String(name))}/access`, - method: 'GET', - signal, - }); -}; - -export const getSecretsAccessSecretQueryKey = (workspace: string, name: string) => { - return [`/apis/secrets/v2/workspaces/${workspace}/secrets/${name}/access`] as const; -}; - -export const getSecretsAccessSecretQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getSecretsAccessSecretQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - secretsAccessSecret(workspace, name, signal); - - return { queryKey, queryFn, enabled: !!(workspace && name), ...queryOptions } as UseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type SecretsAccessSecretQueryResult = NonNullable< - Awaited> ->; -export type SecretsAccessSecretQueryError = ErrorType; - -export function useSecretsAccessSecret< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - DefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): DefinedUseQueryResult & { queryKey: DataTag }; -export function useSecretsAccessSecret< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - > & - Pick< - UndefinedInitialDataOptions< - Awaited>, - TError, - Awaited> - >, - 'initialData' - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -export function useSecretsAccessSecret< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag }; -/** - * @summary Access Secret - */ - -export function useSecretsAccessSecret< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseQueryResult & { queryKey: DataTag } { - const queryOptions = getSecretsAccessSecretQueryOptions(workspace, name, options); - - const query = useQuery(queryOptions, queryClient) as UseQueryResult & { - queryKey: DataTag; - }; - - return { ...query, queryKey: queryOptions.queryKey }; -} - -export const getSecretsAccessSecretSuspenseQueryOptions = < - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - } -) => { - const { query: queryOptions } = options ?? {}; - - const queryKey = queryOptions?.queryKey ?? getSecretsAccessSecretQueryKey(workspace, name); - - const queryFn: QueryFunction>> = ({ signal }) => - secretsAccessSecret(workspace, name, signal); - - return { queryKey, queryFn, ...queryOptions } as UseSuspenseQueryOptions< - Awaited>, - TError, - TData - > & { queryKey: DataTag }; -}; - -export type SecretsAccessSecretSuspenseQueryResult = NonNullable< - Awaited> ->; -export type SecretsAccessSecretSuspenseQueryError = ErrorType; - -export function useSecretsAccessSecretSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options: { - query: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useSecretsAccessSecretSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -export function useSecretsAccessSecretSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag }; -/** - * @summary Access Secret - */ - -export function useSecretsAccessSecretSuspense< - TData = Awaited>, - TError = ErrorType, ->( - workspace: string, - name: string, - options?: { - query?: Partial< - UseSuspenseQueryOptions>, TError, TData> - >; - }, - queryClient?: QueryClient -): UseSuspenseQueryResult & { queryKey: DataTag } { - const queryOptions = getSecretsAccessSecretSuspenseQueryOptions(workspace, name, options); - - const query = useSuspenseQuery(queryOptions, queryClient) as UseSuspenseQueryResult< - TData, - TError - > & { queryKey: DataTag }; - - return { ...query, queryKey: queryOptions.queryKey }; -} diff --git a/web/packages/sdk/generated/platform/schema/AIDefenseRailConfig.ts b/web/packages/sdk/generated/platform/schema/AIDefenseRailConfig.ts deleted file mode 100644 index 94620915ee..0000000000 --- a/web/packages/sdk/generated/platform/schema/AIDefenseRailConfig.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Configuration data for the Cisco AI Defense API - */ -export interface AIDefenseRailConfig { - /** Timeout in seconds for API requests to AI Defense service */ - timeout?: number; - /** If True, allow content when AI Defense API call fails (fail open). If False, block content when API call fails (fail closed). Does not affect missing configuration validation. */ - fail_open?: boolean; -} diff --git a/web/packages/sdk/generated/platform/schema/APIEndpointData.ts b/web/packages/sdk/generated/platform/schema/APIEndpointData.ts deleted file mode 100644 index c0d5862866..0000000000 --- a/web/packages/sdk/generated/platform/schema/APIEndpointData.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Data about an inference endpoint. - */ -export interface APIEndpointData { - /** - * Endpoint URL - * @minLength 1 - */ - url?: string; - /** Model identifier at the endpoint */ - model_id?: string; - /** API key for authentication */ - api_key?: string; - /** API format (e.g., openai, nvidia) */ - format?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/ActionRails.ts b/web/packages/sdk/generated/platform/schema/ActionRails.ts deleted file mode 100644 index 051853cf5a..0000000000 --- a/web/packages/sdk/generated/platform/schema/ActionRails.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Configuration of action rails. - -Action rails control various options related to the execution of actions. -Currently, only - -In the future multiple options will be added, e.g., what input validation should be -performed per action, output validation, throttling, disabling, etc. - */ -export interface ActionRails { - /** The names of all actions which should finish instantly. */ - instant_actions?: string[]; -} diff --git a/web/packages/sdk/generated/platform/schema/ActivatedRail.ts b/web/packages/sdk/generated/platform/schema/ActivatedRail.ts deleted file mode 100644 index ff1ab6b4fe..0000000000 --- a/web/packages/sdk/generated/platform/schema/ActivatedRail.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ActivatedRailAdditionalInfo } from './ActivatedRailAdditionalInfo'; -import type { ExecutedAction } from './ExecutedAction'; - -/** - * A rail that was activated during the generation. - */ -export interface ActivatedRail { - /** The type of the rail that was activated, e.g., input, output, dialog. */ - type: string; - /** The name of the rail, i.e., the name of the flow implementing the rail. */ - name: string; - /** A sequence of decisions made by the rail, e.g., 'bot refuse to respond', 'stop', 'continue'. */ - decisions?: string[]; - /** The list of actions executed by the rail. */ - executed_actions?: ExecutedAction[]; - /** Whether the rail decided to stop any further processing. */ - stop?: boolean; - /** Additional information coming from rail. */ - additional_info?: ActivatedRailAdditionalInfo; - /** Timestamp for when the rail started. */ - started_at?: number; - /** Timestamp for when the rail finished. */ - finished_at?: number; - /** The duration in seconds for applying the rail. Some rails are applied instantly, e.g., dialog rails, so they don't have a duration. */ - duration?: number; -} diff --git a/web/packages/sdk/generated/platform/schema/ActivatedRailAdditionalInfo.ts b/web/packages/sdk/generated/platform/schema/ActivatedRailAdditionalInfo.ts deleted file mode 100644 index dda87f39ad..0000000000 --- a/web/packages/sdk/generated/platform/schema/ActivatedRailAdditionalInfo.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Additional information coming from rail. - */ -export type ActivatedRailAdditionalInfo = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/Adapter.ts b/web/packages/sdk/generated/platform/schema/Adapter.ts deleted file mode 100644 index 6e9f5ff5af..0000000000 --- a/web/packages/sdk/generated/platform/schema/Adapter.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { FinetuningType } from './FinetuningType'; -import type { Lora } from './Lora'; - -export interface Adapter { - /** - * Name of the adapter. Name must be unique in the workspace for all Adapters and match the following regex: Allowed characters: letters (a-z, A-Z), digits (0-9), underscores, hyphens, and dots. - * @maxLength 255 - * @pattern ^[\w\-.]+$ - */ - name: string; - /** - * Workspace of the adapter. Allowed characters: letters (a-z, A-Z), digits (0-9), underscores, hyphens, and dots. - * @maxLength 255 - * @pattern ^[\w\-.]+$ - */ - workspace: string; - /** - * Optional description of the adapter - * @maxLength 1000 - */ - description?: string; - /** Fileset where the adapter files are stored expected format {workspace}/{fileset_name} */ - fileset: string; - /** Type of finetuning (LORA, P_TUNING, etc.) */ - finetuning_type: FinetuningType; - /** Whether to make this adapter available for inference post training */ - enabled?: boolean; - /** Lora configuration specifics */ - lora_config?: Lora; - /** - * Parent model entity reference. A single name (2-63 characters) or 'workspace/model_name' where each segment is a valid name (lowercase, digits, hyphens, and temporarily @ . + _; no leading/trailing or consecutive hyphens). If one slash, both sides must be non-empty. - * @maxLength 127 - */ - model?: string; - created_at?: string; - updated_at?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/AdapterEntityFilter.ts b/web/packages/sdk/generated/platform/schema/AdapterEntityFilter.ts deleted file mode 100644 index 0ac1b4666a..0000000000 --- a/web/packages/sdk/generated/platform/schema/AdapterEntityFilter.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { DatetimeFilter } from './DatetimeFilter'; -import type { FinetuningType } from './FinetuningType'; - -/** - * Filter for Adapter list queries. - */ -export interface AdapterEntityFilter { - /** Filter by adapter name. */ - name?: string; - /** Filter by parent (base) model entity reference in the form {workspace}/{model_name}. */ - model?: string; - /** Filter by description. */ - description?: string; - /** Filter by fileset reference in the form {workspace}/{fileset_name}. */ - fileset?: string; - /** Filter by fine-tuning / PEFT type. */ - finetuning_type?: FinetuningType; - /** Filter by whether the adapter is enabled for inference after training. */ - enabled?: boolean; - /** Filter entities based on creation date. */ - created_at?: DatetimeFilter; - /** Filter entities based on update date. */ - updated_at?: DatetimeFilter; -} diff --git a/web/packages/sdk/generated/platform/schema/AdaptersPage.ts b/web/packages/sdk/generated/platform/schema/AdaptersPage.ts deleted file mode 100644 index 208915824e..0000000000 --- a/web/packages/sdk/generated/platform/schema/AdaptersPage.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { Adapter } from './Adapter'; -import type { AdaptersPageFilter } from './AdaptersPageFilter'; -import type { PaginationData } from './PaginationData'; - -export interface AdaptersPage { - data: Adapter[]; - /** Pagination information. */ - pagination?: PaginationData; - /** The field on which the results are sorted. */ - sort?: string; - /** Filtering information. */ - filter?: AdaptersPageFilter; -} diff --git a/web/packages/sdk/generated/platform/schema/AdaptersPageFilter.ts b/web/packages/sdk/generated/platform/schema/AdaptersPageFilter.ts deleted file mode 100644 index 5717ebdb5f..0000000000 --- a/web/packages/sdk/generated/platform/schema/AdaptersPageFilter.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Filtering information. - */ -export type AdaptersPageFilter = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/Agent.ts b/web/packages/sdk/generated/platform/schema/Agent.ts deleted file mode 100644 index 47ff7fc351..0000000000 --- a/web/packages/sdk/generated/platform/schema/Agent.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AgentBody } from './AgentBody'; -import type { AgentFormat } from './AgentFormat'; -import type { SecretRef } from './SecretRef'; - -/** - * Agent definition for inference in online evaluation jobs. - -An agent is an endpoint that accepts a request and returns a response, -potentially with a trajectory. Two formats are supported: - -- ``generic``: configurable HTTP POST with Jinja-templated body and - JSONPath extraction for response and trajectory. -- ``nemo_agent_toolkit``: NeMo Agent Toolkit SSE streaming protocol - (``/generate/full?filter_steps=none``). - */ -export interface Agent { - /** Base URL of the agent endpoint. */ - url: string; - /** Agent name / identifier. */ - name: string; - /** Agent format that determines the execution path. */ - format?: AgentFormat; - /** API key secret reference for the agent. Format: workspace/secret_name or secret_name within the job workspace. */ - api_key_secret?: SecretRef; - /** Jinja template for the request payload. Required for generic agents. */ - body?: AgentBody; - /** JSONPath expression to extract the response text from the agent's response body. Required for generic agents. */ - response_path?: string; - /** JSONPath expression to extract the trajectory from the agent's response body. Optional. */ - trajectory_path?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/AgentBody.ts b/web/packages/sdk/generated/platform/schema/AgentBody.ts deleted file mode 100644 index 5559ba1cab..0000000000 --- a/web/packages/sdk/generated/platform/schema/AgentBody.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Jinja template for the request payload. Required for generic agents. - */ -export type AgentBody = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/AgentFormat.ts b/web/packages/sdk/generated/platform/schema/AgentFormat.ts deleted file mode 100644 index f2daa50c43..0000000000 --- a/web/packages/sdk/generated/platform/schema/AgentFormat.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Agent format that determines the execution path. - */ -export type AgentFormat = (typeof AgentFormat)[keyof typeof AgentFormat]; - -export const AgentFormat = { - generic: 'generic', - nemo_agent_toolkit: 'nemo_agent_toolkit', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetric.ts b/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetric.ts deleted file mode 100644 index a98ed3681d..0000000000 --- a/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetric.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AgentGoalAccuracyMetricInputTemplate } from './AgentGoalAccuracyMetricInputTemplate'; -import type { AgentGoalAccuracyMetricLabels } from './AgentGoalAccuracyMetricLabels'; -import type { AgentGoalAccuracyMetricSupportedJobTypesItem } from './AgentGoalAccuracyMetricSupportedJobTypesItem'; -import type { EvaluatorModel } from './EvaluatorModel'; -import type { InferenceParams } from './InferenceParams'; - -/** - * RAGAS metric for measuring agent goal accuracy. - */ -export interface AgentGoalAccuracyMetric { - /** Entity name within the workspace */ - name?: string; - /** - * Workspace identifier - * @pattern ^[\w\-\+.@:]+$ - */ - workspace: string; - /** The name of the project associated with this entity. */ - project?: string; - /** The LLM model to use as judge. */ - judge_model: EvaluatorModel; - /** Inference parameters for the judge. */ - inference?: InferenceParams; - /** If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse/output formatting failures are always converted to NaN. */ - ignore_request_failure?: boolean; - type?: 'agent_goal_accuracy'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: AgentGoalAccuracyMetricLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: AgentGoalAccuracyMetricSupportedJobTypesItem[]; - /** Optional Jinja template for rendering the input payload for RAGAS evaluation. */ - input_template?: AgentGoalAccuracyMetricInputTemplate; - /** Whether to use reference for goal accuracy evaluation. */ - use_reference?: boolean; - readonly id: string; - readonly created_at: string; - readonly created_by: string | null; - readonly updated_at: string; - readonly updated_by: string | null; - /** Alias for id for backwards compatibility. */ - readonly entity_id: string; - /** Parent entity ID for nested entities. */ - readonly parent: string; -} diff --git a/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetricInput.ts b/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetricInput.ts deleted file mode 100644 index 566fc04fb3..0000000000 --- a/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetricInput.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AgentGoalAccuracyMetricInputInputTemplate } from './AgentGoalAccuracyMetricInputInputTemplate'; -import type { AgentGoalAccuracyMetricInputLabels } from './AgentGoalAccuracyMetricInputLabels'; -import type { AgentGoalAccuracyMetricInputSupportedJobTypesItem } from './AgentGoalAccuracyMetricInputSupportedJobTypesItem'; -import type { EvaluatorModel } from './EvaluatorModel'; -import type { InferenceParams } from './InferenceParams'; -import type { ModelRef } from './ModelRef'; - -/** - * Request type for AgentGoalAccuracy metrics. - */ -export interface AgentGoalAccuracyMetricInput { - /** The judge model configuration. */ - judge_model: EvaluatorModel | ModelRef; - /** Inference parameters for the judge. */ - inference?: InferenceParams; - /** If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse/output formatting failures are always converted to NaN. */ - ignore_request_failure?: boolean; - type?: 'agent_goal_accuracy'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: AgentGoalAccuracyMetricInputLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: AgentGoalAccuracyMetricInputSupportedJobTypesItem[]; - /** Optional Jinja template for rendering the input payload for RAGAS evaluation. */ - input_template?: AgentGoalAccuracyMetricInputInputTemplate; - /** Whether to use reference for goal accuracy evaluation. */ - use_reference?: boolean; -} diff --git a/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetricInputInputTemplate.ts b/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetricInputInputTemplate.ts deleted file mode 100644 index dd7b492d03..0000000000 --- a/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetricInputInputTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional Jinja template for rendering the input payload for RAGAS evaluation. - */ -export type AgentGoalAccuracyMetricInputInputTemplate = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetricInputLabels.ts b/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetricInputLabels.ts deleted file mode 100644 index ba623e2142..0000000000 --- a/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetricInputLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type AgentGoalAccuracyMetricInputLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetricInputSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetricInputSupportedJobTypesItem.ts deleted file mode 100644 index 8478791fd0..0000000000 --- a/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetricInputSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type AgentGoalAccuracyMetricInputSupportedJobTypesItem = - (typeof AgentGoalAccuracyMetricInputSupportedJobTypesItem)[keyof typeof AgentGoalAccuracyMetricInputSupportedJobTypesItem]; - -export const AgentGoalAccuracyMetricInputSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetricInputTemplate.ts b/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetricInputTemplate.ts deleted file mode 100644 index e7eee923cf..0000000000 --- a/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetricInputTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional Jinja template for rendering the input payload for RAGAS evaluation. - */ -export type AgentGoalAccuracyMetricInputTemplate = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetricLabels.ts b/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetricLabels.ts deleted file mode 100644 index ebde9e4fe4..0000000000 --- a/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetricLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type AgentGoalAccuracyMetricLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetricResponse.ts b/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetricResponse.ts deleted file mode 100644 index 40edeffa31..0000000000 --- a/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetricResponse.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AgentGoalAccuracyMetricResponseInputTemplate } from './AgentGoalAccuracyMetricResponseInputTemplate'; -import type { AgentGoalAccuracyMetricResponseLabels } from './AgentGoalAccuracyMetricResponseLabels'; -import type { AgentGoalAccuracyMetricResponseSupportedJobTypesItem } from './AgentGoalAccuracyMetricResponseSupportedJobTypesItem'; -import type { EvaluatorModel } from './EvaluatorModel'; -import type { InferenceParams } from './InferenceParams'; -import type { ModelRef } from './ModelRef'; - -/** - * Response type for AgentGoalAccuracy metrics. - */ -export interface AgentGoalAccuracyMetricResponse { - /** Entity name within the workspace */ - name?: string; - /** Workspace identifier */ - workspace?: string; - /** The name of the project associated with this entity. */ - project?: string; - /** Entity name within the workspace */ - id?: string; - created_at?: string; - updated_at?: string; - parent?: string; - /** The judge model configuration. */ - judge_model: EvaluatorModel | ModelRef; - /** Inference parameters for the judge. */ - inference?: InferenceParams; - /** If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse/output formatting failures are always converted to NaN. */ - ignore_request_failure?: boolean; - type?: 'agent_goal_accuracy'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: AgentGoalAccuracyMetricResponseLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: AgentGoalAccuracyMetricResponseSupportedJobTypesItem[]; - /** Optional Jinja template for rendering the input payload for RAGAS evaluation. */ - input_template?: AgentGoalAccuracyMetricResponseInputTemplate; - /** Whether to use reference for goal accuracy evaluation. */ - use_reference?: boolean; -} diff --git a/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetricResponseInputTemplate.ts b/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetricResponseInputTemplate.ts deleted file mode 100644 index 43839dc3f3..0000000000 --- a/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetricResponseInputTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional Jinja template for rendering the input payload for RAGAS evaluation. - */ -export type AgentGoalAccuracyMetricResponseInputTemplate = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetricResponseLabels.ts b/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetricResponseLabels.ts deleted file mode 100644 index 69b9f9f1d4..0000000000 --- a/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetricResponseLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type AgentGoalAccuracyMetricResponseLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetricResponseSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetricResponseSupportedJobTypesItem.ts deleted file mode 100644 index b4c9d30b88..0000000000 --- a/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetricResponseSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type AgentGoalAccuracyMetricResponseSupportedJobTypesItem = - (typeof AgentGoalAccuracyMetricResponseSupportedJobTypesItem)[keyof typeof AgentGoalAccuracyMetricResponseSupportedJobTypesItem]; - -export const AgentGoalAccuracyMetricResponseSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetricSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetricSupportedJobTypesItem.ts deleted file mode 100644 index e91b166bd0..0000000000 --- a/web/packages/sdk/generated/platform/schema/AgentGoalAccuracyMetricSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type AgentGoalAccuracyMetricSupportedJobTypesItem = - (typeof AgentGoalAccuracyMetricSupportedJobTypesItem)[keyof typeof AgentGoalAccuracyMetricSupportedJobTypesItem]; - -export const AgentGoalAccuracyMetricSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/AggregateRangeScore.ts b/web/packages/sdk/generated/platform/schema/AggregateRangeScore.ts deleted file mode 100644 index 68e49b741c..0000000000 --- a/web/packages/sdk/generated/platform/schema/AggregateRangeScore.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { Histogram } from './Histogram'; -import type { Percentiles } from './Percentiles'; - -/** - * Aggregated statistics for a range-type score with percentiles and histogram. - */ -export interface AggregateRangeScore { - /** Name of the score. */ - name: string; - /** Number of samples evaluated (excluding NaN). */ - count: number; - /** Number of samples that produced NaN scores. */ - nan_count: number; - /** Sum of all score values. */ - sum?: number; - /** Mean score value. */ - mean?: number; - /** Minimum score value. */ - min?: number; - /** Maximum score value. */ - max?: number; - /** Standard deviation of the scores. */ - std_dev?: number; - /** Variance of the scores. */ - variance?: number; - /** Type of score. */ - score_type?: 'range'; - /** Percentile distribution of scores. */ - percentiles?: Percentiles; - /** Histogram of score distribution. */ - histogram?: Histogram; -} diff --git a/web/packages/sdk/generated/platform/schema/AggregateRubricScore.ts b/web/packages/sdk/generated/platform/schema/AggregateRubricScore.ts deleted file mode 100644 index e44efcfcad..0000000000 --- a/web/packages/sdk/generated/platform/schema/AggregateRubricScore.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { RubricScoreStat } from './RubricScoreStat'; - -/** - * Aggregated statistics for a rubric-type score with category distribution. - */ -export interface AggregateRubricScore { - /** Name of the score. */ - name: string; - /** Number of samples evaluated (excluding NaN). */ - count: number; - /** Number of samples that produced NaN scores. */ - nan_count: number; - /** Sum of all score values. */ - sum?: number; - /** Mean score value. */ - mean?: number; - /** Minimum score value. */ - min?: number; - /** Maximum score value. */ - max?: number; - /** Standard deviation of the scores. */ - std_dev?: number; - /** Variance of the scores. */ - variance?: number; - /** Type of score. */ - score_type?: 'rubric'; - /** Distribution of rubric categories. */ - rubric_distribution: RubricScoreStat[]; - /** Most frequent rubric category. */ - mode_category?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/AggregatedMetricResult.ts b/web/packages/sdk/generated/platform/schema/AggregatedMetricResult.ts deleted file mode 100644 index d917719d37..0000000000 --- a/web/packages/sdk/generated/platform/schema/AggregatedMetricResult.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AggregateRangeScore } from './AggregateRangeScore'; -import type { AggregateRubricScore } from './AggregateRubricScore'; - -/** - * Result of aggregating metric scores with full statistics. - */ -export interface AggregatedMetricResult { - /** The list of aggregated scores. */ - scores: (AggregateRangeScore | AggregateRubricScore)[]; -} diff --git a/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetric.ts b/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetric.ts deleted file mode 100644 index 9f0f2e37ce..0000000000 --- a/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetric.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AnswerAccuracyMetricInputTemplate } from './AnswerAccuracyMetricInputTemplate'; -import type { AnswerAccuracyMetricLabels } from './AnswerAccuracyMetricLabels'; -import type { AnswerAccuracyMetricSupportedJobTypesItem } from './AnswerAccuracyMetricSupportedJobTypesItem'; -import type { EvaluatorModel } from './EvaluatorModel'; -import type { InferenceParams } from './InferenceParams'; - -/** - * RAGAS metric for measuring answer accuracy. - */ -export interface AnswerAccuracyMetric { - /** Entity name within the workspace */ - name?: string; - /** - * Workspace identifier - * @pattern ^[\w\-\+.@:]+$ - */ - workspace: string; - /** The name of the project associated with this entity. */ - project?: string; - /** The LLM model to use as judge. */ - judge_model: EvaluatorModel; - /** Inference parameters for the judge. */ - inference?: InferenceParams; - /** If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse/output formatting failures are always converted to NaN. */ - ignore_request_failure?: boolean; - type?: 'answer_accuracy'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: AnswerAccuracyMetricLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: AnswerAccuracyMetricSupportedJobTypesItem[]; - /** Optional Jinja template for rendering the input payload for RAGAS evaluation. */ - input_template?: AnswerAccuracyMetricInputTemplate; - readonly id: string; - readonly created_at: string; - readonly created_by: string | null; - readonly updated_at: string; - readonly updated_by: string | null; - /** Alias for id for backwards compatibility. */ - readonly entity_id: string; - /** Parent entity ID for nested entities. */ - readonly parent: string; -} diff --git a/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetricInput.ts b/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetricInput.ts deleted file mode 100644 index 0c2039623b..0000000000 --- a/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetricInput.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AnswerAccuracyMetricInputInputTemplate } from './AnswerAccuracyMetricInputInputTemplate'; -import type { AnswerAccuracyMetricInputLabels } from './AnswerAccuracyMetricInputLabels'; -import type { AnswerAccuracyMetricInputSupportedJobTypesItem } from './AnswerAccuracyMetricInputSupportedJobTypesItem'; -import type { EvaluatorModel } from './EvaluatorModel'; -import type { InferenceParams } from './InferenceParams'; -import type { ModelRef } from './ModelRef'; - -/** - * Request type for AnswerAccuracy metrics. - */ -export interface AnswerAccuracyMetricInput { - /** The judge model configuration. */ - judge_model: EvaluatorModel | ModelRef; - /** Inference parameters for the judge. */ - inference?: InferenceParams; - /** If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse/output formatting failures are always converted to NaN. */ - ignore_request_failure?: boolean; - type?: 'answer_accuracy'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: AnswerAccuracyMetricInputLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: AnswerAccuracyMetricInputSupportedJobTypesItem[]; - /** Optional Jinja template for rendering the input payload for RAGAS evaluation. */ - input_template?: AnswerAccuracyMetricInputInputTemplate; -} diff --git a/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetricInputInputTemplate.ts b/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetricInputInputTemplate.ts deleted file mode 100644 index b72c9ae528..0000000000 --- a/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetricInputInputTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional Jinja template for rendering the input payload for RAGAS evaluation. - */ -export type AnswerAccuracyMetricInputInputTemplate = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetricInputLabels.ts b/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetricInputLabels.ts deleted file mode 100644 index 1be9137c52..0000000000 --- a/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetricInputLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type AnswerAccuracyMetricInputLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetricInputSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetricInputSupportedJobTypesItem.ts deleted file mode 100644 index 4d56b07c4b..0000000000 --- a/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetricInputSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type AnswerAccuracyMetricInputSupportedJobTypesItem = - (typeof AnswerAccuracyMetricInputSupportedJobTypesItem)[keyof typeof AnswerAccuracyMetricInputSupportedJobTypesItem]; - -export const AnswerAccuracyMetricInputSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetricInputTemplate.ts b/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetricInputTemplate.ts deleted file mode 100644 index b9df727dc5..0000000000 --- a/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetricInputTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional Jinja template for rendering the input payload for RAGAS evaluation. - */ -export type AnswerAccuracyMetricInputTemplate = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetricLabels.ts b/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetricLabels.ts deleted file mode 100644 index a8ba5afc02..0000000000 --- a/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetricLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type AnswerAccuracyMetricLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetricResponse.ts b/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetricResponse.ts deleted file mode 100644 index f6261a8aa8..0000000000 --- a/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetricResponse.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AnswerAccuracyMetricResponseInputTemplate } from './AnswerAccuracyMetricResponseInputTemplate'; -import type { AnswerAccuracyMetricResponseLabels } from './AnswerAccuracyMetricResponseLabels'; -import type { AnswerAccuracyMetricResponseSupportedJobTypesItem } from './AnswerAccuracyMetricResponseSupportedJobTypesItem'; -import type { EvaluatorModel } from './EvaluatorModel'; -import type { InferenceParams } from './InferenceParams'; -import type { ModelRef } from './ModelRef'; - -/** - * Response type for AnswerAccuracy metrics. - */ -export interface AnswerAccuracyMetricResponse { - /** Entity name within the workspace */ - name?: string; - /** Workspace identifier */ - workspace?: string; - /** The name of the project associated with this entity. */ - project?: string; - /** Entity name within the workspace */ - id?: string; - created_at?: string; - updated_at?: string; - parent?: string; - /** The judge model configuration. */ - judge_model: EvaluatorModel | ModelRef; - /** Inference parameters for the judge. */ - inference?: InferenceParams; - /** If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse/output formatting failures are always converted to NaN. */ - ignore_request_failure?: boolean; - type?: 'answer_accuracy'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: AnswerAccuracyMetricResponseLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: AnswerAccuracyMetricResponseSupportedJobTypesItem[]; - /** Optional Jinja template for rendering the input payload for RAGAS evaluation. */ - input_template?: AnswerAccuracyMetricResponseInputTemplate; -} diff --git a/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetricResponseInputTemplate.ts b/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetricResponseInputTemplate.ts deleted file mode 100644 index 7ae0558056..0000000000 --- a/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetricResponseInputTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional Jinja template for rendering the input payload for RAGAS evaluation. - */ -export type AnswerAccuracyMetricResponseInputTemplate = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetricResponseLabels.ts b/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetricResponseLabels.ts deleted file mode 100644 index 7d70668610..0000000000 --- a/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetricResponseLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type AnswerAccuracyMetricResponseLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetricResponseSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetricResponseSupportedJobTypesItem.ts deleted file mode 100644 index 52548759ee..0000000000 --- a/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetricResponseSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type AnswerAccuracyMetricResponseSupportedJobTypesItem = - (typeof AnswerAccuracyMetricResponseSupportedJobTypesItem)[keyof typeof AnswerAccuracyMetricResponseSupportedJobTypesItem]; - -export const AnswerAccuracyMetricResponseSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetricSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetricSupportedJobTypesItem.ts deleted file mode 100644 index 1c23efc5f3..0000000000 --- a/web/packages/sdk/generated/platform/schema/AnswerAccuracyMetricSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type AnswerAccuracyMetricSupportedJobTypesItem = - (typeof AnswerAccuracyMetricSupportedJobTypesItem)[keyof typeof AnswerAccuracyMetricSupportedJobTypesItem]; - -export const AnswerAccuracyMetricSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/App.ts b/web/packages/sdk/generated/platform/schema/App.ts deleted file mode 100644 index 20d9a51561..0000000000 --- a/web/packages/sdk/generated/platform/schema/App.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Schema for App responses. - */ -export interface App { - /** Unique identifier */ - id: string; - /** App name */ - name: string; - /** Workspace identifier */ - workspace: string; - /** App description */ - description?: string; - /** The name of the project associated with this app */ - project?: string; - /** Lock status */ - locked?: boolean; - /** Creation timestamp */ - created_at?: string; - /** Last update timestamp */ - updated_at?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/AppFilter.ts b/web/packages/sdk/generated/platform/schema/AppFilter.ts deleted file mode 100644 index 7bd67a12c9..0000000000 --- a/web/packages/sdk/generated/platform/schema/AppFilter.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { DatetimeFilter } from './DatetimeFilter'; - -/** - * Filter for Apps. - */ -export interface AppFilter { - /** Filter by workspace id. */ - workspace?: string; - /** Filter by app name. */ - name?: string; - /** Filter by project name. */ - project?: string; - /** Filter by app description. */ - description?: string; - /** Filter entities based on creation date. */ - created_at?: DatetimeFilter; - /** Filter entities based on update date. */ - updated_at?: DatetimeFilter; -} diff --git a/web/packages/sdk/generated/platform/schema/AppInput.ts b/web/packages/sdk/generated/platform/schema/AppInput.ts deleted file mode 100644 index 6870e52371..0000000000 --- a/web/packages/sdk/generated/platform/schema/AppInput.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Schema for creating a new App. - */ -export interface AppInput { - /** App name (unique within workspace) */ - name: string; - /** App description */ - description?: string; - /** The name of the project associated with this app */ - project?: string; - /** If true, this record cannot be automatically updated when entries are ingested. */ - locked?: boolean; -} diff --git a/web/packages/sdk/generated/platform/schema/AppSortField.ts b/web/packages/sdk/generated/platform/schema/AppSortField.ts deleted file mode 100644 index c1c72a9524..0000000000 --- a/web/packages/sdk/generated/platform/schema/AppSortField.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Sort fields for Apps. - */ -export type AppSortField = (typeof AppSortField)[keyof typeof AppSortField]; - -export const AppSortField = { - created_at: 'created_at', - '-created_at': '-created_at', - name: 'name', - '-name': '-name', - updated_at: 'updated_at', - '-updated_at': '-updated_at', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/AppUpdate.ts b/web/packages/sdk/generated/platform/schema/AppUpdate.ts deleted file mode 100644 index 4bdf227f0f..0000000000 --- a/web/packages/sdk/generated/platform/schema/AppUpdate.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Schema for updating an existing App. - */ -export interface AppUpdate { - /** App description */ - description?: string; - /** The name of the project associated with this app */ - project?: string; - /** Lock status */ - locked?: boolean; -} diff --git a/web/packages/sdk/generated/platform/schema/AppsPage.ts b/web/packages/sdk/generated/platform/schema/AppsPage.ts deleted file mode 100644 index e19c92c75e..0000000000 --- a/web/packages/sdk/generated/platform/schema/AppsPage.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { App } from './App'; -import type { AppsPageFilter } from './AppsPageFilter'; -import type { PaginationData } from './PaginationData'; - -export interface AppsPage { - data: App[]; - /** Pagination information. */ - pagination?: PaginationData; - /** The field on which the results are sorted. */ - sort?: string; - /** Filtering information. */ - filter?: AppsPageFilter; -} diff --git a/web/packages/sdk/generated/platform/schema/AppsPageFilter.ts b/web/packages/sdk/generated/platform/schema/AppsPageFilter.ts deleted file mode 100644 index 5f67f99ff9..0000000000 --- a/web/packages/sdk/generated/platform/schema/AppsPageFilter.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Filtering information. - */ -export type AppsPageFilter = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/AtifAgent.ts b/web/packages/sdk/generated/platform/schema/AtifAgent.ts deleted file mode 100644 index 4687e979b2..0000000000 --- a/web/packages/sdk/generated/platform/schema/AtifAgent.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AtifAgentExtra } from './AtifAgentExtra'; -import type { AtifAgentToolDefinitionsItem } from './AtifAgentToolDefinitionsItem'; - -export interface AtifAgent { - name: string; - version: string; - model_name?: string; - tool_definitions?: AtifAgentToolDefinitionsItem[]; - extra?: AtifAgentExtra; -} diff --git a/web/packages/sdk/generated/platform/schema/AtifAgentExtra.ts b/web/packages/sdk/generated/platform/schema/AtifAgentExtra.ts deleted file mode 100644 index 3c41ce3997..0000000000 --- a/web/packages/sdk/generated/platform/schema/AtifAgentExtra.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type AtifAgentExtra = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/AtifAgentToolDefinitionsItem.ts b/web/packages/sdk/generated/platform/schema/AtifAgentToolDefinitionsItem.ts deleted file mode 100644 index 302c723f95..0000000000 --- a/web/packages/sdk/generated/platform/schema/AtifAgentToolDefinitionsItem.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type AtifAgentToolDefinitionsItem = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/AtifContentPart.ts b/web/packages/sdk/generated/platform/schema/AtifContentPart.ts deleted file mode 100644 index dddb4bbd5b..0000000000 --- a/web/packages/sdk/generated/platform/schema/AtifContentPart.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AtifContentPartImage } from './AtifContentPartImage'; -import type { AtifContentPartText } from './AtifContentPartText'; - -export type AtifContentPart = AtifContentPartText | AtifContentPartImage; diff --git a/web/packages/sdk/generated/platform/schema/AtifContentPartImage.ts b/web/packages/sdk/generated/platform/schema/AtifContentPartImage.ts deleted file mode 100644 index 408d27fcab..0000000000 --- a/web/packages/sdk/generated/platform/schema/AtifContentPartImage.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AtifImageSource } from './AtifImageSource'; -import { AtifContentPartImageType } from './AtifContentPartImageType'; - -export interface AtifContentPartImage { - type: AtifContentPartImageType; - source: AtifImageSource; -} diff --git a/web/packages/sdk/generated/platform/schema/AtifContentPartImageType.ts b/web/packages/sdk/generated/platform/schema/AtifContentPartImageType.ts deleted file mode 100644 index 0f18a5eb94..0000000000 --- a/web/packages/sdk/generated/platform/schema/AtifContentPartImageType.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type AtifContentPartImageType = - (typeof AtifContentPartImageType)[keyof typeof AtifContentPartImageType]; - -export const AtifContentPartImageType = { - image: 'image', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/AtifContentPartText.ts b/web/packages/sdk/generated/platform/schema/AtifContentPartText.ts deleted file mode 100644 index 0df8cebe9f..0000000000 --- a/web/packages/sdk/generated/platform/schema/AtifContentPartText.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import { AtifContentPartTextType } from './AtifContentPartTextType'; - -export interface AtifContentPartText { - type: AtifContentPartTextType; - text: string; -} diff --git a/web/packages/sdk/generated/platform/schema/AtifContentPartTextType.ts b/web/packages/sdk/generated/platform/schema/AtifContentPartTextType.ts deleted file mode 100644 index 936bd9da08..0000000000 --- a/web/packages/sdk/generated/platform/schema/AtifContentPartTextType.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type AtifContentPartTextType = - (typeof AtifContentPartTextType)[keyof typeof AtifContentPartTextType]; - -export const AtifContentPartTextType = { - text: 'text', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/AtifFinalMetrics.ts b/web/packages/sdk/generated/platform/schema/AtifFinalMetrics.ts deleted file mode 100644 index e7f7e880c3..0000000000 --- a/web/packages/sdk/generated/platform/schema/AtifFinalMetrics.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AtifFinalMetricsExtra } from './AtifFinalMetricsExtra'; - -export interface AtifFinalMetrics { - total_prompt_tokens?: number; - total_completion_tokens?: number; - total_cached_tokens?: number; - total_cost_usd?: number; - /** @minimum 0 */ - total_steps?: number; - extra?: AtifFinalMetricsExtra; -} diff --git a/web/packages/sdk/generated/platform/schema/AtifFinalMetricsExtra.ts b/web/packages/sdk/generated/platform/schema/AtifFinalMetricsExtra.ts deleted file mode 100644 index 6a053f937d..0000000000 --- a/web/packages/sdk/generated/platform/schema/AtifFinalMetricsExtra.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type AtifFinalMetricsExtra = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/AtifImageSource.ts b/web/packages/sdk/generated/platform/schema/AtifImageSource.ts deleted file mode 100644 index 880ae1a0bb..0000000000 --- a/web/packages/sdk/generated/platform/schema/AtifImageSource.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AtifImageSourceMediaType } from './AtifImageSourceMediaType'; - -export interface AtifImageSource { - media_type: AtifImageSourceMediaType; - path: string; -} diff --git a/web/packages/sdk/generated/platform/schema/AtifImageSourceMediaType.ts b/web/packages/sdk/generated/platform/schema/AtifImageSourceMediaType.ts deleted file mode 100644 index 04df5e5b86..0000000000 --- a/web/packages/sdk/generated/platform/schema/AtifImageSourceMediaType.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type AtifImageSourceMediaType = - (typeof AtifImageSourceMediaType)[keyof typeof AtifImageSourceMediaType]; - -export const AtifImageSourceMediaType = { - 'image/jpeg': 'image/jpeg', - 'image/png': 'image/png', - 'image/gif': 'image/gif', - 'image/webp': 'image/webp', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/AtifIngestRequest.ts b/web/packages/sdk/generated/platform/schema/AtifIngestRequest.ts deleted file mode 100644 index 95f946d181..0000000000 --- a/web/packages/sdk/generated/platform/schema/AtifIngestRequest.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AtifAgent } from './AtifAgent'; -import type { AtifFinalMetrics } from './AtifFinalMetrics'; -import type { AtifIngestRequestExtra } from './AtifIngestRequestExtra'; -import type { AtifIngestRequestSchemaVersion } from './AtifIngestRequestSchemaVersion'; -import type { AtifStep } from './AtifStep'; -import type { EvaluationContext } from './EvaluationContext'; - -/** - * Span-based ATIF ingest request. - -ATIF project scoping is intentionally not accepted here; use the workspace -route and ``evaluation_context`` for evaluation/run identity. - */ -export interface AtifIngestRequest { - schema_version: AtifIngestRequestSchemaVersion; - session_id?: string; - evaluation_context?: EvaluationContext; - agent: AtifAgent; - final_metrics?: AtifFinalMetrics; - continued_trajectory_ref?: string; - notes?: string; - extra?: AtifIngestRequestExtra; - steps?: AtifStep[]; -} diff --git a/web/packages/sdk/generated/platform/schema/AtifIngestRequestExtra.ts b/web/packages/sdk/generated/platform/schema/AtifIngestRequestExtra.ts deleted file mode 100644 index c4c3c3da5b..0000000000 --- a/web/packages/sdk/generated/platform/schema/AtifIngestRequestExtra.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type AtifIngestRequestExtra = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/AtifIngestRequestSchemaVersion.ts b/web/packages/sdk/generated/platform/schema/AtifIngestRequestSchemaVersion.ts deleted file mode 100644 index 1e6bdb6fae..0000000000 --- a/web/packages/sdk/generated/platform/schema/AtifIngestRequestSchemaVersion.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type AtifIngestRequestSchemaVersion = - (typeof AtifIngestRequestSchemaVersion)[keyof typeof AtifIngestRequestSchemaVersion]; - -export const AtifIngestRequestSchemaVersion = { - 'ATIF-v10': 'ATIF-v1.0', - 'ATIF-v11': 'ATIF-v1.1', - 'ATIF-v12': 'ATIF-v1.2', - 'ATIF-v13': 'ATIF-v1.3', - 'ATIF-v14': 'ATIF-v1.4', - 'ATIF-v15': 'ATIF-v1.5', - 'ATIF-v16': 'ATIF-v1.6', - 'ATIF-v17': 'ATIF-v1.7', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/AtifMetrics.ts b/web/packages/sdk/generated/platform/schema/AtifMetrics.ts deleted file mode 100644 index b16dd7520d..0000000000 --- a/web/packages/sdk/generated/platform/schema/AtifMetrics.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AtifMetricsExtra } from './AtifMetricsExtra'; - -export interface AtifMetrics { - prompt_tokens?: number; - completion_tokens?: number; - cached_tokens?: number; - cost_usd?: number; - prompt_token_ids?: number[]; - completion_token_ids?: number[]; - logprobs?: number[]; - extra?: AtifMetricsExtra; -} diff --git a/web/packages/sdk/generated/platform/schema/AtifMetricsExtra.ts b/web/packages/sdk/generated/platform/schema/AtifMetricsExtra.ts deleted file mode 100644 index 2f17495209..0000000000 --- a/web/packages/sdk/generated/platform/schema/AtifMetricsExtra.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type AtifMetricsExtra = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/AtifObservation.ts b/web/packages/sdk/generated/platform/schema/AtifObservation.ts deleted file mode 100644 index c3b0c4aec5..0000000000 --- a/web/packages/sdk/generated/platform/schema/AtifObservation.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AtifObservationResult } from './AtifObservationResult'; - -export interface AtifObservation { - results?: AtifObservationResult[]; -} diff --git a/web/packages/sdk/generated/platform/schema/AtifObservationResult.ts b/web/packages/sdk/generated/platform/schema/AtifObservationResult.ts deleted file mode 100644 index 950d45c924..0000000000 --- a/web/packages/sdk/generated/platform/schema/AtifObservationResult.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AtifContentPart } from './AtifContentPart'; -import type { AtifObservationResultExtra } from './AtifObservationResultExtra'; -import type { AtifSubagentTrajectoryRef } from './AtifSubagentTrajectoryRef'; - -export interface AtifObservationResult { - source_call_id?: string; - content?: string | AtifContentPart[]; - subagent_trajectory_ref?: AtifSubagentTrajectoryRef[]; - extra?: AtifObservationResultExtra; -} diff --git a/web/packages/sdk/generated/platform/schema/AtifObservationResultExtra.ts b/web/packages/sdk/generated/platform/schema/AtifObservationResultExtra.ts deleted file mode 100644 index 0327df5980..0000000000 --- a/web/packages/sdk/generated/platform/schema/AtifObservationResultExtra.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type AtifObservationResultExtra = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/AtifStep.ts b/web/packages/sdk/generated/platform/schema/AtifStep.ts deleted file mode 100644 index ec57cda3f1..0000000000 --- a/web/packages/sdk/generated/platform/schema/AtifStep.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AtifStepAgent } from './AtifStepAgent'; -import type { AtifStepSystem } from './AtifStepSystem'; -import type { AtifStepUser } from './AtifStepUser'; - -export type AtifStep = AtifStepSystem | AtifStepUser | AtifStepAgent; diff --git a/web/packages/sdk/generated/platform/schema/AtifStepAgent.ts b/web/packages/sdk/generated/platform/schema/AtifStepAgent.ts deleted file mode 100644 index 17d4e4e80f..0000000000 --- a/web/packages/sdk/generated/platform/schema/AtifStepAgent.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AtifContentPart } from './AtifContentPart'; -import type { AtifMetrics } from './AtifMetrics'; -import type { AtifObservation } from './AtifObservation'; -import type { AtifStepAgentExtra } from './AtifStepAgentExtra'; -import type { AtifToolCall } from './AtifToolCall'; -import { AtifStepAgentSource } from './AtifStepAgentSource'; - -export interface AtifStepAgent { - /** @minimum 1 */ - step_id: number; - timestamp?: string; - message?: string | AtifContentPart[]; - is_copied_context?: boolean; - extra?: AtifStepAgentExtra; - /** @minimum 0 */ - llm_call_count?: number; - source: AtifStepAgentSource; - model_name?: string; - reasoning_effort?: string | number; - reasoning_content?: string; - tool_calls?: AtifToolCall[]; - observation?: AtifObservation; - metrics?: AtifMetrics; -} diff --git a/web/packages/sdk/generated/platform/schema/AtifStepAgentExtra.ts b/web/packages/sdk/generated/platform/schema/AtifStepAgentExtra.ts deleted file mode 100644 index 6acd3aa02c..0000000000 --- a/web/packages/sdk/generated/platform/schema/AtifStepAgentExtra.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type AtifStepAgentExtra = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/AtifStepAgentSource.ts b/web/packages/sdk/generated/platform/schema/AtifStepAgentSource.ts deleted file mode 100644 index 2a6c422a15..0000000000 --- a/web/packages/sdk/generated/platform/schema/AtifStepAgentSource.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type AtifStepAgentSource = (typeof AtifStepAgentSource)[keyof typeof AtifStepAgentSource]; - -export const AtifStepAgentSource = { - agent: 'agent', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/AtifStepSystem.ts b/web/packages/sdk/generated/platform/schema/AtifStepSystem.ts deleted file mode 100644 index fc36cce9ea..0000000000 --- a/web/packages/sdk/generated/platform/schema/AtifStepSystem.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AtifContentPart } from './AtifContentPart'; -import type { AtifStepSystemExtra } from './AtifStepSystemExtra'; -import { AtifStepSystemSource } from './AtifStepSystemSource'; - -export interface AtifStepSystem { - /** @minimum 1 */ - step_id: number; - timestamp?: string; - message?: string | AtifContentPart[]; - is_copied_context?: boolean; - extra?: AtifStepSystemExtra; - /** @minimum 0 */ - llm_call_count?: number; - source: AtifStepSystemSource; -} diff --git a/web/packages/sdk/generated/platform/schema/AtifStepSystemExtra.ts b/web/packages/sdk/generated/platform/schema/AtifStepSystemExtra.ts deleted file mode 100644 index 033995f8bd..0000000000 --- a/web/packages/sdk/generated/platform/schema/AtifStepSystemExtra.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type AtifStepSystemExtra = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/AtifStepSystemSource.ts b/web/packages/sdk/generated/platform/schema/AtifStepSystemSource.ts deleted file mode 100644 index 74752b9ec9..0000000000 --- a/web/packages/sdk/generated/platform/schema/AtifStepSystemSource.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type AtifStepSystemSource = (typeof AtifStepSystemSource)[keyof typeof AtifStepSystemSource]; - -export const AtifStepSystemSource = { - system: 'system', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/AtifStepUser.ts b/web/packages/sdk/generated/platform/schema/AtifStepUser.ts deleted file mode 100644 index 8f78fed9c9..0000000000 --- a/web/packages/sdk/generated/platform/schema/AtifStepUser.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AtifContentPart } from './AtifContentPart'; -import type { AtifStepUserExtra } from './AtifStepUserExtra'; -import { AtifStepUserSource } from './AtifStepUserSource'; - -export interface AtifStepUser { - /** @minimum 1 */ - step_id: number; - timestamp?: string; - message?: string | AtifContentPart[]; - is_copied_context?: boolean; - extra?: AtifStepUserExtra; - /** @minimum 0 */ - llm_call_count?: number; - source: AtifStepUserSource; -} diff --git a/web/packages/sdk/generated/platform/schema/AtifStepUserExtra.ts b/web/packages/sdk/generated/platform/schema/AtifStepUserExtra.ts deleted file mode 100644 index 0d2ba0c545..0000000000 --- a/web/packages/sdk/generated/platform/schema/AtifStepUserExtra.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type AtifStepUserExtra = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/AtifStepUserSource.ts b/web/packages/sdk/generated/platform/schema/AtifStepUserSource.ts deleted file mode 100644 index 74a0cbdf02..0000000000 --- a/web/packages/sdk/generated/platform/schema/AtifStepUserSource.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type AtifStepUserSource = (typeof AtifStepUserSource)[keyof typeof AtifStepUserSource]; - -export const AtifStepUserSource = { - user: 'user', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/AtifSubagentTrajectoryRef.ts b/web/packages/sdk/generated/platform/schema/AtifSubagentTrajectoryRef.ts deleted file mode 100644 index f3673586a3..0000000000 --- a/web/packages/sdk/generated/platform/schema/AtifSubagentTrajectoryRef.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AtifSubagentTrajectoryRefExtra } from './AtifSubagentTrajectoryRefExtra'; - -export type AtifSubagentTrajectoryRef = unknown & { - trajectory_id?: string; - trajectory_path?: string; - session_id?: string; - extra?: AtifSubagentTrajectoryRefExtra; -}; diff --git a/web/packages/sdk/generated/platform/schema/AtifSubagentTrajectoryRefExtra.ts b/web/packages/sdk/generated/platform/schema/AtifSubagentTrajectoryRefExtra.ts deleted file mode 100644 index caef0710db..0000000000 --- a/web/packages/sdk/generated/platform/schema/AtifSubagentTrajectoryRefExtra.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type AtifSubagentTrajectoryRefExtra = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/AtifToolCall.ts b/web/packages/sdk/generated/platform/schema/AtifToolCall.ts deleted file mode 100644 index 48b5fcbdce..0000000000 --- a/web/packages/sdk/generated/platform/schema/AtifToolCall.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AtifToolCallArguments } from './AtifToolCallArguments'; - -export interface AtifToolCall { - tool_call_id: string; - function_name: string; - arguments?: AtifToolCallArguments; -} diff --git a/web/packages/sdk/generated/platform/schema/AtifToolCallArguments.ts b/web/packages/sdk/generated/platform/schema/AtifToolCallArguments.ts deleted file mode 100644 index e0d5b2fe57..0000000000 --- a/web/packages/sdk/generated/platform/schema/AtifToolCallArguments.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type AtifToolCallArguments = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/AuthContext.ts b/web/packages/sdk/generated/platform/schema/AuthContext.ts deleted file mode 100644 index 9e0cc73f12..0000000000 --- a/web/packages/sdk/generated/platform/schema/AuthContext.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Auth context captured at resource creation for delegated access. - -Stores a snapshot of the creating principal's identity so that controllers -can later act on their behalf (e.g., accessing secrets). - */ -export interface AuthContext { - /** The principal's unique identifier */ - principal_id: string; - /** The principal's email address */ - principal_email?: string; - /** Groups the principal belongs to */ - principal_groups?: string[]; - /** If acting on behalf of another principal, their principal ID */ - principal_on_behalf_of?: string; - /** Groups the on-behalf-of principal belongs to */ - principal_on_behalf_of_groups?: string[]; - /** The on-behalf-of principal's email address */ - principal_on_behalf_of_email?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/AuthCreateIamRoleBindingParams.ts b/web/packages/sdk/generated/platform/schema/AuthCreateIamRoleBindingParams.ts deleted file mode 100644 index b3bdfc683b..0000000000 --- a/web/packages/sdk/generated/platform/schema/AuthCreateIamRoleBindingParams.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type AuthCreateIamRoleBindingParams = { - /** - * If true, wait for role to propagate before returning (default: true). Set to false for bulk operations. - */ - wait_role_propagation?: boolean; -}; diff --git a/web/packages/sdk/generated/platform/schema/AuthDiscoveryResponse.ts b/web/packages/sdk/generated/platform/schema/AuthDiscoveryResponse.ts deleted file mode 100644 index 9aeb32483d..0000000000 --- a/web/packages/sdk/generated/platform/schema/AuthDiscoveryResponse.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { OIDCDiscoveryResponse } from './OIDCDiscoveryResponse'; - -/** - * Auth discovery response for CLI/SDK. - */ -export interface AuthDiscoveryResponse { - auth_enabled: boolean; - oidc?: OIDCDiscoveryResponse; -} diff --git a/web/packages/sdk/generated/platform/schema/AuthListIamRoleBindingsParams.ts b/web/packages/sdk/generated/platform/schema/AuthListIamRoleBindingsParams.ts deleted file mode 100644 index 10d88b1730..0000000000 --- a/web/packages/sdk/generated/platform/schema/AuthListIamRoleBindingsParams.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { RoleBindingFilter } from './RoleBindingFilter'; - -export type AuthListIamRoleBindingsParams = { - /** - * Page number. - */ - page?: number; - /** - * Page size. - */ - page_size?: number; - /** - * The field to sort by. To sort in decreasing order, use `-` in front of the field name. - */ - sort?: string; - /** - * Filter role bindings by principal, workspace, role, granted_by, is_active, granted_at, and revoked_at. - */ - filter?: RoleBindingFilter; -}; diff --git a/web/packages/sdk/generated/platform/schema/AuthRevokeIamRoleBindingParams.ts b/web/packages/sdk/generated/platform/schema/AuthRevokeIamRoleBindingParams.ts deleted file mode 100644 index 4e6508f523..0000000000 --- a/web/packages/sdk/generated/platform/schema/AuthRevokeIamRoleBindingParams.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type AuthRevokeIamRoleBindingParams = { - /** - * If true, wait for role to propagate before returning (default: true). Set to false for bulk operations. - */ - wait_role_propagation?: boolean; -}; diff --git a/web/packages/sdk/generated/platform/schema/AutoAlignOptions.ts b/web/packages/sdk/generated/platform/schema/AutoAlignOptions.ts deleted file mode 100644 index a1f4de4a60..0000000000 --- a/web/packages/sdk/generated/platform/schema/AutoAlignOptions.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AutoAlignOptionsGuardrailsConfig } from './AutoAlignOptionsGuardrailsConfig'; - -/** - * List of guardrails that are activated - */ -export interface AutoAlignOptions { - /** The guardrails configuration that is passed to the AutoAlign endpoint */ - guardrails_config?: AutoAlignOptionsGuardrailsConfig; -} diff --git a/web/packages/sdk/generated/platform/schema/AutoAlignOptionsGuardrailsConfig.ts b/web/packages/sdk/generated/platform/schema/AutoAlignOptionsGuardrailsConfig.ts deleted file mode 100644 index 3b5ccccdb8..0000000000 --- a/web/packages/sdk/generated/platform/schema/AutoAlignOptionsGuardrailsConfig.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * The guardrails configuration that is passed to the AutoAlign endpoint - */ -export type AutoAlignOptionsGuardrailsConfig = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/AutoAlignRailConfig.ts b/web/packages/sdk/generated/platform/schema/AutoAlignRailConfig.ts deleted file mode 100644 index 0c54bd6aca..0000000000 --- a/web/packages/sdk/generated/platform/schema/AutoAlignRailConfig.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AutoAlignOptions } from './AutoAlignOptions'; -import type { AutoAlignRailConfigParameters } from './AutoAlignRailConfigParameters'; - -/** - * Configuration data for the AutoAlign API - */ -export interface AutoAlignRailConfig { - parameters?: AutoAlignRailConfigParameters; - /** Input configuration for AutoAlign guardrails */ - input?: AutoAlignOptions; - /** Output configuration for AutoAlign guardrails */ - output?: AutoAlignOptions; -} diff --git a/web/packages/sdk/generated/platform/schema/AutoAlignRailConfigParameters.ts b/web/packages/sdk/generated/platform/schema/AutoAlignRailConfigParameters.ts deleted file mode 100644 index 60e7ac1c12..0000000000 --- a/web/packages/sdk/generated/platform/schema/AutoAlignRailConfigParameters.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type AutoAlignRailConfigParameters = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/BLEUMetric.ts b/web/packages/sdk/generated/platform/schema/BLEUMetric.ts deleted file mode 100644 index 1b0d3eb47f..0000000000 --- a/web/packages/sdk/generated/platform/schema/BLEUMetric.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { BLEUMetricLabels } from './BLEUMetricLabels'; -import type { BLEUMetricSupportedJobTypesItem } from './BLEUMetricSupportedJobTypesItem'; - -/** - * Persisted BLEU metric. - */ -export interface BLEUMetric { - /** Entity name within the workspace */ - name?: string; - /** - * Workspace identifier - * @pattern ^[\w\-\+.@:]+$ - */ - workspace: string; - /** The name of the project associated with this entity. */ - project?: string; - type?: 'bleu'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: BLEUMetricLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: BLEUMetricSupportedJobTypesItem[]; - /** The templates for the ground truth references to calculate BLEU metric with. */ - references: string[]; - /** The template for the candidate to calculate BLEU metric on. If not provided, the output text from the model is used. */ - candidate?: string; - readonly id: string; - readonly created_at: string; - readonly created_by: string | null; - readonly updated_at: string; - readonly updated_by: string | null; - /** Alias for id for backwards compatibility. */ - readonly entity_id: string; - /** Parent entity ID for nested entities. */ - readonly parent: string; -} diff --git a/web/packages/sdk/generated/platform/schema/BLEUMetricInput.ts b/web/packages/sdk/generated/platform/schema/BLEUMetricInput.ts deleted file mode 100644 index a45b9ab4f7..0000000000 --- a/web/packages/sdk/generated/platform/schema/BLEUMetricInput.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { BLEUMetricInputLabels } from './BLEUMetricInputLabels'; -import type { BLEUMetricInputSupportedJobTypesItem } from './BLEUMetricInputSupportedJobTypesItem'; - -/** - * Request type for BLEUMetric. - */ -export interface BLEUMetricInput { - type?: 'bleu'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: BLEUMetricInputLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: BLEUMetricInputSupportedJobTypesItem[]; - /** The templates for the ground truth references to calculate BLEU metric with. */ - references: string[]; - /** The template for the candidate to calculate BLEU metric on. If not provided, the output text from the model is used. */ - candidate?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/BLEUMetricInputLabels.ts b/web/packages/sdk/generated/platform/schema/BLEUMetricInputLabels.ts deleted file mode 100644 index 606c7c4e58..0000000000 --- a/web/packages/sdk/generated/platform/schema/BLEUMetricInputLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type BLEUMetricInputLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/BLEUMetricInputSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/BLEUMetricInputSupportedJobTypesItem.ts deleted file mode 100644 index f249bdf61e..0000000000 --- a/web/packages/sdk/generated/platform/schema/BLEUMetricInputSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type BLEUMetricInputSupportedJobTypesItem = - (typeof BLEUMetricInputSupportedJobTypesItem)[keyof typeof BLEUMetricInputSupportedJobTypesItem]; - -export const BLEUMetricInputSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/BLEUMetricLabels.ts b/web/packages/sdk/generated/platform/schema/BLEUMetricLabels.ts deleted file mode 100644 index 74140611a1..0000000000 --- a/web/packages/sdk/generated/platform/schema/BLEUMetricLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type BLEUMetricLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/BLEUMetricResponse.ts b/web/packages/sdk/generated/platform/schema/BLEUMetricResponse.ts deleted file mode 100644 index 9c0cc7b8f4..0000000000 --- a/web/packages/sdk/generated/platform/schema/BLEUMetricResponse.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { BLEUMetricResponseLabels } from './BLEUMetricResponseLabels'; -import type { BLEUMetricResponseSupportedJobTypesItem } from './BLEUMetricResponseSupportedJobTypesItem'; - -/** - * Response type for BLEUMetric. - */ -export interface BLEUMetricResponse { - /** Entity name within the workspace */ - name?: string; - /** Workspace identifier */ - workspace?: string; - /** The name of the project associated with this entity. */ - project?: string; - /** Entity name within the workspace */ - id?: string; - created_at?: string; - updated_at?: string; - parent?: string; - type?: 'bleu'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: BLEUMetricResponseLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: BLEUMetricResponseSupportedJobTypesItem[]; - /** The templates for the ground truth references to calculate BLEU metric with. */ - references: string[]; - /** The template for the candidate to calculate BLEU metric on. If not provided, the output text from the model is used. */ - candidate?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/BLEUMetricResponseLabels.ts b/web/packages/sdk/generated/platform/schema/BLEUMetricResponseLabels.ts deleted file mode 100644 index 0b56bb14b8..0000000000 --- a/web/packages/sdk/generated/platform/schema/BLEUMetricResponseLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type BLEUMetricResponseLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/BLEUMetricResponseSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/BLEUMetricResponseSupportedJobTypesItem.ts deleted file mode 100644 index afa0c23b4c..0000000000 --- a/web/packages/sdk/generated/platform/schema/BLEUMetricResponseSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type BLEUMetricResponseSupportedJobTypesItem = - (typeof BLEUMetricResponseSupportedJobTypesItem)[keyof typeof BLEUMetricResponseSupportedJobTypesItem]; - -export const BLEUMetricResponseSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/BLEUMetricSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/BLEUMetricSupportedJobTypesItem.ts deleted file mode 100644 index f439678b9f..0000000000 --- a/web/packages/sdk/generated/platform/schema/BLEUMetricSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type BLEUMetricSupportedJobTypesItem = - (typeof BLEUMetricSupportedJobTypesItem)[keyof typeof BLEUMetricSupportedJobTypesItem]; - -export const BLEUMetricSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/BackendFormat.ts b/web/packages/sdk/generated/platform/schema/BackendFormat.ts deleted file mode 100644 index 5e256adb00..0000000000 --- a/web/packages/sdk/generated/platform/schema/BackendFormat.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Inference backend API wire formats understood by IGW and middleware plugins. - */ -export type BackendFormat = (typeof BackendFormat)[keyof typeof BackendFormat]; - -export const BackendFormat = { - OPENAI_CHAT: 'OPENAI_CHAT', - ANTHROPIC_MESSAGES: 'ANTHROPIC_MESSAGES', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/BaseModelFilter.ts b/web/packages/sdk/generated/platform/schema/BaseModelFilter.ts deleted file mode 100644 index a530fd6e51..0000000000 --- a/web/packages/sdk/generated/platform/schema/BaseModelFilter.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Filter for base model properties. - */ -export interface BaseModelFilter { - /** Filter by name of the base model. */ - name?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/Benchmark.ts b/web/packages/sdk/generated/platform/schema/Benchmark.ts deleted file mode 100644 index 30c8b3ce36..0000000000 --- a/web/packages/sdk/generated/platform/schema/Benchmark.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { BenchmarkLabels } from './BenchmarkLabels'; -import type { FieldMapping } from './FieldMapping'; -import type { FilesetRef } from './FilesetRef'; -import type { MetricRef } from './MetricRef'; - -/** - * Benchmark response schema. - */ -export interface Benchmark { - /** Benchmark name */ - name: string; - /** - * Workspace identifier - * @pattern ^[\w\-\+.@:]+$ - */ - workspace: string; - /** The name of the project associated with this entity. */ - project?: string; - /** Human-readable description of the benchmark. */ - description?: string; - /** The metrics that comprise this benchmark (format: workspace/metric_name). */ - metrics: MetricRef[]; - /** Reference to a Fileset in the Files API (format: workspace/fileset-name). The fileset contains the test cases for this benchmark. */ - dataset: FilesetRef; - /** Maps canonical evaluator fields such as 'input' and 'output' to dataset column paths for this benchmark. */ - field_mapping?: FieldMapping; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: BenchmarkLabels; - readonly id: string; - readonly created_at: string; - readonly created_by: string | null; - readonly updated_at: string; - readonly updated_by: string | null; - /** Alias for id for backwards compatibility. */ - readonly entity_id: string; - /** Parent entity ID for nested entities. */ - readonly parent: string; -} diff --git a/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJob.ts b/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJob.ts deleted file mode 100644 index eeb7df0833..0000000000 --- a/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJob.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { BenchmarkEvaluationJobCustomFields } from './BenchmarkEvaluationJobCustomFields'; -import type { BenchmarkEvaluationJobErrorDetails } from './BenchmarkEvaluationJobErrorDetails'; -import type { BenchmarkEvaluationJobOwnership } from './BenchmarkEvaluationJobOwnership'; -import type { BenchmarkEvaluationJobStatusDetails } from './BenchmarkEvaluationJobStatusDetails'; -import type { BenchmarkOfflineJob } from './BenchmarkOfflineJob'; -import type { BenchmarkOnlineAgentJob } from './BenchmarkOnlineAgentJob'; -import type { BenchmarkOnlineJob } from './BenchmarkOnlineJob'; -import type { PlatformJobStatus } from './PlatformJobStatus'; -import type { SystemBenchmarkOfflineJob } from './SystemBenchmarkOfflineJob'; -import type { SystemBenchmarkOnlineJob } from './SystemBenchmarkOnlineJob'; - -export interface BenchmarkEvaluationJob { - id?: string; - name: string; - description?: string; - project?: string; - workspace?: string; - created_at?: string; - updated_at?: string; - spec: - | BenchmarkOfflineJob - | BenchmarkOnlineJob - | BenchmarkOnlineAgentJob - | SystemBenchmarkOfflineJob - | SystemBenchmarkOnlineJob; - status?: PlatformJobStatus; - status_details?: BenchmarkEvaluationJobStatusDetails; - error_details?: BenchmarkEvaluationJobErrorDetails; - ownership?: BenchmarkEvaluationJobOwnership; - custom_fields?: BenchmarkEvaluationJobCustomFields; -} diff --git a/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJobCustomFields.ts b/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJobCustomFields.ts deleted file mode 100644 index c453c3f68e..0000000000 --- a/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJobCustomFields.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type BenchmarkEvaluationJobCustomFields = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJobErrorDetails.ts b/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJobErrorDetails.ts deleted file mode 100644 index 934fdd4de6..0000000000 --- a/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJobErrorDetails.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type BenchmarkEvaluationJobErrorDetails = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJobOwnership.ts b/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJobOwnership.ts deleted file mode 100644 index 651264faec..0000000000 --- a/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJobOwnership.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type BenchmarkEvaluationJobOwnership = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJobRequest.ts b/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJobRequest.ts deleted file mode 100644 index f811d289a1..0000000000 --- a/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJobRequest.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { BenchmarkEvaluationJobRequestCustomFields } from './BenchmarkEvaluationJobRequestCustomFields'; -import type { BenchmarkEvaluationJobRequestOwnership } from './BenchmarkEvaluationJobRequestOwnership'; -import type { BenchmarkOfflineJob } from './BenchmarkOfflineJob'; -import type { BenchmarkOnlineAgentJob } from './BenchmarkOnlineAgentJob'; -import type { BenchmarkOnlineJob } from './BenchmarkOnlineJob'; -import type { SystemBenchmarkOfflineJob } from './SystemBenchmarkOfflineJob'; -import type { SystemBenchmarkOnlineJob } from './SystemBenchmarkOnlineJob'; - -export interface BenchmarkEvaluationJobRequest { - name?: string; - description?: string; - project?: string; - spec: - | BenchmarkOfflineJob - | BenchmarkOnlineJob - | BenchmarkOnlineAgentJob - | SystemBenchmarkOfflineJob - | SystemBenchmarkOnlineJob; - ownership?: BenchmarkEvaluationJobRequestOwnership; - custom_fields?: BenchmarkEvaluationJobRequestCustomFields; -} diff --git a/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJobRequestCustomFields.ts b/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJobRequestCustomFields.ts deleted file mode 100644 index e26e883dfe..0000000000 --- a/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJobRequestCustomFields.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type BenchmarkEvaluationJobRequestCustomFields = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJobRequestOwnership.ts b/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJobRequestOwnership.ts deleted file mode 100644 index a16fedacc8..0000000000 --- a/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJobRequestOwnership.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type BenchmarkEvaluationJobRequestOwnership = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJobStatusDetails.ts b/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJobStatusDetails.ts deleted file mode 100644 index b86ccd58c3..0000000000 --- a/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJobStatusDetails.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type BenchmarkEvaluationJobStatusDetails = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJobsListFilter.ts b/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJobsListFilter.ts deleted file mode 100644 index 30cea7fd78..0000000000 --- a/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJobsListFilter.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { DatetimeFilter } from './DatetimeFilter'; -import type { PlatformJobStatus } from './PlatformJobStatus'; - -export interface BenchmarkEvaluationJobsListFilter { - /** Jobs created at 'gte' datetime or 'lte' datetime. */ - created_at?: DatetimeFilter; - /** Name of the job. */ - name?: string; - /** Workspace of the job. */ - workspace?: string; - /** Project containing the job. */ - project?: string; - /** The current status. */ - status?: PlatformJobStatus; - /** Jobs updated at 'gte' datetime or 'lte' datetime. */ - updated_at?: DatetimeFilter; -} diff --git a/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJobsPage.ts b/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJobsPage.ts deleted file mode 100644 index b4e604cb75..0000000000 --- a/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJobsPage.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { BenchmarkEvaluationJob } from './BenchmarkEvaluationJob'; -import type { BenchmarkEvaluationJobsPageFilter } from './BenchmarkEvaluationJobsPageFilter'; -import type { PaginationData } from './PaginationData'; - -export interface BenchmarkEvaluationJobsPage { - data: BenchmarkEvaluationJob[]; - /** Pagination information. */ - pagination?: PaginationData; - /** The field on which the results are sorted. */ - sort?: string; - /** Filtering information. */ - filter?: BenchmarkEvaluationJobsPageFilter; -} diff --git a/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJobsPageFilter.ts b/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJobsPageFilter.ts deleted file mode 100644 index a0ea5e0ff9..0000000000 --- a/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJobsPageFilter.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Filtering information. - */ -export type BenchmarkEvaluationJobsPageFilter = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJobsSortField.ts b/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJobsSortField.ts deleted file mode 100644 index b097f2520b..0000000000 --- a/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationJobsSortField.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type BenchmarkEvaluationJobsSortField = - (typeof BenchmarkEvaluationJobsSortField)[keyof typeof BenchmarkEvaluationJobsSortField]; - -export const BenchmarkEvaluationJobsSortField = { - created_at: 'created_at', - '-created_at': '-created_at', - updated_at: 'updated_at', - '-updated_at': '-updated_at', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationResult.ts b/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationResult.ts deleted file mode 100644 index 94985058e1..0000000000 --- a/web/packages/sdk/generated/platform/schema/BenchmarkEvaluationResult.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { BenchmarkMetricResult } from './BenchmarkMetricResult'; - -/** - * Aggregated results for a benchmark evaluation. - */ -export interface BenchmarkEvaluationResult { - /** Results for each metric in the benchmark. */ - results: BenchmarkMetricResult[]; -} diff --git a/web/packages/sdk/generated/platform/schema/BenchmarkJobResult.ts b/web/packages/sdk/generated/platform/schema/BenchmarkJobResult.ts deleted file mode 100644 index e5f0cc5559..0000000000 --- a/web/packages/sdk/generated/platform/schema/BenchmarkJobResult.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { BenchmarkJobResultLabels } from './BenchmarkJobResultLabels'; -import type { BenchmarkMetricResult } from './BenchmarkMetricResult'; -import type { BenchmarkRef } from './BenchmarkRef'; -import type { FilesetRef } from './FilesetRef'; -import type { MetricRef } from './MetricRef'; -import type { ModelRef } from './ModelRef'; - -/** - * Response type for benchmark job result. - */ -export interface BenchmarkJobResult { - /** Entity name within the workspace */ - name?: string; - /** - * Workspace identifier - * @pattern ^[\w\-\+.@:]+$ - */ - workspace: string; - /** The name of the project associated with this entity. */ - project?: string; - /** The dataset used for the evaluation job to generate the result. This field is only populated when the job specifies a FilesetRef. */ - dataset?: FilesetRef; - /** The model evaluated for the job to generate the result. This field is only populated when the job specifies a ModelRef. */ - model?: ModelRef; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: BenchmarkJobResultLabels; - /** The benchmark used for the evaluation job to generate the result. */ - benchmark: BenchmarkRef; - /** The list of metrics used for the evaluation job to generate the result. */ - metrics?: MetricRef[]; - /** Results for each metric in the benchmark. */ - results: BenchmarkMetricResult[]; - readonly id: string; - readonly created_at: string; - readonly created_by: string | null; - readonly updated_at: string; - readonly updated_by: string | null; - /** Alias for id for backwards compatibility. */ - readonly entity_id: string; - /** Parent entity ID for nested entities. */ - readonly parent: string; -} diff --git a/web/packages/sdk/generated/platform/schema/BenchmarkJobResultLabels.ts b/web/packages/sdk/generated/platform/schema/BenchmarkJobResultLabels.ts deleted file mode 100644 index bf3a0bd25b..0000000000 --- a/web/packages/sdk/generated/platform/schema/BenchmarkJobResultLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type BenchmarkJobResultLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/BenchmarkJobResultsListResponse.ts b/web/packages/sdk/generated/platform/schema/BenchmarkJobResultsListResponse.ts deleted file mode 100644 index fe5b57ef7d..0000000000 --- a/web/packages/sdk/generated/platform/schema/BenchmarkJobResultsListResponse.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { BenchmarkJobResult } from './BenchmarkJobResult'; -import type { BenchmarkJobResultsListResponseFilter } from './BenchmarkJobResultsListResponseFilter'; -import type { PaginationData } from './PaginationData'; - -export interface BenchmarkJobResultsListResponse { - data: BenchmarkJobResult[]; - /** Pagination information. */ - pagination?: PaginationData; - /** The field on which the results are sorted. */ - sort?: string; - /** Filtering information. */ - filter?: BenchmarkJobResultsListResponseFilter; -} diff --git a/web/packages/sdk/generated/platform/schema/BenchmarkJobResultsListResponseFilter.ts b/web/packages/sdk/generated/platform/schema/BenchmarkJobResultsListResponseFilter.ts deleted file mode 100644 index 922ec3fbb8..0000000000 --- a/web/packages/sdk/generated/platform/schema/BenchmarkJobResultsListResponseFilter.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Filtering information. - */ -export type BenchmarkJobResultsListResponseFilter = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/BenchmarkLabels.ts b/web/packages/sdk/generated/platform/schema/BenchmarkLabels.ts deleted file mode 100644 index b54ede529e..0000000000 --- a/web/packages/sdk/generated/platform/schema/BenchmarkLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type BenchmarkLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/BenchmarkMetricResult.ts b/web/packages/sdk/generated/platform/schema/BenchmarkMetricResult.ts deleted file mode 100644 index ddae33694c..0000000000 --- a/web/packages/sdk/generated/platform/schema/BenchmarkMetricResult.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AggregateRangeScore } from './AggregateRangeScore'; -import type { AggregateRubricScore } from './AggregateRubricScore'; -import type { MetricRef } from './MetricRef'; - -/** - * Aggregated results for a single metric within a benchmark. - */ -export interface BenchmarkMetricResult { - /** The list of aggregated scores. */ - scores: (AggregateRangeScore | AggregateRubricScore)[]; - /** The metric used for the evaluation job to generate the result. */ - metric?: MetricRef; -} diff --git a/web/packages/sdk/generated/platform/schema/BenchmarkOfflineJob.ts b/web/packages/sdk/generated/platform/schema/BenchmarkOfflineJob.ts deleted file mode 100644 index 05655059d6..0000000000 --- a/web/packages/sdk/generated/platform/schema/BenchmarkOfflineJob.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { BenchmarkRef } from './BenchmarkRef'; -import type { RunConfig } from './RunConfig'; - -/** - * Input for an offline benchmark evaluation job. - -Evaluates the benchmark's dataset against all metrics in the benchmark. - */ -export interface BenchmarkOfflineJob { - /** Reference to the benchmark for evaluation (format: workspace/name). */ - benchmark: BenchmarkRef; - /** Execution parameters for the benchmark job. */ - params?: RunConfig; -} diff --git a/web/packages/sdk/generated/platform/schema/BenchmarkOnlineAgentJob.ts b/web/packages/sdk/generated/platform/schema/BenchmarkOnlineAgentJob.ts deleted file mode 100644 index 7f5d0233e2..0000000000 --- a/web/packages/sdk/generated/platform/schema/BenchmarkOnlineAgentJob.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { Agent } from './Agent'; -import type { BenchmarkOnlineAgentJobPromptTemplate } from './BenchmarkOnlineAgentJobPromptTemplate'; -import type { BenchmarkRef } from './BenchmarkRef'; -import type { RunConfigOnline } from './RunConfigOnline'; - -/** - * Input for an online benchmark evaluation job targeting an agent. - -Evaluates an agent by prompting it with the benchmark's dataset and then evaluating -the responses against all metrics in the benchmark. - */ -export interface BenchmarkOnlineAgentJob { - /** Reference to the benchmark for evaluation (format: workspace/name). */ - benchmark: BenchmarkRef; - /** The agent to evaluate. */ - agent: Agent; - /** Execution parameters for the benchmark job. */ - params?: RunConfigOnline; - /** The jinja template to prompt the agent for evaluation. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{input}}, {{output}}, {{context}}, {{reference}} to reference input columns. */ - prompt_template: BenchmarkOnlineAgentJobPromptTemplate; - /** Prompt template fields that should remain available to the prompt template but not be required by dataset schema validation. */ - optional_fields?: string[]; -} diff --git a/web/packages/sdk/generated/platform/schema/BenchmarkOnlineAgentJobPromptTemplate.ts b/web/packages/sdk/generated/platform/schema/BenchmarkOnlineAgentJobPromptTemplate.ts deleted file mode 100644 index fd17724211..0000000000 --- a/web/packages/sdk/generated/platform/schema/BenchmarkOnlineAgentJobPromptTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * The jinja template to prompt the agent for evaluation. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{input}}, {{output}}, {{context}}, {{reference}} to reference input columns. - */ -export type BenchmarkOnlineAgentJobPromptTemplate = string | { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/BenchmarkOnlineJob.ts b/web/packages/sdk/generated/platform/schema/BenchmarkOnlineJob.ts deleted file mode 100644 index d4d9095e00..0000000000 --- a/web/packages/sdk/generated/platform/schema/BenchmarkOnlineJob.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { BenchmarkOnlineJobPromptTemplate } from './BenchmarkOnlineJobPromptTemplate'; -import type { BenchmarkRef } from './BenchmarkRef'; -import type { EvaluatorModel } from './EvaluatorModel'; -import type { ModelRef } from './ModelRef'; -import type { RunConfigOnlineModel } from './RunConfigOnlineModel'; - -/** - * Input for an online benchmark evaluation job. - -Evaluates a model by prompting it with the benchmark's dataset and then evaluating -the responses against all metrics in the benchmark. - */ -export interface BenchmarkOnlineJob { - /** Reference to the benchmark for evaluation (format: workspace/name). */ - benchmark: BenchmarkRef; - /** The model to evaluate. */ - model: EvaluatorModel | ModelRef; - /** Execution parameters for the benchmark job. */ - params?: RunConfigOnlineModel; - /** The jinja template to prompt the model for evaluation. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{input}}, {{output}}, {{context}}, {{reference}} to reference input columns. */ - prompt_template: BenchmarkOnlineJobPromptTemplate; - /** Prompt template fields that should remain available to the prompt template but not be required by dataset schema validation. */ - optional_fields?: string[]; -} diff --git a/web/packages/sdk/generated/platform/schema/BenchmarkOnlineJobPromptTemplate.ts b/web/packages/sdk/generated/platform/schema/BenchmarkOnlineJobPromptTemplate.ts deleted file mode 100644 index 0ec6a956b4..0000000000 --- a/web/packages/sdk/generated/platform/schema/BenchmarkOnlineJobPromptTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * The jinja template to prompt the model for evaluation. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{input}}, {{output}}, {{context}}, {{reference}} to reference input columns. - */ -export type BenchmarkOnlineJobPromptTemplate = string | { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/BenchmarkRef.ts b/web/packages/sdk/generated/platform/schema/BenchmarkRef.ts deleted file mode 100644 index 52c157f33a..0000000000 --- a/web/packages/sdk/generated/platform/schema/BenchmarkRef.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Reference to a benchmark in the Benchmarks API. - -A reference is a string with format 'workspace/benchmark-name' that points to a -persisted benchmark entity. See [Entity references](docs/get-started/concepts/entity-references.md) for the -general entity reference pattern used across the platform. - * @pattern ^[a-z0-9_-]+/[a-z0-9_-]+$ - */ -export type BenchmarkRef = string; diff --git a/web/packages/sdk/generated/platform/schema/BenchmarkRequest.ts b/web/packages/sdk/generated/platform/schema/BenchmarkRequest.ts deleted file mode 100644 index 8ded277360..0000000000 --- a/web/packages/sdk/generated/platform/schema/BenchmarkRequest.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { BenchmarkRequestLabels } from './BenchmarkRequestLabels'; -import type { FieldMapping } from './FieldMapping'; -import type { FilesetRef } from './FilesetRef'; -import type { MetricRef } from './MetricRef'; - -/** - * Request schema for creating a benchmark. Workspace comes from route parameter. - */ -export interface BenchmarkRequest { - /** The name of the benchmark. */ - name: string; - /** The description of the benchmark. */ - description: string; - /** The metrics that comprise this benchmark (format: workspace/metric_name). */ - metrics: MetricRef[]; - /** The Fileset containing test data (format: workspace/fileset-name). */ - dataset: FilesetRef; - /** Maps canonical evaluator fields such as 'input' and 'output' to dataset column paths for this benchmark. */ - field_mapping?: FieldMapping; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: BenchmarkRequestLabels; -} diff --git a/web/packages/sdk/generated/platform/schema/BenchmarkRequestLabels.ts b/web/packages/sdk/generated/platform/schema/BenchmarkRequestLabels.ts deleted file mode 100644 index 8067c6b10d..0000000000 --- a/web/packages/sdk/generated/platform/schema/BenchmarkRequestLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type BenchmarkRequestLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/BenchmarksListResponse.ts b/web/packages/sdk/generated/platform/schema/BenchmarksListResponse.ts deleted file mode 100644 index a260d11d77..0000000000 --- a/web/packages/sdk/generated/platform/schema/BenchmarksListResponse.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { Benchmark } from './Benchmark'; -import type { BenchmarksListResponseFilter } from './BenchmarksListResponseFilter'; -import type { ExtendedBenchmark } from './ExtendedBenchmark'; -import type { PaginationData } from './PaginationData'; -import type { SystemBenchmark } from './SystemBenchmark'; - -export interface BenchmarksListResponse { - data: (Benchmark | ExtendedBenchmark | SystemBenchmark)[]; - /** Pagination information. */ - pagination?: PaginationData; - /** The field on which the results are sorted. */ - sort?: string; - /** Filtering information. */ - filter?: BenchmarksListResponseFilter; -} diff --git a/web/packages/sdk/generated/platform/schema/BenchmarksListResponseFilter.ts b/web/packages/sdk/generated/platform/schema/BenchmarksListResponseFilter.ts deleted file mode 100644 index c68b06154a..0000000000 --- a/web/packages/sdk/generated/platform/schema/BenchmarksListResponseFilter.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Filtering information. - */ -export type BenchmarksListResponseFilter = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/BuiltInDataset.ts b/web/packages/sdk/generated/platform/schema/BuiltInDataset.ts deleted file mode 100644 index 753c85e922..0000000000 --- a/web/packages/sdk/generated/platform/schema/BuiltInDataset.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Well-known dataset (BEIR or RAGAS) referenced by its identifier. - */ -export type BuiltInDataset = (typeof BuiltInDataset)[keyof typeof BuiltInDataset]; - -export const BuiltInDataset = { - 'beir/climate-fever': 'beir/climate-fever', - 'beir/cqadupstack': 'beir/cqadupstack', - 'beir/dbpedia-entity': 'beir/dbpedia-entity', - 'beir/fever': 'beir/fever', - 'beir/fiqa': 'beir/fiqa', - 'beir/germanquad': 'beir/germanquad', - 'beir/hotpotqa': 'beir/hotpotqa', - 'beir/mmarco': 'beir/mmarco', - 'beir/mrtydi': 'beir/mrtydi', - 'beir/msmarco-v2': 'beir/msmarco-v2', - 'beir/msmarco': 'beir/msmarco', - 'beir/nfcorpus': 'beir/nfcorpus', - 'beir/nq-train': 'beir/nq-train', - 'beir/nq': 'beir/nq', - 'beir/quora': 'beir/quora', - 'beir/scidocs': 'beir/scidocs', - 'beir/scifact': 'beir/scifact', - 'beir/trec-covid-beir': 'beir/trec-covid-beir', - 'beir/trec-covid-v2': 'beir/trec-covid-v2', - 'beir/trec-covid': 'beir/trec-covid', - 'beir/vihealthqa': 'beir/vihealthqa', - 'beir/webis-touche2020': 'beir/webis-touche2020', - 'ragas/amnesty_qa': 'ragas/amnesty_qa', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/CPUExecutionProviderInput.ts b/web/packages/sdk/generated/platform/schema/CPUExecutionProviderInput.ts deleted file mode 100644 index 88260718cf..0000000000 --- a/web/packages/sdk/generated/platform/schema/CPUExecutionProviderInput.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ComputeResources } from './ComputeResources'; -import type { ContainerSpec } from './ContainerSpec'; - -/** - * CPU-based execution provider. - -Provides configuration for running jobs on CPU resources with -resource requests and limits. - */ -export interface CPUExecutionProviderInput { - provider?: 'cpu'; - profile?: string; - container: ContainerSpec; - /** Resource requests and limits for CPU execution. */ - resources?: ComputeResources; -} diff --git a/web/packages/sdk/generated/platform/schema/CPUExecutionProviderOutput.ts b/web/packages/sdk/generated/platform/schema/CPUExecutionProviderOutput.ts deleted file mode 100644 index e32c9d6b91..0000000000 --- a/web/packages/sdk/generated/platform/schema/CPUExecutionProviderOutput.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ComputeResources } from './ComputeResources'; -import type { ContainerSpec } from './ContainerSpec'; - -/** - * CPU-based execution provider. - -Provides configuration for running jobs on CPU resources with -resource requests and limits. - */ -export interface CPUExecutionProviderOutput { - provider?: 'cpu'; - profile?: string; - container: ContainerSpec; - /** Resource requests and limits for CPU execution. */ - resources?: ComputeResources; -} diff --git a/web/packages/sdk/generated/platform/schema/CacheStatsConfig.ts b/web/packages/sdk/generated/platform/schema/CacheStatsConfig.ts deleted file mode 100644 index 6cf7ba5afb..0000000000 --- a/web/packages/sdk/generated/platform/schema/CacheStatsConfig.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Configuration for cache statistics tracking and logging. - */ -export interface CacheStatsConfig { - /** Whether cache statistics tracking is enabled */ - enabled?: boolean; - /** Seconds between periodic cache stats logging to logs (None disables logging) */ - log_interval?: number; -} diff --git a/web/packages/sdk/generated/platform/schema/CacheStatus.ts b/web/packages/sdk/generated/platform/schema/CacheStatus.ts deleted file mode 100644 index 5a82875dcb..0000000000 --- a/web/packages/sdk/generated/platform/schema/CacheStatus.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Cache status for files in external storage backends. - */ -export type CacheStatus = (typeof CacheStatus)[keyof typeof CacheStatus]; - -export const CacheStatus = { - cached: 'cached', - caching: 'caching', - not_cached: 'not_cached', - not_cacheable: 'not_cacheable', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/ChatCompletionAssistantMessageParam.ts b/web/packages/sdk/generated/platform/schema/ChatCompletionAssistantMessageParam.ts deleted file mode 100644 index 42bd440c3e..0000000000 --- a/web/packages/sdk/generated/platform/schema/ChatCompletionAssistantMessageParam.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ChatCompletionMessageToolCallParam } from './ChatCompletionMessageToolCallParam'; -import type { FunctionCall } from './FunctionCall'; - -/** - * Assistant message parameter for chat completion. - */ -export interface ChatCompletionAssistantMessageParam { - /** The role of the messages author, in this case `assistant`. */ - role: 'assistant'; - /** The contents of the assistant message. */ - content?: string; - /** Deprecated and replaced by `tool_calls`. */ - function_call?: FunctionCall; - /** An optional name for the participant. */ - name?: string; - /** The tool calls generated by the model, such as function calls. */ - tool_calls?: ChatCompletionMessageToolCallParam[]; -} diff --git a/web/packages/sdk/generated/platform/schema/ChatCompletionContentPartImageParam.ts b/web/packages/sdk/generated/platform/schema/ChatCompletionContentPartImageParam.ts deleted file mode 100644 index 276fee6b5f..0000000000 --- a/web/packages/sdk/generated/platform/schema/ChatCompletionContentPartImageParam.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ImageURL } from './ImageURL'; - -/** - * Image content part for chat messages. - */ -export interface ChatCompletionContentPartImageParam { - /** The image URL information. */ - image_url: ImageURL; - /** The type of the content part. */ - type: 'image_url'; -} diff --git a/web/packages/sdk/generated/platform/schema/ChatCompletionContentPartTextParam.ts b/web/packages/sdk/generated/platform/schema/ChatCompletionContentPartTextParam.ts deleted file mode 100644 index 30d2fa4b98..0000000000 --- a/web/packages/sdk/generated/platform/schema/ChatCompletionContentPartTextParam.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Text content part for chat messages. - */ -export interface ChatCompletionContentPartTextParam { - /** The text content. */ - text: string; - /** The type of the content part. */ - type: 'text'; -} diff --git a/web/packages/sdk/generated/platform/schema/ChatCompletionFunctionMessageParam.ts b/web/packages/sdk/generated/platform/schema/ChatCompletionFunctionMessageParam.ts deleted file mode 100644 index 815ae6546a..0000000000 --- a/web/packages/sdk/generated/platform/schema/ChatCompletionFunctionMessageParam.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Function message parameter for chat completion. - */ -export interface ChatCompletionFunctionMessageParam { - /** The contents of the function message. */ - content: string; - /** The name of the function to call. */ - name: string; - /** The role of the messages author, in this case `function`. */ - role: 'function'; -} diff --git a/web/packages/sdk/generated/platform/schema/ChatCompletionMessageToolCallParam.ts b/web/packages/sdk/generated/platform/schema/ChatCompletionMessageToolCallParam.ts deleted file mode 100644 index 9215004d90..0000000000 --- a/web/packages/sdk/generated/platform/schema/ChatCompletionMessageToolCallParam.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { Function } from './Function'; - -/** - * Tool call parameter for chat completion messages. - */ -export interface ChatCompletionMessageToolCallParam { - /** The ID of the tool call. */ - id: string; - /** The function that the model called. */ - function: Function; - /** The type of the tool. Currently, only `function` is supported. */ - type: 'function'; -} diff --git a/web/packages/sdk/generated/platform/schema/ChatCompletionSystemMessageParam.ts b/web/packages/sdk/generated/platform/schema/ChatCompletionSystemMessageParam.ts deleted file mode 100644 index b499457adf..0000000000 --- a/web/packages/sdk/generated/platform/schema/ChatCompletionSystemMessageParam.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * System message parameter for chat completion. - */ -export interface ChatCompletionSystemMessageParam { - /** The contents of the system message. */ - content: string; - /** The role of the messages author, in this case `system`. */ - role: 'system'; - /** An optional name for the participant. */ - name?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/ChatCompletionToolMessageParam.ts b/web/packages/sdk/generated/platform/schema/ChatCompletionToolMessageParam.ts deleted file mode 100644 index dfd0f64cfb..0000000000 --- a/web/packages/sdk/generated/platform/schema/ChatCompletionToolMessageParam.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Tool message parameter for chat completion. - */ -export interface ChatCompletionToolMessageParam { - /** The contents of the tool message. */ - content: string; - /** The role of the messages author, in this case `tool`. */ - role: 'tool'; - /** Tool call that this message is responding to. */ - tool_call_id: string; -} diff --git a/web/packages/sdk/generated/platform/schema/ChatCompletionUserMessageParam.ts b/web/packages/sdk/generated/platform/schema/ChatCompletionUserMessageParam.ts deleted file mode 100644 index e9644129f9..0000000000 --- a/web/packages/sdk/generated/platform/schema/ChatCompletionUserMessageParam.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ChatCompletionContentPartImageParam } from './ChatCompletionContentPartImageParam'; -import type { ChatCompletionContentPartTextParam } from './ChatCompletionContentPartTextParam'; - -/** - * User message parameter for chat completion. - */ -export interface ChatCompletionUserMessageParam { - /** The contents of the user message. */ - content: string | (ChatCompletionContentPartTextParam | ChatCompletionContentPartImageParam)[]; - /** The role of the messages author, in this case `user`. */ - role: 'user'; - /** An optional name for the participant. */ - name?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/ChatCompletionsIngestRequest.ts b/web/packages/sdk/generated/platform/schema/ChatCompletionsIngestRequest.ts deleted file mode 100644 index 8fcd9ed18e..0000000000 --- a/web/packages/sdk/generated/platform/schema/ChatCompletionsIngestRequest.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { EvaluationContext } from './EvaluationContext'; -import type { FlexibleEntryRequestInput } from './FlexibleEntryRequestInput'; -import type { FlexibleEntryResponse } from './FlexibleEntryResponse'; - -export interface ChatCompletionsIngestRequest { - request: FlexibleEntryRequestInput; - response: FlexibleEntryResponse; - /** Groups related chat-completions calls without forcing them into the same trace. */ - session_id?: string; - /** Opt into joining an existing trace built via OTel or ATIF. This is not a grouping mechanism for chat-completions calls; use session_id to group related calls. */ - trace_id?: string; - evaluation_context?: EvaluationContext; - provider?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/ChatCompletionsIngestResponse.ts b/web/packages/sdk/generated/platform/schema/ChatCompletionsIngestResponse.ts deleted file mode 100644 index ab1c83516c..0000000000 --- a/web/packages/sdk/generated/platform/schema/ChatCompletionsIngestResponse.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export interface ChatCompletionsIngestResponse { - session_id: string; - span_id: string; -} diff --git a/web/packages/sdk/generated/platform/schema/ClassifyConfig.ts b/web/packages/sdk/generated/platform/schema/ClassifyConfig.ts deleted file mode 100644 index e12a2c5bf3..0000000000 --- a/web/packages/sdk/generated/platform/schema/ClassifyConfig.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Configuration for column classification using an LLM. - */ -export interface ClassifyConfig { - /** Enable column classification. */ - enable_classify?: boolean; - /** List of entity types to classify. */ - entities?: string[]; - /** Number of column values to sample for classification. */ - num_samples?: number; - /** Name of the model provider in the Inference Gateway for column classification. The job compiler will resolve this to the appropriate endpoint URL. */ - classify_model_provider?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/ClavataRailConfig.ts b/web/packages/sdk/generated/platform/schema/ClavataRailConfig.ts deleted file mode 100644 index 210aaee477..0000000000 --- a/web/packages/sdk/generated/platform/schema/ClavataRailConfig.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ClavataRailConfigLabelMatchLogic } from './ClavataRailConfigLabelMatchLogic'; -import type { ClavataRailConfigPolicies } from './ClavataRailConfigPolicies'; -import type { ClavataRailOptions } from './ClavataRailOptions'; - -/** - * Configuration data for the Clavata API - */ -export interface ClavataRailConfig { - /** The endpoint for the Clavata API */ - server_endpoint?: string; - /** A dictionary of policy aliases and their corresponding IDs. */ - policies?: ClavataRailConfigPolicies; - /** The logic to use when deciding whether the evaluation matched. - If ANY, only one of the configured labels needs to be found in the input or output. - If ALL, all configured labels must be found in the input or output. */ - label_match_logic?: ClavataRailConfigLabelMatchLogic; - /** Clavata configuration for an Input Guardrail */ - input?: ClavataRailOptions; - /** Clavata configuration for an Output Guardrail */ - output?: ClavataRailOptions; -} diff --git a/web/packages/sdk/generated/platform/schema/ClavataRailConfigLabelMatchLogic.ts b/web/packages/sdk/generated/platform/schema/ClavataRailConfigLabelMatchLogic.ts deleted file mode 100644 index b6e11ace61..0000000000 --- a/web/packages/sdk/generated/platform/schema/ClavataRailConfigLabelMatchLogic.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * The logic to use when deciding whether the evaluation matched. - If ANY, only one of the configured labels needs to be found in the input or output. - If ALL, all configured labels must be found in the input or output. - */ -export type ClavataRailConfigLabelMatchLogic = - (typeof ClavataRailConfigLabelMatchLogic)[keyof typeof ClavataRailConfigLabelMatchLogic]; - -export const ClavataRailConfigLabelMatchLogic = { - ANY: 'ANY', - ALL: 'ALL', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/ClavataRailConfigPolicies.ts b/web/packages/sdk/generated/platform/schema/ClavataRailConfigPolicies.ts deleted file mode 100644 index 1dfbd4cfee..0000000000 --- a/web/packages/sdk/generated/platform/schema/ClavataRailConfigPolicies.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * A dictionary of policy aliases and their corresponding IDs. - */ -export type ClavataRailConfigPolicies = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/ClavataRailOptions.ts b/web/packages/sdk/generated/platform/schema/ClavataRailOptions.ts deleted file mode 100644 index 6a95dc7164..0000000000 --- a/web/packages/sdk/generated/platform/schema/ClavataRailOptions.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Configuration data for the Clavata API - */ -export interface ClavataRailOptions { - /** The policy alias to use when evaluating inputs or outputs. */ - policy: string; - /** A list of labels to match against the policy. - If no labels are provided, the overall policy result will be returned. - If labels are provided, only hits on the provided labels will be considered a hit. */ - labels?: string[]; -} diff --git a/web/packages/sdk/generated/platform/schema/Column.ts b/web/packages/sdk/generated/platform/schema/Column.ts deleted file mode 100644 index 05a413393c..0000000000 --- a/web/packages/sdk/generated/platform/schema/Column.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Rule matcher for selecting columns by name, position, condition, entity, or type. - */ -export interface Column { - /** Column name. */ - name?: string; - /** Column position. */ - position?: number | number[]; - /** Column condition. */ - condition?: string; - /** Rename to value. */ - value?: string; - /** Column entity match. */ - entity?: string | string[]; - /** Column type match. */ - type?: string | string[]; -} diff --git a/web/packages/sdk/generated/platform/schema/ColumnActions.ts b/web/packages/sdk/generated/platform/schema/ColumnActions.ts deleted file mode 100644 index c4f58864d5..0000000000 --- a/web/packages/sdk/generated/platform/schema/ColumnActions.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { Column } from './Column'; - -/** - * Container for column add, drop, and rename operations. - */ -export interface ColumnActions { - /** Columns to add. */ - add?: Column[]; - /** Columns to drop. */ - drop?: Column[]; - /** Columns to rename. */ - rename?: Column[]; -} diff --git a/web/packages/sdk/generated/platform/schema/ComputeResourceSpec.ts b/web/packages/sdk/generated/platform/schema/ComputeResourceSpec.ts deleted file mode 100644 index fdd69c517b..0000000000 --- a/web/packages/sdk/generated/platform/schema/ComputeResourceSpec.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Resource specification. - */ -export interface ComputeResourceSpec { - /** CPU specification (e.g., '250m', '1', '2.5'). */ - cpu?: string; - /** Memory specification (e.g., '128Mi', '1Gi', '512M'). */ - memory?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/ComputeResources.ts b/web/packages/sdk/generated/platform/schema/ComputeResources.ts deleted file mode 100644 index d9c2da09fb..0000000000 --- a/web/packages/sdk/generated/platform/schema/ComputeResources.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ComputeResourceSpec } from './ComputeResourceSpec'; - -/** - * Resource requirements matching k8s ResourceRequirements format. - */ -export interface ComputeResources { - /** Minimum resources requested for the container. */ - requests?: ComputeResourceSpec; - /** Maximum resources the container can use. */ - limits?: ComputeResourceSpec; - /** - * Number of nodes to use. - * @minimum 1 - */ - num_nodes?: number; - /** Step requesting number of GPUs. */ - num_gpus?: number; - /** Shared memory (/dev/shm) size as a Kubernetes quantity (e.g. '1Gi', '4Gi'). Used for GPU and distributed-GPU job executors. When unset, defaults to 1Gi per allocated GPU. */ - shm_size?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/ContainerSpec.ts b/web/packages/sdk/generated/platform/schema/ContainerSpec.ts deleted file mode 100644 index 720717ded9..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContainerSpec.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Specification for a container configuration. - -Defines the container image and related configuration for job execution. - */ -export interface ContainerSpec { - image: string; - entrypoint?: string[]; - command?: string[]; -} diff --git a/web/packages/sdk/generated/platform/schema/ContentSafetyConfig.ts b/web/packages/sdk/generated/platform/schema/ContentSafetyConfig.ts deleted file mode 100644 index 8be97e0614..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContentSafetyConfig.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { MultilingualConfig } from './MultilingualConfig'; -import type { ReasoningConfig } from './ReasoningConfig'; - -/** - * Configuration data for content safety rails. - */ -export interface ContentSafetyConfig { - multilingual?: MultilingualConfig; - reasoning?: ReasoningConfig; -} diff --git a/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetric.ts b/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetric.ts deleted file mode 100644 index af694d3c23..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetric.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ContextEntityRecallMetricInputTemplate } from './ContextEntityRecallMetricInputTemplate'; -import type { ContextEntityRecallMetricLabels } from './ContextEntityRecallMetricLabels'; -import type { ContextEntityRecallMetricSupportedJobTypesItem } from './ContextEntityRecallMetricSupportedJobTypesItem'; -import type { EvaluatorModel } from './EvaluatorModel'; -import type { InferenceParams } from './InferenceParams'; - -/** - * RAGAS metric for measuring context entity recall. - */ -export interface ContextEntityRecallMetric { - /** Entity name within the workspace */ - name?: string; - /** - * Workspace identifier - * @pattern ^[\w\-\+.@:]+$ - */ - workspace: string; - /** The name of the project associated with this entity. */ - project?: string; - /** The LLM model to use as judge. */ - judge_model: EvaluatorModel; - /** Inference parameters for the judge. */ - inference?: InferenceParams; - /** If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse/output formatting failures are always converted to NaN. */ - ignore_request_failure?: boolean; - type?: 'context_entity_recall'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: ContextEntityRecallMetricLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: ContextEntityRecallMetricSupportedJobTypesItem[]; - /** Optional Jinja template for rendering the input payload for RAGAS evaluation. */ - input_template?: ContextEntityRecallMetricInputTemplate; - readonly id: string; - readonly created_at: string; - readonly created_by: string | null; - readonly updated_at: string; - readonly updated_by: string | null; - /** Alias for id for backwards compatibility. */ - readonly entity_id: string; - /** Parent entity ID for nested entities. */ - readonly parent: string; -} diff --git a/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetricInput.ts b/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetricInput.ts deleted file mode 100644 index 20efbcd61a..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetricInput.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ContextEntityRecallMetricInputInputTemplate } from './ContextEntityRecallMetricInputInputTemplate'; -import type { ContextEntityRecallMetricInputLabels } from './ContextEntityRecallMetricInputLabels'; -import type { ContextEntityRecallMetricInputSupportedJobTypesItem } from './ContextEntityRecallMetricInputSupportedJobTypesItem'; -import type { EvaluatorModel } from './EvaluatorModel'; -import type { InferenceParams } from './InferenceParams'; -import type { ModelRef } from './ModelRef'; - -/** - * Request type for ContextEntityRecall metrics. - */ -export interface ContextEntityRecallMetricInput { - /** The judge model configuration. */ - judge_model: EvaluatorModel | ModelRef; - /** Inference parameters for the judge. */ - inference?: InferenceParams; - /** If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse/output formatting failures are always converted to NaN. */ - ignore_request_failure?: boolean; - type?: 'context_entity_recall'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: ContextEntityRecallMetricInputLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: ContextEntityRecallMetricInputSupportedJobTypesItem[]; - /** Optional Jinja template for rendering the input payload for RAGAS evaluation. */ - input_template?: ContextEntityRecallMetricInputInputTemplate; -} diff --git a/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetricInputInputTemplate.ts b/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetricInputInputTemplate.ts deleted file mode 100644 index e3c8269611..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetricInputInputTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional Jinja template for rendering the input payload for RAGAS evaluation. - */ -export type ContextEntityRecallMetricInputInputTemplate = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetricInputLabels.ts b/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetricInputLabels.ts deleted file mode 100644 index 879fb8658e..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetricInputLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type ContextEntityRecallMetricInputLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetricInputSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetricInputSupportedJobTypesItem.ts deleted file mode 100644 index 3807783fb5..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetricInputSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type ContextEntityRecallMetricInputSupportedJobTypesItem = - (typeof ContextEntityRecallMetricInputSupportedJobTypesItem)[keyof typeof ContextEntityRecallMetricInputSupportedJobTypesItem]; - -export const ContextEntityRecallMetricInputSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetricInputTemplate.ts b/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetricInputTemplate.ts deleted file mode 100644 index 4aad79acdc..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetricInputTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional Jinja template for rendering the input payload for RAGAS evaluation. - */ -export type ContextEntityRecallMetricInputTemplate = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetricLabels.ts b/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetricLabels.ts deleted file mode 100644 index d3983f41a3..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetricLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type ContextEntityRecallMetricLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetricResponse.ts b/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetricResponse.ts deleted file mode 100644 index ed6dfd8bf6..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetricResponse.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ContextEntityRecallMetricResponseInputTemplate } from './ContextEntityRecallMetricResponseInputTemplate'; -import type { ContextEntityRecallMetricResponseLabels } from './ContextEntityRecallMetricResponseLabels'; -import type { ContextEntityRecallMetricResponseSupportedJobTypesItem } from './ContextEntityRecallMetricResponseSupportedJobTypesItem'; -import type { EvaluatorModel } from './EvaluatorModel'; -import type { InferenceParams } from './InferenceParams'; -import type { ModelRef } from './ModelRef'; - -/** - * Response type for ContextEntityRecall metrics. - */ -export interface ContextEntityRecallMetricResponse { - /** Entity name within the workspace */ - name?: string; - /** Workspace identifier */ - workspace?: string; - /** The name of the project associated with this entity. */ - project?: string; - /** Entity name within the workspace */ - id?: string; - created_at?: string; - updated_at?: string; - parent?: string; - /** The judge model configuration. */ - judge_model: EvaluatorModel | ModelRef; - /** Inference parameters for the judge. */ - inference?: InferenceParams; - /** If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse/output formatting failures are always converted to NaN. */ - ignore_request_failure?: boolean; - type?: 'context_entity_recall'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: ContextEntityRecallMetricResponseLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: ContextEntityRecallMetricResponseSupportedJobTypesItem[]; - /** Optional Jinja template for rendering the input payload for RAGAS evaluation. */ - input_template?: ContextEntityRecallMetricResponseInputTemplate; -} diff --git a/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetricResponseInputTemplate.ts b/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetricResponseInputTemplate.ts deleted file mode 100644 index 8754fd1563..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetricResponseInputTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional Jinja template for rendering the input payload for RAGAS evaluation. - */ -export type ContextEntityRecallMetricResponseInputTemplate = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetricResponseLabels.ts b/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetricResponseLabels.ts deleted file mode 100644 index f61c4da01e..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetricResponseLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type ContextEntityRecallMetricResponseLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetricResponseSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetricResponseSupportedJobTypesItem.ts deleted file mode 100644 index 4f848c748c..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetricResponseSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type ContextEntityRecallMetricResponseSupportedJobTypesItem = - (typeof ContextEntityRecallMetricResponseSupportedJobTypesItem)[keyof typeof ContextEntityRecallMetricResponseSupportedJobTypesItem]; - -export const ContextEntityRecallMetricResponseSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetricSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetricSupportedJobTypesItem.ts deleted file mode 100644 index 9a5948dd0a..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextEntityRecallMetricSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type ContextEntityRecallMetricSupportedJobTypesItem = - (typeof ContextEntityRecallMetricSupportedJobTypesItem)[keyof typeof ContextEntityRecallMetricSupportedJobTypesItem]; - -export const ContextEntityRecallMetricSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/ContextPrecisionMetric.ts b/web/packages/sdk/generated/platform/schema/ContextPrecisionMetric.ts deleted file mode 100644 index fa1605ea58..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextPrecisionMetric.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ContextPrecisionMetricInputTemplate } from './ContextPrecisionMetricInputTemplate'; -import type { ContextPrecisionMetricLabels } from './ContextPrecisionMetricLabels'; -import type { ContextPrecisionMetricSupportedJobTypesItem } from './ContextPrecisionMetricSupportedJobTypesItem'; -import type { EvaluatorModel } from './EvaluatorModel'; -import type { InferenceParams } from './InferenceParams'; - -/** - * RAGAS metric for measuring context precision. - */ -export interface ContextPrecisionMetric { - /** Entity name within the workspace */ - name?: string; - /** - * Workspace identifier - * @pattern ^[\w\-\+.@:]+$ - */ - workspace: string; - /** The name of the project associated with this entity. */ - project?: string; - /** The LLM model to use as judge. */ - judge_model: EvaluatorModel; - /** Inference parameters for the judge. */ - inference?: InferenceParams; - /** If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse/output formatting failures are always converted to NaN. */ - ignore_request_failure?: boolean; - type?: 'context_precision'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: ContextPrecisionMetricLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: ContextPrecisionMetricSupportedJobTypesItem[]; - /** Optional Jinja template for rendering the input payload for RAGAS evaluation. */ - input_template?: ContextPrecisionMetricInputTemplate; - readonly id: string; - readonly created_at: string; - readonly created_by: string | null; - readonly updated_at: string; - readonly updated_by: string | null; - /** Alias for id for backwards compatibility. */ - readonly entity_id: string; - /** Parent entity ID for nested entities. */ - readonly parent: string; -} diff --git a/web/packages/sdk/generated/platform/schema/ContextPrecisionMetricInput.ts b/web/packages/sdk/generated/platform/schema/ContextPrecisionMetricInput.ts deleted file mode 100644 index 9289e40b7a..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextPrecisionMetricInput.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ContextPrecisionMetricInputInputTemplate } from './ContextPrecisionMetricInputInputTemplate'; -import type { ContextPrecisionMetricInputLabels } from './ContextPrecisionMetricInputLabels'; -import type { ContextPrecisionMetricInputSupportedJobTypesItem } from './ContextPrecisionMetricInputSupportedJobTypesItem'; -import type { EvaluatorModel } from './EvaluatorModel'; -import type { InferenceParams } from './InferenceParams'; -import type { ModelRef } from './ModelRef'; - -/** - * Request type for ContextPrecision metrics. - */ -export interface ContextPrecisionMetricInput { - /** The judge model configuration. */ - judge_model: EvaluatorModel | ModelRef; - /** Inference parameters for the judge. */ - inference?: InferenceParams; - /** If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse/output formatting failures are always converted to NaN. */ - ignore_request_failure?: boolean; - type?: 'context_precision'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: ContextPrecisionMetricInputLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: ContextPrecisionMetricInputSupportedJobTypesItem[]; - /** Optional Jinja template for rendering the input payload for RAGAS evaluation. */ - input_template?: ContextPrecisionMetricInputInputTemplate; -} diff --git a/web/packages/sdk/generated/platform/schema/ContextPrecisionMetricInputInputTemplate.ts b/web/packages/sdk/generated/platform/schema/ContextPrecisionMetricInputInputTemplate.ts deleted file mode 100644 index d665a849c3..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextPrecisionMetricInputInputTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional Jinja template for rendering the input payload for RAGAS evaluation. - */ -export type ContextPrecisionMetricInputInputTemplate = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/ContextPrecisionMetricInputLabels.ts b/web/packages/sdk/generated/platform/schema/ContextPrecisionMetricInputLabels.ts deleted file mode 100644 index b68747bdb2..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextPrecisionMetricInputLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type ContextPrecisionMetricInputLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/ContextPrecisionMetricInputSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/ContextPrecisionMetricInputSupportedJobTypesItem.ts deleted file mode 100644 index 696a8a4ff1..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextPrecisionMetricInputSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type ContextPrecisionMetricInputSupportedJobTypesItem = - (typeof ContextPrecisionMetricInputSupportedJobTypesItem)[keyof typeof ContextPrecisionMetricInputSupportedJobTypesItem]; - -export const ContextPrecisionMetricInputSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/ContextPrecisionMetricInputTemplate.ts b/web/packages/sdk/generated/platform/schema/ContextPrecisionMetricInputTemplate.ts deleted file mode 100644 index f8abc5227e..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextPrecisionMetricInputTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional Jinja template for rendering the input payload for RAGAS evaluation. - */ -export type ContextPrecisionMetricInputTemplate = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/ContextPrecisionMetricLabels.ts b/web/packages/sdk/generated/platform/schema/ContextPrecisionMetricLabels.ts deleted file mode 100644 index 2082870cf9..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextPrecisionMetricLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type ContextPrecisionMetricLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/ContextPrecisionMetricResponse.ts b/web/packages/sdk/generated/platform/schema/ContextPrecisionMetricResponse.ts deleted file mode 100644 index 6ed0548f5e..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextPrecisionMetricResponse.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ContextPrecisionMetricResponseInputTemplate } from './ContextPrecisionMetricResponseInputTemplate'; -import type { ContextPrecisionMetricResponseLabels } from './ContextPrecisionMetricResponseLabels'; -import type { ContextPrecisionMetricResponseSupportedJobTypesItem } from './ContextPrecisionMetricResponseSupportedJobTypesItem'; -import type { EvaluatorModel } from './EvaluatorModel'; -import type { InferenceParams } from './InferenceParams'; -import type { ModelRef } from './ModelRef'; - -/** - * Response type for ContextPrecision metrics. - */ -export interface ContextPrecisionMetricResponse { - /** Entity name within the workspace */ - name?: string; - /** Workspace identifier */ - workspace?: string; - /** The name of the project associated with this entity. */ - project?: string; - /** Entity name within the workspace */ - id?: string; - created_at?: string; - updated_at?: string; - parent?: string; - /** The judge model configuration. */ - judge_model: EvaluatorModel | ModelRef; - /** Inference parameters for the judge. */ - inference?: InferenceParams; - /** If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse/output formatting failures are always converted to NaN. */ - ignore_request_failure?: boolean; - type?: 'context_precision'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: ContextPrecisionMetricResponseLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: ContextPrecisionMetricResponseSupportedJobTypesItem[]; - /** Optional Jinja template for rendering the input payload for RAGAS evaluation. */ - input_template?: ContextPrecisionMetricResponseInputTemplate; -} diff --git a/web/packages/sdk/generated/platform/schema/ContextPrecisionMetricResponseInputTemplate.ts b/web/packages/sdk/generated/platform/schema/ContextPrecisionMetricResponseInputTemplate.ts deleted file mode 100644 index d0163fbb2e..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextPrecisionMetricResponseInputTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional Jinja template for rendering the input payload for RAGAS evaluation. - */ -export type ContextPrecisionMetricResponseInputTemplate = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/ContextPrecisionMetricResponseLabels.ts b/web/packages/sdk/generated/platform/schema/ContextPrecisionMetricResponseLabels.ts deleted file mode 100644 index f17248ecc1..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextPrecisionMetricResponseLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type ContextPrecisionMetricResponseLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/ContextPrecisionMetricResponseSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/ContextPrecisionMetricResponseSupportedJobTypesItem.ts deleted file mode 100644 index d36eb4ddf8..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextPrecisionMetricResponseSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type ContextPrecisionMetricResponseSupportedJobTypesItem = - (typeof ContextPrecisionMetricResponseSupportedJobTypesItem)[keyof typeof ContextPrecisionMetricResponseSupportedJobTypesItem]; - -export const ContextPrecisionMetricResponseSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/ContextPrecisionMetricSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/ContextPrecisionMetricSupportedJobTypesItem.ts deleted file mode 100644 index aee52bb5b7..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextPrecisionMetricSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type ContextPrecisionMetricSupportedJobTypesItem = - (typeof ContextPrecisionMetricSupportedJobTypesItem)[keyof typeof ContextPrecisionMetricSupportedJobTypesItem]; - -export const ContextPrecisionMetricSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/ContextRecallMetric.ts b/web/packages/sdk/generated/platform/schema/ContextRecallMetric.ts deleted file mode 100644 index 27b7c2233e..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextRecallMetric.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ContextRecallMetricInputTemplate } from './ContextRecallMetricInputTemplate'; -import type { ContextRecallMetricLabels } from './ContextRecallMetricLabels'; -import type { ContextRecallMetricSupportedJobTypesItem } from './ContextRecallMetricSupportedJobTypesItem'; -import type { EvaluatorModel } from './EvaluatorModel'; -import type { InferenceParams } from './InferenceParams'; - -/** - * RAGAS metric for measuring context recall. - */ -export interface ContextRecallMetric { - /** Entity name within the workspace */ - name?: string; - /** - * Workspace identifier - * @pattern ^[\w\-\+.@:]+$ - */ - workspace: string; - /** The name of the project associated with this entity. */ - project?: string; - /** The LLM model to use as judge. */ - judge_model: EvaluatorModel; - /** Inference parameters for the judge. */ - inference?: InferenceParams; - /** If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse/output formatting failures are always converted to NaN. */ - ignore_request_failure?: boolean; - type?: 'context_recall'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: ContextRecallMetricLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: ContextRecallMetricSupportedJobTypesItem[]; - /** Optional Jinja template for rendering the input payload for RAGAS evaluation. */ - input_template?: ContextRecallMetricInputTemplate; - readonly id: string; - readonly created_at: string; - readonly created_by: string | null; - readonly updated_at: string; - readonly updated_by: string | null; - /** Alias for id for backwards compatibility. */ - readonly entity_id: string; - /** Parent entity ID for nested entities. */ - readonly parent: string; -} diff --git a/web/packages/sdk/generated/platform/schema/ContextRecallMetricInput.ts b/web/packages/sdk/generated/platform/schema/ContextRecallMetricInput.ts deleted file mode 100644 index 511c1b2c30..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextRecallMetricInput.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ContextRecallMetricInputInputTemplate } from './ContextRecallMetricInputInputTemplate'; -import type { ContextRecallMetricInputLabels } from './ContextRecallMetricInputLabels'; -import type { ContextRecallMetricInputSupportedJobTypesItem } from './ContextRecallMetricInputSupportedJobTypesItem'; -import type { EvaluatorModel } from './EvaluatorModel'; -import type { InferenceParams } from './InferenceParams'; -import type { ModelRef } from './ModelRef'; - -/** - * Request type for ContextRecall metrics. - */ -export interface ContextRecallMetricInput { - /** The judge model configuration. */ - judge_model: EvaluatorModel | ModelRef; - /** Inference parameters for the judge. */ - inference?: InferenceParams; - /** If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse/output formatting failures are always converted to NaN. */ - ignore_request_failure?: boolean; - type?: 'context_recall'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: ContextRecallMetricInputLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: ContextRecallMetricInputSupportedJobTypesItem[]; - /** Optional Jinja template for rendering the input payload for RAGAS evaluation. */ - input_template?: ContextRecallMetricInputInputTemplate; -} diff --git a/web/packages/sdk/generated/platform/schema/ContextRecallMetricInputInputTemplate.ts b/web/packages/sdk/generated/platform/schema/ContextRecallMetricInputInputTemplate.ts deleted file mode 100644 index 963a2baede..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextRecallMetricInputInputTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional Jinja template for rendering the input payload for RAGAS evaluation. - */ -export type ContextRecallMetricInputInputTemplate = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/ContextRecallMetricInputLabels.ts b/web/packages/sdk/generated/platform/schema/ContextRecallMetricInputLabels.ts deleted file mode 100644 index 031d0229d2..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextRecallMetricInputLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type ContextRecallMetricInputLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/ContextRecallMetricInputSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/ContextRecallMetricInputSupportedJobTypesItem.ts deleted file mode 100644 index 126dac194b..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextRecallMetricInputSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type ContextRecallMetricInputSupportedJobTypesItem = - (typeof ContextRecallMetricInputSupportedJobTypesItem)[keyof typeof ContextRecallMetricInputSupportedJobTypesItem]; - -export const ContextRecallMetricInputSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/ContextRecallMetricInputTemplate.ts b/web/packages/sdk/generated/platform/schema/ContextRecallMetricInputTemplate.ts deleted file mode 100644 index d6120b2e8f..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextRecallMetricInputTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional Jinja template for rendering the input payload for RAGAS evaluation. - */ -export type ContextRecallMetricInputTemplate = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/ContextRecallMetricLabels.ts b/web/packages/sdk/generated/platform/schema/ContextRecallMetricLabels.ts deleted file mode 100644 index 19a0f584e5..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextRecallMetricLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type ContextRecallMetricLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/ContextRecallMetricResponse.ts b/web/packages/sdk/generated/platform/schema/ContextRecallMetricResponse.ts deleted file mode 100644 index d0ad7826a7..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextRecallMetricResponse.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ContextRecallMetricResponseInputTemplate } from './ContextRecallMetricResponseInputTemplate'; -import type { ContextRecallMetricResponseLabels } from './ContextRecallMetricResponseLabels'; -import type { ContextRecallMetricResponseSupportedJobTypesItem } from './ContextRecallMetricResponseSupportedJobTypesItem'; -import type { EvaluatorModel } from './EvaluatorModel'; -import type { InferenceParams } from './InferenceParams'; -import type { ModelRef } from './ModelRef'; - -/** - * Response type for ContextRecall metrics. - */ -export interface ContextRecallMetricResponse { - /** Entity name within the workspace */ - name?: string; - /** Workspace identifier */ - workspace?: string; - /** The name of the project associated with this entity. */ - project?: string; - /** Entity name within the workspace */ - id?: string; - created_at?: string; - updated_at?: string; - parent?: string; - /** The judge model configuration. */ - judge_model: EvaluatorModel | ModelRef; - /** Inference parameters for the judge. */ - inference?: InferenceParams; - /** If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse/output formatting failures are always converted to NaN. */ - ignore_request_failure?: boolean; - type?: 'context_recall'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: ContextRecallMetricResponseLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: ContextRecallMetricResponseSupportedJobTypesItem[]; - /** Optional Jinja template for rendering the input payload for RAGAS evaluation. */ - input_template?: ContextRecallMetricResponseInputTemplate; -} diff --git a/web/packages/sdk/generated/platform/schema/ContextRecallMetricResponseInputTemplate.ts b/web/packages/sdk/generated/platform/schema/ContextRecallMetricResponseInputTemplate.ts deleted file mode 100644 index 57d87e21d2..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextRecallMetricResponseInputTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional Jinja template for rendering the input payload for RAGAS evaluation. - */ -export type ContextRecallMetricResponseInputTemplate = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/ContextRecallMetricResponseLabels.ts b/web/packages/sdk/generated/platform/schema/ContextRecallMetricResponseLabels.ts deleted file mode 100644 index 0b284c54af..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextRecallMetricResponseLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type ContextRecallMetricResponseLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/ContextRecallMetricResponseSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/ContextRecallMetricResponseSupportedJobTypesItem.ts deleted file mode 100644 index 3f70f9bb09..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextRecallMetricResponseSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type ContextRecallMetricResponseSupportedJobTypesItem = - (typeof ContextRecallMetricResponseSupportedJobTypesItem)[keyof typeof ContextRecallMetricResponseSupportedJobTypesItem]; - -export const ContextRecallMetricResponseSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/ContextRecallMetricSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/ContextRecallMetricSupportedJobTypesItem.ts deleted file mode 100644 index c13555a45a..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextRecallMetricSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type ContextRecallMetricSupportedJobTypesItem = - (typeof ContextRecallMetricSupportedJobTypesItem)[keyof typeof ContextRecallMetricSupportedJobTypesItem]; - -export const ContextRecallMetricSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/ContextRelevanceMetric.ts b/web/packages/sdk/generated/platform/schema/ContextRelevanceMetric.ts deleted file mode 100644 index 2778ef8f8c..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextRelevanceMetric.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ContextRelevanceMetricInputTemplate } from './ContextRelevanceMetricInputTemplate'; -import type { ContextRelevanceMetricLabels } from './ContextRelevanceMetricLabels'; -import type { ContextRelevanceMetricSupportedJobTypesItem } from './ContextRelevanceMetricSupportedJobTypesItem'; -import type { EvaluatorModel } from './EvaluatorModel'; -import type { InferenceParams } from './InferenceParams'; - -/** - * RAGAS metric for measuring context relevance. - */ -export interface ContextRelevanceMetric { - /** Entity name within the workspace */ - name?: string; - /** - * Workspace identifier - * @pattern ^[\w\-\+.@:]+$ - */ - workspace: string; - /** The name of the project associated with this entity. */ - project?: string; - /** The LLM model to use as judge. */ - judge_model: EvaluatorModel; - /** Inference parameters for the judge. */ - inference?: InferenceParams; - /** If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse/output formatting failures are always converted to NaN. */ - ignore_request_failure?: boolean; - type?: 'context_relevance'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: ContextRelevanceMetricLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: ContextRelevanceMetricSupportedJobTypesItem[]; - /** Optional Jinja template for rendering the input payload for RAGAS evaluation. */ - input_template?: ContextRelevanceMetricInputTemplate; - readonly id: string; - readonly created_at: string; - readonly created_by: string | null; - readonly updated_at: string; - readonly updated_by: string | null; - /** Alias for id for backwards compatibility. */ - readonly entity_id: string; - /** Parent entity ID for nested entities. */ - readonly parent: string; -} diff --git a/web/packages/sdk/generated/platform/schema/ContextRelevanceMetricInput.ts b/web/packages/sdk/generated/platform/schema/ContextRelevanceMetricInput.ts deleted file mode 100644 index e0441b6d32..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextRelevanceMetricInput.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ContextRelevanceMetricInputInputTemplate } from './ContextRelevanceMetricInputInputTemplate'; -import type { ContextRelevanceMetricInputLabels } from './ContextRelevanceMetricInputLabels'; -import type { ContextRelevanceMetricInputSupportedJobTypesItem } from './ContextRelevanceMetricInputSupportedJobTypesItem'; -import type { EvaluatorModel } from './EvaluatorModel'; -import type { InferenceParams } from './InferenceParams'; -import type { ModelRef } from './ModelRef'; - -/** - * Request type for ContextRelevance metrics. - */ -export interface ContextRelevanceMetricInput { - /** The judge model configuration. */ - judge_model: EvaluatorModel | ModelRef; - /** Inference parameters for the judge. */ - inference?: InferenceParams; - /** If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse/output formatting failures are always converted to NaN. */ - ignore_request_failure?: boolean; - type?: 'context_relevance'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: ContextRelevanceMetricInputLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: ContextRelevanceMetricInputSupportedJobTypesItem[]; - /** Optional Jinja template for rendering the input payload for RAGAS evaluation. */ - input_template?: ContextRelevanceMetricInputInputTemplate; -} diff --git a/web/packages/sdk/generated/platform/schema/ContextRelevanceMetricInputInputTemplate.ts b/web/packages/sdk/generated/platform/schema/ContextRelevanceMetricInputInputTemplate.ts deleted file mode 100644 index 29f93cbea2..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextRelevanceMetricInputInputTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional Jinja template for rendering the input payload for RAGAS evaluation. - */ -export type ContextRelevanceMetricInputInputTemplate = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/ContextRelevanceMetricInputLabels.ts b/web/packages/sdk/generated/platform/schema/ContextRelevanceMetricInputLabels.ts deleted file mode 100644 index ba2f2c6e97..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextRelevanceMetricInputLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type ContextRelevanceMetricInputLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/ContextRelevanceMetricInputSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/ContextRelevanceMetricInputSupportedJobTypesItem.ts deleted file mode 100644 index e3ca0b14ed..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextRelevanceMetricInputSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type ContextRelevanceMetricInputSupportedJobTypesItem = - (typeof ContextRelevanceMetricInputSupportedJobTypesItem)[keyof typeof ContextRelevanceMetricInputSupportedJobTypesItem]; - -export const ContextRelevanceMetricInputSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/ContextRelevanceMetricInputTemplate.ts b/web/packages/sdk/generated/platform/schema/ContextRelevanceMetricInputTemplate.ts deleted file mode 100644 index f3da24329c..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextRelevanceMetricInputTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional Jinja template for rendering the input payload for RAGAS evaluation. - */ -export type ContextRelevanceMetricInputTemplate = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/ContextRelevanceMetricLabels.ts b/web/packages/sdk/generated/platform/schema/ContextRelevanceMetricLabels.ts deleted file mode 100644 index 4b10781cdb..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextRelevanceMetricLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type ContextRelevanceMetricLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/ContextRelevanceMetricResponse.ts b/web/packages/sdk/generated/platform/schema/ContextRelevanceMetricResponse.ts deleted file mode 100644 index 5f4ae82409..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextRelevanceMetricResponse.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ContextRelevanceMetricResponseInputTemplate } from './ContextRelevanceMetricResponseInputTemplate'; -import type { ContextRelevanceMetricResponseLabels } from './ContextRelevanceMetricResponseLabels'; -import type { ContextRelevanceMetricResponseSupportedJobTypesItem } from './ContextRelevanceMetricResponseSupportedJobTypesItem'; -import type { EvaluatorModel } from './EvaluatorModel'; -import type { InferenceParams } from './InferenceParams'; -import type { ModelRef } from './ModelRef'; - -/** - * Response type for ContextRelevance metrics. - */ -export interface ContextRelevanceMetricResponse { - /** Entity name within the workspace */ - name?: string; - /** Workspace identifier */ - workspace?: string; - /** The name of the project associated with this entity. */ - project?: string; - /** Entity name within the workspace */ - id?: string; - created_at?: string; - updated_at?: string; - parent?: string; - /** The judge model configuration. */ - judge_model: EvaluatorModel | ModelRef; - /** Inference parameters for the judge. */ - inference?: InferenceParams; - /** If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse/output formatting failures are always converted to NaN. */ - ignore_request_failure?: boolean; - type?: 'context_relevance'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: ContextRelevanceMetricResponseLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: ContextRelevanceMetricResponseSupportedJobTypesItem[]; - /** Optional Jinja template for rendering the input payload for RAGAS evaluation. */ - input_template?: ContextRelevanceMetricResponseInputTemplate; -} diff --git a/web/packages/sdk/generated/platform/schema/ContextRelevanceMetricResponseInputTemplate.ts b/web/packages/sdk/generated/platform/schema/ContextRelevanceMetricResponseInputTemplate.ts deleted file mode 100644 index 0f3d46991c..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextRelevanceMetricResponseInputTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional Jinja template for rendering the input payload for RAGAS evaluation. - */ -export type ContextRelevanceMetricResponseInputTemplate = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/ContextRelevanceMetricResponseLabels.ts b/web/packages/sdk/generated/platform/schema/ContextRelevanceMetricResponseLabels.ts deleted file mode 100644 index 5f4d73dc99..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextRelevanceMetricResponseLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type ContextRelevanceMetricResponseLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/ContextRelevanceMetricResponseSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/ContextRelevanceMetricResponseSupportedJobTypesItem.ts deleted file mode 100644 index 590e053e85..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextRelevanceMetricResponseSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type ContextRelevanceMetricResponseSupportedJobTypesItem = - (typeof ContextRelevanceMetricResponseSupportedJobTypesItem)[keyof typeof ContextRelevanceMetricResponseSupportedJobTypesItem]; - -export const ContextRelevanceMetricResponseSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/ContextRelevanceMetricSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/ContextRelevanceMetricSupportedJobTypesItem.ts deleted file mode 100644 index f3d77f58c7..0000000000 --- a/web/packages/sdk/generated/platform/schema/ContextRelevanceMetricSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type ContextRelevanceMetricSupportedJobTypesItem = - (typeof ContextRelevanceMetricSupportedJobTypesItem)[keyof typeof ContextRelevanceMetricSupportedJobTypesItem]; - -export const ContextRelevanceMetricSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/CreateAdapterRequest.ts b/web/packages/sdk/generated/platform/schema/CreateAdapterRequest.ts deleted file mode 100644 index fab2c7e784..0000000000 --- a/web/packages/sdk/generated/platform/schema/CreateAdapterRequest.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { FinetuningType } from './FinetuningType'; -import type { Lora } from './Lora'; - -/** - * Request body for Adapter creation. - */ -export interface CreateAdapterRequest { - /** - * Name of the adapter. Name must be unique in the workspace. Allowed characters: letters (a-z, A-Z), digits (0-9), underscores, hyphens, and dots. - * @maxLength 255 - * @pattern ^[\w\-.]+$ - */ - name: string; - /** - * Optional description of the adapter - * @maxLength 1000 - */ - description?: string; - /** Location where adapter files are stored - expected format {workspace}/{fileset_name} */ - fileset: string; - /** Type of finetuning (LORA, P_TUNING, etc.) */ - finetuning_type: FinetuningType; - /** Whether to make this adapter available for inference post training */ - enabled?: boolean; - /** Lora configuration specifics */ - lora_config?: Lora; - /** - * Base model entity. - Use `{workspace}/{model_name}` to reference a model in any workspace, or a single `{model_name}` resolved in the path workspace. A single name (2-63 characters) or 'workspace/model_name' where each segment is a valid name (lowercase, digits, hyphens, and temporarily @ . + _; no leading/trailing or consecutive hyphens). If one slash, both sides must be non-empty. - * @maxLength 127 - */ - model: string; -} diff --git a/web/packages/sdk/generated/platform/schema/CreateFilesetRequest.ts b/web/packages/sdk/generated/platform/schema/CreateFilesetRequest.ts deleted file mode 100644 index d5293b7e70..0000000000 --- a/web/packages/sdk/generated/platform/schema/CreateFilesetRequest.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { CreateFilesetRequestCustomFields } from './CreateFilesetRequestCustomFields'; -import type { FilesetMetadataInput } from './FilesetMetadataInput'; -import type { FilesetPurpose } from './FilesetPurpose'; -import type { HuggingfaceStorageConfig } from './HuggingfaceStorageConfig'; -import type { LocalStorageConfig } from './LocalStorageConfig'; -import type { NGCStorageConfig } from './NGCStorageConfig'; -import type { S3StorageConfig } from './S3StorageConfig'; - -export interface CreateFilesetRequest { - /** - * The name of the fileset. Allowed characters: letters (a-z, A-Z), digits (0-9), underscores, hyphens, and dots. - * @maxLength 255 - * @pattern ^[\w\-.]+$ - */ - name: string; - /** - * The description of the fileset. - * @maxLength 255 - */ - description?: string; - /** The name of the project associated with this fileset. */ - project?: string; - /** The storage configuration for the fileset. If not provided, uses default storage. */ - storage?: LocalStorageConfig | NGCStorageConfig | HuggingfaceStorageConfig | S3StorageConfig; - /** The purpose of the fileset. */ - purpose?: FilesetPurpose; - /** Purpose-specific metadata. Use the purpose as the key (e.g., {dataset: {...}}). */ - metadata?: FilesetMetadataInput; - /** Custom fields for the fileset. */ - custom_fields?: CreateFilesetRequestCustomFields; - /** Cache all files after creation. Only applies to external storage. */ - cache?: boolean; -} diff --git a/web/packages/sdk/generated/platform/schema/CreateFilesetRequestCustomFields.ts b/web/packages/sdk/generated/platform/schema/CreateFilesetRequestCustomFields.ts deleted file mode 100644 index 9513c1cc6d..0000000000 --- a/web/packages/sdk/generated/platform/schema/CreateFilesetRequestCustomFields.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Custom fields for the fileset. - */ -export type CreateFilesetRequestCustomFields = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/CreateModelAdapterRequest.ts b/web/packages/sdk/generated/platform/schema/CreateModelAdapterRequest.ts deleted file mode 100644 index c1a53ce934..0000000000 --- a/web/packages/sdk/generated/platform/schema/CreateModelAdapterRequest.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { FinetuningType } from './FinetuningType'; -import type { Lora } from './Lora'; - -/** - * Request body for nested Adapter creation. The base model comes from the URL path, not the body. - */ -export interface CreateModelAdapterRequest { - /** - * Name of the adapter. Name must be unique in the workspace. Allowed characters: letters (a-z, A-Z), digits (0-9), underscores, hyphens, and dots. - * @maxLength 255 - * @pattern ^[\w\-.]+$ - */ - name: string; - /** - * Optional description of the adapter - * @maxLength 1000 - */ - description?: string; - /** Location where adapter files are stored - expected format {workspace}/{fileset_name} */ - fileset: string; - /** Type of finetuning (LORA, P_TUNING, etc.) */ - finetuning_type: FinetuningType; - /** Whether to make this adapter available for inference post training */ - enabled?: boolean; - /** Lora configuration specifics */ - lora_config?: Lora; -} diff --git a/web/packages/sdk/generated/platform/schema/CreateModelDeploymentConfigRequest.ts b/web/packages/sdk/generated/platform/schema/CreateModelDeploymentConfigRequest.ts deleted file mode 100644 index 606738b14e..0000000000 --- a/web/packages/sdk/generated/platform/schema/CreateModelDeploymentConfigRequest.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { NIMDeployment } from './NIMDeployment'; - -/** - * Request model for creating a ModelDeploymentConfig. - */ -export interface CreateModelDeploymentConfigRequest { - /** - * Name of the deployment configuration. Allowed characters: letters (a-z, A-Z), digits (0-9), underscores, hyphens, and dots. - * @maxLength 255 - * @pattern ^[\w\-.]+$ - */ - name: string; - /** - * The URN of the project associated with this deployment configuration - * @maxLength 255 - * @pattern ^[\w\-./]+$ - */ - project?: string; - /** - * Optional description of the deployment configuration - * @maxLength 1000 - */ - description?: string; - /** Configuration for NIM-based deployment */ - nim_deployment: NIMDeployment; - /** - * Optional reference to the base model entity ID for this deployment - * @maxLength 255 - */ - model_entity_id?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/CreateModelDeploymentRequest.ts b/web/packages/sdk/generated/platform/schema/CreateModelDeploymentRequest.ts deleted file mode 100644 index e5beb8342c..0000000000 --- a/web/packages/sdk/generated/platform/schema/CreateModelDeploymentRequest.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Request model for creating a ModelDeployment. - */ -export interface CreateModelDeploymentRequest { - /** - * Name of the deployment. Allowed characters: letters (a-z, A-Z), digits (0-9), underscores, hyphens, and dots. - * @maxLength 255 - * @pattern ^[\w\-.]+$ - */ - name: string; - /** - * The URN of the project associated with this deployment - * @maxLength 255 - * @pattern ^[\w\-./]+$ - */ - project?: string; - /** - * Reference to the ModelDeploymentConfig name - * @maxLength 255 - */ - config: string; - /** Reference to a specific ModelDeploymentConfig version. If not specified, uses latest. */ - config_version?: number; -} diff --git a/web/packages/sdk/generated/platform/schema/CreateModelEntityRequest.ts b/web/packages/sdk/generated/platform/schema/CreateModelEntityRequest.ts deleted file mode 100644 index 8b1aeac5cb..0000000000 --- a/web/packages/sdk/generated/platform/schema/CreateModelEntityRequest.ts +++ /dev/null @@ -1,65 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { APIEndpointData } from './APIEndpointData'; -import type { BackendFormat } from './BackendFormat'; -import type { CreateModelEntityRequestCustomFields } from './CreateModelEntityRequestCustomFields'; -import type { CreateModelEntityRequestOwnership } from './CreateModelEntityRequestOwnership'; -import type { FinetuningType } from './FinetuningType'; -import type { ModelSpec } from './ModelSpec'; -import type { PromptData } from './PromptData'; - -/** - * Request model for creating a Model Entity. - */ -export interface CreateModelEntityRequest { - /** - * Name of the model entity. Allowed characters: letters (a-z, A-Z), digits (0-9), underscores, hyphens, and dots. - * @maxLength 255 - * @pattern ^[\w\-.]+$ - */ - name: string; - /** - * The URN of the project associated with this model entity - * @maxLength 255 - * @pattern ^[\w\-./]+$ - */ - project?: string; - /** - * Optional description of the model - * @maxLength 1000 - */ - description?: string; - /** Detailed specification for the model - Automatically generated by the platform at creation when fileset provided. */ - spec?: ModelSpec; - /** Set for full weight finetuned models */ - finetuning_type?: FinetuningType; - /** A set of checkpoint files, configs, and other auxiliary info associated with this model - expected format {workspace}/{fileset_name} */ - fileset?: string; - /** Link to another model which is used as a base for the current model */ - base_model?: string; - /** Data about the inference endpoint for this model */ - api_endpoint?: APIEndpointData; - /** Inference API wire format expected by the backend. If unset, inference routing treats the model as OPENAI_CHAT. */ - backend_format?: BackendFormat | null; - /** Configuration for prompt engineering */ - prompt?: PromptData; - /** Custom fields for additional metadata */ - custom_fields?: CreateModelEntityRequestCustomFields; - /** Ownership information for the model */ - ownership?: CreateModelEntityRequestOwnership; - /** List of ModelProvider workspace/name resource names that provide inference for this Model Entity */ - model_providers?: string[]; - /** Whether to trust remote code for the checkpoint. - Some models without support in certain libraries such as Transformers require additional custom Python code to execute. - Due to security ramifications of running arbitrary code, this can only be set to true on one of the following conditions: - (1) the model's fileset's source is pre-approved in the platform config, or - (2) the user creating this model is an administrator. - */ - trust_remote_code?: boolean; -} diff --git a/web/packages/sdk/generated/platform/schema/CreateModelEntityRequestCustomFields.ts b/web/packages/sdk/generated/platform/schema/CreateModelEntityRequestCustomFields.ts deleted file mode 100644 index f1529b0db6..0000000000 --- a/web/packages/sdk/generated/platform/schema/CreateModelEntityRequestCustomFields.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Custom fields for additional metadata - */ -export type CreateModelEntityRequestCustomFields = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/CreateModelEntityRequestOwnership.ts b/web/packages/sdk/generated/platform/schema/CreateModelEntityRequestOwnership.ts deleted file mode 100644 index b1daea3704..0000000000 --- a/web/packages/sdk/generated/platform/schema/CreateModelEntityRequestOwnership.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Ownership information for the model - */ -export type CreateModelEntityRequestOwnership = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/CreateModelProviderRequest.ts b/web/packages/sdk/generated/platform/schema/CreateModelProviderRequest.ts deleted file mode 100644 index ae9e0a4cfa..0000000000 --- a/web/packages/sdk/generated/platform/schema/CreateModelProviderRequest.ts +++ /dev/null @@ -1,73 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { CreateModelProviderRequestDefaultExtraBody } from './CreateModelProviderRequestDefaultExtraBody'; -import type { CreateModelProviderRequestDefaultExtraHeaders } from './CreateModelProviderRequestDefaultExtraHeaders'; -import type { CreateModelProviderRequestRequiredExtraBody } from './CreateModelProviderRequestRequiredExtraBody'; -import type { CreateModelProviderRequestRequiredExtraHeaders } from './CreateModelProviderRequestRequiredExtraHeaders'; -import type { ModelProviderStatus } from './ModelProviderStatus'; - -/** - * Request model for creating a ModelProvider. - */ -export interface CreateModelProviderRequest { - /** - * Name of the model provider. Allowed characters: letters (a-z, A-Z), digits (0-9), underscores, hyphens, and dots. - * @maxLength 255 - * @pattern ^[\w\-.]+$ - */ - name: string; - /** - * The URN of the project associated with this model provider - * @maxLength 255 - * @pattern ^[\w\-./]+$ - */ - project?: string; - /** - * Optional description of the model provider - * @maxLength 1000 - */ - description?: string; - /** - * The network endpoint URL for the model provider - * @maxLength 2048 - */ - host_url: string; - /** - * Reference to an API key secret stored in the Secrets service. Create the secret first via secrets API, then pass the secret name here. - * @maxLength 255 - */ - api_key_secret_name?: string; - /** Optional list of specific models to enable from this provider */ - enabled_models?: string[]; - /** Default body parameters for inference requests. Can be overridden by user requests. */ - default_extra_body?: CreateModelProviderRequestDefaultExtraBody; - /** Default headers for inference requests. Can be overridden by user requests. */ - default_extra_headers?: CreateModelProviderRequestDefaultExtraHeaders; - /** Required body parameters for inference requests. Cannot be overridden by user requests. */ - required_extra_body?: CreateModelProviderRequestRequiredExtraBody; - /** Required headers for inference requests. Cannot be overridden by user requests. */ - required_extra_headers?: CreateModelProviderRequestRequiredExtraHeaders; - /** - * Optional reference to the ModelDeployment ID if this provider is being auto-created for a deployment - * @maxLength 255 - */ - model_deployment_id?: string; - /** Status of the model provider */ - status?: ModelProviderStatus; - /** - * Status message - * @maxLength 1000 - */ - status_message?: string; - /** - * Jinja2 template string controlling how the API key secret is sent to the upstream. Must contain exactly one variable named `auth_secret`, which is substituted with the resolved secret value at request time. Example: `'X-Api-Key: {{ auth_secret }}'`. If not set, defaults to `'Authorization: Bearer {{ auth_secret }}'`. - * @maxLength 1024 - */ - auth_header_format?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/CreateModelProviderRequestDefaultExtraBody.ts b/web/packages/sdk/generated/platform/schema/CreateModelProviderRequestDefaultExtraBody.ts deleted file mode 100644 index 65b4bceb26..0000000000 --- a/web/packages/sdk/generated/platform/schema/CreateModelProviderRequestDefaultExtraBody.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Default body parameters for inference requests. Can be overridden by user requests. - */ -export type CreateModelProviderRequestDefaultExtraBody = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/CreateModelProviderRequestDefaultExtraHeaders.ts b/web/packages/sdk/generated/platform/schema/CreateModelProviderRequestDefaultExtraHeaders.ts deleted file mode 100644 index 890878b643..0000000000 --- a/web/packages/sdk/generated/platform/schema/CreateModelProviderRequestDefaultExtraHeaders.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Default headers for inference requests. Can be overridden by user requests. - */ -export type CreateModelProviderRequestDefaultExtraHeaders = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/CreateModelProviderRequestRequiredExtraBody.ts b/web/packages/sdk/generated/platform/schema/CreateModelProviderRequestRequiredExtraBody.ts deleted file mode 100644 index d66bb96bb7..0000000000 --- a/web/packages/sdk/generated/platform/schema/CreateModelProviderRequestRequiredExtraBody.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Required body parameters for inference requests. Cannot be overridden by user requests. - */ -export type CreateModelProviderRequestRequiredExtraBody = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/CreateModelProviderRequestRequiredExtraHeaders.ts b/web/packages/sdk/generated/platform/schema/CreateModelProviderRequestRequiredExtraHeaders.ts deleted file mode 100644 index d393c5abf4..0000000000 --- a/web/packages/sdk/generated/platform/schema/CreateModelProviderRequestRequiredExtraHeaders.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Required headers for inference requests. Cannot be overridden by user requests. - */ -export type CreateModelProviderRequestRequiredExtraHeaders = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/CreatePlatformJobRequest.ts b/web/packages/sdk/generated/platform/schema/CreatePlatformJobRequest.ts deleted file mode 100644 index 06e2b5ce5e..0000000000 --- a/web/packages/sdk/generated/platform/schema/CreatePlatformJobRequest.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { CreatePlatformJobRequestCustomFields } from './CreatePlatformJobRequestCustomFields'; -import type { CreatePlatformJobRequestOwnership } from './CreatePlatformJobRequestOwnership'; -import type { CreatePlatformJobRequestSpec } from './CreatePlatformJobRequestSpec'; -import type { PlatformJobSpecInput } from './PlatformJobSpecInput'; - -/** - * Request model for creating a new platform job. - */ -export interface CreatePlatformJobRequest { - name?: string; - description?: string; - project?: string; - spec: CreatePlatformJobRequestSpec; - platform_spec: PlatformJobSpecInput; - source: string; - ownership?: CreatePlatformJobRequestOwnership; - custom_fields?: CreatePlatformJobRequestCustomFields; -} diff --git a/web/packages/sdk/generated/platform/schema/CreatePlatformJobRequestCustomFields.ts b/web/packages/sdk/generated/platform/schema/CreatePlatformJobRequestCustomFields.ts deleted file mode 100644 index 4267899450..0000000000 --- a/web/packages/sdk/generated/platform/schema/CreatePlatformJobRequestCustomFields.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type CreatePlatformJobRequestCustomFields = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/CreatePlatformJobRequestOwnership.ts b/web/packages/sdk/generated/platform/schema/CreatePlatformJobRequestOwnership.ts deleted file mode 100644 index 81af65ba46..0000000000 --- a/web/packages/sdk/generated/platform/schema/CreatePlatformJobRequestOwnership.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type CreatePlatformJobRequestOwnership = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/CreatePlatformJobRequestSpec.ts b/web/packages/sdk/generated/platform/schema/CreatePlatformJobRequestSpec.ts deleted file mode 100644 index b389209c58..0000000000 --- a/web/packages/sdk/generated/platform/schema/CreatePlatformJobRequestSpec.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type CreatePlatformJobRequestSpec = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/CreateVirtualModelRequest.ts b/web/packages/sdk/generated/platform/schema/CreateVirtualModelRequest.ts deleted file mode 100644 index 319855b09b..0000000000 --- a/web/packages/sdk/generated/platform/schema/CreateVirtualModelRequest.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { MiddlewareCall } from './MiddlewareCall'; -import type { VirtualModelInferenceConfig } from './VirtualModelInferenceConfig'; - -/** - * Request body for creating a new VirtualModel. - */ -export interface CreateVirtualModelRequest { - /** Model entity to route to, in "workspace/name" format. Written into request["model"] before the request middleware pipeline runs. If omitted, a request middleware plugin must handle backend routing itself. Set to null to clear an existing value. */ - default_model_entity?: string; - /** Marks this VirtualModel as controller-managed. The Models controller will delete it once no ModelProvider serves the matching entity. Setting this manually opts the VirtualModel into that cleanup behavior. */ - autoprovisioned?: boolean; - /** Model entity references used by this VirtualModel. A per-entry backend_format overrides the referenced ModelEntity backend_format when IGW resolves the backend format for a request. */ - models?: VirtualModelInferenceConfig[]; - /** Ordered list of middleware plugins applied before proxying to the backend. Each entry is a MiddlewareCall with a "name" (plugin identifier) and optional "config_type" and "config_id" fields that reference a stored plugin configuration. */ - request_middleware?: MiddlewareCall[]; - /** Ordered list of middleware plugins applied after the backend response is received, before returning it to the caller. */ - response_middleware?: MiddlewareCall[]; - /** Ordered list of middleware plugins invoked after the response has been returned to the caller. Intended for fire-and-forget work (logging, analytics) that must not block or modify the response. */ - post_response_middleware?: MiddlewareCall[]; - /** Plugin-provided proxy implementation for IGW to use instead of its default aiohttp proxy. Format: "plugin-name.proxy-name". Leave unset to use the default IGW proxy. Set to null to clear an existing value. */ - override_proxy?: string; - /** Name of the virtual model within the workspace. Must be unique per workspace. */ - name: string; -} diff --git a/web/packages/sdk/generated/platform/schema/CrowdStrikeAIDRRailConfig.ts b/web/packages/sdk/generated/platform/schema/CrowdStrikeAIDRRailConfig.ts deleted file mode 100644 index 51078ee470..0000000000 --- a/web/packages/sdk/generated/platform/schema/CrowdStrikeAIDRRailConfig.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Configuration data for the CrowdStrike AIDR API - */ -export interface CrowdStrikeAIDRRailConfig { - /** Timeout in seconds for API requests to CrowdStrike AIDR */ - timeout?: number; -} diff --git a/web/packages/sdk/generated/platform/schema/DataParameters.ts b/web/packages/sdk/generated/platform/schema/DataParameters.ts deleted file mode 100644 index a83460ab26..0000000000 --- a/web/packages/sdk/generated/platform/schema/DataParameters.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Configuration for grouping, ordering, and splitting input data for training and evaluation. - */ -export interface DataParameters { - /** Column to group training examples by. This is useful when you want the model to learn inter-record correlations for a given grouping of records. */ - group_training_examples_by?: string; - /** Column to order training examples by. This is useful when you want the model to learn sequential relationships for a given ordering of records. If you provide this parameter, you must also provide ``group_training_examples_by``. */ - order_training_examples_by?: string; - /** If specified, adds at most this number of sequences per example. Supports 'auto' where a value of 1 is chosen if differential privacy is enabled, and 10 otherwise. If not specified or set to 'auto', fills up context. Required for DP to limit contribution of each example. */ - max_sequences_per_example?: 'auto' | number; - /** Amount of records to hold out for evaluation. If this is a float between 0 and 1, that ratio of records is held out. If an integer greater than 1, that number of records is held out. If the value is equal to zero, no holdout will be performed. Must be >= 0. */ - holdout?: number; - /** Maximum number of records to hold out. Overrides any behavior set by ``holdout``. Must be >= 0. */ - max_holdout?: number; - /** Random state for holdout split to ensure reproducibility. */ - random_state?: number; -} diff --git a/web/packages/sdk/generated/platform/schema/DatasetMetadataContent.ts b/web/packages/sdk/generated/platform/schema/DatasetMetadataContent.ts deleted file mode 100644 index faec913383..0000000000 --- a/web/packages/sdk/generated/platform/schema/DatasetMetadataContent.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { DatasetMetadataContentSchema } from './DatasetMetadataContentSchema'; -import type { DatasetMetadataContentSchemaDefs } from './DatasetMetadataContentSchemaDefs'; -import type { DatasetMetadataContentSchemasByPath } from './DatasetMetadataContentSchemasByPath'; - -/** - * Content for dataset-type filesets. - */ -export interface DatasetMetadataContent { - /** Default row schema for files in this fileset, either inline JSON Schema or a schema_defs key. */ - schema?: DatasetMetadataContentSchema; - /** Reusable JSON Schema definitions keyed by name for deduplicating per-file dataset schemas. */ - schema_defs?: DatasetMetadataContentSchemaDefs; - /** Optional per-file row schemas keyed by relative path within the fileset. Each value may be inline JSON Schema or a schema_defs key. */ - schemas_by_path?: DatasetMetadataContentSchemasByPath; -} diff --git a/web/packages/sdk/generated/platform/schema/DatasetMetadataContentSchema.ts b/web/packages/sdk/generated/platform/schema/DatasetMetadataContentSchema.ts deleted file mode 100644 index 362bb73e0d..0000000000 --- a/web/packages/sdk/generated/platform/schema/DatasetMetadataContentSchema.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Default row schema for files in this fileset, either inline JSON Schema or a schema_defs key. - */ -export type DatasetMetadataContentSchema = { [key: string]: unknown } | string; diff --git a/web/packages/sdk/generated/platform/schema/DatasetMetadataContentSchemaDefs.ts b/web/packages/sdk/generated/platform/schema/DatasetMetadataContentSchemaDefs.ts deleted file mode 100644 index 5d588e3ed0..0000000000 --- a/web/packages/sdk/generated/platform/schema/DatasetMetadataContentSchemaDefs.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Reusable JSON Schema definitions keyed by name for deduplicating per-file dataset schemas. - */ -export type DatasetMetadataContentSchemaDefs = { [key: string]: { [key: string]: unknown } }; diff --git a/web/packages/sdk/generated/platform/schema/DatasetMetadataContentSchemasByPath.ts b/web/packages/sdk/generated/platform/schema/DatasetMetadataContentSchemasByPath.ts deleted file mode 100644 index 58221d7ce9..0000000000 --- a/web/packages/sdk/generated/platform/schema/DatasetMetadataContentSchemasByPath.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional per-file row schemas keyed by relative path within the fileset. Each value may be inline JSON Schema or a schema_defs key. - */ -export type DatasetMetadataContentSchemasByPath = { - [key: string]: { [key: string]: unknown } | string; -}; diff --git a/web/packages/sdk/generated/platform/schema/DatasetRows.ts b/web/packages/sdk/generated/platform/schema/DatasetRows.ts deleted file mode 100644 index a202d87f80..0000000000 --- a/web/packages/sdk/generated/platform/schema/DatasetRows.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { DatasetRowsRowsItem } from './DatasetRowsRowsItem'; - -/** - * Inline dataset definition with embedded rows. - -Use this for quick evaluations without persisting the dataset first. - */ -export interface DatasetRows { - /** - * Array of data rows. Each row can be any valid JSON value (object, string, array, etc.). - * @minItems 1 - */ - rows: DatasetRowsRowsItem[]; -} diff --git a/web/packages/sdk/generated/platform/schema/DatasetRowsRowsItem.ts b/web/packages/sdk/generated/platform/schema/DatasetRowsRowsItem.ts deleted file mode 100644 index 512fa72bd0..0000000000 --- a/web/packages/sdk/generated/platform/schema/DatasetRowsRowsItem.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type DatasetRowsRowsItem = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/DateRangeFilter.ts b/web/packages/sdk/generated/platform/schema/DateRangeFilter.ts deleted file mode 100644 index e698d067e3..0000000000 --- a/web/packages/sdk/generated/platform/schema/DateRangeFilter.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Filter for date ranges. - */ -export interface DateRangeFilter { - /** Greater than or equal to this date */ - gte?: string; - /** Less than or equal to this date */ - lte?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/DatetimeFilter.ts b/web/packages/sdk/generated/platform/schema/DatetimeFilter.ts deleted file mode 100644 index 0f6e5eb20c..0000000000 --- a/web/packages/sdk/generated/platform/schema/DatetimeFilter.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export interface DatetimeFilter { - /** Filter for results greater than or equal to this datetime. */ - $gte?: string; - /** Filter for results less than or equal to this datetime. */ - $lte?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/DeleteResponse.ts b/web/packages/sdk/generated/platform/schema/DeleteResponse.ts deleted file mode 100644 index 0643df95ff..0000000000 --- a/web/packages/sdk/generated/platform/schema/DeleteResponse.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export interface DeleteResponse { - message?: string; - /** The ID of the deleted resource. */ - id?: string; - /** The timestamp when the resource was deleted. */ - deleted_at?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/DialogRails.ts b/web/packages/sdk/generated/platform/schema/DialogRails.ts deleted file mode 100644 index 5cfb17033b..0000000000 --- a/web/packages/sdk/generated/platform/schema/DialogRails.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { SingleCallConfig } from './SingleCallConfig'; -import type { UserMessagesConfig } from './UserMessagesConfig'; - -/** - * Configuration of topical rails. - */ -export interface DialogRails { - /** Configuration for the single LLM call option. */ - single_call?: SingleCallConfig; - user_messages?: UserMessagesConfig; -} diff --git a/web/packages/sdk/generated/platform/schema/DifferentialPrivacyHyperparams.ts b/web/packages/sdk/generated/platform/schema/DifferentialPrivacyHyperparams.ts deleted file mode 100644 index 961ce43e05..0000000000 --- a/web/packages/sdk/generated/platform/schema/DifferentialPrivacyHyperparams.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Hyperparameters for differential privacy during training. - -These parameters configure differential privacy (DP) training using DP-SGD algorithm. -When enabled, they provide formal privacy guarantees by adding calibrated noise -during training. - */ -export interface DifferentialPrivacyHyperparams { - /** Enable differentially-private training with DP-SGD. */ - dp_enabled?: boolean; - /** Target privacy budget -- lower values provide stronger privacy. Must be > 0. */ - epsilon?: number; - /** Probability of accidentally leaking information. Should be much smaller than 1/n where n is the number of training records. Setting to 'auto' uses delta of 1/n^1.2. Must be in [0, 1) or 'auto'. */ - delta?: 'auto' | number; - /** Maximum L2 norm for per-sample gradient clipping. Must be > 0. */ - per_sample_max_grad_norm?: number; -} diff --git a/web/packages/sdk/generated/platform/schema/DistributedGPUExecutionProviderInput.ts b/web/packages/sdk/generated/platform/schema/DistributedGPUExecutionProviderInput.ts deleted file mode 100644 index 09a35b0700..0000000000 --- a/web/packages/sdk/generated/platform/schema/DistributedGPUExecutionProviderInput.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ComputeResources } from './ComputeResources'; -import type { ContainerSpec } from './ContainerSpec'; - -/** - * GPU-based execution provider. - -Provides configuration for running jobs on GPU resources with -resource requests and limits. - */ -export interface DistributedGPUExecutionProviderInput { - provider?: 'gpu_distributed'; - profile?: string; - container: ContainerSpec; - /** Resource requests and limits for distributed GPU execution. */ - resources?: ComputeResources; -} diff --git a/web/packages/sdk/generated/platform/schema/DistributedGPUExecutionProviderOutput.ts b/web/packages/sdk/generated/platform/schema/DistributedGPUExecutionProviderOutput.ts deleted file mode 100644 index 22fd3eb79b..0000000000 --- a/web/packages/sdk/generated/platform/schema/DistributedGPUExecutionProviderOutput.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ComputeResources } from './ComputeResources'; -import type { ContainerSpec } from './ContainerSpec'; - -/** - * GPU-based execution provider. - -Provides configuration for running jobs on GPU resources with -resource requests and limits. - */ -export interface DistributedGPUExecutionProviderOutput { - provider?: 'gpu_distributed'; - profile?: string; - container: ContainerSpec; - /** Resource requests and limits for distributed GPU execution. */ - resources?: ComputeResources; -} diff --git a/web/packages/sdk/generated/platform/schema/DockerJobExecutionProfile.ts b/web/packages/sdk/generated/platform/schema/DockerJobExecutionProfile.ts deleted file mode 100644 index e13586293c..0000000000 --- a/web/packages/sdk/generated/platform/schema/DockerJobExecutionProfile.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { DockerJobExecutionProfileConfig } from './DockerJobExecutionProfileConfig'; - -/** - * Execution configuration for a Docker Job. -This is used to define the executor type, provider, profile, and any additional configuration -required for the executor to run the job on Docker - */ -export interface DockerJobExecutionProfile { - /** The compute provider for the executor, e.g., cpu, gpu */ - provider?: string; - /** The profile name for the executor, e.g., high_priority_a100, low_priority, etc. */ - profile?: string; - backend?: 'docker'; - /** Additional configuration for the docker executor */ - config: DockerJobExecutionProfileConfig; -} diff --git a/web/packages/sdk/generated/platform/schema/DockerJobExecutionProfileConfig.ts b/web/packages/sdk/generated/platform/schema/DockerJobExecutionProfileConfig.ts deleted file mode 100644 index e4e1bb2039..0000000000 --- a/web/packages/sdk/generated/platform/schema/DockerJobExecutionProfileConfig.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { DockerJobExecutionProfileConfigEnv } from './DockerJobExecutionProfileConfigEnv'; -import type { DockerJobNetworkConfig } from './DockerJobNetworkConfig'; -import type { DockerJobStorageConfig } from './DockerJobStorageConfig'; - -/** - * Configuration for Docker Job execution profile. - */ -export interface DockerJobExecutionProfileConfig { - ttl_seconds_before_active?: number; - ttl_seconds_active?: number; - ttl_seconds_after_finished?: number; - cleanup_completed_jobs_immediately?: boolean; - /** Path to the jobs launcher tool */ - launcher_tool_path?: string; - /** Optional env vars applied to all jobs (e.g. HOME=/tmp). Keys must not conflict with platform-reserved names. Job steps may override these variables. */ - env?: DockerJobExecutionProfileConfigEnv; - /** Docker storage configuration */ - storage?: DockerJobStorageConfig; - /** Docker networking configuration */ - networking?: DockerJobNetworkConfig; -} diff --git a/web/packages/sdk/generated/platform/schema/DockerJobExecutionProfileConfigEnv.ts b/web/packages/sdk/generated/platform/schema/DockerJobExecutionProfileConfigEnv.ts deleted file mode 100644 index bfdab25841..0000000000 --- a/web/packages/sdk/generated/platform/schema/DockerJobExecutionProfileConfigEnv.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional env vars applied to all jobs (e.g. HOME=/tmp). Keys must not conflict with platform-reserved names. Job steps may override these variables. - */ -export type DockerJobExecutionProfileConfigEnv = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/DockerJobNetworkConfig.ts b/web/packages/sdk/generated/platform/schema/DockerJobNetworkConfig.ts deleted file mode 100644 index d47c120b9a..0000000000 --- a/web/packages/sdk/generated/platform/schema/DockerJobNetworkConfig.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export interface DockerJobNetworkConfig { - /** Docker network for the job container */ - job_container_network?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/DockerJobStorageConfig.ts b/web/packages/sdk/generated/platform/schema/DockerJobStorageConfig.ts deleted file mode 100644 index 4584af66b9..0000000000 --- a/web/packages/sdk/generated/platform/schema/DockerJobStorageConfig.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { DockerVolumeMount } from './DockerVolumeMount'; - -/** - * Configuration for persistent storage in Docker jobs. - */ -export interface DockerJobStorageConfig { - /** Name of the Docker volume for persistent storage */ - volume_name?: string; - /** Docker image used to set permissions on the volume */ - volume_permissions_image?: string; - /** List of additional Docker volume mounts for the job */ - additional_volume_mounts?: DockerVolumeMount[]; -} diff --git a/web/packages/sdk/generated/platform/schema/DockerVolumeMount.ts b/web/packages/sdk/generated/platform/schema/DockerVolumeMount.ts deleted file mode 100644 index 98b9a4a9eb..0000000000 --- a/web/packages/sdk/generated/platform/schema/DockerVolumeMount.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { DockerVolumeMountKind } from './DockerVolumeMountKind'; -import type { DockerVolumeMountOptions } from './DockerVolumeMountOptions'; - -export interface DockerVolumeMount { - /** Name of the Docker volume to mount */ - volume_name: string; - /** Path inside the container where the volume will be mounted */ - mount_path: string; - /** Type of the Docker volume to mount. Options are 'volume' or 'tmpfs' (default: 'volume'). tmpfs volumes are only supported on Linux hosts. */ - kind?: DockerVolumeMountKind; - /** Additional options for the volume */ - options?: DockerVolumeMountOptions; - /** Whether to allow the creation of the volume if it does not exist (default: false). */ - allow_create_volume?: boolean; -} diff --git a/web/packages/sdk/generated/platform/schema/DockerVolumeMountKind.ts b/web/packages/sdk/generated/platform/schema/DockerVolumeMountKind.ts deleted file mode 100644 index 3d61ddb38f..0000000000 --- a/web/packages/sdk/generated/platform/schema/DockerVolumeMountKind.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Type of the Docker volume to mount. Options are 'volume' or 'tmpfs' (default: 'volume'). tmpfs volumes are only supported on Linux hosts. - */ -export type DockerVolumeMountKind = - (typeof DockerVolumeMountKind)[keyof typeof DockerVolumeMountKind]; - -export const DockerVolumeMountKind = { - volume: 'volume', - tmpfs: 'tmpfs', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/DockerVolumeMountOptions.ts b/web/packages/sdk/generated/platform/schema/DockerVolumeMountOptions.ts deleted file mode 100644 index f90f7f69dc..0000000000 --- a/web/packages/sdk/generated/platform/schema/DockerVolumeMountOptions.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Additional options for the volume - */ -export type DockerVolumeMountOptions = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/E2EJobExecutionProfile.ts b/web/packages/sdk/generated/platform/schema/E2EJobExecutionProfile.ts deleted file mode 100644 index a69b5e1cb8..0000000000 --- a/web/packages/sdk/generated/platform/schema/E2EJobExecutionProfile.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { JobExecutionProfileConfig } from './JobExecutionProfileConfig'; - -/** - * Execution configuration for E2E testing. -This backend auto-completes jobs without actually running containers, -making tests fast and deterministic. - */ -export interface E2EJobExecutionProfile { - /** The compute provider for the executor, e.g., cpu, gpu */ - provider?: string; - /** The profile name for the executor, e.g., high_priority_a100, low_priority, etc. */ - profile?: string; - backend?: 'e2e'; - /** Configuration for the e2e test executor */ - config?: JobExecutionProfileConfig; -} diff --git a/web/packages/sdk/generated/platform/schema/EntitiesAddWorkspaceMemberParams.ts b/web/packages/sdk/generated/platform/schema/EntitiesAddWorkspaceMemberParams.ts deleted file mode 100644 index 9e02447e39..0000000000 --- a/web/packages/sdk/generated/platform/schema/EntitiesAddWorkspaceMemberParams.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type EntitiesAddWorkspaceMemberParams = { - /** - * If true, wait for roles to propagate before returning (default: true). Set to false for bulk operations. - */ - wait_role_propagation?: boolean; -}; diff --git a/web/packages/sdk/generated/platform/schema/EntitiesCreateWorkspaceParams.ts b/web/packages/sdk/generated/platform/schema/EntitiesCreateWorkspaceParams.ts deleted file mode 100644 index 8064761484..0000000000 --- a/web/packages/sdk/generated/platform/schema/EntitiesCreateWorkspaceParams.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type EntitiesCreateWorkspaceParams = { - /** - * If true, wait for Admin role to propagate before returning (default: true). Set to false for bulk operations. - */ - wait_role_propagation?: boolean; -}; diff --git a/web/packages/sdk/generated/platform/schema/EntitiesDeleteEntityByNameParams.ts b/web/packages/sdk/generated/platform/schema/EntitiesDeleteEntityByNameParams.ts deleted file mode 100644 index 79d6f0aeda..0000000000 --- a/web/packages/sdk/generated/platform/schema/EntitiesDeleteEntityByNameParams.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type EntitiesDeleteEntityByNameParams = { - /** - * Parent entity ID for nested entities - */ - parent?: string; -}; diff --git a/web/packages/sdk/generated/platform/schema/EntitiesGetEntityByNameParams.ts b/web/packages/sdk/generated/platform/schema/EntitiesGetEntityByNameParams.ts deleted file mode 100644 index c1e0e7bad9..0000000000 --- a/web/packages/sdk/generated/platform/schema/EntitiesGetEntityByNameParams.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type EntitiesGetEntityByNameParams = { - /** - * Parent entity ID for nested entities - */ - parent?: string; -}; diff --git a/web/packages/sdk/generated/platform/schema/EntitiesListEntitiesParams.ts b/web/packages/sdk/generated/platform/schema/EntitiesListEntitiesParams.ts deleted file mode 100644 index 1b95c64e97..0000000000 --- a/web/packages/sdk/generated/platform/schema/EntitiesListEntitiesParams.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type EntitiesListEntitiesParams = { - /** - * Page number - * @minimum 1 - */ - page?: number; - /** - * Items per page - * @minimum 1 - * @maximum 1000 - */ - page_size?: number; - /** - * Sort field - */ - sort?: string; - /** - * Query filter expression. Supports text and JSON syntaxes: -- Text: name:"value" AND status>500 with operators : ~ > >= < <= IN NOT IN AND OR and negation prefix - -- Object (JSON): {"name":{"$like":"value"}} with operators $eq, $like, $lt, $lte, $gt, $gte, $in, $nin, $and, $or, $not -- Bracket notation: ?filter[name][$like]=value -- Relationship traversal: ?filter[relationship][$exists]=true or ?filter[relationship][field]=value - */ - filter?: string; -}; diff --git a/web/packages/sdk/generated/platform/schema/EntitiesListProjectsParams.ts b/web/packages/sdk/generated/platform/schema/EntitiesListProjectsParams.ts deleted file mode 100644 index 151105145a..0000000000 --- a/web/packages/sdk/generated/platform/schema/EntitiesListProjectsParams.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ProjectSortField } from './ProjectSortField'; - -export type EntitiesListProjectsParams = { - /** - * Page number - * @minimum 1 - */ - page?: number; - /** - * Items per page - * @minimum 1 - * @maximum 1000 - */ - page_size?: number; - /** - * Sort field - */ - sort?: ProjectSortField; - /** - * Query filter expression. Supports text and JSON syntaxes: -- Text: name:"value" AND status>500 with operators : ~ > >= < <= IN NOT IN AND OR and negation prefix - -- Object (JSON): {"name":{"$like":"value"}} with operators $eq, $like, $lt, $lte, $gt, $gte, $in, $nin, $and, $or, $not -- Bracket notation: ?filter[name][$like]=value -- Relationship traversal: ?filter[relationship][$exists]=true or ?filter[relationship][field]=value - */ - filter?: string; -}; diff --git a/web/packages/sdk/generated/platform/schema/EntitiesListWorkspacesParams.ts b/web/packages/sdk/generated/platform/schema/EntitiesListWorkspacesParams.ts deleted file mode 100644 index 44741d620d..0000000000 --- a/web/packages/sdk/generated/platform/schema/EntitiesListWorkspacesParams.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { GenericSortField } from './GenericSortField'; - -export type EntitiesListWorkspacesParams = { - /** - * Page number - * @minimum 1 - */ - page?: number; - /** - * Items per page - * @minimum 1 - * @maximum 1000 - */ - page_size?: number; - /** - * Sort field - */ - sort?: GenericSortField; - /** - * Query filter expression. Supports text and JSON syntaxes: -- Text: name:"value" AND status>500 with operators : ~ > >= < <= IN NOT IN AND OR and negation prefix - -- Object (JSON): {"name":{"$like":"value"}} with operators $eq, $like, $lt, $lte, $gt, $gte, $in, $nin, $and, $or, $not -- Bracket notation: ?filter[name][$like]=value -- Relationship traversal: ?filter[relationship][$exists]=true or ?filter[relationship][field]=value - */ - filter?: string; -}; diff --git a/web/packages/sdk/generated/platform/schema/EntitiesPage.ts b/web/packages/sdk/generated/platform/schema/EntitiesPage.ts deleted file mode 100644 index c14bd13ae1..0000000000 --- a/web/packages/sdk/generated/platform/schema/EntitiesPage.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { EntitiesPageFilter } from './EntitiesPageFilter'; -import type { Entity } from './Entity'; -import type { PaginationData } from './PaginationData'; - -export interface EntitiesPage { - data: Entity[]; - /** Pagination information. */ - pagination?: PaginationData; - /** The field on which the results are sorted. */ - sort?: string; - /** Filtering information. */ - filter?: EntitiesPageFilter; -} diff --git a/web/packages/sdk/generated/platform/schema/EntitiesPageFilter.ts b/web/packages/sdk/generated/platform/schema/EntitiesPageFilter.ts deleted file mode 100644 index b0d63d0b30..0000000000 --- a/web/packages/sdk/generated/platform/schema/EntitiesPageFilter.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Filtering information. - */ -export type EntitiesPageFilter = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/EntitiesRemoveWorkspaceMemberParams.ts b/web/packages/sdk/generated/platform/schema/EntitiesRemoveWorkspaceMemberParams.ts deleted file mode 100644 index ecbaa6eca3..0000000000 --- a/web/packages/sdk/generated/platform/schema/EntitiesRemoveWorkspaceMemberParams.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type EntitiesRemoveWorkspaceMemberParams = { - /** - * If true, wait for roles to propagate before returning (default: true). Set to false for bulk operations. - */ - wait_role_propagation?: boolean; -}; diff --git a/web/packages/sdk/generated/platform/schema/EntitiesUpdateEntityByNameParams.ts b/web/packages/sdk/generated/platform/schema/EntitiesUpdateEntityByNameParams.ts deleted file mode 100644 index 0043760326..0000000000 --- a/web/packages/sdk/generated/platform/schema/EntitiesUpdateEntityByNameParams.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type EntitiesUpdateEntityByNameParams = { - /** - * Parent entity ID for nested entities - */ - parent?: string; -}; diff --git a/web/packages/sdk/generated/platform/schema/EntitiesUpdateWorkspaceMemberParams.ts b/web/packages/sdk/generated/platform/schema/EntitiesUpdateWorkspaceMemberParams.ts deleted file mode 100644 index 2a9a9c4071..0000000000 --- a/web/packages/sdk/generated/platform/schema/EntitiesUpdateWorkspaceMemberParams.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type EntitiesUpdateWorkspaceMemberParams = { - /** - * If true, wait for roles to propagate before returning (default: true). Set to false for bulk operations. - */ - wait_role_propagation?: boolean; -}; diff --git a/web/packages/sdk/generated/platform/schema/Entity.ts b/web/packages/sdk/generated/platform/schema/Entity.ts deleted file mode 100644 index bfd347314f..0000000000 --- a/web/packages/sdk/generated/platform/schema/Entity.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { EntityData } from './EntityData'; - -/** - * Entity schema for API responses. - */ -export interface Entity { - /** Entity type identifier */ - entity_type: string; - /** UUID identifier */ - id: string; - /** Workspace identifier */ - workspace: string; - /** Parent entity ID for nested entities */ - parent?: string; - /** The name of the project associated with this entity */ - project?: string; - /** Entity name */ - name: string; - /** Entity data */ - data: EntityData; - /** Timestamp of entity creation */ - created_at: string; - /** Principal id for entity creator */ - created_by?: string; - /** Timestamp of last entity update */ - updated_at: string; - /** Principal id for last entity update */ - updated_by?: string; - /** Database version of the entity for optimistic locking. */ - db_version: number; -} diff --git a/web/packages/sdk/generated/platform/schema/EntityCreateInput.ts b/web/packages/sdk/generated/platform/schema/EntityCreateInput.ts deleted file mode 100644 index bb50231c0e..0000000000 --- a/web/packages/sdk/generated/platform/schema/EntityCreateInput.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { EntityCreateInputData } from './EntityCreateInputData'; - -/** - * Schema for creating a new entity (name-based routes). - -Name is optional - if not provided, it will be auto-generated. -Workspace and entity_type come from the URL path parameters. - */ -export interface EntityCreateInput { - /** - * Entity name (optional - auto-generated if not provided). Name must start with a lowercase letter, be 2-63 characters, and contain only lowercase letters, digits, and hyphens (no consecutive hyphens, cannot end with a hyphen). - * @pattern ^[a-z](?!.*--)[a-z0-9\-@.+_]{1,62}(? 0. */ - repetition_penalty?: number; - /** Nucleus sampling probability for token selection. Must be in (0, 1]. */ - top_p?: number; - /** Number of consecutive generations where the ``invalid_fraction_threshold`` is reached before stopping generation. Must be >= 1. */ - patience?: number; - /** The fraction of invalid records that will stop generation after the ``patience`` limit is reached. Must be in [0, 1]. */ - invalid_fraction_threshold?: number; - /** Whether to use structured generation for better format control. */ - use_structured_generation?: boolean; - /** The backend used by vLLM when ``use_structured_generation`` is ``True``. Supported backends: 'outlines', 'guidance', 'xgrammar', 'lm-format-enforcer'. 'auto' will allow vLLM to choose the backend. */ - structured_generation_backend?: GenerateParametersStructuredGenerationBackend; - /** The method used to generate the schema from your dataset and pass it to the generation backend. 'regex' uses a custom regex construction method that tends to be more comprehensive than 'json_schema' at the cost of speed. */ - structured_generation_schema_method?: GenerateParametersStructuredGenerationSchemaMethod; - /** Whether to use a regex that matches exactly one sequence or record if ``max_sequences_per_example`` is 1. */ - structured_generation_use_single_sequence?: boolean; - /** Enforce time-series fidelity by enforcing order, intervals, start and end times of the records. */ - enforce_timeseries_fidelity?: boolean; - /** Validation parameters controlling validation logic and automatic fixes when parsing LLM output and converting to tabular data. */ - validation?: ValidationParameters; - /** The attention backend for the vLLM engine. Common values: 'FLASHINFER', 'FLASH_ATTN', 'TRITON_ATTN', 'FLEX_ATTENTION'. If ``None`` or 'auto', vLLM will auto-select the best available backend. */ - attention_backend?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/GenerateParametersStructuredGenerationBackend.ts b/web/packages/sdk/generated/platform/schema/GenerateParametersStructuredGenerationBackend.ts deleted file mode 100644 index 8f52f556ea..0000000000 --- a/web/packages/sdk/generated/platform/schema/GenerateParametersStructuredGenerationBackend.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * The backend used by vLLM when ``use_structured_generation`` is ``True``. Supported backends: 'outlines', 'guidance', 'xgrammar', 'lm-format-enforcer'. 'auto' will allow vLLM to choose the backend. - */ -export type GenerateParametersStructuredGenerationBackend = - (typeof GenerateParametersStructuredGenerationBackend)[keyof typeof GenerateParametersStructuredGenerationBackend]; - -export const GenerateParametersStructuredGenerationBackend = { - auto: 'auto', - xgrammar: 'xgrammar', - guidance: 'guidance', - outlines: 'outlines', - 'lm-format-enforcer': 'lm-format-enforcer', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/GenerateParametersStructuredGenerationSchemaMethod.ts b/web/packages/sdk/generated/platform/schema/GenerateParametersStructuredGenerationSchemaMethod.ts deleted file mode 100644 index 983f97739f..0000000000 --- a/web/packages/sdk/generated/platform/schema/GenerateParametersStructuredGenerationSchemaMethod.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * The method used to generate the schema from your dataset and pass it to the generation backend. 'regex' uses a custom regex construction method that tends to be more comprehensive than 'json_schema' at the cost of speed. - */ -export type GenerateParametersStructuredGenerationSchemaMethod = - (typeof GenerateParametersStructuredGenerationSchemaMethod)[keyof typeof GenerateParametersStructuredGenerationSchemaMethod]; - -export const GenerateParametersStructuredGenerationSchemaMethod = { - regex: 'regex', - json_schema: 'json_schema', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/GenerationLog.ts b/web/packages/sdk/generated/platform/schema/GenerationLog.ts deleted file mode 100644 index d5aeda73df..0000000000 --- a/web/packages/sdk/generated/platform/schema/GenerationLog.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ActivatedRail } from './ActivatedRail'; -import type { GenerationLogInternalEventsItem } from './GenerationLogInternalEventsItem'; -import type { GenerationStats } from './GenerationStats'; -import type { LLMCallInfo } from './LLMCallInfo'; - -/** - * Contains additional logging information associated with a generation call. - */ -export interface GenerationLog { - /** The list of rails that were activated during generation. */ - activated_rails?: ActivatedRail[]; - /** General stats about the generation process. */ - stats?: GenerationStats; - /** The list of LLM calls that have been made to fulfill the generation request. */ - llm_calls?: LLMCallInfo[]; - /** The complete sequence of internal events generated. */ - internal_events?: GenerationLogInternalEventsItem[]; - /** The Colang history associated with the generation. */ - colang_history?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/GenerationLogInternalEventsItem.ts b/web/packages/sdk/generated/platform/schema/GenerationLogInternalEventsItem.ts deleted file mode 100644 index a97c36e2a9..0000000000 --- a/web/packages/sdk/generated/platform/schema/GenerationLogInternalEventsItem.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type GenerationLogInternalEventsItem = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/GenerationLogOptions.ts b/web/packages/sdk/generated/platform/schema/GenerationLogOptions.ts deleted file mode 100644 index 0bd2d505f4..0000000000 --- a/web/packages/sdk/generated/platform/schema/GenerationLogOptions.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Options for what should be included in the generation log. - */ -export interface GenerationLogOptions { - /** Include detailed information about the rails that were activated during generation. */ - activated_rails?: boolean; - /** Include information about all the LLM calls that were made. This includes: prompt, completion, token usage, raw response, etc. */ - llm_calls?: boolean; - /** Include the array of internal generated events. */ - internal_events?: boolean; - /** Include the history of the conversation in Colang format. */ - colang_history?: boolean; - /** Include generation statistics — rail durations, LLM call counts, and token usage. */ - stats?: boolean; -} diff --git a/web/packages/sdk/generated/platform/schema/GenerationOptions.ts b/web/packages/sdk/generated/platform/schema/GenerationOptions.ts deleted file mode 100644 index b56b3bb174..0000000000 --- a/web/packages/sdk/generated/platform/schema/GenerationOptions.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { GenerationLogOptions } from './GenerationLogOptions'; -import type { GenerationOptionsLlmParams } from './GenerationOptionsLlmParams'; -import type { GenerationRailsOptions } from './GenerationRailsOptions'; - -/** - * A set of options that should be applied during a generation. - -The GenerationOptions control various things such as what rails are enabled, -additional parameters for the main LLM, whether the rails should be enforced or -ran in parallel, what to be included in the generation log, etc. - */ -export interface GenerationOptions { - /** Options for which rails should be applied for the generation. By default, all rails are enabled. */ - rails?: GenerationRailsOptions; - /** Additional parameters that should be used for the LLM call */ - llm_params?: GenerationOptionsLlmParams; - /** Whether the response should also include any custom LLM output. */ - llm_output?: boolean; - /** Whether additional context information should be returned. When True is specified, the whole context is returned. Otherwise, a list of key names can be specified. */ - output_vars?: boolean | string[]; - /** Options about what to include in the log. By default, nothing is included. */ - log?: GenerationLogOptions; -} diff --git a/web/packages/sdk/generated/platform/schema/GenerationOptionsLlmParams.ts b/web/packages/sdk/generated/platform/schema/GenerationOptionsLlmParams.ts deleted file mode 100644 index a18a81f1ce..0000000000 --- a/web/packages/sdk/generated/platform/schema/GenerationOptionsLlmParams.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Additional parameters that should be used for the LLM call - */ -export type GenerationOptionsLlmParams = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/GenerationRailsOptions.ts b/web/packages/sdk/generated/platform/schema/GenerationRailsOptions.ts deleted file mode 100644 index dae9ee3f56..0000000000 --- a/web/packages/sdk/generated/platform/schema/GenerationRailsOptions.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Options for what rails should be used during the generation. - */ -export interface GenerationRailsOptions { - /** Whether the input rails are enabled or not. If a list of names is specified, then only the specified input rails will be applied. */ - input?: boolean | string[]; - /** Whether the output rails are enabled or not. If a list of names is specified, then only the specified output rails will be applied. */ - output?: boolean | string[]; - /** Whether the retrieval rails are enabled or not. If a list of names is specified, then only the specified retrieval rails will be applied. */ - retrieval?: boolean | string[]; - /** Whether the dialog rails are enabled or not. */ - dialog?: boolean; -} diff --git a/web/packages/sdk/generated/platform/schema/GenerationStats.ts b/web/packages/sdk/generated/platform/schema/GenerationStats.ts deleted file mode 100644 index cedee95263..0000000000 --- a/web/packages/sdk/generated/platform/schema/GenerationStats.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * General stats about the generation. - */ -export interface GenerationStats { - /** The time in seconds spent in processing the input rails. */ - input_rails_duration?: number; - /** The time in seconds spent in processing the dialog rails. */ - dialog_rails_duration?: number; - /** The time in seconds spent in generation rails. */ - generation_rails_duration?: number; - /** The time in seconds spent in processing the output rails. */ - output_rails_duration?: number; - /** The total time in seconds. */ - total_duration?: number; - /** The time in seconds spent in LLM calls. */ - llm_calls_duration?: number; - /** The number of LLM calls in total. */ - llm_calls_count?: number; - /** The total number of prompt tokens. */ - llm_calls_total_prompt_tokens?: number; - /** The total number of completion tokens. */ - llm_calls_total_completion_tokens?: number; - /** The total number of tokens. */ - llm_calls_total_tokens?: number; -} diff --git a/web/packages/sdk/generated/platform/schema/GenericSortField.ts b/web/packages/sdk/generated/platform/schema/GenericSortField.ts deleted file mode 100644 index 68647d6278..0000000000 --- a/web/packages/sdk/generated/platform/schema/GenericSortField.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type GenericSortField = (typeof GenericSortField)[keyof typeof GenericSortField]; - -export const GenericSortField = { - created_at: 'created_at', - '-created_at': '-created_at', - name: 'name', - '-name': '-name', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/GetTraceMode.ts b/web/packages/sdk/generated/platform/schema/GetTraceMode.ts deleted file mode 100644 index 2e490527a3..0000000000 --- a/web/packages/sdk/generated/platform/schema/GetTraceMode.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type GetTraceMode = (typeof GetTraceMode)[keyof typeof GetTraceMode]; - -export const GetTraceMode = { - summary: 'summary', - detailed: 'detailed', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/GetTraceParams.ts b/web/packages/sdk/generated/platform/schema/GetTraceParams.ts deleted file mode 100644 index 44e76269de..0000000000 --- a/web/packages/sdk/generated/platform/schema/GetTraceParams.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { GetTraceMode } from './GetTraceMode'; - -export type GetTraceParams = { - /** - * Use summary for root-span trace fields only, or detailed to include token, cost, and span-count rollups. - */ - mode?: GetTraceMode; -}; diff --git a/web/packages/sdk/generated/platform/schema/GlinerConfig.ts b/web/packages/sdk/generated/platform/schema/GlinerConfig.ts deleted file mode 100644 index cdc01b1c2a..0000000000 --- a/web/packages/sdk/generated/platform/schema/GlinerConfig.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Configuration for the GLiNER named-entity recognition model. - */ -export interface GlinerConfig { - /** Enable GLiNER NER module. */ - enable_gliner?: boolean; - /** Enable GLiNER batch mode. */ - enable_batch_mode?: boolean; - /** GLiNER batch size. */ - batch_size?: number; - /** GLiNER batch chunk length in characters. */ - chunk_length?: number; - /** GLiNER model name. */ - gliner_model?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/Globals.ts b/web/packages/sdk/generated/platform/schema/Globals.ts deleted file mode 100644 index 5162b99ff2..0000000000 --- a/web/packages/sdk/generated/platform/schema/Globals.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ClassifyConfig } from './ClassifyConfig'; -import type { NERConfig } from './NERConfig'; - -/** - * Global settings for the PII replacer including locales, seed, NER, and classification. - */ -export interface Globals { - /** List of locales. */ - locales?: string[]; - /** - * Optional random seed. - * @exclusiveMinimum -2147483647 - * @exclusiveMaximum 2147483647 - */ - seed?: number; - /** Column classification configuration. */ - classify?: ClassifyConfig; - /** Named Entity Recognition configuration. */ - ner?: NERConfig; - /** List of columns to preserve as immutable across all transformations. */ - lock_columns?: string[]; -} diff --git a/web/packages/sdk/generated/platform/schema/GuardrailCheckRequest.ts b/web/packages/sdk/generated/platform/schema/GuardrailCheckRequest.ts deleted file mode 100644 index 769e9da9c7..0000000000 --- a/web/packages/sdk/generated/platform/schema/GuardrailCheckRequest.ts +++ /dev/null @@ -1,112 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ChatCompletionAssistantMessageParam } from './ChatCompletionAssistantMessageParam'; -import type { ChatCompletionFunctionMessageParam } from './ChatCompletionFunctionMessageParam'; -import type { ChatCompletionSystemMessageParam } from './ChatCompletionSystemMessageParam'; -import type { ChatCompletionToolMessageParam } from './ChatCompletionToolMessageParam'; -import type { ChatCompletionUserMessageParam } from './ChatCompletionUserMessageParam'; -import type { GuardrailCheckRequestFunctionCall } from './GuardrailCheckRequestFunctionCall'; -import type { GuardrailCheckRequestLogitBias } from './GuardrailCheckRequestLogitBias'; -import type { GuardrailCheckRequestResponseFormat } from './GuardrailCheckRequestResponseFormat'; -import type { GuardrailCheckRequestStreamOptions } from './GuardrailCheckRequestStreamOptions'; -import type { GuardrailCheckRequestToolChoice } from './GuardrailCheckRequestToolChoice'; -import type { GuardrailCheckRequestToolsItem } from './GuardrailCheckRequestToolsItem'; -import type { GuardrailsDataInput } from './GuardrailsDataInput'; - -/** - * Currently only inherits, in the future we might add new fields. - */ -export interface GuardrailCheckRequest { - /** The model to use for completion. Must be one of the available models. */ - model: string; - /** Format of the response. Use {'type': 'json_object'} for JSON mode or {'type': 'json_schema', 'json_schema': {...}} for structured outputs. */ - response_format?: GuardrailCheckRequestResponseFormat; - /** - * The maximum number of tokens that can be generated in the chat completion. - * @minimum 1 - */ - max_tokens?: number; - /** - * How many chat completion choices to generate for each input message. - * @minimum 1 - */ - n?: number; - /** If set, partial message deltas will be sent, like in ChatGPT. */ - stream?: boolean; - /** - * What sampling temperature to use, between 0 and 2. - * @minimum 0 - * @maximum 2 - */ - temperature?: number; - /** - * An alternative to sampling with temperature, called nucleus sampling. - * @minimum 0 - * @maximum 1 - */ - top_p?: number; - /** Up to 4 sequences where the API will stop generating further tokens. */ - stop?: string | string[]; - /** - * Positive values penalize new tokens based on their existing frequency in the text. - * @minimum -2 - * @maximum 2 - */ - frequency_penalty?: number; - /** - * Positive values penalize new tokens based on whether they appear in the text so far. - * @minimum -2 - * @maximum 2 - */ - presence_penalty?: number; - /** Deprecated in favor of tool_choice. 'none' means the model will not call a function and instead generates a message. 'auto' means the model can pick between generating a message or calling a function. Specifying a particular function via {'name': 'my_function'} forces the model to call that function. */ - function_call?: GuardrailCheckRequestFunctionCall; - /** If specified, attempts to sample deterministically. */ - seed?: number; - /** Modify the likelihood of specified tokens appearing in the completion. Maps token IDs (as strings) to bias values from -100 to 100. */ - logit_bias?: GuardrailCheckRequestLogitBias; - /** - * The number of most likely tokens to return at each token position. - * @minimum 0 - * @maximum 20 - */ - top_logprobs?: number; - /** Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the content of message */ - logprobs?: boolean; - /** Controls which (if any) tool is called by the model. 'none' means no tool is called, 'auto' lets the model decide, 'required' forces a tool call. */ - tool_choice?: GuardrailCheckRequestToolChoice; - /** A unique identifier representing your end-user, used by some providers for abuse monitoring. */ - user?: string; - /** A list of tools the model may call. Each tool is an object with a 'type' field and a 'function' definition. */ - tools?: GuardrailCheckRequestToolsItem[]; - /** Ignore the eos when running */ - ignore_eos?: boolean; - /** Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. */ - reasoning_effort?: string; - /** - * An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. Preferred over max_tokens for reasoning models. - * @minimum 1 - */ - max_completion_tokens?: number; - /** Options for streaming response. Only set this when stream=True. Supports include_usage to receive token usage in the final stream chunk. */ - stream_options?: GuardrailCheckRequestStreamOptions; - /** A list of messages comprising the conversation so far */ - messages: ( - | ChatCompletionSystemMessageParam - | ChatCompletionUserMessageParam - | ChatCompletionAssistantMessageParam - | ChatCompletionToolMessageParam - | ChatCompletionFunctionMessageParam - )[]; - /** Whether this is a vision-capable request with image inputs. */ - vision?: boolean; - /** Guardrails specific options for the request. */ - guardrails?: GuardrailsDataInput; - [key: string]: unknown; -} diff --git a/web/packages/sdk/generated/platform/schema/GuardrailCheckRequestFunctionCall.ts b/web/packages/sdk/generated/platform/schema/GuardrailCheckRequestFunctionCall.ts deleted file mode 100644 index ca571f7604..0000000000 --- a/web/packages/sdk/generated/platform/schema/GuardrailCheckRequestFunctionCall.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Deprecated in favor of tool_choice. 'none' means the model will not call a function and instead generates a message. 'auto' means the model can pick between generating a message or calling a function. Specifying a particular function via {'name': 'my_function'} forces the model to call that function. - */ -export type GuardrailCheckRequestFunctionCall = string | { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/GuardrailCheckRequestLogitBias.ts b/web/packages/sdk/generated/platform/schema/GuardrailCheckRequestLogitBias.ts deleted file mode 100644 index 16757ad87d..0000000000 --- a/web/packages/sdk/generated/platform/schema/GuardrailCheckRequestLogitBias.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Modify the likelihood of specified tokens appearing in the completion. Maps token IDs (as strings) to bias values from -100 to 100. - */ -export type GuardrailCheckRequestLogitBias = { [key: string]: number }; diff --git a/web/packages/sdk/generated/platform/schema/GuardrailCheckRequestResponseFormat.ts b/web/packages/sdk/generated/platform/schema/GuardrailCheckRequestResponseFormat.ts deleted file mode 100644 index fee21bd99d..0000000000 --- a/web/packages/sdk/generated/platform/schema/GuardrailCheckRequestResponseFormat.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Format of the response. Use {'type': 'json_object'} for JSON mode or {'type': 'json_schema', 'json_schema': {...}} for structured outputs. - */ -export type GuardrailCheckRequestResponseFormat = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/GuardrailCheckRequestStreamOptions.ts b/web/packages/sdk/generated/platform/schema/GuardrailCheckRequestStreamOptions.ts deleted file mode 100644 index 06ca3c50f0..0000000000 --- a/web/packages/sdk/generated/platform/schema/GuardrailCheckRequestStreamOptions.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Options for streaming response. Only set this when stream=True. Supports include_usage to receive token usage in the final stream chunk. - */ -export type GuardrailCheckRequestStreamOptions = { [key: string]: boolean }; diff --git a/web/packages/sdk/generated/platform/schema/GuardrailCheckRequestToolChoice.ts b/web/packages/sdk/generated/platform/schema/GuardrailCheckRequestToolChoice.ts deleted file mode 100644 index 3b0e236f8a..0000000000 --- a/web/packages/sdk/generated/platform/schema/GuardrailCheckRequestToolChoice.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Controls which (if any) tool is called by the model. 'none' means no tool is called, 'auto' lets the model decide, 'required' forces a tool call. - */ -export type GuardrailCheckRequestToolChoice = string | { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/GuardrailCheckRequestToolsItem.ts b/web/packages/sdk/generated/platform/schema/GuardrailCheckRequestToolsItem.ts deleted file mode 100644 index 5ef4448fdf..0000000000 --- a/web/packages/sdk/generated/platform/schema/GuardrailCheckRequestToolsItem.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type GuardrailCheckRequestToolsItem = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/GuardrailCheckResponse.ts b/web/packages/sdk/generated/platform/schema/GuardrailCheckResponse.ts deleted file mode 100644 index 4ad5031651..0000000000 --- a/web/packages/sdk/generated/platform/schema/GuardrailCheckResponse.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { GuardrailCheckResponseRailsStatus } from './GuardrailCheckResponseRailsStatus'; -import type { GuardrailsDataOutput } from './GuardrailsDataOutput'; -import type { StatusEnum } from './StatusEnum'; - -export interface GuardrailCheckResponse { - /** Overall status indicating if all rails passed or if any failed. */ - status: StatusEnum; - /** Dictionary mapping each rail to its status. */ - rails_status: GuardrailCheckResponseRailsStatus; - /** Additional data related to guardrails. */ - guardrails_data?: GuardrailsDataOutput; -} diff --git a/web/packages/sdk/generated/platform/schema/GuardrailCheckResponseRailsStatus.ts b/web/packages/sdk/generated/platform/schema/GuardrailCheckResponseRailsStatus.ts deleted file mode 100644 index 6d8aacc49c..0000000000 --- a/web/packages/sdk/generated/platform/schema/GuardrailCheckResponseRailsStatus.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { RailStatus } from './RailStatus'; - -/** - * Dictionary mapping each rail to its status. - */ -export type GuardrailCheckResponseRailsStatus = { [key: string]: RailStatus }; diff --git a/web/packages/sdk/generated/platform/schema/GuardrailConfig.ts b/web/packages/sdk/generated/platform/schema/GuardrailConfig.ts deleted file mode 100644 index 49f084e622..0000000000 --- a/web/packages/sdk/generated/platform/schema/GuardrailConfig.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { RailsConfigOutput } from './RailsConfigOutput'; - -/** - * A guardrail configuration entity. - */ -export interface GuardrailConfig { - /** Entity name within the workspace */ - name?: string; - /** - * Workspace identifier - * @pattern ^[\w\-\+.@:]+$ - */ - workspace: string; - /** The name of the project associated with this entity. */ - project?: string; - /** Description of the guardrail config */ - description?: string; - /** Guardrail configuration data */ - data?: RailsConfigOutput; - readonly id: string; - readonly created_at: string; - readonly created_by: string | null; - readonly updated_at: string; - readonly updated_by: string | null; - /** Alias for id for backwards compatibility. */ - readonly entity_id: string; - /** Parent entity ID for nested entities. */ - readonly parent: string; -} diff --git a/web/packages/sdk/generated/platform/schema/GuardrailConfigFilter.ts b/web/packages/sdk/generated/platform/schema/GuardrailConfigFilter.ts deleted file mode 100644 index 5bbe2531da..0000000000 --- a/web/packages/sdk/generated/platform/schema/GuardrailConfigFilter.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { DatetimeFilter } from './DatetimeFilter'; - -/** - * Filter schema for listing guardrail configs. - */ -export interface GuardrailConfigFilter { - /** Filter by config name. */ - name?: string; - /** Filter by config description. */ - description?: string; - /** Filter by project name. */ - project?: string; - /** Filter by creation date. Supports '$gte' (on or after) and '$lte' (on or before) datetime filters. */ - created_at?: DatetimeFilter; - /** Filter by update date. Supports '$gte' (on or after) and '$lte' (on or before) datetime filters. */ - updated_at?: DatetimeFilter; -} diff --git a/web/packages/sdk/generated/platform/schema/GuardrailConfigInput.ts b/web/packages/sdk/generated/platform/schema/GuardrailConfigInput.ts deleted file mode 100644 index 1ae86a5978..0000000000 --- a/web/packages/sdk/generated/platform/schema/GuardrailConfigInput.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { GuardrailConfigInputData } from './GuardrailConfigInputData'; - -/** - * Input schema for creating a guardrail config. - */ -export interface GuardrailConfigInput { - /** The name of the guardrail config */ - name: string; - /** Description of the guardrail config */ - description?: string; - /** Guardrail configuration data */ - data?: GuardrailConfigInputData; -} diff --git a/web/packages/sdk/generated/platform/schema/GuardrailConfigInputData.ts b/web/packages/sdk/generated/platform/schema/GuardrailConfigInputData.ts deleted file mode 100644 index 0ff4f54cad..0000000000 --- a/web/packages/sdk/generated/platform/schema/GuardrailConfigInputData.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Guardrail configuration data - */ -export type GuardrailConfigInputData = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/GuardrailConfigUpdate.ts b/web/packages/sdk/generated/platform/schema/GuardrailConfigUpdate.ts deleted file mode 100644 index 461c10c964..0000000000 --- a/web/packages/sdk/generated/platform/schema/GuardrailConfigUpdate.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { GuardrailConfigUpdateData } from './GuardrailConfigUpdateData'; - -/** - * Input schema for updating a guardrail config. - */ -export interface GuardrailConfigUpdate { - /** Description of the guardrail config */ - description?: string; - /** Guardrail configuration data */ - data?: GuardrailConfigUpdateData; -} diff --git a/web/packages/sdk/generated/platform/schema/GuardrailConfigUpdateData.ts b/web/packages/sdk/generated/platform/schema/GuardrailConfigUpdateData.ts deleted file mode 100644 index e5920bad81..0000000000 --- a/web/packages/sdk/generated/platform/schema/GuardrailConfigUpdateData.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Guardrail configuration data - */ -export type GuardrailConfigUpdateData = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/GuardrailConfigsPage.ts b/web/packages/sdk/generated/platform/schema/GuardrailConfigsPage.ts deleted file mode 100644 index cddfcac693..0000000000 --- a/web/packages/sdk/generated/platform/schema/GuardrailConfigsPage.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { GuardrailConfig } from './GuardrailConfig'; -import type { GuardrailConfigsPageFilter } from './GuardrailConfigsPageFilter'; -import type { PaginationData } from './PaginationData'; - -export interface GuardrailConfigsPage { - data: GuardrailConfig[]; - /** Pagination information. */ - pagination?: PaginationData; - /** The field on which the results are sorted. */ - sort?: string; - /** Filtering information. */ - filter?: GuardrailConfigsPageFilter; -} diff --git a/web/packages/sdk/generated/platform/schema/GuardrailConfigsPageFilter.ts b/web/packages/sdk/generated/platform/schema/GuardrailConfigsPageFilter.ts deleted file mode 100644 index 0d17d31c9f..0000000000 --- a/web/packages/sdk/generated/platform/schema/GuardrailConfigsPageFilter.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Filtering information. - */ -export type GuardrailConfigsPageFilter = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/GuardrailsAIRailConfig.ts b/web/packages/sdk/generated/platform/schema/GuardrailsAIRailConfig.ts deleted file mode 100644 index e618088270..0000000000 --- a/web/packages/sdk/generated/platform/schema/GuardrailsAIRailConfig.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { GuardrailsAIValidatorConfig } from './GuardrailsAIValidatorConfig'; - -/** - * Configuration data for Guardrails AI integration. - */ -export interface GuardrailsAIRailConfig { - /** List of Guardrails AI validators to apply. Each validator can have its own parameters and metadata. */ - validators?: GuardrailsAIValidatorConfig[]; -} diff --git a/web/packages/sdk/generated/platform/schema/GuardrailsAIValidatorConfig.ts b/web/packages/sdk/generated/platform/schema/GuardrailsAIValidatorConfig.ts deleted file mode 100644 index 355c4cc470..0000000000 --- a/web/packages/sdk/generated/platform/schema/GuardrailsAIValidatorConfig.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { GuardrailsAIValidatorConfigMetadata } from './GuardrailsAIValidatorConfigMetadata'; -import type { GuardrailsAIValidatorConfigParameters } from './GuardrailsAIValidatorConfigParameters'; - -/** - * Configuration for a single Guardrails AI validator. - */ -export interface GuardrailsAIValidatorConfig { - /** Unique identifier or import path for the Guardrails AI validator (e.g., 'toxic_language', 'pii', 'regex_match', or 'guardrails/competitor_check'). */ - name: string; - /** Parameters to pass to the validator during initialization (e.g., threshold, regex pattern). */ - parameters?: GuardrailsAIValidatorConfigParameters; - /** Metadata to pass to the validator during validation (e.g., valid_topics, context). */ - metadata?: GuardrailsAIValidatorConfigMetadata; -} diff --git a/web/packages/sdk/generated/platform/schema/GuardrailsAIValidatorConfigMetadata.ts b/web/packages/sdk/generated/platform/schema/GuardrailsAIValidatorConfigMetadata.ts deleted file mode 100644 index a6bd02158c..0000000000 --- a/web/packages/sdk/generated/platform/schema/GuardrailsAIValidatorConfigMetadata.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Metadata to pass to the validator during validation (e.g., valid_topics, context). - */ -export type GuardrailsAIValidatorConfigMetadata = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/GuardrailsAIValidatorConfigParameters.ts b/web/packages/sdk/generated/platform/schema/GuardrailsAIValidatorConfigParameters.ts deleted file mode 100644 index e3c0e443c0..0000000000 --- a/web/packages/sdk/generated/platform/schema/GuardrailsAIValidatorConfigParameters.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Parameters to pass to the validator during initialization (e.g., threshold, regex pattern). - */ -export type GuardrailsAIValidatorConfigParameters = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/GuardrailsDataInput.ts b/web/packages/sdk/generated/platform/schema/GuardrailsDataInput.ts deleted file mode 100644 index e08ded68d4..0000000000 --- a/web/packages/sdk/generated/platform/schema/GuardrailsDataInput.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { GenerationOptions } from './GenerationOptions'; -import type { GuardrailsDataInputContext } from './GuardrailsDataInputContext'; -import type { GuardrailsDataInputState } from './GuardrailsDataInputState'; -import type { RailsConfigInput } from './RailsConfigInput'; - -export interface GuardrailsDataInput { - /** The id of the configuration or its dict representation to be used. */ - config?: string | RailsConfigInput; - /** The id of the configuration to be used. */ - config_id?: string; - /** The list of configuration ids to be used. If set, the configurations will be combined. */ - config_ids?: string[]; - /** If set, guardrails data will be included as a JSON in the choices array. */ - return_choice?: boolean; - /** Additional context data to be added to the conversation. */ - context?: GuardrailsDataInputContext; - /** If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message. */ - stream?: boolean; - /** Additional options for controlling the generation. */ - options?: GenerationOptions; - /** A state object that should be used to continue the interaction. */ - state?: GuardrailsDataInputState; -} diff --git a/web/packages/sdk/generated/platform/schema/GuardrailsDataInputContext.ts b/web/packages/sdk/generated/platform/schema/GuardrailsDataInputContext.ts deleted file mode 100644 index bbff8b98ee..0000000000 --- a/web/packages/sdk/generated/platform/schema/GuardrailsDataInputContext.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Additional context data to be added to the conversation. - */ -export type GuardrailsDataInputContext = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/GuardrailsDataInputState.ts b/web/packages/sdk/generated/platform/schema/GuardrailsDataInputState.ts deleted file mode 100644 index 3627222520..0000000000 --- a/web/packages/sdk/generated/platform/schema/GuardrailsDataInputState.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * A state object that should be used to continue the interaction. - */ -export type GuardrailsDataInputState = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/GuardrailsDataOutput.ts b/web/packages/sdk/generated/platform/schema/GuardrailsDataOutput.ts deleted file mode 100644 index 48dc9dc60f..0000000000 --- a/web/packages/sdk/generated/platform/schema/GuardrailsDataOutput.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { GenerationLog } from './GenerationLog'; -import type { GuardrailsDataOutputLlmOutput } from './GuardrailsDataOutputLlmOutput'; -import type { GuardrailsDataOutputOutputData } from './GuardrailsDataOutputOutputData'; - -export interface GuardrailsDataOutput { - /** Contains any additional output coming from the LLM. */ - llm_output?: GuardrailsDataOutputLlmOutput; - /** The list of configuration ids that were used. */ - config_ids?: string[]; - /** The output data, i.e. a dict with the values corresponding to the `output_vars`. */ - output_data?: GuardrailsDataOutputOutputData; - /** Additional logging information. */ - log?: GenerationLog; -} diff --git a/web/packages/sdk/generated/platform/schema/GuardrailsDataOutputLlmOutput.ts b/web/packages/sdk/generated/platform/schema/GuardrailsDataOutputLlmOutput.ts deleted file mode 100644 index 571d68dbc0..0000000000 --- a/web/packages/sdk/generated/platform/schema/GuardrailsDataOutputLlmOutput.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Contains any additional output coming from the LLM. - */ -export type GuardrailsDataOutputLlmOutput = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/GuardrailsDataOutputOutputData.ts b/web/packages/sdk/generated/platform/schema/GuardrailsDataOutputOutputData.ts deleted file mode 100644 index f66de5c6fc..0000000000 --- a/web/packages/sdk/generated/platform/schema/GuardrailsDataOutputOutputData.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * The output data, i.e. a dict with the values corresponding to the `output_vars`. - */ -export type GuardrailsDataOutputOutputData = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/GuardrailsListGuardrailConfigsParams.ts b/web/packages/sdk/generated/platform/schema/GuardrailsListGuardrailConfigsParams.ts deleted file mode 100644 index bee00ad9ef..0000000000 --- a/web/packages/sdk/generated/platform/schema/GuardrailsListGuardrailConfigsParams.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { GenericSortField } from './GenericSortField'; -import type { GuardrailConfigFilter } from './GuardrailConfigFilter'; - -export type GuardrailsListGuardrailConfigsParams = { - /** - * Page number. - */ - page?: number; - /** - * Page size. - */ - page_size?: number; - /** - * The field to sort by. To sort in decreasing order, use `-` in front of the field name. - */ - sort?: GenericSortField; - /** - * Filter guardrail configs by name, description, project, created_at, and updated_at. - */ - filter?: GuardrailConfigFilter; -}; diff --git a/web/packages/sdk/generated/platform/schema/HTTPValidationError.ts b/web/packages/sdk/generated/platform/schema/HTTPValidationError.ts deleted file mode 100644 index 62be1e2ae9..0000000000 --- a/web/packages/sdk/generated/platform/schema/HTTPValidationError.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ValidationError } from './ValidationError'; - -export interface HTTPValidationError { - detail?: ValidationError[]; -} diff --git a/web/packages/sdk/generated/platform/schema/Histogram.ts b/web/packages/sdk/generated/platform/schema/Histogram.ts deleted file mode 100644 index c3a6361778..0000000000 --- a/web/packages/sdk/generated/platform/schema/Histogram.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { HistogramBin } from './HistogramBin'; - -/** - * Histogram of score distribution. - */ -export interface Histogram { - /** Histogram bins. */ - bins: HistogramBin[]; -} diff --git a/web/packages/sdk/generated/platform/schema/HistogramBin.ts b/web/packages/sdk/generated/platform/schema/HistogramBin.ts deleted file mode 100644 index 7f23450bd0..0000000000 --- a/web/packages/sdk/generated/platform/schema/HistogramBin.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * A single bin in a histogram. - */ -export interface HistogramBin { - /** Lower bound of the bin (inclusive). */ - lower_bound: number; - /** Upper bound of the bin (exclusive for all but last bin). */ - upper_bound: number; - /** Number of values in this bin. */ - count: number; -} diff --git a/web/packages/sdk/generated/platform/schema/HuggingfaceStorageConfig.ts b/web/packages/sdk/generated/platform/schema/HuggingfaceStorageConfig.ts deleted file mode 100644 index 8c34e61f90..0000000000 --- a/web/packages/sdk/generated/platform/schema/HuggingfaceStorageConfig.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { HuggingfaceStorageConfigRepoType } from './HuggingfaceStorageConfigRepoType'; -import type { SecretRef } from './SecretRef'; - -export interface HuggingfaceStorageConfig { - /** Chunk size in bytes for reading/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB. */ - read_chunk_size?: number; - type?: 'huggingface'; - /** Huggingface repository ID (e.g., 'meta-llama/Llama-2-7b') */ - repo_id: string; - /** Type of Huggingface repository: 'model', 'dataset', or 'space' */ - repo_type?: HuggingfaceStorageConfigRepoType; - /** Branch, tag, or commit SHA. Defaults to 'main' */ - revision?: string; - /** The original revision requested by the user before resolution (e.g., 'main'). The 'revision' field contains the resolved commit SHA. */ - original_revision?: string; - /** Huggingface API `token` secret name for private repositories */ - token_secret?: SecretRef; - /** Huggingface Hub endpoint URL. Use for self-hosted instances. */ - endpoint?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/HuggingfaceStorageConfigRepoType.ts b/web/packages/sdk/generated/platform/schema/HuggingfaceStorageConfigRepoType.ts deleted file mode 100644 index d114f26e85..0000000000 --- a/web/packages/sdk/generated/platform/schema/HuggingfaceStorageConfigRepoType.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Type of Huggingface repository: 'model', 'dataset', or 'space' - */ -export type HuggingfaceStorageConfigRepoType = - (typeof HuggingfaceStorageConfigRepoType)[keyof typeof HuggingfaceStorageConfigRepoType]; - -export const HuggingfaceStorageConfigRepoType = { - model: 'model', - dataset: 'dataset', - space: 'space', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/ImagePullSecret.ts b/web/packages/sdk/generated/platform/schema/ImagePullSecret.ts deleted file mode 100644 index 2e344cf92b..0000000000 --- a/web/packages/sdk/generated/platform/schema/ImagePullSecret.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Kubernetes image pull secret reference. - */ -export interface ImagePullSecret { - /** Kubernetes Secret name for pulling images */ - name: string; -} diff --git a/web/packages/sdk/generated/platform/schema/ImageURL.ts b/web/packages/sdk/generated/platform/schema/ImageURL.ts deleted file mode 100644 index df01901328..0000000000 --- a/web/packages/sdk/generated/platform/schema/ImageURL.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ImageURLDetail } from './ImageURLDetail'; - -/** - * Image URL for vision requests. - */ -export interface ImageURL { - /** Either a URL of the image or the base64 encoded image data. */ - url: string; - /** Specifies the detail level of the image. */ - detail?: ImageURLDetail; -} diff --git a/web/packages/sdk/generated/platform/schema/ImageURLDetail.ts b/web/packages/sdk/generated/platform/schema/ImageURLDetail.ts deleted file mode 100644 index 39b2de5e17..0000000000 --- a/web/packages/sdk/generated/platform/schema/ImageURLDetail.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Specifies the detail level of the image. - */ -export type ImageURLDetail = (typeof ImageURLDetail)[keyof typeof ImageURLDetail]; - -export const ImageURLDetail = { - auto: 'auto', - low: 'low', - high: 'high', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/InferenceParams.ts b/web/packages/sdk/generated/platform/schema/InferenceParams.ts deleted file mode 100644 index 4098691544..0000000000 --- a/web/packages/sdk/generated/platform/schema/InferenceParams.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation. - */ -export interface InferenceParams { - /** - * Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently - * @minimum 0 - * @maximum 2 - */ - temperature?: number; - /** - * Max tokens to generate - * @minimum 1 - */ - max_tokens?: number; - /** - * Max tokens to generate - * @minimum 1 - */ - max_completion_tokens?: number; - /** - * Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction - * @minimum 0 - * @maximum 1 - */ - top_p?: number; - stop?: string[]; - [key: string]: unknown; -} diff --git a/web/packages/sdk/generated/platform/schema/IngestResponse.ts b/web/packages/sdk/generated/platform/schema/IngestResponse.ts deleted file mode 100644 index 0c30207ac0..0000000000 --- a/web/packages/sdk/generated/platform/schema/IngestResponse.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export interface IngestResponse { - errors?: string[]; -} diff --git a/web/packages/sdk/generated/platform/schema/InjectionDetection.ts b/web/packages/sdk/generated/platform/schema/InjectionDetection.ts deleted file mode 100644 index cc2f055480..0000000000 --- a/web/packages/sdk/generated/platform/schema/InjectionDetection.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { InjectionDetectionYaraRules } from './InjectionDetectionYaraRules'; - -export interface InjectionDetection { - /** The list of injection types to detect. Options are 'sqli', 'template', 'code', 'xss'.Currently, only SQL injection, template injection, code injection, and markdown cross-site scripting are supported. Custom rules can be added, provided they are in the `yara_path` and have a `.yara` file extension. */ - injections?: string[]; - /** - * Action to take. Options are 'reject' to offer a rejection message, 'omit' to mask the offending content, and 'sanitize' to pass the content as-is in the safest way. These options are listed in descending order of relative safety. 'sanitize' is not implemented at this time. - * @pattern ^(reject|omit)$ - */ - action?: string; - /** Dictionary mapping rule names to YARA rule strings. If provided, these rules will be used instead of loading rules from yara_path. Each rule should be a valid YARA rule string. */ - yara_rules?: InjectionDetectionYaraRules; -} diff --git a/web/packages/sdk/generated/platform/schema/InjectionDetectionYaraRules.ts b/web/packages/sdk/generated/platform/schema/InjectionDetectionYaraRules.ts deleted file mode 100644 index dd80b0f030..0000000000 --- a/web/packages/sdk/generated/platform/schema/InjectionDetectionYaraRules.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Dictionary mapping rule names to YARA rule strings. If provided, these rules will be used instead of loading rules from yara_path. Each rule should be a valid YARA rule string. - */ -export type InjectionDetectionYaraRules = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/InputRails.ts b/web/packages/sdk/generated/platform/schema/InputRails.ts deleted file mode 100644 index 29b128a2b7..0000000000 --- a/web/packages/sdk/generated/platform/schema/InputRails.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Configuration of input rails. - */ -export interface InputRails { - /** If True, the input rails are executed in parallel. */ - parallel?: boolean; - /** The names of all the flows that implement input rails. */ - flows?: string[]; -} diff --git a/web/packages/sdk/generated/platform/schema/Instruction.ts b/web/packages/sdk/generated/platform/schema/Instruction.ts deleted file mode 100644 index 4ae60e8f87..0000000000 --- a/web/packages/sdk/generated/platform/schema/Instruction.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Configuration for instructions in natural language that should be passed to the LLM. - */ -export interface Instruction { - type: string; - content: string; -} diff --git a/web/packages/sdk/generated/platform/schema/JSONScoreParser.ts b/web/packages/sdk/generated/platform/schema/JSONScoreParser.ts deleted file mode 100644 index 8022555917..0000000000 --- a/web/packages/sdk/generated/platform/schema/JSONScoreParser.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Parse a score from JSON structured content. - */ -export interface JSONScoreParser { - type?: 'json'; - /** The JSON path to parse the score from the judge response when using structured output. */ - json_path: string; -} diff --git a/web/packages/sdk/generated/platform/schema/JailbreakDetectionConfig.ts b/web/packages/sdk/generated/platform/schema/JailbreakDetectionConfig.ts deleted file mode 100644 index 7bd2ecbf40..0000000000 --- a/web/packages/sdk/generated/platform/schema/JailbreakDetectionConfig.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Configuration data for jailbreak detection. - */ -export interface JailbreakDetectionConfig { - /** The endpoint for the jailbreak detection heuristics/model container. */ - server_endpoint?: string; - /** - * The length/perplexity threshold. - * @exclusiveMinimum 0 - */ - length_per_perplexity_threshold?: number; - /** - * The prefix/suffix perplexity threshold. - * @exclusiveMinimum 0 - */ - prefix_suffix_perplexity_threshold?: number; - /** Base URL for jailbreak detection model. Example: http://localhost:8000/v1 */ - nim_base_url?: string; - /** Classification path uri. Defaults to 'classify' for NemoGuard JailbreakDetect. */ - nim_server_endpoint?: string; - /** Secret String with API key for use in Jailbreak requests. Takes precedence over api_key_env_var */ - api_key?: string; - /** Environment variable containing API key for jailbreak detection model */ - api_key_env_var?: string; - /** - * DEPRECATED: Use nim_base_url instead - * @deprecated - */ - nim_url?: string; - /** - * DEPRECATED: Include port in nim_base_url instead - * @deprecated - */ - nim_port?: number; - /** @deprecated */ - embedding?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/JobExecutionProfileConfig.ts b/web/packages/sdk/generated/platform/schema/JobExecutionProfileConfig.ts deleted file mode 100644 index 263ebb146e..0000000000 --- a/web/packages/sdk/generated/platform/schema/JobExecutionProfileConfig.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { JobExecutionProfileConfigEnv } from './JobExecutionProfileConfigEnv'; - -export interface JobExecutionProfileConfig { - ttl_seconds_before_active?: number; - ttl_seconds_active?: number; - ttl_seconds_after_finished?: number; - cleanup_completed_jobs_immediately?: boolean; - /** Path to the jobs launcher tool */ - launcher_tool_path?: string; - /** Optional env vars applied to all jobs (e.g. HOME=/tmp). Keys must not conflict with platform-reserved names. Job steps may override these variables. */ - env?: JobExecutionProfileConfigEnv; -} diff --git a/web/packages/sdk/generated/platform/schema/JobExecutionProfileConfigEnv.ts b/web/packages/sdk/generated/platform/schema/JobExecutionProfileConfigEnv.ts deleted file mode 100644 index 9103d5f8dc..0000000000 --- a/web/packages/sdk/generated/platform/schema/JobExecutionProfileConfigEnv.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional env vars applied to all jobs (e.g. HOME=/tmp). Keys must not conflict with platform-reserved names. Job steps may override these variables. - */ -export type JobExecutionProfileConfigEnv = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/JobStatus.ts b/web/packages/sdk/generated/platform/schema/JobStatus.ts deleted file mode 100644 index 29f68c1a13..0000000000 --- a/web/packages/sdk/generated/platform/schema/JobStatus.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Job status enum. - */ -export type JobStatus = (typeof JobStatus)[keyof typeof JobStatus]; - -export const JobStatus = { - pending: 'pending', - running: 'running', - completed: 'completed', - failed: 'failed', - cancelled: 'cancelled', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/JobsListJobResultsParams.ts b/web/packages/sdk/generated/platform/schema/JobsListJobResultsParams.ts deleted file mode 100644 index 2250afe876..0000000000 --- a/web/packages/sdk/generated/platform/schema/JobsListJobResultsParams.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { PlatformJobSortField } from './PlatformJobSortField'; - -export type JobsListJobResultsParams = { - /** - * The field to sort by. To sort in decreasing order, use `-` in front of the field name. - */ - sort?: PlatformJobSortField; -}; diff --git a/web/packages/sdk/generated/platform/schema/JobsListJobsParams.ts b/web/packages/sdk/generated/platform/schema/JobsListJobsParams.ts deleted file mode 100644 index 0c47efbc51..0000000000 --- a/web/packages/sdk/generated/platform/schema/JobsListJobsParams.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { PlatformJobsListFilter } from './PlatformJobsListFilter'; -import type { PlatformJobSortField } from './PlatformJobSortField'; - -export type JobsListJobsParams = { - /** - * Page number. - * @exclusiveMinimum 0 - */ - page?: number; - /** - * Page size. - * @exclusiveMinimum 0 - */ - page_size?: number; - /** - * The field to sort by. To sort in decreasing order, use `-` in front of the field name. - */ - sort?: PlatformJobSortField; - /** - * Filter jobs by workspace, project, name, status, source, created_at, and updated_at. - */ - filter?: PlatformJobsListFilter; -}; diff --git a/web/packages/sdk/generated/platform/schema/JobsListStepsParams.ts b/web/packages/sdk/generated/platform/schema/JobsListStepsParams.ts deleted file mode 100644 index c98bed9569..0000000000 --- a/web/packages/sdk/generated/platform/schema/JobsListStepsParams.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { PlatformJobSortField } from './PlatformJobSortField'; -import type { PlatformJobStepsListFilter } from './PlatformJobStepsListFilter'; - -export type JobsListStepsParams = { - /** - * Page number. - * @exclusiveMinimum 0 - */ - page?: number; - /** - * Page size. - * @exclusiveMinimum 0 - */ - page_size?: number; - /** - * The field to sort by. To sort in decreasing order, use `-` in front of the field name. - */ - sort?: PlatformJobSortField; - /** - * Filter steps by job, status, and source. - */ - filter?: PlatformJobStepsListFilter; -}; diff --git a/web/packages/sdk/generated/platform/schema/JobsPageJobLogsParams.ts b/web/packages/sdk/generated/platform/schema/JobsPageJobLogsParams.ts deleted file mode 100644 index 3297093a10..0000000000 --- a/web/packages/sdk/generated/platform/schema/JobsPageJobLogsParams.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type JobsPageJobLogsParams = { - /** - * Maximum number of logs to return - * @exclusiveMinimum 0 - */ - limit?: number; - /** - * Page cursor - */ - page_cursor?: string; - /** - * Filter logs by job attempt ID - */ - attempt_id?: number; - /** - * Filter logs by step name - */ - step_id?: string; - /** - * Filter logs by task ID - */ - task_id?: string; -}; diff --git a/web/packages/sdk/generated/platform/schema/JobsUpdateJobStatusDetailsBody.ts b/web/packages/sdk/generated/platform/schema/JobsUpdateJobStatusDetailsBody.ts deleted file mode 100644 index 4395ea5a15..0000000000 --- a/web/packages/sdk/generated/platform/schema/JobsUpdateJobStatusDetailsBody.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type JobsUpdateJobStatusDetailsBody = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/K8sNIMOperatorConfig.ts b/web/packages/sdk/generated/platform/schema/K8sNIMOperatorConfig.ts deleted file mode 100644 index a5fbfda835..0000000000 --- a/web/packages/sdk/generated/platform/schema/K8sNIMOperatorConfig.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { K8sNIMOperatorConfigNodeSelector } from './K8sNIMOperatorConfigNodeSelector'; -import type { K8sNIMOperatorConfigResources } from './K8sNIMOperatorConfigResources'; -import type { K8sNIMOperatorConfigTolerationsItem } from './K8sNIMOperatorConfigTolerationsItem'; - -/** - * Kubernetes configuration for NIM deployment via k8s-nim-operator. - -These fields provide typed access to commonly-used NIMService Spec fields -and are applied before override_config in the compilation precedence. - */ -export interface K8sNIMOperatorConfig { - /** Kubernetes resource requirements including requests and limits. Example: {'requests': {'cpu': '2', 'memory': '8Gi'}, 'limits': {'memory': '16Gi'}} */ - resources?: K8sNIMOperatorConfigResources; - /** Kubernetes tolerations for pod scheduling. Example: [{'key': 'nvidia.com/gpu', 'operator': 'Exists', 'effect': 'NoSchedule'}] */ - tolerations?: K8sNIMOperatorConfigTolerationsItem[]; - /** Kubernetes node selector for pod placement. Example: {'node-type': 'gpu-node', 'zone': 'us-west1-a'} */ - node_selector?: K8sNIMOperatorConfigNodeSelector; - /** - * Grace period in seconds for NIM startup. Determines how long Kubernetes will wait for the NIM to become ready before restarting it. Example: 600 (10 minutes). Must be a positive integer. - * @exclusiveMinimum 0 - */ - startup_probe_grace_seconds?: number; -} diff --git a/web/packages/sdk/generated/platform/schema/K8sNIMOperatorConfigNodeSelector.ts b/web/packages/sdk/generated/platform/schema/K8sNIMOperatorConfigNodeSelector.ts deleted file mode 100644 index 27a4622e81..0000000000 --- a/web/packages/sdk/generated/platform/schema/K8sNIMOperatorConfigNodeSelector.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Kubernetes node selector for pod placement. Example: {'node-type': 'gpu-node', 'zone': 'us-west1-a'} - */ -export type K8sNIMOperatorConfigNodeSelector = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/K8sNIMOperatorConfigResources.ts b/web/packages/sdk/generated/platform/schema/K8sNIMOperatorConfigResources.ts deleted file mode 100644 index 060a52301b..0000000000 --- a/web/packages/sdk/generated/platform/schema/K8sNIMOperatorConfigResources.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Kubernetes resource requirements including requests and limits. Example: {'requests': {'cpu': '2', 'memory': '8Gi'}, 'limits': {'memory': '16Gi'}} - */ -export type K8sNIMOperatorConfigResources = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/K8sNIMOperatorConfigTolerationsItem.ts b/web/packages/sdk/generated/platform/schema/K8sNIMOperatorConfigTolerationsItem.ts deleted file mode 100644 index e01d0b8336..0000000000 --- a/web/packages/sdk/generated/platform/schema/K8sNIMOperatorConfigTolerationsItem.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type K8sNIMOperatorConfigTolerationsItem = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/KubernetesEmptyDirVolume.ts b/web/packages/sdk/generated/platform/schema/KubernetesEmptyDirVolume.ts deleted file mode 100644 index ae0c0e8fc1..0000000000 --- a/web/packages/sdk/generated/platform/schema/KubernetesEmptyDirVolume.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Kubernetes EmptyDir Volume definition. - */ -export interface KubernetesEmptyDirVolume { - /** The medium of the emptyDir volume (e.g., 'Memory') */ - medium?: string; - /** The size limit of the emptyDir volume (e.g., '1Gi') */ - size_limit?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/KubernetesJobExecutionProfile.ts b/web/packages/sdk/generated/platform/schema/KubernetesJobExecutionProfile.ts deleted file mode 100644 index 6daabf1c76..0000000000 --- a/web/packages/sdk/generated/platform/schema/KubernetesJobExecutionProfile.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { KubernetesJobExecutionProfileConfig } from './KubernetesJobExecutionProfileConfig'; - -/** - * Execution configuration for a Kubernetes Job. -This is used to define the executor type, provider, profile, and any additional configuration -required for the executor to run the job on Kubernetes - */ -export interface KubernetesJobExecutionProfile { - /** The compute provider for the executor, e.g., cpu, gpu */ - provider?: string; - /** The profile name for the executor, e.g., high_priority_a100, low_priority, etc. */ - profile?: string; - backend?: 'kubernetes_job'; - /** Additional configuration for the kubernetes executor */ - config: KubernetesJobExecutionProfileConfig; -} diff --git a/web/packages/sdk/generated/platform/schema/KubernetesJobExecutionProfileConfig.ts b/web/packages/sdk/generated/platform/schema/KubernetesJobExecutionProfileConfig.ts deleted file mode 100644 index d83c04333b..0000000000 --- a/web/packages/sdk/generated/platform/schema/KubernetesJobExecutionProfileConfig.ts +++ /dev/null @@ -1,59 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ComputeResources } from './ComputeResources'; -import type { ImagePullSecret } from './ImagePullSecret'; -import type { KubernetesJobExecutionProfileConfigAffinity } from './KubernetesJobExecutionProfileConfigAffinity'; -import type { KubernetesJobExecutionProfileConfigEnv } from './KubernetesJobExecutionProfileConfigEnv'; -import type { KubernetesJobExecutionProfileConfigNodeSelector } from './KubernetesJobExecutionProfileConfigNodeSelector'; -import type { KubernetesJobExecutionProfileConfigPodSecurityContext } from './KubernetesJobExecutionProfileConfigPodSecurityContext'; -import type { KubernetesJobExecutionProfileConfigTolerationsItem } from './KubernetesJobExecutionProfileConfigTolerationsItem'; -import type { KubernetesJobStorageConfig } from './KubernetesJobStorageConfig'; -import type { KubernetesObjectMetadata } from './KubernetesObjectMetadata'; - -/** - * Configuration for Kubernetes execution environment. - */ -export interface KubernetesJobExecutionProfileConfig { - ttl_seconds_before_active?: number; - ttl_seconds_active?: number; - ttl_seconds_after_finished?: number; - cleanup_completed_jobs_immediately?: boolean; - /** Path to the jobs launcher tool */ - launcher_tool_path?: string; - /** Optional env vars applied to all jobs (e.g. HOME=/tmp). Keys must not conflict with platform-reserved names. Job steps may override these variables. */ - env?: KubernetesJobExecutionProfileConfigEnv; - /** Kubernetes namespace to submit the job to. If not set, it will be determined from the environment. */ - namespace?: string; - /** Kubernetes service account name for job pods. Uses the Kubernetes default service account when set to 'default'. */ - service_account_name?: string; - /** Tolerations for the Kubernetes job pods. */ - tolerations?: KubernetesJobExecutionProfileConfigTolerationsItem[]; - /** Node selector for the Kubernetes job pods. */ - node_selector?: KubernetesJobExecutionProfileConfigNodeSelector; - /** Affinity for the Kubernetes job pods. */ - affinity?: KubernetesJobExecutionProfileConfigAffinity; - /** Resource requests and limits for the Kubernetes job pods. */ - resources?: ComputeResources; - /** Pod security context for the Kubernetes job pods. */ - pod_security_context?: KubernetesJobExecutionProfileConfigPodSecurityContext; - /** Image pull secrets for the Kubernetes job pods. */ - image_pull_secrets?: ImagePullSecret[]; - /** Metadata to add to each job object in the Kubernetes job. */ - job_metadata?: KubernetesObjectMetadata; - /** Metadata to add to each pod in the Kubernetes job. */ - pod_metadata?: KubernetesObjectMetadata; - /** Storage configuration for the Kubernetes job pods. */ - storage?: KubernetesJobStorageConfig; - /** Number of GPUs to request for the job */ - num_gpus?: number; - /** The scheduler name to use for the pod spec. When non-empty, this value is applied to the pod's schedulerName field, enabling custom schedulers such as KAI Scheduler. Empty string omits schedulerName so the cluster default scheduler is used. */ - scheduler_name?: string; - /** Container image that contains the jobs-launcher binary. */ - launcher_image?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/KubernetesJobExecutionProfileConfigAffinity.ts b/web/packages/sdk/generated/platform/schema/KubernetesJobExecutionProfileConfigAffinity.ts deleted file mode 100644 index 20259b04fc..0000000000 --- a/web/packages/sdk/generated/platform/schema/KubernetesJobExecutionProfileConfigAffinity.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Affinity for the Kubernetes job pods. - */ -export type KubernetesJobExecutionProfileConfigAffinity = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/KubernetesJobExecutionProfileConfigEnv.ts b/web/packages/sdk/generated/platform/schema/KubernetesJobExecutionProfileConfigEnv.ts deleted file mode 100644 index 744721540a..0000000000 --- a/web/packages/sdk/generated/platform/schema/KubernetesJobExecutionProfileConfigEnv.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional env vars applied to all jobs (e.g. HOME=/tmp). Keys must not conflict with platform-reserved names. Job steps may override these variables. - */ -export type KubernetesJobExecutionProfileConfigEnv = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/KubernetesJobExecutionProfileConfigNodeSelector.ts b/web/packages/sdk/generated/platform/schema/KubernetesJobExecutionProfileConfigNodeSelector.ts deleted file mode 100644 index a96d4f7698..0000000000 --- a/web/packages/sdk/generated/platform/schema/KubernetesJobExecutionProfileConfigNodeSelector.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Node selector for the Kubernetes job pods. - */ -export type KubernetesJobExecutionProfileConfigNodeSelector = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/KubernetesJobExecutionProfileConfigPodSecurityContext.ts b/web/packages/sdk/generated/platform/schema/KubernetesJobExecutionProfileConfigPodSecurityContext.ts deleted file mode 100644 index c7f41ffe9c..0000000000 --- a/web/packages/sdk/generated/platform/schema/KubernetesJobExecutionProfileConfigPodSecurityContext.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Pod security context for the Kubernetes job pods. - */ -export type KubernetesJobExecutionProfileConfigPodSecurityContext = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/KubernetesJobExecutionProfileConfigTolerationsItem.ts b/web/packages/sdk/generated/platform/schema/KubernetesJobExecutionProfileConfigTolerationsItem.ts deleted file mode 100644 index 3968a1c6b1..0000000000 --- a/web/packages/sdk/generated/platform/schema/KubernetesJobExecutionProfileConfigTolerationsItem.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type KubernetesJobExecutionProfileConfigTolerationsItem = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/KubernetesJobStorageConfig.ts b/web/packages/sdk/generated/platform/schema/KubernetesJobStorageConfig.ts deleted file mode 100644 index 298331da0e..0000000000 --- a/web/packages/sdk/generated/platform/schema/KubernetesJobStorageConfig.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { KubernetesVolume } from './KubernetesVolume'; -import type { KubernetesVolumeMount } from './KubernetesVolumeMount'; - -/** - * Configuration for persistent storage in Kubernetes jobs. - */ -export interface KubernetesJobStorageConfig { - /** Persistent Volume Claim Name to use for job storage. */ - pvc_name?: string; - /** Image used to set volume permissions */ - volume_permissions_image?: string; - /** Additional volumes to mount */ - additional_volumes?: KubernetesVolume[]; - /** Additional volume mounts */ - additional_volume_mounts?: KubernetesVolumeMount[]; -} diff --git a/web/packages/sdk/generated/platform/schema/KubernetesObjectMetadata.ts b/web/packages/sdk/generated/platform/schema/KubernetesObjectMetadata.ts deleted file mode 100644 index 0c6ef04230..0000000000 --- a/web/packages/sdk/generated/platform/schema/KubernetesObjectMetadata.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { KubernetesObjectMetadataAnnotations } from './KubernetesObjectMetadataAnnotations'; -import type { KubernetesObjectMetadataLabels } from './KubernetesObjectMetadataLabels'; - -export interface KubernetesObjectMetadata { - labels?: KubernetesObjectMetadataLabels; - annotations?: KubernetesObjectMetadataAnnotations; -} diff --git a/web/packages/sdk/generated/platform/schema/KubernetesObjectMetadataAnnotations.ts b/web/packages/sdk/generated/platform/schema/KubernetesObjectMetadataAnnotations.ts deleted file mode 100644 index 87b24ccc71..0000000000 --- a/web/packages/sdk/generated/platform/schema/KubernetesObjectMetadataAnnotations.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type KubernetesObjectMetadataAnnotations = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/KubernetesObjectMetadataLabels.ts b/web/packages/sdk/generated/platform/schema/KubernetesObjectMetadataLabels.ts deleted file mode 100644 index ac222de098..0000000000 --- a/web/packages/sdk/generated/platform/schema/KubernetesObjectMetadataLabels.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type KubernetesObjectMetadataLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/KubernetesPersistentVolumeClaim.ts b/web/packages/sdk/generated/platform/schema/KubernetesPersistentVolumeClaim.ts deleted file mode 100644 index 840234b64d..0000000000 --- a/web/packages/sdk/generated/platform/schema/KubernetesPersistentVolumeClaim.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Kubernetes Persistent Volume Claim definition. - */ -export interface KubernetesPersistentVolumeClaim { - /** Persistent Volume Claim Name */ - claim_name: string; - /** Whether the volume is mounted read-only */ - read_only?: boolean; -} diff --git a/web/packages/sdk/generated/platform/schema/KubernetesVolume.ts b/web/packages/sdk/generated/platform/schema/KubernetesVolume.ts deleted file mode 100644 index 73e9cce500..0000000000 --- a/web/packages/sdk/generated/platform/schema/KubernetesVolume.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { KubernetesEmptyDirVolume } from './KubernetesEmptyDirVolume'; -import type { KubernetesPersistentVolumeClaim } from './KubernetesPersistentVolumeClaim'; - -/** - * Kubernetes Volume definition. - */ -export interface KubernetesVolume { - /** Volume Name */ - name: string; - /** Persistent Volume Claim configuration */ - persistent_volume_claim?: KubernetesPersistentVolumeClaim; - /** EmptyDir Volume configuration */ - empty_dir?: KubernetesEmptyDirVolume; -} diff --git a/web/packages/sdk/generated/platform/schema/KubernetesVolumeMount.ts b/web/packages/sdk/generated/platform/schema/KubernetesVolumeMount.ts deleted file mode 100644 index 90e1734daf..0000000000 --- a/web/packages/sdk/generated/platform/schema/KubernetesVolumeMount.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Kubernetes Volume Mount definition. - */ -export interface KubernetesVolumeMount { - /** Volume Name */ - name: string; - /** Mount Path in the container */ - mount_path: string; - /** Sub-path within the volume to mount */ - sub_path?: string; - /** Whether the volume mount is read-only */ - read_only?: boolean; -} diff --git a/web/packages/sdk/generated/platform/schema/LLMCallInfo.ts b/web/packages/sdk/generated/platform/schema/LLMCallInfo.ts deleted file mode 100644 index 8abb8c2ecf..0000000000 --- a/web/packages/sdk/generated/platform/schema/LLMCallInfo.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { LLMCallInfoRawResponse } from './LLMCallInfoRawResponse'; - -export interface LLMCallInfo { - /** The internal task that made the call. */ - task?: string; - /** The duration in seconds. */ - duration?: number; - /** The total number of used tokens. */ - total_tokens?: number; - /** The number of input tokens. */ - prompt_tokens?: number; - /** The number of output tokens. */ - completion_tokens?: number; - /** The timestamp for when the LLM call started. */ - started_at?: number; - /** The timestamp for when the LLM call finished. */ - finished_at?: number; - /** The unique prompt identifier. */ - id?: string; - /** The prompt that was used for the LLM call. */ - prompt?: string; - /** The completion generated by the LLM. */ - completion?: string; - /** The raw response received from the LLM. May contain additional information, e.g. logprobs. */ - raw_response?: LLMCallInfoRawResponse; - /** The name of the model use for the LLM call. */ - llm_model_name?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/LLMCallInfoRawResponse.ts b/web/packages/sdk/generated/platform/schema/LLMCallInfoRawResponse.ts deleted file mode 100644 index ecd0a3714e..0000000000 --- a/web/packages/sdk/generated/platform/schema/LLMCallInfoRawResponse.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * The raw response received from the LLM. May contain additional information, e.g. logprobs. - */ -export type LLMCallInfoRawResponse = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/LLMJudgeMetric.ts b/web/packages/sdk/generated/platform/schema/LLMJudgeMetric.ts deleted file mode 100644 index f8dc0556e2..0000000000 --- a/web/packages/sdk/generated/platform/schema/LLMJudgeMetric.ts +++ /dev/null @@ -1,69 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { EvaluatorModel } from './EvaluatorModel'; -import type { InferenceParams } from './InferenceParams'; -import type { LLMJudgeMetricLabels } from './LLMJudgeMetricLabels'; -import type { LLMJudgeMetricPromptTemplate } from './LLMJudgeMetricPromptTemplate'; -import type { LLMJudgeMetricStructuredOutput } from './LLMJudgeMetricStructuredOutput'; -import type { LLMJudgeMetricSupportedJobTypesItem } from './LLMJudgeMetricSupportedJobTypesItem'; -import type { RangeScore } from './RangeScore'; -import type { ReasoningParams } from './ReasoningParams'; -import type { RubricScore } from './RubricScore'; - -/** - * Persisted LLM-as-a-Judge metric. - */ -export interface LLMJudgeMetric { - /** Entity name within the workspace */ - name?: string; - /** - * Workspace identifier - * @pattern ^[\w\-\+.@:]+$ - */ - workspace: string; - /** The name of the project associated with this entity. */ - project?: string; - type?: 'llm-judge'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: LLMJudgeMetricLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: LLMJudgeMetricSupportedJobTypesItem[]; - /** The judge model to use for the metric. */ - model: EvaluatorModel; - /** - * Definitions of scores that will be extracted from the judge's output. - * @minItems 1 - */ - scores: (RubricScore | RangeScore)[]; - /** The prompt template for the judge. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{sample.output_text}} to use the model output within the template or {{item.xxx}} to reference input columns from the dataset. */ - prompt_template?: LLMJudgeMetricPromptTemplate; - /** Prompt template fields that should remain in the inferred input schema but not be required. Use this for fields like 'reference' when the metric can still run without them. */ - optional_fields?: string[]; - /** JSON schema to apply structured output for the judge model evaluation. Structured output is derived from scores when omitted. Use this option if there are custom requirements for the output of the judge. */ - structured_output?: LLMJudgeMetricStructuredOutput; - /** Inference parameters for the judge model. */ - inference?: InferenceParams; - /** Initial instructions that define the judge model's role and behavior for the conversation. This is prepended to the messages as a system message. */ - system_prompt?: string; - /** Custom settings that control the judge model's reasoning behavior. For reasoning models (e.g., Nemotron), use `end_token` to strip reasoning traces from the output. */ - reasoning?: ReasoningParams; - /** If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception. */ - ignore_request_failure?: boolean; - readonly id: string; - readonly created_at: string; - readonly created_by: string | null; - readonly updated_at: string; - readonly updated_by: string | null; - /** Alias for id for backwards compatibility. */ - readonly entity_id: string; - /** Parent entity ID for nested entities. */ - readonly parent: string; -} diff --git a/web/packages/sdk/generated/platform/schema/LLMJudgeMetricInput.ts b/web/packages/sdk/generated/platform/schema/LLMJudgeMetricInput.ts deleted file mode 100644 index 0344d66082..0000000000 --- a/web/packages/sdk/generated/platform/schema/LLMJudgeMetricInput.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { EvaluatorModel } from './EvaluatorModel'; -import type { InferenceParams } from './InferenceParams'; -import type { LLMJudgeMetricInputLabels } from './LLMJudgeMetricInputLabels'; -import type { LLMJudgeMetricInputPromptTemplate } from './LLMJudgeMetricInputPromptTemplate'; -import type { LLMJudgeMetricInputStructuredOutput } from './LLMJudgeMetricInputStructuredOutput'; -import type { LLMJudgeMetricInputSupportedJobTypesItem } from './LLMJudgeMetricInputSupportedJobTypesItem'; -import type { ModelRef } from './ModelRef'; -import type { RangeScore } from './RangeScore'; -import type { ReasoningParams } from './ReasoningParams'; -import type { RubricScore } from './RubricScore'; - -/** - * Request type for creating LLM Judge metrics. - */ -export interface LLMJudgeMetricInput { - type?: 'llm-judge'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: LLMJudgeMetricInputLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: LLMJudgeMetricInputSupportedJobTypesItem[]; - /** The model configuration. */ - model: EvaluatorModel | ModelRef; - /** - * Definitions of scores that will be extracted from the judge's output. - * @minItems 1 - */ - scores: (RubricScore | RangeScore)[]; - /** The prompt template for the judge. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{sample.output_text}} to use the model output within the template or {{item.xxx}} to reference input columns from the dataset. */ - prompt_template?: LLMJudgeMetricInputPromptTemplate; - /** Prompt template fields that should remain in the inferred input schema but not be required. Use this for fields like 'reference' when the metric can still run without them. */ - optional_fields?: string[]; - /** JSON schema to apply structured output for the judge model evaluation. Structured output is derived from scores when omitted. Use this option if there are custom requirements for the output of the judge. */ - structured_output?: LLMJudgeMetricInputStructuredOutput; - /** Inference parameters for the judge model. */ - inference?: InferenceParams; - /** Initial instructions that define the judge model's role and behavior for the conversation. This is prepended to the messages as a system message. */ - system_prompt?: string; - /** Custom settings that control the judge model's reasoning behavior. For reasoning models (e.g., Nemotron), use `end_token` to strip reasoning traces from the output. */ - reasoning?: ReasoningParams; - /** If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception. */ - ignore_request_failure?: boolean; -} diff --git a/web/packages/sdk/generated/platform/schema/LLMJudgeMetricInputLabels.ts b/web/packages/sdk/generated/platform/schema/LLMJudgeMetricInputLabels.ts deleted file mode 100644 index cfa6c59ffc..0000000000 --- a/web/packages/sdk/generated/platform/schema/LLMJudgeMetricInputLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type LLMJudgeMetricInputLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/LLMJudgeMetricInputPromptTemplate.ts b/web/packages/sdk/generated/platform/schema/LLMJudgeMetricInputPromptTemplate.ts deleted file mode 100644 index 363e73d63e..0000000000 --- a/web/packages/sdk/generated/platform/schema/LLMJudgeMetricInputPromptTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * The prompt template for the judge. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{sample.output_text}} to use the model output within the template or {{item.xxx}} to reference input columns from the dataset. - */ -export type LLMJudgeMetricInputPromptTemplate = string | { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/LLMJudgeMetricInputStructuredOutput.ts b/web/packages/sdk/generated/platform/schema/LLMJudgeMetricInputStructuredOutput.ts deleted file mode 100644 index 879fa348c8..0000000000 --- a/web/packages/sdk/generated/platform/schema/LLMJudgeMetricInputStructuredOutput.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * JSON schema to apply structured output for the judge model evaluation. Structured output is derived from scores when omitted. Use this option if there are custom requirements for the output of the judge. - */ -export type LLMJudgeMetricInputStructuredOutput = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/LLMJudgeMetricInputSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/LLMJudgeMetricInputSupportedJobTypesItem.ts deleted file mode 100644 index a1f6b42f10..0000000000 --- a/web/packages/sdk/generated/platform/schema/LLMJudgeMetricInputSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type LLMJudgeMetricInputSupportedJobTypesItem = - (typeof LLMJudgeMetricInputSupportedJobTypesItem)[keyof typeof LLMJudgeMetricInputSupportedJobTypesItem]; - -export const LLMJudgeMetricInputSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/LLMJudgeMetricLabels.ts b/web/packages/sdk/generated/platform/schema/LLMJudgeMetricLabels.ts deleted file mode 100644 index edfc262c21..0000000000 --- a/web/packages/sdk/generated/platform/schema/LLMJudgeMetricLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type LLMJudgeMetricLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/LLMJudgeMetricPromptTemplate.ts b/web/packages/sdk/generated/platform/schema/LLMJudgeMetricPromptTemplate.ts deleted file mode 100644 index f812c14ac5..0000000000 --- a/web/packages/sdk/generated/platform/schema/LLMJudgeMetricPromptTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * The prompt template for the judge. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{sample.output_text}} to use the model output within the template or {{item.xxx}} to reference input columns from the dataset. - */ -export type LLMJudgeMetricPromptTemplate = string | { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/LLMJudgeMetricResponse.ts b/web/packages/sdk/generated/platform/schema/LLMJudgeMetricResponse.ts deleted file mode 100644 index bbbcf3f04c..0000000000 --- a/web/packages/sdk/generated/platform/schema/LLMJudgeMetricResponse.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { EvaluatorModel } from './EvaluatorModel'; -import type { InferenceParams } from './InferenceParams'; -import type { LLMJudgeMetricResponseLabels } from './LLMJudgeMetricResponseLabels'; -import type { LLMJudgeMetricResponsePromptTemplate } from './LLMJudgeMetricResponsePromptTemplate'; -import type { LLMJudgeMetricResponseStructuredOutput } from './LLMJudgeMetricResponseStructuredOutput'; -import type { LLMJudgeMetricResponseSupportedJobTypesItem } from './LLMJudgeMetricResponseSupportedJobTypesItem'; -import type { ModelRef } from './ModelRef'; -import type { RangeScore } from './RangeScore'; -import type { ReasoningParams } from './ReasoningParams'; -import type { RubricScore } from './RubricScore'; - -export interface LLMJudgeMetricResponse { - /** Entity name within the workspace */ - name?: string; - /** Workspace identifier */ - workspace?: string; - /** The name of the project associated with this entity. */ - project?: string; - /** Entity name within the workspace */ - id?: string; - created_at?: string; - updated_at?: string; - parent?: string; - type?: 'llm-judge'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: LLMJudgeMetricResponseLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: LLMJudgeMetricResponseSupportedJobTypesItem[]; - /** The model configuration. */ - model: EvaluatorModel | ModelRef; - /** - * Definitions of scores that will be extracted from the judge's output. - * @minItems 1 - */ - scores: (RubricScore | RangeScore)[]; - /** The prompt template for the judge. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{sample.output_text}} to use the model output within the template or {{item.xxx}} to reference input columns from the dataset. */ - prompt_template?: LLMJudgeMetricResponsePromptTemplate; - /** Prompt template fields that should remain in the inferred input schema but not be required. Use this for fields like 'reference' when the metric can still run without them. */ - optional_fields?: string[]; - /** JSON schema to apply structured output for the judge model evaluation. Structured output is derived from scores when omitted. Use this option if there are custom requirements for the output of the judge. */ - structured_output?: LLMJudgeMetricResponseStructuredOutput; - /** Inference parameters for the judge model. */ - inference?: InferenceParams; - /** Initial instructions that define the judge model's role and behavior for the conversation. This is prepended to the messages as a system message. */ - system_prompt?: string; - /** Custom settings that control the judge model's reasoning behavior. For reasoning models (e.g., Nemotron), use `end_token` to strip reasoning traces from the output. */ - reasoning?: ReasoningParams; - /** If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception. */ - ignore_request_failure?: boolean; -} diff --git a/web/packages/sdk/generated/platform/schema/LLMJudgeMetricResponseLabels.ts b/web/packages/sdk/generated/platform/schema/LLMJudgeMetricResponseLabels.ts deleted file mode 100644 index 89d85d20b3..0000000000 --- a/web/packages/sdk/generated/platform/schema/LLMJudgeMetricResponseLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type LLMJudgeMetricResponseLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/LLMJudgeMetricResponsePromptTemplate.ts b/web/packages/sdk/generated/platform/schema/LLMJudgeMetricResponsePromptTemplate.ts deleted file mode 100644 index d35a237627..0000000000 --- a/web/packages/sdk/generated/platform/schema/LLMJudgeMetricResponsePromptTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * The prompt template for the judge. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{sample.output_text}} to use the model output within the template or {{item.xxx}} to reference input columns from the dataset. - */ -export type LLMJudgeMetricResponsePromptTemplate = string | { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/LLMJudgeMetricResponseStructuredOutput.ts b/web/packages/sdk/generated/platform/schema/LLMJudgeMetricResponseStructuredOutput.ts deleted file mode 100644 index 2fde8ea6b8..0000000000 --- a/web/packages/sdk/generated/platform/schema/LLMJudgeMetricResponseStructuredOutput.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * JSON schema to apply structured output for the judge model evaluation. Structured output is derived from scores when omitted. Use this option if there are custom requirements for the output of the judge. - */ -export type LLMJudgeMetricResponseStructuredOutput = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/LLMJudgeMetricResponseSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/LLMJudgeMetricResponseSupportedJobTypesItem.ts deleted file mode 100644 index 1b4b90664d..0000000000 --- a/web/packages/sdk/generated/platform/schema/LLMJudgeMetricResponseSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type LLMJudgeMetricResponseSupportedJobTypesItem = - (typeof LLMJudgeMetricResponseSupportedJobTypesItem)[keyof typeof LLMJudgeMetricResponseSupportedJobTypesItem]; - -export const LLMJudgeMetricResponseSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/LLMJudgeMetricStructuredOutput.ts b/web/packages/sdk/generated/platform/schema/LLMJudgeMetricStructuredOutput.ts deleted file mode 100644 index 6f413d81b9..0000000000 --- a/web/packages/sdk/generated/platform/schema/LLMJudgeMetricStructuredOutput.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * JSON schema to apply structured output for the judge model evaluation. Structured output is derived from scores when omitted. Use this option if there are custom requirements for the output of the judge. - */ -export type LLMJudgeMetricStructuredOutput = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/LLMJudgeMetricSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/LLMJudgeMetricSupportedJobTypesItem.ts deleted file mode 100644 index fb6ae23887..0000000000 --- a/web/packages/sdk/generated/platform/schema/LLMJudgeMetricSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type LLMJudgeMetricSupportedJobTypesItem = - (typeof LLMJudgeMetricSupportedJobTypesItem)[keyof typeof LLMJudgeMetricSupportedJobTypesItem]; - -export const LLMJudgeMetricSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/LinearLayerSpec.ts b/web/packages/sdk/generated/platform/schema/LinearLayerSpec.ts deleted file mode 100644 index 29ab53fe58..0000000000 --- a/web/packages/sdk/generated/platform/schema/LinearLayerSpec.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Specification for a single linear layer in the model. - */ -export interface LinearLayerSpec { - /** Module name (e.g., 'model.layers.0.self_attn.q_proj') */ - name: string; - /** Input feature dimension */ - in_features: number; - /** Output feature dimension */ - out_features: number; -} diff --git a/web/packages/sdk/generated/platform/schema/ListAppsParams.ts b/web/packages/sdk/generated/platform/schema/ListAppsParams.ts deleted file mode 100644 index 3f57a76c82..0000000000 --- a/web/packages/sdk/generated/platform/schema/ListAppsParams.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AppFilter } from './AppFilter'; -import type { AppSortField } from './AppSortField'; - -export type ListAppsParams = { - /** - * Page number. - */ - page?: number; - /** - * Page size. - */ - page_size?: number; - /** - * The field to sort by. To sort in decreasing order, use `-` in front of the field name. - */ - sort?: AppSortField; - /** - * Filter apps by name, description, project, created_at, and updated_at. - */ - filter?: AppFilter; -}; diff --git a/web/packages/sdk/generated/platform/schema/ListEntriesParams.ts b/web/packages/sdk/generated/platform/schema/ListEntriesParams.ts deleted file mode 100644 index 7aa57d04bf..0000000000 --- a/web/packages/sdk/generated/platform/schema/ListEntriesParams.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { EntryFilter } from './EntryFilter'; -import type { EntrySortField } from './EntrySortField'; - -export type ListEntriesParams = { - /** - * Page number. - */ - page?: number; - /** - * Page size. - */ - page_size?: number; - /** - * The field to sort by. To sort in decreasing order, use `-` in front of the field name. - */ - sort?: EntrySortField; - /** - * Filter entries by id, project, external_id, created_at, updated_at, usage fields (model), context fields, and user_rating fields. - */ - filter?: EntryFilter; -}; diff --git a/web/packages/sdk/generated/platform/schema/ListEvaluatorResultsParams.ts b/web/packages/sdk/generated/platform/schema/ListEvaluatorResultsParams.ts deleted file mode 100644 index 532d91f7a5..0000000000 --- a/web/packages/sdk/generated/platform/schema/ListEvaluatorResultsParams.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { EvaluatorResultFilter } from './EvaluatorResultFilter'; -import type { EvaluatorResultSortField } from './EvaluatorResultSortField'; - -export type ListEvaluatorResultsParams = { - /** - * Page number. - * @minimum 1 - */ - page?: number; - /** - * Page size. - * @minimum 1 - * @maximum 1000 - */ - page_size?: number; - sort?: EvaluatorResultSortField; - /** - * Filter evaluator results by span_id, session_id, name, data_type, created_by, value range, and created_at range. - */ - filter?: EvaluatorResultFilter; -}; diff --git a/web/packages/sdk/generated/platform/schema/ListExportJobsParams.ts b/web/packages/sdk/generated/platform/schema/ListExportJobsParams.ts deleted file mode 100644 index 1f5eb551b3..0000000000 --- a/web/packages/sdk/generated/platform/schema/ListExportJobsParams.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ExportJobFilter } from './ExportJobFilter'; -import type { ExportJobSortField } from './ExportJobSortField'; - -export type ListExportJobsParams = { - /** - * Page number. - */ - page?: number; - /** - * Page size. - */ - page_size?: number; - /** - * The field to sort by. To sort in decreasing order, use `-` in front of the field name. - */ - sort?: ExportJobSortField; - /** - * Filter export jobs by name, status, output_file_url, created_at, and updated_at. - */ - filter?: ExportJobFilter; -}; diff --git a/web/packages/sdk/generated/platform/schema/ListFilesetFilesResponse.ts b/web/packages/sdk/generated/platform/schema/ListFilesetFilesResponse.ts deleted file mode 100644 index 0f84506164..0000000000 --- a/web/packages/sdk/generated/platform/schema/ListFilesetFilesResponse.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { FilesetFileOutput } from './FilesetFileOutput'; - -export interface ListFilesetFilesResponse { - data: FilesetFileOutput[]; -} diff --git a/web/packages/sdk/generated/platform/schema/ListSpansMode.ts b/web/packages/sdk/generated/platform/schema/ListSpansMode.ts deleted file mode 100644 index b5215c2ecf..0000000000 --- a/web/packages/sdk/generated/platform/schema/ListSpansMode.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type ListSpansMode = (typeof ListSpansMode)[keyof typeof ListSpansMode]; - -export const ListSpansMode = { - summary: 'summary', - detailed: 'detailed', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/ListSpansParams.ts b/web/packages/sdk/generated/platform/schema/ListSpansParams.ts deleted file mode 100644 index 9a1aaa82c6..0000000000 --- a/web/packages/sdk/generated/platform/schema/ListSpansParams.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ListSpansMode } from './ListSpansMode'; -import type { SpanFilter } from './SpanFilter'; -import type { SpanSortField } from './SpanSortField'; - -export type ListSpansParams = { - /** - * Page number. - * @minimum 1 - */ - page?: number; - /** - * Page size. - * @minimum 1 - * @maximum 1000 - */ - page_size?: number; - sort?: SpanSortField; - mode?: ListSpansMode; - /** - * Filter spans by session_id, parent_span_id, project, evaluation context fields, source, kind, status, model, tool_name, provider, agent_id, agent_name, prompt_name, prompt_version, and started_at. - */ - filter?: SpanFilter; -}; diff --git a/web/packages/sdk/generated/platform/schema/ListTasksParams.ts b/web/packages/sdk/generated/platform/schema/ListTasksParams.ts deleted file mode 100644 index c1b71b14df..0000000000 --- a/web/packages/sdk/generated/platform/schema/ListTasksParams.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { TaskFilter } from './TaskFilter'; -import type { TaskSortField } from './TaskSortField'; - -export type ListTasksParams = { - /** - * Page number. - */ - page?: number; - /** - * Page size. - */ - page_size?: number; - /** - * The field to sort by. To sort in decreasing order, use `-` in front of the field name. - */ - sort?: TaskSortField; - /** - * Filter tasks by name, app, description, project, created_at, and updated_at. - */ - filter?: TaskFilter; -}; diff --git a/web/packages/sdk/generated/platform/schema/ListTracesMode.ts b/web/packages/sdk/generated/platform/schema/ListTracesMode.ts deleted file mode 100644 index 1f3c3826b2..0000000000 --- a/web/packages/sdk/generated/platform/schema/ListTracesMode.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type ListTracesMode = (typeof ListTracesMode)[keyof typeof ListTracesMode]; - -export const ListTracesMode = { - summary: 'summary', - detailed: 'detailed', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/ListTracesParams.ts b/web/packages/sdk/generated/platform/schema/ListTracesParams.ts deleted file mode 100644 index 63a364a55d..0000000000 --- a/web/packages/sdk/generated/platform/schema/ListTracesParams.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ListTracesMode } from './ListTracesMode'; -import type { TraceFilter } from './TraceFilter'; -import type { TraceSortField } from './TraceSortField'; - -export type ListTracesParams = { - /** - * Page number. - * @minimum 1 - */ - page?: number; - /** - * Page size. - * @minimum 1 - * @maximum 1000 - */ - page_size?: number; - sort?: TraceSortField; - /** - * Use summary for root-span trace fields only, or detailed to include token, cost, and span-count rollups. - */ - mode?: ListTracesMode; - /** - * Filter root-span-backed traces by id, session_id, rolled-up status, root span started_at, and root-span evaluation context fields. - */ - filter?: TraceFilter; -}; diff --git a/web/packages/sdk/generated/platform/schema/ListVirtualModelsParams.ts b/web/packages/sdk/generated/platform/schema/ListVirtualModelsParams.ts deleted file mode 100644 index 3b79927a5b..0000000000 --- a/web/packages/sdk/generated/platform/schema/ListVirtualModelsParams.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type ListVirtualModelsParams = { - /** - * Page number (1-indexed). - * @minimum 1 - */ - page?: number; - /** - * Number of results per page. - * @minimum 1 - * @maximum 200 - */ - page_size?: number; - /** - * Sort field. Prefix with ``-`` for descending order. - */ - sort?: string; -}; diff --git a/web/packages/sdk/generated/platform/schema/LocalStorageConfig.ts b/web/packages/sdk/generated/platform/schema/LocalStorageConfig.ts deleted file mode 100644 index b4ced5709b..0000000000 --- a/web/packages/sdk/generated/platform/schema/LocalStorageConfig.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export interface LocalStorageConfig { - /** Chunk size in bytes for reading/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB. */ - read_chunk_size?: number; - type?: 'local'; - path: string; - /** How many bytes to buffer before flushing to disk */ - write_buffer_size?: number; -} diff --git a/web/packages/sdk/generated/platform/schema/LogAdapterConfig.ts b/web/packages/sdk/generated/platform/schema/LogAdapterConfig.ts deleted file mode 100644 index dd03aa1018..0000000000 --- a/web/packages/sdk/generated/platform/schema/LogAdapterConfig.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export interface LogAdapterConfig { - /** The name of the adapter. */ - name?: string; - [key: string]: unknown; -} diff --git a/web/packages/sdk/generated/platform/schema/LogQueryRequest.ts b/web/packages/sdk/generated/platform/schema/LogQueryRequest.ts deleted file mode 100644 index a64df8cf15..0000000000 --- a/web/packages/sdk/generated/platform/schema/LogQueryRequest.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { LogQueryRequestFilters } from './LogQueryRequestFilters'; - -/** - * Request body for querying logs from a fileset. - */ -export interface LogQueryRequest { - /** Key-value filters to apply to the query */ - filters?: LogQueryRequestFilters; - /** - * Maximum number of results to return - * @maximum 1000 - * @exclusiveMinimum 0 - */ - limit?: number; - /** Cursor for pagination */ - page_cursor?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/LogQueryRequestFilters.ts b/web/packages/sdk/generated/platform/schema/LogQueryRequestFilters.ts deleted file mode 100644 index 31e4af7ccd..0000000000 --- a/web/packages/sdk/generated/platform/schema/LogQueryRequestFilters.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Key-value filters to apply to the query - */ -export type LogQueryRequestFilters = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/Lora.ts b/web/packages/sdk/generated/platform/schema/Lora.ts deleted file mode 100644 index e5f0ac3e2e..0000000000 --- a/web/packages/sdk/generated/platform/schema/Lora.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export interface Lora { - /** Alpha scaling used for this adapter */ - alpha?: number; - /** LoRA Rank */ - rank: number; -} diff --git a/web/packages/sdk/generated/platform/schema/MambaConfig.ts b/web/packages/sdk/generated/platform/schema/MambaConfig.ts deleted file mode 100644 index e72a4f008c..0000000000 --- a/web/packages/sdk/generated/platform/schema/MambaConfig.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Mamba/State Space Model configuration. - */ -export interface MambaConfig { - /** Whether model is Mamba-Transformer hybrid */ - is_hybrid: boolean; - /** Number of Mamba/SSM layers */ - num_mamba_layers: number; - /** Number of attention layers (for hybrids) */ - num_attention_layers?: number; - /** Number of standalone MLP layers (for interleaved architectures) */ - num_mlp_layers?: number; - /** SSM state expansion factor (d_state) */ - state_size?: number; - /** Convolution kernel size for Mamba (d_conv) */ - conv_kernel?: number; -} diff --git a/web/packages/sdk/generated/platform/schema/MessageRole.ts b/web/packages/sdk/generated/platform/schema/MessageRole.ts deleted file mode 100644 index f639d2a14e..0000000000 --- a/web/packages/sdk/generated/platform/schema/MessageRole.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Valid role values for entry request messages. - */ -export type MessageRole = (typeof MessageRole)[keyof typeof MessageRole]; - -export const MessageRole = { - user: 'user', - system: 'system', - assistant: 'assistant', - developer: 'developer', - tool: 'tool', - function: 'function', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/MessageTemplate.ts b/web/packages/sdk/generated/platform/schema/MessageTemplate.ts deleted file mode 100644 index 468cd6e4aa..0000000000 --- a/web/packages/sdk/generated/platform/schema/MessageTemplate.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Template for a message structure. - */ -export interface MessageTemplate { - /** The type of message, e.g., 'assistant', 'user', 'system'. */ - type: string; - /** The content of the message. */ - content: string; -} diff --git a/web/packages/sdk/generated/platform/schema/MetricEvaluationJob.ts b/web/packages/sdk/generated/platform/schema/MetricEvaluationJob.ts deleted file mode 100644 index 85bd5acaac..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricEvaluationJob.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { MetricEvaluationJobCustomFields } from './MetricEvaluationJobCustomFields'; -import type { MetricEvaluationJobErrorDetails } from './MetricEvaluationJobErrorDetails'; -import type { MetricEvaluationJobOwnership } from './MetricEvaluationJobOwnership'; -import type { MetricEvaluationJobStatusDetails } from './MetricEvaluationJobStatusDetails'; -import type { MetricOfflineJob } from './MetricOfflineJob'; -import type { MetricOnlineAgentJob } from './MetricOnlineAgentJob'; -import type { MetricOnlineJob } from './MetricOnlineJob'; -import type { MetricRetrieverJob } from './MetricRetrieverJob'; -import type { PlatformJobStatus } from './PlatformJobStatus'; - -export interface MetricEvaluationJob { - id?: string; - name: string; - description?: string; - project?: string; - workspace?: string; - created_at?: string; - updated_at?: string; - spec: MetricOfflineJob | MetricOnlineJob | MetricOnlineAgentJob | MetricRetrieverJob; - status?: PlatformJobStatus; - status_details?: MetricEvaluationJobStatusDetails; - error_details?: MetricEvaluationJobErrorDetails; - ownership?: MetricEvaluationJobOwnership; - custom_fields?: MetricEvaluationJobCustomFields; -} diff --git a/web/packages/sdk/generated/platform/schema/MetricEvaluationJobCustomFields.ts b/web/packages/sdk/generated/platform/schema/MetricEvaluationJobCustomFields.ts deleted file mode 100644 index 75371892d9..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricEvaluationJobCustomFields.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type MetricEvaluationJobCustomFields = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/MetricEvaluationJobErrorDetails.ts b/web/packages/sdk/generated/platform/schema/MetricEvaluationJobErrorDetails.ts deleted file mode 100644 index fffc52b23c..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricEvaluationJobErrorDetails.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type MetricEvaluationJobErrorDetails = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/MetricEvaluationJobOwnership.ts b/web/packages/sdk/generated/platform/schema/MetricEvaluationJobOwnership.ts deleted file mode 100644 index 9da7f90603..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricEvaluationJobOwnership.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type MetricEvaluationJobOwnership = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/MetricEvaluationJobRequest.ts b/web/packages/sdk/generated/platform/schema/MetricEvaluationJobRequest.ts deleted file mode 100644 index 295eb28fe0..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricEvaluationJobRequest.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { MetricEvaluationJobRequestCustomFields } from './MetricEvaluationJobRequestCustomFields'; -import type { MetricEvaluationJobRequestOwnership } from './MetricEvaluationJobRequestOwnership'; -import type { MetricOfflineJob } from './MetricOfflineJob'; -import type { MetricOnlineAgentJob } from './MetricOnlineAgentJob'; -import type { MetricOnlineJob } from './MetricOnlineJob'; -import type { MetricRetrieverJob } from './MetricRetrieverJob'; - -export interface MetricEvaluationJobRequest { - name?: string; - description?: string; - project?: string; - spec: MetricOfflineJob | MetricOnlineJob | MetricOnlineAgentJob | MetricRetrieverJob; - ownership?: MetricEvaluationJobRequestOwnership; - custom_fields?: MetricEvaluationJobRequestCustomFields; -} diff --git a/web/packages/sdk/generated/platform/schema/MetricEvaluationJobRequestCustomFields.ts b/web/packages/sdk/generated/platform/schema/MetricEvaluationJobRequestCustomFields.ts deleted file mode 100644 index 5699ddff74..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricEvaluationJobRequestCustomFields.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type MetricEvaluationJobRequestCustomFields = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/MetricEvaluationJobRequestOwnership.ts b/web/packages/sdk/generated/platform/schema/MetricEvaluationJobRequestOwnership.ts deleted file mode 100644 index 171711cd80..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricEvaluationJobRequestOwnership.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type MetricEvaluationJobRequestOwnership = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/MetricEvaluationJobStatusDetails.ts b/web/packages/sdk/generated/platform/schema/MetricEvaluationJobStatusDetails.ts deleted file mode 100644 index 7775fda5e7..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricEvaluationJobStatusDetails.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type MetricEvaluationJobStatusDetails = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/MetricEvaluationJobsListFilter.ts b/web/packages/sdk/generated/platform/schema/MetricEvaluationJobsListFilter.ts deleted file mode 100644 index 92655910b6..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricEvaluationJobsListFilter.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { DatetimeFilter } from './DatetimeFilter'; -import type { PlatformJobStatus } from './PlatformJobStatus'; - -export interface MetricEvaluationJobsListFilter { - /** Jobs created at 'gte' datetime or 'lte' datetime. */ - created_at?: DatetimeFilter; - /** Name of the job. */ - name?: string; - /** Workspace of the job. */ - workspace?: string; - /** Project containing the job. */ - project?: string; - /** The current status. */ - status?: PlatformJobStatus; - /** Jobs updated at 'gte' datetime or 'lte' datetime. */ - updated_at?: DatetimeFilter; -} diff --git a/web/packages/sdk/generated/platform/schema/MetricEvaluationJobsPage.ts b/web/packages/sdk/generated/platform/schema/MetricEvaluationJobsPage.ts deleted file mode 100644 index 34e7289557..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricEvaluationJobsPage.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { MetricEvaluationJob } from './MetricEvaluationJob'; -import type { MetricEvaluationJobsPageFilter } from './MetricEvaluationJobsPageFilter'; -import type { PaginationData } from './PaginationData'; - -export interface MetricEvaluationJobsPage { - data: MetricEvaluationJob[]; - /** Pagination information. */ - pagination?: PaginationData; - /** The field on which the results are sorted. */ - sort?: string; - /** Filtering information. */ - filter?: MetricEvaluationJobsPageFilter; -} diff --git a/web/packages/sdk/generated/platform/schema/MetricEvaluationJobsPageFilter.ts b/web/packages/sdk/generated/platform/schema/MetricEvaluationJobsPageFilter.ts deleted file mode 100644 index bf90c37e11..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricEvaluationJobsPageFilter.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Filtering information. - */ -export type MetricEvaluationJobsPageFilter = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/MetricEvaluationJobsSortField.ts b/web/packages/sdk/generated/platform/schema/MetricEvaluationJobsSortField.ts deleted file mode 100644 index e4fd4aad5f..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricEvaluationJobsSortField.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type MetricEvaluationJobsSortField = - (typeof MetricEvaluationJobsSortField)[keyof typeof MetricEvaluationJobsSortField]; - -export const MetricEvaluationJobsSortField = { - created_at: 'created_at', - '-created_at': '-created_at', - updated_at: 'updated_at', - '-updated_at': '-updated_at', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/MetricEvaluationRequest.ts b/web/packages/sdk/generated/platform/schema/MetricEvaluationRequest.ts deleted file mode 100644 index aefc289986..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricEvaluationRequest.ts +++ /dev/null @@ -1,65 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AgentGoalAccuracyMetricInput } from './AgentGoalAccuracyMetricInput'; -import type { AnswerAccuracyMetricInput } from './AnswerAccuracyMetricInput'; -import type { BLEUMetricInput } from './BLEUMetricInput'; -import type { ContextEntityRecallMetricInput } from './ContextEntityRecallMetricInput'; -import type { ContextPrecisionMetricInput } from './ContextPrecisionMetricInput'; -import type { ContextRecallMetricInput } from './ContextRecallMetricInput'; -import type { ContextRelevanceMetricInput } from './ContextRelevanceMetricInput'; -import type { EvaluateDatasetRows } from './EvaluateDatasetRows'; -import type { ExactMatchMetricInput } from './ExactMatchMetricInput'; -import type { F1MetricInput } from './F1MetricInput'; -import type { FaithfulnessMetricInput } from './FaithfulnessMetricInput'; -import type { LLMJudgeMetricInput } from './LLMJudgeMetricInput'; -import type { MetricRef } from './MetricRef'; -import type { NemoAgentToolkitRemoteMetricInput } from './NemoAgentToolkitRemoteMetricInput'; -import type { NoiseSensitivityMetricInput } from './NoiseSensitivityMetricInput'; -import type { NumberCheckMetricInput } from './NumberCheckMetricInput'; -import type { RemoteMetricInput } from './RemoteMetricInput'; -import type { ResponseGroundednessMetricInput } from './ResponseGroundednessMetricInput'; -import type { ResponseRelevancyMetricInput } from './ResponseRelevancyMetricInput'; -import type { ROUGEMetricInput } from './ROUGEMetricInput'; -import type { StringCheckMetricInput } from './StringCheckMetricInput'; -import type { ToolCallAccuracyMetricInput } from './ToolCallAccuracyMetricInput'; -import type { ToolCallingMetricInput } from './ToolCallingMetricInput'; -import type { TopicAdherenceMetricInput } from './TopicAdherenceMetricInput'; - -/** - * Request body for metric evaluation. - */ -export interface MetricEvaluationRequest { - /** The metric to use for evaluation. Can be a reference (workspace/metric_name) or an inline metric definition. */ - metric: - | MetricRef - | LLMJudgeMetricInput - | TopicAdherenceMetricInput - | AgentGoalAccuracyMetricInput - | AnswerAccuracyMetricInput - | ContextRelevanceMetricInput - | ResponseGroundednessMetricInput - | ContextRecallMetricInput - | ContextPrecisionMetricInput - | ContextEntityRecallMetricInput - | ResponseRelevancyMetricInput - | FaithfulnessMetricInput - | NoiseSensitivityMetricInput - | ToolCallAccuracyMetricInput - | BLEUMetricInput - | ExactMatchMetricInput - | F1MetricInput - | NumberCheckMetricInput - | RemoteMetricInput - | NemoAgentToolkitRemoteMetricInput - | ROUGEMetricInput - | StringCheckMetricInput - | ToolCallingMetricInput; - /** The dataset to evaluate with inline rows. */ - dataset: EvaluateDatasetRows; -} diff --git a/web/packages/sdk/generated/platform/schema/MetricEvaluationResponse.ts b/web/packages/sdk/generated/platform/schema/MetricEvaluationResponse.ts deleted file mode 100644 index 629560245a..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricEvaluationResponse.ts +++ /dev/null @@ -1,72 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AgentGoalAccuracyMetricResponse } from './AgentGoalAccuracyMetricResponse'; -import type { AggregateRangeScore } from './AggregateRangeScore'; -import type { AggregateRubricScore } from './AggregateRubricScore'; -import type { AnswerAccuracyMetricResponse } from './AnswerAccuracyMetricResponse'; -import type { BLEUMetricResponse } from './BLEUMetricResponse'; -import type { ContextEntityRecallMetricResponse } from './ContextEntityRecallMetricResponse'; -import type { ContextPrecisionMetricResponse } from './ContextPrecisionMetricResponse'; -import type { ContextRecallMetricResponse } from './ContextRecallMetricResponse'; -import type { ContextRelevanceMetricResponse } from './ContextRelevanceMetricResponse'; -import type { ExactMatchMetricResponse } from './ExactMatchMetricResponse'; -import type { F1MetricResponse } from './F1MetricResponse'; -import type { FaithfulnessMetricResponse } from './FaithfulnessMetricResponse'; -import type { LLMJudgeMetricResponse } from './LLMJudgeMetricResponse'; -import type { MetricEvaluationRowScore } from './MetricEvaluationRowScore'; -import type { NemoAgentToolkitRemoteMetricResponse } from './NemoAgentToolkitRemoteMetricResponse'; -import type { NoiseSensitivityMetricResponse } from './NoiseSensitivityMetricResponse'; -import type { NumberCheckMetricResponse } from './NumberCheckMetricResponse'; -import type { RemoteMetricResponse } from './RemoteMetricResponse'; -import type { ResponseGroundednessMetricResponse } from './ResponseGroundednessMetricResponse'; -import type { ResponseRelevancyMetricResponse } from './ResponseRelevancyMetricResponse'; -import type { ROUGEMetricResponse } from './ROUGEMetricResponse'; -import type { StringCheckMetricResponse } from './StringCheckMetricResponse'; -import type { SystemMetricResponse } from './SystemMetricResponse'; -import type { ToolCallAccuracyMetricResponse } from './ToolCallAccuracyMetricResponse'; -import type { ToolCallingMetricResponse } from './ToolCallingMetricResponse'; -import type { TopicAdherenceMetricResponse } from './TopicAdherenceMetricResponse'; - -/** - * Response body for metric evaluation. - -Designed for easy loading into pandas DataFrames. See docs/evaluation-response-pandas.md -for examples of how to load `aggregate_scores` and `row_scores` into DataFrames. - */ -export interface MetricEvaluationResponse { - /** The metric definition that was used for evaluation. */ - metric: - | LLMJudgeMetricResponse - | TopicAdherenceMetricResponse - | AgentGoalAccuracyMetricResponse - | AnswerAccuracyMetricResponse - | ContextRelevanceMetricResponse - | ResponseGroundednessMetricResponse - | ContextRecallMetricResponse - | ContextPrecisionMetricResponse - | ContextEntityRecallMetricResponse - | ResponseRelevancyMetricResponse - | FaithfulnessMetricResponse - | NoiseSensitivityMetricResponse - | ToolCallAccuracyMetricResponse - | BLEUMetricResponse - | ExactMatchMetricResponse - | F1MetricResponse - | NumberCheckMetricResponse - | RemoteMetricResponse - | NemoAgentToolkitRemoteMetricResponse - | ROUGEMetricResponse - | StringCheckMetricResponse - | ToolCallingMetricResponse - | SystemMetricResponse; - /** Aggregated statistics per score. */ - aggregate_scores: (AggregateRangeScore | AggregateRubricScore)[]; - /** Per-row evaluation results with scores or errors. */ - row_scores: MetricEvaluationRowScore[]; -} diff --git a/web/packages/sdk/generated/platform/schema/MetricEvaluationRowScore.ts b/web/packages/sdk/generated/platform/schema/MetricEvaluationRowScore.ts deleted file mode 100644 index 719847accf..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricEvaluationRowScore.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { MetricEvaluationRowScoreRow } from './MetricEvaluationRowScoreRow'; -import type { MetricEvaluationRowScoreScores } from './MetricEvaluationRowScoreScores'; - -/** - * Result for a single evaluated row. - -Contains either scores (on success) or error (on failure), facilitating -easy manipulation where each row represents one evaluation. - */ -export interface MetricEvaluationRowScore { - /** Position of this row in the original input dataset (0-based). */ - index: number; - /** The original dataset row. */ - row: MetricEvaluationRowScoreRow; - /** Score name to value mapping for this row. Non-finite values are serialized as null. Null if evaluation failed. */ - scores?: MetricEvaluationRowScoreScores; - /** Error message if evaluation failed. Null if evaluation succeeded. */ - error?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/MetricEvaluationRowScoreRow.ts b/web/packages/sdk/generated/platform/schema/MetricEvaluationRowScoreRow.ts deleted file mode 100644 index 7cd1a3b64c..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricEvaluationRowScoreRow.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * The original dataset row. - */ -export type MetricEvaluationRowScoreRow = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/MetricEvaluationRowScoreScores.ts b/web/packages/sdk/generated/platform/schema/MetricEvaluationRowScoreScores.ts deleted file mode 100644 index 39802a7e73..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricEvaluationRowScoreScores.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Score name to value mapping for this row. Non-finite values are serialized as null. Null if evaluation failed. - */ -export type MetricEvaluationRowScoreScores = { [key: string]: number }; diff --git a/web/packages/sdk/generated/platform/schema/MetricJobResult.ts b/web/packages/sdk/generated/platform/schema/MetricJobResult.ts deleted file mode 100644 index fd303c1006..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricJobResult.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AggregateRangeScore } from './AggregateRangeScore'; -import type { AggregateRubricScore } from './AggregateRubricScore'; -import type { FilesetRef } from './FilesetRef'; -import type { MetricJobResultLabels } from './MetricJobResultLabels'; -import type { MetricRef } from './MetricRef'; -import type { ModelRef } from './ModelRef'; - -/** - * Response type for metric job result. - */ -export interface MetricJobResult { - /** Entity name within the workspace */ - name?: string; - /** - * Workspace identifier - * @pattern ^[\w\-\+.@:]+$ - */ - workspace: string; - /** The name of the project associated with this entity. */ - project?: string; - /** The dataset used for the evaluation job to generate the result. This field is only populated when the job specifies a FilesetRef. */ - dataset?: FilesetRef; - /** The model evaluated for the job to generate the result. This field is only populated when the job specifies a ModelRef. */ - model?: ModelRef; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: MetricJobResultLabels; - /** The metric used for the evaluation job to generate the result. */ - metric?: MetricRef; - /** The list of aggregated scores. */ - scores: (AggregateRangeScore | AggregateRubricScore)[]; - readonly id: string; - readonly created_at: string; - readonly created_by: string | null; - readonly updated_at: string; - readonly updated_by: string | null; - /** Alias for id for backwards compatibility. */ - readonly entity_id: string; - /** Parent entity ID for nested entities. */ - readonly parent: string; -} diff --git a/web/packages/sdk/generated/platform/schema/MetricJobResultLabels.ts b/web/packages/sdk/generated/platform/schema/MetricJobResultLabels.ts deleted file mode 100644 index 43b06e0d31..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricJobResultLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type MetricJobResultLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/MetricJobResultsListResponse.ts b/web/packages/sdk/generated/platform/schema/MetricJobResultsListResponse.ts deleted file mode 100644 index da0bccd966..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricJobResultsListResponse.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { MetricJobResult } from './MetricJobResult'; -import type { MetricJobResultsListResponseFilter } from './MetricJobResultsListResponseFilter'; -import type { PaginationData } from './PaginationData'; - -export interface MetricJobResultsListResponse { - data: MetricJobResult[]; - /** Pagination information. */ - pagination?: PaginationData; - /** The field on which the results are sorted. */ - sort?: string; - /** Filtering information. */ - filter?: MetricJobResultsListResponseFilter; -} diff --git a/web/packages/sdk/generated/platform/schema/MetricJobResultsListResponseFilter.ts b/web/packages/sdk/generated/platform/schema/MetricJobResultsListResponseFilter.ts deleted file mode 100644 index 204ee7af2c..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricJobResultsListResponseFilter.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Filtering information. - */ -export type MetricJobResultsListResponseFilter = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/MetricOfflineJob.ts b/web/packages/sdk/generated/platform/schema/MetricOfflineJob.ts deleted file mode 100644 index 9fe9f3d4cb..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricOfflineJob.ts +++ /dev/null @@ -1,78 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AgentGoalAccuracyMetricInput } from './AgentGoalAccuracyMetricInput'; -import type { AnswerAccuracyMetricInput } from './AnswerAccuracyMetricInput'; -import type { BLEUMetricInput } from './BLEUMetricInput'; -import type { ContextEntityRecallMetricInput } from './ContextEntityRecallMetricInput'; -import type { ContextPrecisionMetricInput } from './ContextPrecisionMetricInput'; -import type { ContextRecallMetricInput } from './ContextRecallMetricInput'; -import type { ContextRelevanceMetricInput } from './ContextRelevanceMetricInput'; -import type { DatasetRows } from './DatasetRows'; -import type { ExactMatchMetricInput } from './ExactMatchMetricInput'; -import type { F1MetricInput } from './F1MetricInput'; -import type { FaithfulnessMetricInput } from './FaithfulnessMetricInput'; -import type { FieldMapping } from './FieldMapping'; -import type { FilesetInput } from './FilesetInput'; -import type { FilesetRef } from './FilesetRef'; -import type { LLMJudgeMetricInput } from './LLMJudgeMetricInput'; -import type { MetricOfflineJobMetricParams } from './MetricOfflineJobMetricParams'; -import type { MetricRef } from './MetricRef'; -import type { NemoAgentToolkitRemoteMetricInput } from './NemoAgentToolkitRemoteMetricInput'; -import type { NoiseSensitivityMetricInput } from './NoiseSensitivityMetricInput'; -import type { NumberCheckMetricInput } from './NumberCheckMetricInput'; -import type { RemoteMetricInput } from './RemoteMetricInput'; -import type { ResponseGroundednessMetricInput } from './ResponseGroundednessMetricInput'; -import type { ResponseRelevancyMetricInput } from './ResponseRelevancyMetricInput'; -import type { ROUGEMetricInput } from './ROUGEMetricInput'; -import type { RunConfig } from './RunConfig'; -import type { StringCheckMetricInput } from './StringCheckMetricInput'; -import type { SystemMetricInput } from './SystemMetricInput'; -import type { ToolCallAccuracyMetricInput } from './ToolCallAccuracyMetricInput'; -import type { ToolCallingMetricInput } from './ToolCallingMetricInput'; -import type { TopicAdherenceMetricInput } from './TopicAdherenceMetricInput'; - -/** - * An offline metric job. - */ -export interface MetricOfflineJob { - /** The metric for evaluation. */ - metric: - | MetricRef - | LLMJudgeMetricInput - | TopicAdherenceMetricInput - | AgentGoalAccuracyMetricInput - | AnswerAccuracyMetricInput - | ContextRelevanceMetricInput - | ResponseGroundednessMetricInput - | ContextRecallMetricInput - | ContextPrecisionMetricInput - | ContextEntityRecallMetricInput - | ResponseRelevancyMetricInput - | FaithfulnessMetricInput - | NoiseSensitivityMetricInput - | ToolCallAccuracyMetricInput - | BLEUMetricInput - | ExactMatchMetricInput - | F1MetricInput - | NumberCheckMetricInput - | RemoteMetricInput - | NemoAgentToolkitRemoteMetricInput - | ROUGEMetricInput - | StringCheckMetricInput - | ToolCallingMetricInput - | SystemMetricInput; - /** Additional parameters for the metric. Required for system metrics, optional overrides for custom metrics. */ - metric_params?: MetricOfflineJobMetricParams; - /** Maps canonical evaluator fields such as 'input' and 'output' to dataset column paths for this job. */ - field_mapping?: FieldMapping; - /** The dataset to evaluate which may represent generated outputs from a model. */ - dataset: DatasetRows | FilesetRef | FilesetInput; - /** Execution parameters for the metric job. */ - params?: RunConfig; -} diff --git a/web/packages/sdk/generated/platform/schema/MetricOfflineJobMetricParams.ts b/web/packages/sdk/generated/platform/schema/MetricOfflineJobMetricParams.ts deleted file mode 100644 index 9dae6cfff1..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricOfflineJobMetricParams.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Additional parameters for the metric. Required for system metrics, optional overrides for custom metrics. - */ -export type MetricOfflineJobMetricParams = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/MetricOnlineAgentJob.ts b/web/packages/sdk/generated/platform/schema/MetricOnlineAgentJob.ts deleted file mode 100644 index b8588f606a..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricOnlineAgentJob.ts +++ /dev/null @@ -1,86 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { Agent } from './Agent'; -import type { AgentGoalAccuracyMetricInput } from './AgentGoalAccuracyMetricInput'; -import type { AnswerAccuracyMetricInput } from './AnswerAccuracyMetricInput'; -import type { BLEUMetricInput } from './BLEUMetricInput'; -import type { ContextEntityRecallMetricInput } from './ContextEntityRecallMetricInput'; -import type { ContextPrecisionMetricInput } from './ContextPrecisionMetricInput'; -import type { ContextRecallMetricInput } from './ContextRecallMetricInput'; -import type { ContextRelevanceMetricInput } from './ContextRelevanceMetricInput'; -import type { DatasetRows } from './DatasetRows'; -import type { ExactMatchMetricInput } from './ExactMatchMetricInput'; -import type { F1MetricInput } from './F1MetricInput'; -import type { FaithfulnessMetricInput } from './FaithfulnessMetricInput'; -import type { FieldMapping } from './FieldMapping'; -import type { FilesetInput } from './FilesetInput'; -import type { FilesetRef } from './FilesetRef'; -import type { LLMJudgeMetricInput } from './LLMJudgeMetricInput'; -import type { MetricOnlineAgentJobMetricParams } from './MetricOnlineAgentJobMetricParams'; -import type { MetricOnlineAgentJobPromptTemplate } from './MetricOnlineAgentJobPromptTemplate'; -import type { MetricRef } from './MetricRef'; -import type { NemoAgentToolkitRemoteMetricInput } from './NemoAgentToolkitRemoteMetricInput'; -import type { NoiseSensitivityMetricInput } from './NoiseSensitivityMetricInput'; -import type { NumberCheckMetricInput } from './NumberCheckMetricInput'; -import type { RemoteMetricInput } from './RemoteMetricInput'; -import type { ResponseGroundednessMetricInput } from './ResponseGroundednessMetricInput'; -import type { ResponseRelevancyMetricInput } from './ResponseRelevancyMetricInput'; -import type { ROUGEMetricInput } from './ROUGEMetricInput'; -import type { RunConfigOnline } from './RunConfigOnline'; -import type { StringCheckMetricInput } from './StringCheckMetricInput'; -import type { SystemMetricInput } from './SystemMetricInput'; -import type { ToolCallAccuracyMetricInput } from './ToolCallAccuracyMetricInput'; -import type { ToolCallingMetricInput } from './ToolCallingMetricInput'; -import type { TopicAdherenceMetricInput } from './TopicAdherenceMetricInput'; - -/** - * An online metric job that evaluates an agent. - */ -export interface MetricOnlineAgentJob { - /** The metric for evaluation. */ - metric: - | MetricRef - | LLMJudgeMetricInput - | TopicAdherenceMetricInput - | AgentGoalAccuracyMetricInput - | AnswerAccuracyMetricInput - | ContextRelevanceMetricInput - | ResponseGroundednessMetricInput - | ContextRecallMetricInput - | ContextPrecisionMetricInput - | ContextEntityRecallMetricInput - | ResponseRelevancyMetricInput - | FaithfulnessMetricInput - | NoiseSensitivityMetricInput - | ToolCallAccuracyMetricInput - | BLEUMetricInput - | ExactMatchMetricInput - | F1MetricInput - | NumberCheckMetricInput - | RemoteMetricInput - | NemoAgentToolkitRemoteMetricInput - | ROUGEMetricInput - | StringCheckMetricInput - | ToolCallingMetricInput - | SystemMetricInput; - /** Additional parameters for the metric. Required for system metrics, optional overrides for custom metrics. */ - metric_params?: MetricOnlineAgentJobMetricParams; - /** Maps canonical evaluator fields such as 'input' and 'output' to dataset column paths for this job. */ - field_mapping?: FieldMapping; - /** The agent to evaluate. */ - agent: Agent; - /** The dataset to use for agent prompts and evaluation. */ - dataset: DatasetRows | FilesetRef | FilesetInput; - /** Execution parameters for the metric job. */ - params?: RunConfigOnline; - /** The jinja template to prompt the agent for evaluation. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{input}}, {{output}}, {{context}}, {{reference}} to reference input columns. */ - prompt_template: MetricOnlineAgentJobPromptTemplate; - /** Prompt template fields that should remain available to the prompt template but not be required by dataset schema validation. */ - optional_fields?: string[]; -} diff --git a/web/packages/sdk/generated/platform/schema/MetricOnlineAgentJobMetricParams.ts b/web/packages/sdk/generated/platform/schema/MetricOnlineAgentJobMetricParams.ts deleted file mode 100644 index 5cd9da1572..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricOnlineAgentJobMetricParams.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Additional parameters for the metric. Required for system metrics, optional overrides for custom metrics. - */ -export type MetricOnlineAgentJobMetricParams = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/MetricOnlineAgentJobPromptTemplate.ts b/web/packages/sdk/generated/platform/schema/MetricOnlineAgentJobPromptTemplate.ts deleted file mode 100644 index b7587120c9..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricOnlineAgentJobPromptTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * The jinja template to prompt the agent for evaluation. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{input}}, {{output}}, {{context}}, {{reference}} to reference input columns. - */ -export type MetricOnlineAgentJobPromptTemplate = string | { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/MetricOnlineJob.ts b/web/packages/sdk/generated/platform/schema/MetricOnlineJob.ts deleted file mode 100644 index 1f91fbaf93..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricOnlineJob.ts +++ /dev/null @@ -1,87 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AgentGoalAccuracyMetricInput } from './AgentGoalAccuracyMetricInput'; -import type { AnswerAccuracyMetricInput } from './AnswerAccuracyMetricInput'; -import type { BLEUMetricInput } from './BLEUMetricInput'; -import type { ContextEntityRecallMetricInput } from './ContextEntityRecallMetricInput'; -import type { ContextPrecisionMetricInput } from './ContextPrecisionMetricInput'; -import type { ContextRecallMetricInput } from './ContextRecallMetricInput'; -import type { ContextRelevanceMetricInput } from './ContextRelevanceMetricInput'; -import type { DatasetRows } from './DatasetRows'; -import type { EvaluatorModel } from './EvaluatorModel'; -import type { ExactMatchMetricInput } from './ExactMatchMetricInput'; -import type { F1MetricInput } from './F1MetricInput'; -import type { FaithfulnessMetricInput } from './FaithfulnessMetricInput'; -import type { FieldMapping } from './FieldMapping'; -import type { FilesetInput } from './FilesetInput'; -import type { FilesetRef } from './FilesetRef'; -import type { LLMJudgeMetricInput } from './LLMJudgeMetricInput'; -import type { MetricOnlineJobMetricParams } from './MetricOnlineJobMetricParams'; -import type { MetricOnlineJobPromptTemplate } from './MetricOnlineJobPromptTemplate'; -import type { MetricRef } from './MetricRef'; -import type { ModelRef } from './ModelRef'; -import type { NemoAgentToolkitRemoteMetricInput } from './NemoAgentToolkitRemoteMetricInput'; -import type { NoiseSensitivityMetricInput } from './NoiseSensitivityMetricInput'; -import type { NumberCheckMetricInput } from './NumberCheckMetricInput'; -import type { RemoteMetricInput } from './RemoteMetricInput'; -import type { ResponseGroundednessMetricInput } from './ResponseGroundednessMetricInput'; -import type { ResponseRelevancyMetricInput } from './ResponseRelevancyMetricInput'; -import type { ROUGEMetricInput } from './ROUGEMetricInput'; -import type { RunConfigOnlineModel } from './RunConfigOnlineModel'; -import type { StringCheckMetricInput } from './StringCheckMetricInput'; -import type { SystemMetricInput } from './SystemMetricInput'; -import type { ToolCallAccuracyMetricInput } from './ToolCallAccuracyMetricInput'; -import type { ToolCallingMetricInput } from './ToolCallingMetricInput'; -import type { TopicAdherenceMetricInput } from './TopicAdherenceMetricInput'; - -/** - * A online metric job. - */ -export interface MetricOnlineJob { - /** The metric for evaluation. */ - metric: - | MetricRef - | LLMJudgeMetricInput - | TopicAdherenceMetricInput - | AgentGoalAccuracyMetricInput - | AnswerAccuracyMetricInput - | ContextRelevanceMetricInput - | ResponseGroundednessMetricInput - | ContextRecallMetricInput - | ContextPrecisionMetricInput - | ContextEntityRecallMetricInput - | ResponseRelevancyMetricInput - | FaithfulnessMetricInput - | NoiseSensitivityMetricInput - | ToolCallAccuracyMetricInput - | BLEUMetricInput - | ExactMatchMetricInput - | F1MetricInput - | NumberCheckMetricInput - | RemoteMetricInput - | NemoAgentToolkitRemoteMetricInput - | ROUGEMetricInput - | StringCheckMetricInput - | ToolCallingMetricInput - | SystemMetricInput; - /** Additional parameters for the metric. Required for system metrics, optional overrides for custom metrics. */ - metric_params?: MetricOnlineJobMetricParams; - /** Maps canonical evaluator fields such as 'input' and 'output' to dataset column paths for this job. */ - field_mapping?: FieldMapping; - /** The model configuration. */ - model: EvaluatorModel | ModelRef; - /** The dataset to use for model prompts and evaluation. */ - dataset: DatasetRows | FilesetRef | FilesetInput; - /** Execution parameters for the metric job. */ - params?: RunConfigOnlineModel; - /** The jinja template to prompt the model for evaluation. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{input}}, {{output}}, {{context}}, {{reference}} to reference input columns. */ - prompt_template: MetricOnlineJobPromptTemplate; - /** Prompt template fields that should remain available to the prompt template but not be required by dataset schema validation. */ - optional_fields?: string[]; -} diff --git a/web/packages/sdk/generated/platform/schema/MetricOnlineJobMetricParams.ts b/web/packages/sdk/generated/platform/schema/MetricOnlineJobMetricParams.ts deleted file mode 100644 index 6244c4948e..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricOnlineJobMetricParams.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Additional parameters for the metric. Required for system metrics, optional overrides for custom metrics. - */ -export type MetricOnlineJobMetricParams = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/MetricOnlineJobPromptTemplate.ts b/web/packages/sdk/generated/platform/schema/MetricOnlineJobPromptTemplate.ts deleted file mode 100644 index 8f1972a70c..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricOnlineJobPromptTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * The jinja template to prompt the model for evaluation. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{input}}, {{output}}, {{context}}, {{reference}} to reference input columns. - */ -export type MetricOnlineJobPromptTemplate = string | { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/MetricOutput.ts b/web/packages/sdk/generated/platform/schema/MetricOutput.ts deleted file mode 100644 index 105d03190f..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricOutput.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * One named value emitted by a metric. - */ -export interface MetricOutput { - name: string; - value: unknown; -} diff --git a/web/packages/sdk/generated/platform/schema/MetricRef.ts b/web/packages/sdk/generated/platform/schema/MetricRef.ts deleted file mode 100644 index 8736fa3422..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricRef.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Reference to a metric in the Metrics API. - -A reference is a string with format 'workspace/metric-name' that points to a -persisted metric entity. See [Entity references](docs/get-started/concepts/entity-references.md) for the -general entity reference pattern used across the platform. - * @pattern ^[a-z0-9_-]+/[a-z0-9_-]+$ - */ -export type MetricRef = string; diff --git a/web/packages/sdk/generated/platform/schema/MetricRetrieverJob.ts b/web/packages/sdk/generated/platform/schema/MetricRetrieverJob.ts deleted file mode 100644 index 2b9360fdd9..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricRetrieverJob.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { BuiltInDataset } from './BuiltInDataset'; -import type { DatasetRows } from './DatasetRows'; -import type { FieldMapping } from './FieldMapping'; -import type { FilesetInput } from './FilesetInput'; -import type { FilesetRef } from './FilesetRef'; -import type { MetricRef } from './MetricRef'; -import type { MetricRetrieverJobMetricParams } from './MetricRetrieverJobMetricParams'; -import type { RetrieverPipelineInput } from './RetrieverPipelineInput'; -import type { RunConfigOnline } from './RunConfigOnline'; -import type { SystemMetricInput } from './SystemMetricInput'; - -/** - * Evaluation with a retriever-based metric. - */ -export interface MetricRetrieverJob { - /** The metric for evaluation. */ - metric: MetricRef | SystemMetricInput; - /** Additional parameters for the metric. Required for system metrics, optional overrides for custom metrics. */ - metric_params?: MetricRetrieverJobMetricParams; - /** Maps canonical evaluator fields such as 'input' and 'output' to dataset column paths for this job. */ - field_mapping?: FieldMapping; - /** The pipeline configuration for retriever-based evaluation. */ - retriever_pipeline: RetrieverPipelineInput; - /** The dataset to use for evaluation. */ - dataset: BuiltInDataset | DatasetRows | FilesetRef | FilesetInput; - /** Execution parameters for the metric job. */ - params?: RunConfigOnline; -} diff --git a/web/packages/sdk/generated/platform/schema/MetricRetrieverJobMetricParams.ts b/web/packages/sdk/generated/platform/schema/MetricRetrieverJobMetricParams.ts deleted file mode 100644 index 84e502af4b..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricRetrieverJobMetricParams.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Additional parameters for the metric. Required for system metrics, optional overrides for custom metrics. - */ -export type MetricRetrieverJobMetricParams = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/MetricType.ts b/web/packages/sdk/generated/platform/schema/MetricType.ts deleted file mode 100644 index 71e122dc28..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricType.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * The predefined metric types. - */ -export type MetricType = (typeof MetricType)[keyof typeof MetricType]; - -export const MetricType = { - bleu: 'bleu', - rouge: 'rouge', - f1: 'f1', - 'exact-match': 'exact-match', - 'string-check': 'string-check', - 'number-check': 'number-check', - 'llm-judge': 'llm-judge', - 'tool-calling': 'tool-calling', - remote: 'remote', - 'nemo-agent-toolkit-remote': 'nemo-agent-toolkit-remote', - topic_adherence: 'topic_adherence', - tool_call_accuracy: 'tool_call_accuracy', - agent_goal_accuracy: 'agent_goal_accuracy', - answer_accuracy: 'answer_accuracy', - context_relevance: 'context_relevance', - response_groundedness: 'response_groundedness', - context_recall: 'context_recall', - context_precision: 'context_precision', - context_entity_recall: 'context_entity_recall', - response_relevancy: 'response_relevancy', - faithfulness: 'faithfulness', - noise_sensitivity: 'noise_sensitivity', - system: 'system', - 'system-retriever': 'system-retriever', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/MetricsListResponse.ts b/web/packages/sdk/generated/platform/schema/MetricsListResponse.ts deleted file mode 100644 index 7cbcc9798a..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricsListResponse.ts +++ /dev/null @@ -1,67 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AgentGoalAccuracyMetricResponse } from './AgentGoalAccuracyMetricResponse'; -import type { AnswerAccuracyMetricResponse } from './AnswerAccuracyMetricResponse'; -import type { BLEUMetricResponse } from './BLEUMetricResponse'; -import type { ContextEntityRecallMetricResponse } from './ContextEntityRecallMetricResponse'; -import type { ContextPrecisionMetricResponse } from './ContextPrecisionMetricResponse'; -import type { ContextRecallMetricResponse } from './ContextRecallMetricResponse'; -import type { ContextRelevanceMetricResponse } from './ContextRelevanceMetricResponse'; -import type { ExactMatchMetricResponse } from './ExactMatchMetricResponse'; -import type { F1MetricResponse } from './F1MetricResponse'; -import type { FaithfulnessMetricResponse } from './FaithfulnessMetricResponse'; -import type { LLMJudgeMetricResponse } from './LLMJudgeMetricResponse'; -import type { MetricsListResponseFilter } from './MetricsListResponseFilter'; -import type { NemoAgentToolkitRemoteMetricResponse } from './NemoAgentToolkitRemoteMetricResponse'; -import type { NoiseSensitivityMetricResponse } from './NoiseSensitivityMetricResponse'; -import type { NumberCheckMetricResponse } from './NumberCheckMetricResponse'; -import type { PaginationData } from './PaginationData'; -import type { RemoteMetricResponse } from './RemoteMetricResponse'; -import type { ResponseGroundednessMetricResponse } from './ResponseGroundednessMetricResponse'; -import type { ResponseRelevancyMetricResponse } from './ResponseRelevancyMetricResponse'; -import type { ROUGEMetricResponse } from './ROUGEMetricResponse'; -import type { StringCheckMetricResponse } from './StringCheckMetricResponse'; -import type { SystemMetricResponse } from './SystemMetricResponse'; -import type { ToolCallAccuracyMetricResponse } from './ToolCallAccuracyMetricResponse'; -import type { ToolCallingMetricResponse } from './ToolCallingMetricResponse'; -import type { TopicAdherenceMetricResponse } from './TopicAdherenceMetricResponse'; - -export interface MetricsListResponse { - data: ( - | LLMJudgeMetricResponse - | TopicAdherenceMetricResponse - | AgentGoalAccuracyMetricResponse - | AnswerAccuracyMetricResponse - | ContextRelevanceMetricResponse - | ResponseGroundednessMetricResponse - | ContextRecallMetricResponse - | ContextPrecisionMetricResponse - | ContextEntityRecallMetricResponse - | ResponseRelevancyMetricResponse - | FaithfulnessMetricResponse - | NoiseSensitivityMetricResponse - | ToolCallAccuracyMetricResponse - | BLEUMetricResponse - | ExactMatchMetricResponse - | F1MetricResponse - | NumberCheckMetricResponse - | RemoteMetricResponse - | NemoAgentToolkitRemoteMetricResponse - | ROUGEMetricResponse - | StringCheckMetricResponse - | ToolCallingMetricResponse - | SystemMetricResponse - )[]; - /** Pagination information. */ - pagination?: PaginationData; - /** The field on which the results are sorted. */ - sort?: string; - /** Filtering information. */ - filter?: MetricsListResponseFilter; -} diff --git a/web/packages/sdk/generated/platform/schema/MetricsListResponseFilter.ts b/web/packages/sdk/generated/platform/schema/MetricsListResponseFilter.ts deleted file mode 100644 index 19a8deb87b..0000000000 --- a/web/packages/sdk/generated/platform/schema/MetricsListResponseFilter.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Filtering information. - */ -export type MetricsListResponseFilter = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/MiddlewareCall.ts b/web/packages/sdk/generated/platform/schema/MiddlewareCall.ts deleted file mode 100644 index f5c090444a..0000000000 --- a/web/packages/sdk/generated/platform/schema/MiddlewareCall.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { MiddlewareCallConfig } from './MiddlewareCallConfig'; - -/** - * One entry in a VirtualModel middleware pipeline. - -Declares which plugin to invoke and how to resolve its configuration. -Exactly one of ``config`` (inline dict) or ``config_id`` (entity reference) -should be provided. ``config_type`` is always required regardless of which -is used — it is the discriminator that tells IGW (and the plugin) which -config schema applies. - -Attributes: - name: The entry-point key of the plugin to invoke - (e.g. ``"nemo-switchyard"``). Must match the plugin's - ``nemo.inference_middleware`` entry-point key. - config_type: Always required. Maps to the ``entity_type`` of the plugin's - config ``NemoEntity`` subclass (e.g. ``"routellm_config"``). Used by - IGW to call :meth:`~NemoInferenceMiddleware.validate_middleware_config` - with the right discriminator, and by the plugin to dispatch to the - correct schema when it supports multiple config types. - config: Inline config dict. Mutually exclusive with ``config_id``. - config_id: ``"workspace/name"`` reference to a stored config entity. - Mutually exclusive with ``config``. IGW resolves this by calling - :meth:`~NemoInferenceMiddleware.get_middleware_config` on the plugin. - */ -export interface MiddlewareCall { - name: string; - config_type: string; - config?: MiddlewareCallConfig; - config_id?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/MiddlewareCallConfig.ts b/web/packages/sdk/generated/platform/schema/MiddlewareCallConfig.ts deleted file mode 100644 index e410027a19..0000000000 --- a/web/packages/sdk/generated/platform/schema/MiddlewareCallConfig.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type MiddlewareCallConfig = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/MoEConfig.ts b/web/packages/sdk/generated/platform/schema/MoEConfig.ts deleted file mode 100644 index 76eeb7dd67..0000000000 --- a/web/packages/sdk/generated/platform/schema/MoEConfig.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Mixture of Experts configuration. - */ -export interface MoEConfig { - /** Total number of routed experts (sharded by EP) */ - num_experts: number; - /** Number of experts activated per token (top-k routing) */ - num_experts_per_tok: number; - /** Number of layers with MoE */ - num_expert_layers: number; - /** FFN size for experts (if different from main FFN) */ - expert_ffn_size?: number; - /** Number of shared experts (replicated, not sharded by EP) */ - num_shared_experts?: number; -} diff --git a/web/packages/sdk/generated/platform/schema/Model.ts b/web/packages/sdk/generated/platform/schema/Model.ts deleted file mode 100644 index d5ad4e04ea..0000000000 --- a/web/packages/sdk/generated/platform/schema/Model.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ModelCacheConfig } from './ModelCacheConfig'; -import type { ModelMode } from './ModelMode'; -import type { ModelParameters } from './ModelParameters'; - -/** - * Configuration of a model used by the rails engine. - -If using Inference Gateway, the `model` field should be a Model Entity reference ('workspace/model_name'). - */ -export interface Model { - type: string; - engine: string; - /** The model name. If using Inference Gateway, this should be the Model Entity reference ('workspace/model_name'). */ - model?: string; - /** Additional parameters to configure how to interact with the model. */ - parameters?: ModelParameters; - /** Whether the mode is 'text' completion or 'chat' completion. Allowed values are 'chat' or 'text'. */ - mode?: ModelMode; - /** Cache configuration for this specific model (primarily used for content safety models) */ - cache?: ModelCacheConfig; -} diff --git a/web/packages/sdk/generated/platform/schema/ModelCacheConfig.ts b/web/packages/sdk/generated/platform/schema/ModelCacheConfig.ts deleted file mode 100644 index de27f05c75..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelCacheConfig.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { CacheStatsConfig } from './CacheStatsConfig'; - -/** - * Configuration for model caching. - */ -export interface ModelCacheConfig { - /** Whether caching is enabled (default: False - no caching) */ - enabled?: boolean; - /** Maximum number of entries in the cache per model */ - maxsize?: number; - /** Configuration for cache statistics tracking and logging */ - stats?: CacheStatsConfig; -} diff --git a/web/packages/sdk/generated/platform/schema/ModelDeployment.ts b/web/packages/sdk/generated/platform/schema/ModelDeployment.ts deleted file mode 100644 index d6a75b33c5..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelDeployment.ts +++ /dev/null @@ -1,69 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AuthContext } from './AuthContext'; -import type { ModelDeploymentStatus } from './ModelDeploymentStatus'; -import type { ModelDeploymentStatusHistoryItem } from './ModelDeploymentStatusHistoryItem'; - -/** - * ModelDeployment represents a deployed instance of a model with a specific configuration. -These objects are immutable with automatic versioning, except for status updates. - -The unique identifier is the combination of workspace/name/entity_version. - */ -export interface ModelDeployment { - /** Unique identifier for the deployment */ - id?: string; - /** - * Name of the entity. Name/workspace combo must be unique across all entities. Allowed characters: letters (a-z, A-Z), digits (0-9), underscores, hyphens, and dots. - * @maxLength 255 - * @pattern ^[\w\-.]+$ - */ - name: string; - /** - * The workspace of the entity. Allowed characters: letters (a-z, A-Z), digits (0-9), underscores, hyphens, and dots. - * @maxLength 255 - * @pattern ^[\w\-.]+$ - */ - workspace: string; - /** - * The URN of the project associated with this entity. - * @maxLength 255 - * @pattern ^[\w\-./]+$ - */ - project?: string; - /** The timestamp of model entity creation */ - created_at: string; - /** The timestamp of the last model entity update */ - updated_at: string; - /** Version of this deployment. Automatically managed. */ - entity_version: number; - /** - * Reference to the ModelDeploymentConfig name - * @maxLength 255 - */ - config: string; - /** Reference to the specific ModelDeploymentConfig version */ - config_version: number; - /** Current status of the deployment, populated by models controller */ - status?: ModelDeploymentStatus; - /** - * Detailed status message, populated by models controller - * @maxLength 1000 - */ - status_message?: string; - /** History of status changes, ordered chronologically (oldest first) */ - status_history?: ModelDeploymentStatusHistoryItem[]; - /** - * Optional reference to the auto-created ModelProvider workspace/name (format: workspace/name) - * @maxLength 255 - */ - model_provider_id?: string; - /** Auth context captured at deployment creation. */ - auth_context?: AuthContext; -} diff --git a/web/packages/sdk/generated/platform/schema/ModelDeploymentConfig.ts b/web/packages/sdk/generated/platform/schema/ModelDeploymentConfig.ts deleted file mode 100644 index 5ae2050a2d..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelDeploymentConfig.ts +++ /dev/null @@ -1,56 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { NIMDeployment } from './NIMDeployment'; - -/** - * ModelDeploymentConfig stores the configuration details for deploying a model. -These objects are immutable with automatic versioning. - -The unique identifier is the combination of workspace/name/entity_version. - */ -export interface ModelDeploymentConfig { - /** Unique identifier for the deployment config */ - id?: string; - /** - * Name of the entity. Name/workspace combo must be unique across all entities. Allowed characters: letters (a-z, A-Z), digits (0-9), underscores, hyphens, and dots. - * @maxLength 255 - * @pattern ^[\w\-.]+$ - */ - name: string; - /** - * The workspace of the entity. Allowed characters: letters (a-z, A-Z), digits (0-9), underscores, hyphens, and dots. - * @maxLength 255 - * @pattern ^[\w\-.]+$ - */ - workspace: string; - /** - * The URN of the project associated with this entity. - * @maxLength 255 - * @pattern ^[\w\-./]+$ - */ - project?: string; - /** The timestamp of model entity creation */ - created_at: string; - /** The timestamp of the last model entity update */ - updated_at: string; - /** Version of this deployment config. Automatically managed. */ - entity_version: number; - /** - * Optional description of the deployment configuration - * @maxLength 1000 - */ - description?: string; - /** Configuration for NIM-based deployment */ - nim_deployment: NIMDeployment; - /** - * Optional reference to the base model entity ID for this deployment - * @maxLength 255 - */ - model_entity_id?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/ModelDeploymentConfigFilter.ts b/web/packages/sdk/generated/platform/schema/ModelDeploymentConfigFilter.ts deleted file mode 100644 index 1c5d9783d7..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelDeploymentConfigFilter.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { DatetimeFilter } from './DatetimeFilter'; - -/** - * Filter for ModelDeploymentConfig queries. - */ -export interface ModelDeploymentConfigFilter { - /** Filter by workspace. */ - workspace?: string; - /** Filter by project URN. */ - project?: string; - /** Filter by associated model entity ID. */ - model_entity_id?: string; - /** Filter by config name. */ - name?: string; - /** Filter by description. */ - description?: string; - /** Filter by creation date. */ - created_at?: DatetimeFilter; - /** Filter by update date. */ - updated_at?: DatetimeFilter; -} diff --git a/web/packages/sdk/generated/platform/schema/ModelDeploymentConfigsPage.ts b/web/packages/sdk/generated/platform/schema/ModelDeploymentConfigsPage.ts deleted file mode 100644 index bac1080ea2..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelDeploymentConfigsPage.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ModelDeploymentConfig } from './ModelDeploymentConfig'; -import type { ModelDeploymentConfigsPageFilter } from './ModelDeploymentConfigsPageFilter'; -import type { PaginationData } from './PaginationData'; - -export interface ModelDeploymentConfigsPage { - data: ModelDeploymentConfig[]; - /** Pagination information. */ - pagination?: PaginationData; - /** The field on which the results are sorted. */ - sort?: string; - /** Filtering information. */ - filter?: ModelDeploymentConfigsPageFilter; -} diff --git a/web/packages/sdk/generated/platform/schema/ModelDeploymentConfigsPageFilter.ts b/web/packages/sdk/generated/platform/schema/ModelDeploymentConfigsPageFilter.ts deleted file mode 100644 index d1aab9da92..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelDeploymentConfigsPageFilter.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Filtering information. - */ -export type ModelDeploymentConfigsPageFilter = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/ModelDeploymentFilter.ts b/web/packages/sdk/generated/platform/schema/ModelDeploymentFilter.ts deleted file mode 100644 index 563586990b..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelDeploymentFilter.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { DatetimeFilter } from './DatetimeFilter'; -import type { ModelDeploymentStatus } from './ModelDeploymentStatus'; - -/** - * Filter for ModelDeployment queries. - */ -export interface ModelDeploymentFilter { - /** Filter by workspace. */ - workspace?: string; - /** Filter by project URN. */ - project?: string; - /** Filter by status. */ - status?: ModelDeploymentStatus; - /** Filter by config name. */ - config?: string; - /** Filter by model provider ID. */ - model_provider_id?: string; - /** Filter by deployment name. */ - name?: string; - /** Filter by status message. */ - status_message?: string; - /** Filter by creation date. */ - created_at?: DatetimeFilter; - /** Filter by update date. */ - updated_at?: DatetimeFilter; -} diff --git a/web/packages/sdk/generated/platform/schema/ModelDeploymentStatus.ts b/web/packages/sdk/generated/platform/schema/ModelDeploymentStatus.ts deleted file mode 100644 index 1e14320cd8..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelDeploymentStatus.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Status enum for ModelDeployment objects. - */ -export type ModelDeploymentStatus = - (typeof ModelDeploymentStatus)[keyof typeof ModelDeploymentStatus]; - -export const ModelDeploymentStatus = { - UNKNOWN: 'UNKNOWN', - CREATED: 'CREATED', - PENDING: 'PENDING', - READY: 'READY', - ERROR: 'ERROR', - DELETING: 'DELETING', - DELETED: 'DELETED', - LOST: 'LOST', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/ModelDeploymentStatusHistoryItem.ts b/web/packages/sdk/generated/platform/schema/ModelDeploymentStatusHistoryItem.ts deleted file mode 100644 index adbe5f9450..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelDeploymentStatusHistoryItem.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ModelDeploymentStatus } from './ModelDeploymentStatus'; - -/** - * Record of a status change in ModelDeployment history. - */ -export interface ModelDeploymentStatusHistoryItem { - /** When this status was recorded */ - timestamp: string; - /** The status at this point in time */ - status: ModelDeploymentStatus; - /** - * Status message - * @maxLength 1000 - */ - status_message?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/ModelDeploymentsPage.ts b/web/packages/sdk/generated/platform/schema/ModelDeploymentsPage.ts deleted file mode 100644 index bdfcc41812..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelDeploymentsPage.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ModelDeployment } from './ModelDeployment'; -import type { ModelDeploymentsPageFilter } from './ModelDeploymentsPageFilter'; -import type { PaginationData } from './PaginationData'; - -export interface ModelDeploymentsPage { - data: ModelDeployment[]; - /** Pagination information. */ - pagination?: PaginationData; - /** The field on which the results are sorted. */ - sort?: string; - /** Filtering information. */ - filter?: ModelDeploymentsPageFilter; -} diff --git a/web/packages/sdk/generated/platform/schema/ModelDeploymentsPageFilter.ts b/web/packages/sdk/generated/platform/schema/ModelDeploymentsPageFilter.ts deleted file mode 100644 index 06f93ed82f..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelDeploymentsPageFilter.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Filtering information. - */ -export type ModelDeploymentsPageFilter = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/ModelEntity.ts b/web/packages/sdk/generated/platform/schema/ModelEntity.ts deleted file mode 100644 index 4b5739518b..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelEntity.ts +++ /dev/null @@ -1,75 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { Adapter } from './Adapter'; -import type { APIEndpointData } from './APIEndpointData'; -import type { BackendFormat } from './BackendFormat'; -import type { FinetuningType } from './FinetuningType'; -import type { ModelEntityCustomFields } from './ModelEntityCustomFields'; -import type { ModelEntityOwnership } from './ModelEntityOwnership'; -import type { ModelSpec } from './ModelSpec'; -import type { PromptData } from './PromptData'; - -/** - * Model Entity represents a versioned model registered within the platform. -Uses EntityBase for entity store compatibility. - */ -export interface ModelEntity { - /** Autogenerated id */ - id: string; - /** - * Name of the entity. Name/workspace combo must be unique across all entities. Allowed characters: letters (a-z, A-Z), digits (0-9), underscores, hyphens, and dots. - * @maxLength 255 - * @pattern ^[\w\-.]+$ - */ - name: string; - /** - * The workspace of the entity. Allowed characters: letters (a-z, A-Z), digits (0-9), underscores, hyphens, and dots. - * @maxLength 255 - * @pattern ^[\w\-.]+$ - */ - workspace: string; - /** - * The URN of the project associated with this model entity. - * @maxLength 255 - */ - project?: string; - /** The timestamp of model entity creation */ - created_at: string; - /** The timestamp of the last model entity update */ - updated_at: string; - /** - * Optional description of the model. - * @maxLength 1000 - */ - description?: string; - /** Detailed specification for the model */ - spec?: ModelSpec; - /** Set for full weight finetuned models */ - finetuning_type?: FinetuningType; - /** A set of checkpoint files, configs, and other auxiliary info associated with this model - expected format {workspace}/{fileset_name} */ - fileset?: string; - /** Whether to trust remote code to load this model checkpoint. */ - trust_remote_code?: boolean; - /** Link to another model which is used as a base for the current model */ - base_model?: string; - /** Data about the inference endpoint for this model */ - api_endpoint?: APIEndpointData; - /** Inference API wire format expected by the backend. If unset, inference routing treats the model as OPENAI_CHAT. */ - backend_format?: BackendFormat | null; - /** Adapters that have been created against this model */ - adapters?: Adapter[]; - /** Configuration for prompt engineering */ - prompt?: PromptData; - /** Custom fields for additional metadata */ - custom_fields?: ModelEntityCustomFields; - /** Ownership information for the model */ - ownership?: ModelEntityOwnership; - /** List of ModelProvider workspace/name resource names that provide inference for this Model Entity */ - model_providers?: string[]; -} diff --git a/web/packages/sdk/generated/platform/schema/ModelEntityCustomFields.ts b/web/packages/sdk/generated/platform/schema/ModelEntityCustomFields.ts deleted file mode 100644 index 68b27ea35b..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelEntityCustomFields.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Custom fields for additional metadata - */ -export type ModelEntityCustomFields = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/ModelEntityFilter.ts b/web/packages/sdk/generated/platform/schema/ModelEntityFilter.ts deleted file mode 100644 index 9064e815e3..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelEntityFilter.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { BaseModelFilter } from './BaseModelFilter'; -import type { DatetimeFilter } from './DatetimeFilter'; -import type { FinetuningType } from './FinetuningType'; -import type { FinetuningTypeFilter } from './FinetuningTypeFilter'; - -/** - * Filter for Model Entity queries. - */ -export interface ModelEntityFilter { - /** Filter by name. */ - name?: string; - /** Filter by project name. */ - project?: string; - /** Filter by workspace id. */ - workspace?: string; - /** Filter by base model: true = has a base model, false = no base model, { name: string } or string = match base model name. */ - base_model?: BaseModelFilter | boolean | string; - /** Filter models with Parameter Efficient Fine-tuning Adapters. */ - adapters?: FinetuningTypeFilter | boolean; - /** Filter models that have been perviously finetuned. */ - finetuning_type?: FinetuningType | boolean; - /** Filter models with prompt engineering data. */ - prompt?: boolean; - /** Filter models by whether their deployment config has LoRA enabled. */ - lora_enabled?: boolean; - /** Filter by description. */ - description?: string; - /** Filter entities based on creation date. */ - created_at?: DatetimeFilter; - /** Filter entities based on update date. */ - updated_at?: DatetimeFilter; -} diff --git a/web/packages/sdk/generated/platform/schema/ModelEntityOwnership.ts b/web/packages/sdk/generated/platform/schema/ModelEntityOwnership.ts deleted file mode 100644 index f296c3b79b..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelEntityOwnership.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Ownership information for the model - */ -export type ModelEntityOwnership = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/ModelEntitySortField.ts b/web/packages/sdk/generated/platform/schema/ModelEntitySortField.ts deleted file mode 100644 index 4b3fb70afd..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelEntitySortField.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Sort fields for Model Entity queries. - */ -export type ModelEntitySortField = (typeof ModelEntitySortField)[keyof typeof ModelEntitySortField]; - -export const ModelEntitySortField = { - name: 'name', - '-name': '-name', - created_at: 'created_at', - '-created_at': '-created_at', - updated_at: 'updated_at', - '-updated_at': '-updated_at', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/ModelEntitysPage.ts b/web/packages/sdk/generated/platform/schema/ModelEntitysPage.ts deleted file mode 100644 index 9f78d86234..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelEntitysPage.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ModelEntity } from './ModelEntity'; -import type { ModelEntitysPageFilter } from './ModelEntitysPageFilter'; -import type { PaginationData } from './PaginationData'; - -export interface ModelEntitysPage { - data: ModelEntity[]; - /** Pagination information. */ - pagination?: PaginationData; - /** The field on which the results are sorted. */ - sort?: string; - /** Filtering information. */ - filter?: ModelEntitysPageFilter; -} diff --git a/web/packages/sdk/generated/platform/schema/ModelEntitysPageFilter.ts b/web/packages/sdk/generated/platform/schema/ModelEntitysPageFilter.ts deleted file mode 100644 index b24f50ac92..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelEntitysPageFilter.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Filtering information. - */ -export type ModelEntitysPageFilter = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/ModelMetadataContent.ts b/web/packages/sdk/generated/platform/schema/ModelMetadataContent.ts deleted file mode 100644 index eb93fbedbe..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelMetadataContent.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ToolCallingMetadataContent } from './ToolCallingMetadataContent'; - -/** - * Content for model-type filesets. - -Contains tool calling configuration that is merged into the ModelSpec -during checkpoint analysis. - */ -export interface ModelMetadataContent { - tool_calling?: ToolCallingMetadataContent; -} diff --git a/web/packages/sdk/generated/platform/schema/ModelMode.ts b/web/packages/sdk/generated/platform/schema/ModelMode.ts deleted file mode 100644 index e63367ac42..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelMode.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Whether the mode is 'text' completion or 'chat' completion. Allowed values are 'chat' or 'text'. - */ -export type ModelMode = (typeof ModelMode)[keyof typeof ModelMode]; - -export const ModelMode = { - chat: 'chat', - text: 'text', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/ModelParameters.ts b/web/packages/sdk/generated/platform/schema/ModelParameters.ts deleted file mode 100644 index 83017b8b21..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelParameters.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ModelParametersDefaultHeaders } from './ModelParametersDefaultHeaders'; - -/** - * Parameters for configuring how to interact with a model in a guardrails config. - */ -export interface ModelParameters { - /** The URL to use for inference with this model. */ - base_url?: string; - /** Custom HTTP headers to include in requests to this model. Each key-value pair represents a header name (key) and its default value (value). You can override the default value for a header by populating it in the request headers. */ - default_headers?: ModelParametersDefaultHeaders; - [key: string]: unknown; -} diff --git a/web/packages/sdk/generated/platform/schema/ModelParametersDefaultHeaders.ts b/web/packages/sdk/generated/platform/schema/ModelParametersDefaultHeaders.ts deleted file mode 100644 index 4adbf9fa48..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelParametersDefaultHeaders.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Custom HTTP headers to include in requests to this model. Each key-value pair represents a header name (key) and its default value (value). You can override the default value for a header by populating it in the request headers. - */ -export type ModelParametersDefaultHeaders = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/ModelProvider.ts b/web/packages/sdk/generated/platform/schema/ModelProvider.ts deleted file mode 100644 index d2735dd94f..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelProvider.ts +++ /dev/null @@ -1,98 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AuthContext } from './AuthContext'; -import type { ModelProviderDefaultExtraBody } from './ModelProviderDefaultExtraBody'; -import type { ModelProviderDefaultExtraHeaders } from './ModelProviderDefaultExtraHeaders'; -import type { ModelProviderRequiredExtraBody } from './ModelProviderRequiredExtraBody'; -import type { ModelProviderRequiredExtraHeaders } from './ModelProviderRequiredExtraHeaders'; -import type { ModelProviderStatus } from './ModelProviderStatus'; -import type { ServedModelMapping } from './ServedModelMapping'; - -/** - * A ModelProvider defines a reachable network endpoint that provides an inference -service for one or more Model Entities. Examples of Model Providers include -OpenAI, NIMs, Bedrock, NVIDIA Build, etc. A ModelProvider may be provisioned -automatically by Models Controller for ModelDeployments, or it may be provisioned -manually by an end user for an endpoint that does not have its lifecycle managed -by models service (like an external provider.) - -The unique identifier for a ModelProvider is the combination of workspace/name. - */ -export interface ModelProvider { - /** Unique identifier for the model provider */ - id?: string; - /** - * Name of the entity. Name/workspace combo must be unique across all entities. Allowed characters: letters (a-z, A-Z), digits (0-9), underscores, hyphens, and dots. - * @maxLength 255 - * @pattern ^[\w\-.]+$ - */ - name: string; - /** - * The workspace of the entity. Allowed characters: letters (a-z, A-Z), digits (0-9), underscores, hyphens, and dots. - * @maxLength 255 - * @pattern ^[\w\-.]+$ - */ - workspace: string; - /** - * The URN of the project associated with this entity. - * @maxLength 255 - * @pattern ^[\w\-./]+$ - */ - project?: string; - /** The timestamp of model entity creation */ - created_at: string; - /** The timestamp of the last model entity update */ - updated_at: string; - /** - * Optional description of the model provider - * @maxLength 1000 - */ - description?: string; - /** - * The network endpoint URL for the model provider - * @maxLength 2048 - */ - host_url: string; - /** - * Reference to the API key stored in Secrets service - * @maxLength 255 - */ - api_key_secret_name?: string; - /** List of models served by this provider with routing information for IGW */ - served_models?: ServedModelMapping[]; - /** Optional list of specific models to enable from this provider. If not set, all discovered models are enabled. */ - enabled_models?: string[]; - /** Current status of the model provider, populated by models service */ - status?: ModelProviderStatus; - /** - * Detailed status message, populated by models service - * @maxLength 1000 - */ - status_message?: string; - /** Default body parameters for inference requests. Can be overridden by user requests. */ - default_extra_body?: ModelProviderDefaultExtraBody; - /** Default headers for inference requests. Can be overridden by user requests. */ - default_extra_headers?: ModelProviderDefaultExtraHeaders; - /** Required body parameters for inference requests. Cannot be overridden by user requests. */ - required_extra_body?: ModelProviderRequiredExtraBody; - /** Required headers for inference requests. Cannot be overridden by user requests. */ - required_extra_headers?: ModelProviderRequiredExtraHeaders; - /** - * Optional reference to the ModelDeployment ID if this provider was auto-created for a deployment - * @maxLength 255 - */ - model_deployment_id?: string; - /** Auth context captured at provider creation. */ - auth_context?: AuthContext; - /** - * Jinja2 template string controlling how the API key secret is sent to the upstream. Must contain exactly one variable named `auth_secret`, which is substituted with the resolved secret value at request time. Example: `'X-Api-Key: {{ auth_secret }}'`. If not set, defaults to `'Authorization: Bearer {{ auth_secret }}'`. - * @maxLength 1024 - */ - auth_header_format?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/ModelProviderDefaultExtraBody.ts b/web/packages/sdk/generated/platform/schema/ModelProviderDefaultExtraBody.ts deleted file mode 100644 index 68174853f0..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelProviderDefaultExtraBody.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Default body parameters for inference requests. Can be overridden by user requests. - */ -export type ModelProviderDefaultExtraBody = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/ModelProviderDefaultExtraHeaders.ts b/web/packages/sdk/generated/platform/schema/ModelProviderDefaultExtraHeaders.ts deleted file mode 100644 index 9c2d3bd8d3..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelProviderDefaultExtraHeaders.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Default headers for inference requests. Can be overridden by user requests. - */ -export type ModelProviderDefaultExtraHeaders = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/ModelProviderFilter.ts b/web/packages/sdk/generated/platform/schema/ModelProviderFilter.ts deleted file mode 100644 index 7216c9e61f..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelProviderFilter.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { DatetimeFilter } from './DatetimeFilter'; -import type { ModelProviderStatus } from './ModelProviderStatus'; - -/** - * Filter for ModelProvider queries. - */ -export interface ModelProviderFilter { - /** Filter by workspace. */ - workspace?: string; - /** Filter by project URN. */ - project?: string; - /** Filter by status. */ - status?: ModelProviderStatus; - /** Filter by associated deployment ID. */ - model_deployment_id?: string; - /** Filter by name. */ - name?: string; - /** Filter by description. */ - description?: string; - /** Filter by host URL. */ - host_url?: string; - /** Filter by creation date. */ - created_at?: DatetimeFilter; - /** Filter by update date. */ - updated_at?: DatetimeFilter; -} diff --git a/web/packages/sdk/generated/platform/schema/ModelProviderRequiredExtraBody.ts b/web/packages/sdk/generated/platform/schema/ModelProviderRequiredExtraBody.ts deleted file mode 100644 index 74efafd584..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelProviderRequiredExtraBody.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Required body parameters for inference requests. Cannot be overridden by user requests. - */ -export type ModelProviderRequiredExtraBody = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/ModelProviderRequiredExtraHeaders.ts b/web/packages/sdk/generated/platform/schema/ModelProviderRequiredExtraHeaders.ts deleted file mode 100644 index 9c62952e22..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelProviderRequiredExtraHeaders.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Required headers for inference requests. Cannot be overridden by user requests. - */ -export type ModelProviderRequiredExtraHeaders = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/ModelProviderSort.ts b/web/packages/sdk/generated/platform/schema/ModelProviderSort.ts deleted file mode 100644 index f4f3a713a8..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelProviderSort.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Sort fields for ModelProvider queries. - */ -export type ModelProviderSort = (typeof ModelProviderSort)[keyof typeof ModelProviderSort]; - -export const ModelProviderSort = { - name: 'name', - '-name': '-name', - created_at: 'created_at', - '-created_at': '-created_at', - updated_at: 'updated_at', - '-updated_at': '-updated_at', - status: 'status', - '-status': '-status', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/ModelProviderStatus.ts b/web/packages/sdk/generated/platform/schema/ModelProviderStatus.ts deleted file mode 100644 index 12174f8559..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelProviderStatus.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Status enum for ModelProvider objects. - */ -export type ModelProviderStatus = (typeof ModelProviderStatus)[keyof typeof ModelProviderStatus]; - -export const ModelProviderStatus = { - UNKNOWN: 'UNKNOWN', - CREATED: 'CREATED', - PENDING: 'PENDING', - READY: 'READY', - ERROR: 'ERROR', - DELETING: 'DELETING', - DELETED: 'DELETED', - LOST: 'LOST', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/ModelProvidersPage.ts b/web/packages/sdk/generated/platform/schema/ModelProvidersPage.ts deleted file mode 100644 index d6de3681b7..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelProvidersPage.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ModelProvider } from './ModelProvider'; -import type { ModelProvidersPageFilter } from './ModelProvidersPageFilter'; -import type { PaginationData } from './PaginationData'; - -export interface ModelProvidersPage { - data: ModelProvider[]; - /** Pagination information. */ - pagination?: PaginationData; - /** The field on which the results are sorted. */ - sort?: string; - /** Filtering information. */ - filter?: ModelProvidersPageFilter; -} diff --git a/web/packages/sdk/generated/platform/schema/ModelProvidersPageFilter.ts b/web/packages/sdk/generated/platform/schema/ModelProvidersPageFilter.ts deleted file mode 100644 index 66bcc65ffc..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelProvidersPageFilter.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Filtering information. - */ -export type ModelProvidersPageFilter = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/ModelRef.ts b/web/packages/sdk/generated/platform/schema/ModelRef.ts deleted file mode 100644 index 3da23131ce..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelRef.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Reference to a Model in the Models API. - -See [Entity references](docs/get-started/concepts/entity-references.md) for the general entity reference -pattern used across the platform. - * @pattern ^[a-z0-9_-]+/[a-z0-9_-]+$ - */ -export type ModelRef = string; diff --git a/web/packages/sdk/generated/platform/schema/ModelSpec.ts b/web/packages/sdk/generated/platform/schema/ModelSpec.ts deleted file mode 100644 index fd81a25781..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelSpec.ts +++ /dev/null @@ -1,67 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { LinearLayerSpec } from './LinearLayerSpec'; -import type { MambaConfig } from './MambaConfig'; -import type { MoEConfig } from './MoEConfig'; -import type { SlidingWindowConfig } from './SlidingWindowConfig'; -import type { ToolCallConfig } from './ToolCallConfig'; - -/** - * Detailed specification for a model. - */ -export interface ModelSpec { - /** Context window size */ - context_size?: number; - /** Number of virtual tokens for prompt tuning */ - num_virtual_tokens?: number; - /** Whether this is a chat model */ - is_chat?: boolean; - /** Whether this is an embedding model */ - is_embedding_model?: boolean; - /** Checkpoint Model identifier or model path */ - checkpoint_model_name: string; - /** Model architecture family (e.g., 'llama', 'mixtral', 'gpt2') */ - family: string; - /** Number of transformer layers */ - num_layers: number; - /** Hidden dimension size */ - hidden_size: number; - /** Number of attention heads */ - num_attention_heads: number; - /** Number of key-value heads (for GQA/MQA) */ - num_kv_heads: number; - /** FFN intermediate size */ - ffn_hidden_size: number; - /** Vocabulary size */ - vocab_size: number; - /** Whether embeddings are tied */ - tied_embeddings: boolean; - /** Whether MLP uses gated activation */ - gated_mlp: boolean; - /** Total model parameters */ - base_num_parameters: number; - /** Model precision (e.g., 'float16', 'bfloat16', 'float32', 'int8', 'int4') */ - precision: string; - /** MoE configuration if applicable */ - moe_config?: MoEConfig; - /** Mamba/SSM configuration if applicable */ - mamba_config?: MambaConfig; - /** Sliding window attention config if applicable */ - sliding_window_config?: SlidingWindowConfig; - /** List of all linear/Conv1D layers with their dimensions. Used for LoRA parameter estimation without requiring model instantiation. Each entry contains the module name, in_features, and out_features. */ - linear_layers?: LinearLayerSpec[]; - /** Jinja2 chat template string for the model. Used by NIM to format chat completions. If not set, the model's built-in tokenizer template is used. */ - chat_template?: string; - /** Tool calling configuration for NIM deployments. Controls how the model handles function/tool calling in chat completions. */ - tool_call_config?: ToolCallConfig; - /** Minimum GPUs required for full fine-tuning using default configurations. */ - minimum_gpus_all_weights?: number; - /** Minimum GPUs required for LoRA fine-tuning using default configurations. */ - minimum_gpus_lora?: number; -} diff --git a/web/packages/sdk/generated/platform/schema/ModelType.ts b/web/packages/sdk/generated/platform/schema/ModelType.ts deleted file mode 100644 index 50c085e14e..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelType.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Model type enum for NIM deployments. - */ -export type ModelType = (typeof ModelType)[keyof typeof ModelType]; - -export const ModelType = { - llm: 'llm', - embed: 'embed', - other: 'other', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/ModelsGetDeploymentModels200.ts b/web/packages/sdk/generated/platform/schema/ModelsGetDeploymentModels200.ts deleted file mode 100644 index efd913636d..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelsGetDeploymentModels200.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type ModelsGetDeploymentModels200 = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/ModelsGetModelParams.ts b/web/packages/sdk/generated/platform/schema/ModelsGetModelParams.ts deleted file mode 100644 index 079a17649c..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelsGetModelParams.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type ModelsGetModelParams = { - /** - * Whether to include full spec details - */ - verbose?: boolean; -}; diff --git a/web/packages/sdk/generated/platform/schema/ModelsListAdaptersParams.ts b/web/packages/sdk/generated/platform/schema/ModelsListAdaptersParams.ts deleted file mode 100644 index 74d64e32d2..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelsListAdaptersParams.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { AdapterEntityFilter } from './AdapterEntityFilter'; - -export type ModelsListAdaptersParams = { - /** - * Page number. - */ - page?: number; - /** - * Page size. - * @minimum 1 - * @maximum 1000 - */ - page_size?: number; - /** - * The field to sort by. To sort in decreasing order, use `-` in front of the field name. - */ - sort?: string; - /** - * Filter adapters by name, model (parent model ref string, stored on the adapter), description, fileset, finetuning_type, enabled, created_at, and updated_at. - */ - filter?: AdapterEntityFilter; -}; diff --git a/web/packages/sdk/generated/platform/schema/ModelsListDeploymentConfigsParams.ts b/web/packages/sdk/generated/platform/schema/ModelsListDeploymentConfigsParams.ts deleted file mode 100644 index 761da20636..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelsListDeploymentConfigsParams.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ModelDeploymentConfigFilter } from './ModelDeploymentConfigFilter'; - -export type ModelsListDeploymentConfigsParams = { - /** - * Page number. - */ - page?: number; - /** - * Page size. - */ - page_size?: number; - /** - * The field to sort by. To sort in decreasing order, use `-` in front of the field name. - */ - sort?: string; - /** - * Filter deployment configs by workspace, project, model_entity_id, name, description, created_at, and updated_at. - */ - filter?: ModelDeploymentConfigFilter; -}; diff --git a/web/packages/sdk/generated/platform/schema/ModelsListDeploymentsParams.ts b/web/packages/sdk/generated/platform/schema/ModelsListDeploymentsParams.ts deleted file mode 100644 index 8f6de0bb74..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelsListDeploymentsParams.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ModelDeploymentFilter } from './ModelDeploymentFilter'; - -export type ModelsListDeploymentsParams = { - /** - * Page number. - */ - page?: number; - /** - * Page size. - */ - page_size?: number; - /** - * The field to sort by. To sort in decreasing order, use `-` in front of the field name. - */ - sort?: string; - /** - * If true, return all versions of each deployment. If false (default), return only the latest version. - */ - all_versions?: boolean; - /** - * Filter deployments by workspace, project, status, config, model_provider_id, name, status_message, created_at, and updated_at. - */ - filter?: ModelDeploymentFilter; -}; diff --git a/web/packages/sdk/generated/platform/schema/ModelsListModelsParams.ts b/web/packages/sdk/generated/platform/schema/ModelsListModelsParams.ts deleted file mode 100644 index 7b96f47ad3..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelsListModelsParams.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ModelEntityFilter } from './ModelEntityFilter'; -import type { ModelEntitySortField } from './ModelEntitySortField'; - -export type ModelsListModelsParams = { - /** - * Page number. - */ - page?: number; - /** - * Page size. - */ - page_size?: number; - /** - * The field to sort by. To sort in decreasing order, use `-` in front of the field name. - */ - sort?: ModelEntitySortField; - /** - * Whether to include full spec details - */ - verbose?: boolean; - /** - * Filter models by name, project, workspace, base_model, adapters, finetuning_type, prompt, lora_enabled, description, created_at, and updated_at. - */ - filter?: ModelEntityFilter; -}; diff --git a/web/packages/sdk/generated/platform/schema/ModelsListProvidersParams.ts b/web/packages/sdk/generated/platform/schema/ModelsListProvidersParams.ts deleted file mode 100644 index 62b522b5cf..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelsListProvidersParams.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ModelProviderFilter } from './ModelProviderFilter'; -import type { ModelProviderSort } from './ModelProviderSort'; - -export type ModelsListProvidersParams = { - /** - * Page number. - */ - page?: number; - /** - * Page size. - */ - page_size?: number; - /** - * The field to sort by. To sort in decreasing order, use `-` in front of the field name. - */ - sort?: ModelProviderSort; - /** - * Filter model providers by workspace, project, status, model_deployment_id, name, description, host_url, created_at, and updated_at. - */ - filter?: ModelProviderFilter; -}; diff --git a/web/packages/sdk/generated/platform/schema/ModelsUpdateDeploymentStatusParams.ts b/web/packages/sdk/generated/platform/schema/ModelsUpdateDeploymentStatusParams.ts deleted file mode 100644 index cbfb79ceaa..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelsUpdateDeploymentStatusParams.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type ModelsUpdateDeploymentStatusParams = { - version?: string; -}; diff --git a/web/packages/sdk/generated/platform/schema/ModelsUpdateModelParams.ts b/web/packages/sdk/generated/platform/schema/ModelsUpdateModelParams.ts deleted file mode 100644 index 1b18f7db02..0000000000 --- a/web/packages/sdk/generated/platform/schema/ModelsUpdateModelParams.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type ModelsUpdateModelParams = { - /** - * Whether to include full spec details - */ - verbose?: boolean; -}; diff --git a/web/packages/sdk/generated/platform/schema/MultilingualConfig.ts b/web/packages/sdk/generated/platform/schema/MultilingualConfig.ts deleted file mode 100644 index 6da08adf70..0000000000 --- a/web/packages/sdk/generated/platform/schema/MultilingualConfig.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { MultilingualConfigRefusalMessages } from './MultilingualConfigRefusalMessages'; - -/** - * Configuration for multilingual refusal messages. - */ -export interface MultilingualConfig { - /** If True, detect the language of user input and return refusal messages in the same language. Supported languages: en (English), es (Spanish), zh (Chinese), de (German), fr (French), hi (Hindi), ja (Japanese), ar (Arabic), th (Thai). */ - enabled?: boolean; - /** Custom refusal messages per language code. If not specified, built-in defaults are used. Example: {'en': 'Sorry, I cannot help.', 'es': 'Lo siento, no puedo ayudar.'} */ - refusal_messages?: MultilingualConfigRefusalMessages; -} diff --git a/web/packages/sdk/generated/platform/schema/MultilingualConfigRefusalMessages.ts b/web/packages/sdk/generated/platform/schema/MultilingualConfigRefusalMessages.ts deleted file mode 100644 index 1952324381..0000000000 --- a/web/packages/sdk/generated/platform/schema/MultilingualConfigRefusalMessages.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Custom refusal messages per language code. If not specified, built-in defaults are used. Example: {'en': 'Sorry, I cannot help.', 'es': 'Lo siento, no puedo ayudar.'} - */ -export type MultilingualConfigRefusalMessages = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/NERConfig.ts b/web/packages/sdk/generated/platform/schema/NERConfig.ts deleted file mode 100644 index 826b5c1852..0000000000 --- a/web/packages/sdk/generated/platform/schema/NERConfig.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { GlinerConfig } from './GlinerConfig'; - -/** - * Configuration for Named Entity Recognition. - */ -export interface NERConfig { - /** NER model threshold. */ - ner_threshold?: number; - /** Enable NER regular expressions (experimental). */ - enable_regexps?: boolean; - /** GLiNER NER configuration. */ - gliner?: GlinerConfig; - /** List of entity types to recognize. If unset, classification entity types are used. */ - ner_entities?: string[]; -} diff --git a/web/packages/sdk/generated/platform/schema/NGCStorageConfig.ts b/web/packages/sdk/generated/platform/schema/NGCStorageConfig.ts deleted file mode 100644 index 30494d4570..0000000000 --- a/web/packages/sdk/generated/platform/schema/NGCStorageConfig.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { NGCStorageConfigTargetType } from './NGCStorageConfigTargetType'; -import type { SecretRef } from './SecretRef'; - -export interface NGCStorageConfig { - /** Chunk size in bytes for reading/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB. */ - read_chunk_size?: number; - type?: 'ngc'; - /** NGC organization name */ - org: string; - /** NGC team name */ - team: string; - /** NGC asset name (model or resource) */ - target: string; - /** Type of NGC asset: 'resource' or 'model' */ - target_type?: NGCStorageConfigTargetType; - /** NGC asset version. If not provided, defaults to latest version */ - version?: string; - /** The original version requested by the user before resolution (e.g., 'latest' or None). The 'version' field contains the resolved version ID. */ - original_version?: string; - /** NGC API key secret name */ - api_key_secret: SecretRef; - /** NGC API host URL */ - host?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/NGCStorageConfigTargetType.ts b/web/packages/sdk/generated/platform/schema/NGCStorageConfigTargetType.ts deleted file mode 100644 index d18bae8673..0000000000 --- a/web/packages/sdk/generated/platform/schema/NGCStorageConfigTargetType.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Type of NGC asset: 'resource' or 'model' - */ -export type NGCStorageConfigTargetType = - (typeof NGCStorageConfigTargetType)[keyof typeof NGCStorageConfigTargetType]; - -export const NGCStorageConfigTargetType = { - resource: 'resource', - model: 'model', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/NIMDeployment.ts b/web/packages/sdk/generated/platform/schema/NIMDeployment.ts deleted file mode 100644 index b2e5d7c59e..0000000000 --- a/web/packages/sdk/generated/platform/schema/NIMDeployment.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { K8sNIMOperatorConfig } from './K8sNIMOperatorConfig'; -import type { ModelType } from './ModelType'; -import type { NIMDeploymentAdditionalEnvs } from './NIMDeploymentAdditionalEnvs'; -import type { NIMDeploymentOverrideConfig } from './NIMDeploymentOverrideConfig'; -import type { ToolCallConfig } from './ToolCallConfig'; - -/** - * Configuration for NIM-based model deployment. - */ -export interface NIMDeployment { - /** Type of model being deployed */ - model_type?: ModelType; - /** Whether to enable LoRA support */ - lora_enabled?: boolean; - /** - * Number of GPUs required for the deployment - * @minimum 0 - */ - gpu: number; - /** Disk size for the deployment */ - disk_size?: string; - /** - * Container image name from NGC. If not specified, defaults to multi-llm - * @maxLength 255 - */ - image_name?: string; - /** - * Container image tag from NGC - * @maxLength 255 - */ - image_tag?: string; - /** - * Model repository namespace - organization/user namespace as it exists in repo_id. - * @maxLength 255 - */ - model_namespace?: string; - /** - * Model name - model repository name for model weights. - * @maxLength 255 - */ - model_name?: string; - /** - * Model revision (branch, tag, or commit). If not specified, parsed from model_name @revision suffix or defaults to 'main' - * @maxLength 255 - */ - model_revision?: string; - /** - * Model provider: 'hf' for HuggingFace or 'nmp' for NeMo Platform - * @maxLength 255 - */ - model_provider?: string; - /** Jinja2 chat template string for the model. Overrides the chat_template from ModelEntity.spec if both are set. Used by NIM to format chat completions. */ - chat_template?: string; - /** Tool calling configuration for NIM deployments. Overrides tool_call_config from ModelEntity.spec if both are set. Controls how the model handles function/tool calling. */ - tool_call_config?: ToolCallConfig; - /** Additional environment variables for the deployment */ - additional_envs?: NIMDeploymentAdditionalEnvs; - /** Typed Kubernetes configuration for common NIMService Spec fields. Applied after defaults but before override_config. */ - k8s_nim_operator_config?: K8sNIMOperatorConfig; - /** Raw NIMService spec configuration that takes precedence over generated config. Allows end users to provide advanced configuration options directly. */ - override_config?: NIMDeploymentOverrideConfig; -} diff --git a/web/packages/sdk/generated/platform/schema/NIMDeploymentAdditionalEnvs.ts b/web/packages/sdk/generated/platform/schema/NIMDeploymentAdditionalEnvs.ts deleted file mode 100644 index 3a5e116d15..0000000000 --- a/web/packages/sdk/generated/platform/schema/NIMDeploymentAdditionalEnvs.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Additional environment variables for the deployment - */ -export type NIMDeploymentAdditionalEnvs = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/NIMDeploymentOverrideConfig.ts b/web/packages/sdk/generated/platform/schema/NIMDeploymentOverrideConfig.ts deleted file mode 100644 index 8ee91ba6db..0000000000 --- a/web/packages/sdk/generated/platform/schema/NIMDeploymentOverrideConfig.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Raw NIMService spec configuration that takes precedence over generated config. Allows end users to provide advanced configuration options directly. - */ -export type NIMDeploymentOverrideConfig = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/NemoAgentToolkitRemoteMetric.ts b/web/packages/sdk/generated/platform/schema/NemoAgentToolkitRemoteMetric.ts deleted file mode 100644 index ad99c66749..0000000000 --- a/web/packages/sdk/generated/platform/schema/NemoAgentToolkitRemoteMetric.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { NemoAgentToolkitRemoteMetricLabels } from './NemoAgentToolkitRemoteMetricLabels'; -import type { NemoAgentToolkitRemoteMetricSupportedJobTypesItem } from './NemoAgentToolkitRemoteMetricSupportedJobTypesItem'; -import type { SecretRef } from './SecretRef'; - -/** - * Persisted NeMo Agent Toolkit Remote metric. - */ -export interface NemoAgentToolkitRemoteMetric { - /** Entity name within the workspace */ - name?: string; - /** - * Workspace identifier - * @pattern ^[\w\-\+.@:]+$ - */ - workspace: string; - /** The name of the project associated with this entity. */ - project?: string; - type?: 'nemo-agent-toolkit-remote'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: NemoAgentToolkitRemoteMetricLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: NemoAgentToolkitRemoteMetricSupportedJobTypesItem[]; - /** The URL of the remote endpoint. */ - url: string; - /** Optional secret reference of an API key for authentication. Format: workspace/secret_name or secret_name within the job workspace. */ - api_key_secret?: SecretRef; - /** Request timeout in seconds. */ - timeout_seconds?: number; - /** Maximum number of retry attempts. */ - max_retries?: number; - /** The name of the evaluator (also used as the score name). */ - evaluator_name: string; - readonly id: string; - readonly created_at: string; - readonly created_by: string | null; - readonly updated_at: string; - readonly updated_by: string | null; - /** Alias for id for backwards compatibility. */ - readonly entity_id: string; - /** Parent entity ID for nested entities. */ - readonly parent: string; -} diff --git a/web/packages/sdk/generated/platform/schema/NemoAgentToolkitRemoteMetricInput.ts b/web/packages/sdk/generated/platform/schema/NemoAgentToolkitRemoteMetricInput.ts deleted file mode 100644 index df270a27af..0000000000 --- a/web/packages/sdk/generated/platform/schema/NemoAgentToolkitRemoteMetricInput.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { NemoAgentToolkitRemoteMetricInputLabels } from './NemoAgentToolkitRemoteMetricInputLabels'; -import type { NemoAgentToolkitRemoteMetricInputSupportedJobTypesItem } from './NemoAgentToolkitRemoteMetricInputSupportedJobTypesItem'; -import type { SecretRef } from './SecretRef'; - -/** - * Request type for NemoAgentToolkitRemoteMetric. A remote metric that interfaces with NeMo Agent Toolkit evaluators. - */ -export interface NemoAgentToolkitRemoteMetricInput { - type?: 'nemo-agent-toolkit-remote'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: NemoAgentToolkitRemoteMetricInputLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: NemoAgentToolkitRemoteMetricInputSupportedJobTypesItem[]; - /** The URL of the remote endpoint. */ - url: string; - /** Optional secret reference of an API key for authentication. Format: workspace/secret_name or secret_name within the job workspace. */ - api_key_secret?: SecretRef; - /** Request timeout in seconds. */ - timeout_seconds?: number; - /** Maximum number of retry attempts. */ - max_retries?: number; - /** The name of the evaluator (also used as the score name). */ - evaluator_name: string; -} diff --git a/web/packages/sdk/generated/platform/schema/NemoAgentToolkitRemoteMetricInputLabels.ts b/web/packages/sdk/generated/platform/schema/NemoAgentToolkitRemoteMetricInputLabels.ts deleted file mode 100644 index ffb75f78d4..0000000000 --- a/web/packages/sdk/generated/platform/schema/NemoAgentToolkitRemoteMetricInputLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type NemoAgentToolkitRemoteMetricInputLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/NemoAgentToolkitRemoteMetricInputSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/NemoAgentToolkitRemoteMetricInputSupportedJobTypesItem.ts deleted file mode 100644 index a15c566144..0000000000 --- a/web/packages/sdk/generated/platform/schema/NemoAgentToolkitRemoteMetricInputSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type NemoAgentToolkitRemoteMetricInputSupportedJobTypesItem = - (typeof NemoAgentToolkitRemoteMetricInputSupportedJobTypesItem)[keyof typeof NemoAgentToolkitRemoteMetricInputSupportedJobTypesItem]; - -export const NemoAgentToolkitRemoteMetricInputSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/NemoAgentToolkitRemoteMetricLabels.ts b/web/packages/sdk/generated/platform/schema/NemoAgentToolkitRemoteMetricLabels.ts deleted file mode 100644 index f865aa9c6c..0000000000 --- a/web/packages/sdk/generated/platform/schema/NemoAgentToolkitRemoteMetricLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type NemoAgentToolkitRemoteMetricLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/NemoAgentToolkitRemoteMetricResponse.ts b/web/packages/sdk/generated/platform/schema/NemoAgentToolkitRemoteMetricResponse.ts deleted file mode 100644 index 07f65822f5..0000000000 --- a/web/packages/sdk/generated/platform/schema/NemoAgentToolkitRemoteMetricResponse.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { NemoAgentToolkitRemoteMetricResponseLabels } from './NemoAgentToolkitRemoteMetricResponseLabels'; -import type { NemoAgentToolkitRemoteMetricResponseSupportedJobTypesItem } from './NemoAgentToolkitRemoteMetricResponseSupportedJobTypesItem'; -import type { SecretRef } from './SecretRef'; - -/** - * Response type for NemoAgentToolkitRemoteMetric. - */ -export interface NemoAgentToolkitRemoteMetricResponse { - /** Entity name within the workspace */ - name?: string; - /** Workspace identifier */ - workspace?: string; - /** The name of the project associated with this entity. */ - project?: string; - /** Entity name within the workspace */ - id?: string; - created_at?: string; - updated_at?: string; - parent?: string; - type?: 'nemo-agent-toolkit-remote'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: NemoAgentToolkitRemoteMetricResponseLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: NemoAgentToolkitRemoteMetricResponseSupportedJobTypesItem[]; - /** The URL of the remote endpoint. */ - url: string; - /** Optional secret reference of an API key for authentication. Format: workspace/secret_name or secret_name within the job workspace. */ - api_key_secret?: SecretRef; - /** Request timeout in seconds. */ - timeout_seconds?: number; - /** Maximum number of retry attempts. */ - max_retries?: number; - /** The name of the evaluator (also used as the score name). */ - evaluator_name: string; -} diff --git a/web/packages/sdk/generated/platform/schema/NemoAgentToolkitRemoteMetricResponseLabels.ts b/web/packages/sdk/generated/platform/schema/NemoAgentToolkitRemoteMetricResponseLabels.ts deleted file mode 100644 index 628053fcbc..0000000000 --- a/web/packages/sdk/generated/platform/schema/NemoAgentToolkitRemoteMetricResponseLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type NemoAgentToolkitRemoteMetricResponseLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/NemoAgentToolkitRemoteMetricResponseSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/NemoAgentToolkitRemoteMetricResponseSupportedJobTypesItem.ts deleted file mode 100644 index 88fc13971e..0000000000 --- a/web/packages/sdk/generated/platform/schema/NemoAgentToolkitRemoteMetricResponseSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type NemoAgentToolkitRemoteMetricResponseSupportedJobTypesItem = - (typeof NemoAgentToolkitRemoteMetricResponseSupportedJobTypesItem)[keyof typeof NemoAgentToolkitRemoteMetricResponseSupportedJobTypesItem]; - -export const NemoAgentToolkitRemoteMetricResponseSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/NemoAgentToolkitRemoteMetricSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/NemoAgentToolkitRemoteMetricSupportedJobTypesItem.ts deleted file mode 100644 index aacda9a3bf..0000000000 --- a/web/packages/sdk/generated/platform/schema/NemoAgentToolkitRemoteMetricSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type NemoAgentToolkitRemoteMetricSupportedJobTypesItem = - (typeof NemoAgentToolkitRemoteMetricSupportedJobTypesItem)[keyof typeof NemoAgentToolkitRemoteMetricSupportedJobTypesItem]; - -export const NemoAgentToolkitRemoteMetricSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetric.ts b/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetric.ts deleted file mode 100644 index cff9dcffa6..0000000000 --- a/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetric.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { EvaluatorModel } from './EvaluatorModel'; -import type { InferenceParams } from './InferenceParams'; -import type { NoiseSensitivityMetricInputTemplate } from './NoiseSensitivityMetricInputTemplate'; -import type { NoiseSensitivityMetricLabels } from './NoiseSensitivityMetricLabels'; -import type { NoiseSensitivityMetricSupportedJobTypesItem } from './NoiseSensitivityMetricSupportedJobTypesItem'; - -/** - * RAGAS metric for measuring noise sensitivity. - */ -export interface NoiseSensitivityMetric { - /** Entity name within the workspace */ - name?: string; - /** - * Workspace identifier - * @pattern ^[\w\-\+.@:]+$ - */ - workspace: string; - /** The name of the project associated with this entity. */ - project?: string; - /** The LLM model to use as judge. */ - judge_model: EvaluatorModel; - /** Inference parameters for the judge. */ - inference?: InferenceParams; - /** If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse/output formatting failures are always converted to NaN. */ - ignore_request_failure?: boolean; - type?: 'noise_sensitivity'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: NoiseSensitivityMetricLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: NoiseSensitivityMetricSupportedJobTypesItem[]; - /** Optional Jinja template for rendering the input payload for RAGAS evaluation. */ - input_template?: NoiseSensitivityMetricInputTemplate; - readonly id: string; - readonly created_at: string; - readonly created_by: string | null; - readonly updated_at: string; - readonly updated_by: string | null; - /** Alias for id for backwards compatibility. */ - readonly entity_id: string; - /** Parent entity ID for nested entities. */ - readonly parent: string; -} diff --git a/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetricInput.ts b/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetricInput.ts deleted file mode 100644 index 8b6b46db44..0000000000 --- a/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetricInput.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { EvaluatorModel } from './EvaluatorModel'; -import type { InferenceParams } from './InferenceParams'; -import type { ModelRef } from './ModelRef'; -import type { NoiseSensitivityMetricInputInputTemplate } from './NoiseSensitivityMetricInputInputTemplate'; -import type { NoiseSensitivityMetricInputLabels } from './NoiseSensitivityMetricInputLabels'; -import type { NoiseSensitivityMetricInputSupportedJobTypesItem } from './NoiseSensitivityMetricInputSupportedJobTypesItem'; - -/** - * Request type for NoiseSensitivity metrics. - */ -export interface NoiseSensitivityMetricInput { - /** The judge model configuration. */ - judge_model: EvaluatorModel | ModelRef; - /** Inference parameters for the judge. */ - inference?: InferenceParams; - /** If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse/output formatting failures are always converted to NaN. */ - ignore_request_failure?: boolean; - type?: 'noise_sensitivity'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: NoiseSensitivityMetricInputLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: NoiseSensitivityMetricInputSupportedJobTypesItem[]; - /** Optional Jinja template for rendering the input payload for RAGAS evaluation. */ - input_template?: NoiseSensitivityMetricInputInputTemplate; -} diff --git a/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetricInputInputTemplate.ts b/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetricInputInputTemplate.ts deleted file mode 100644 index 783e87329e..0000000000 --- a/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetricInputInputTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional Jinja template for rendering the input payload for RAGAS evaluation. - */ -export type NoiseSensitivityMetricInputInputTemplate = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetricInputLabels.ts b/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetricInputLabels.ts deleted file mode 100644 index 02f07f372e..0000000000 --- a/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetricInputLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type NoiseSensitivityMetricInputLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetricInputSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetricInputSupportedJobTypesItem.ts deleted file mode 100644 index ef502bd4ef..0000000000 --- a/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetricInputSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type NoiseSensitivityMetricInputSupportedJobTypesItem = - (typeof NoiseSensitivityMetricInputSupportedJobTypesItem)[keyof typeof NoiseSensitivityMetricInputSupportedJobTypesItem]; - -export const NoiseSensitivityMetricInputSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetricInputTemplate.ts b/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetricInputTemplate.ts deleted file mode 100644 index 827383bda3..0000000000 --- a/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetricInputTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional Jinja template for rendering the input payload for RAGAS evaluation. - */ -export type NoiseSensitivityMetricInputTemplate = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetricLabels.ts b/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetricLabels.ts deleted file mode 100644 index 864a03da2c..0000000000 --- a/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetricLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type NoiseSensitivityMetricLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetricResponse.ts b/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetricResponse.ts deleted file mode 100644 index e3ba0919e4..0000000000 --- a/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetricResponse.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { EvaluatorModel } from './EvaluatorModel'; -import type { InferenceParams } from './InferenceParams'; -import type { ModelRef } from './ModelRef'; -import type { NoiseSensitivityMetricResponseInputTemplate } from './NoiseSensitivityMetricResponseInputTemplate'; -import type { NoiseSensitivityMetricResponseLabels } from './NoiseSensitivityMetricResponseLabels'; -import type { NoiseSensitivityMetricResponseSupportedJobTypesItem } from './NoiseSensitivityMetricResponseSupportedJobTypesItem'; - -/** - * Response type for NoiseSensitivity metrics. - */ -export interface NoiseSensitivityMetricResponse { - /** Entity name within the workspace */ - name?: string; - /** Workspace identifier */ - workspace?: string; - /** The name of the project associated with this entity. */ - project?: string; - /** Entity name within the workspace */ - id?: string; - created_at?: string; - updated_at?: string; - parent?: string; - /** The judge model configuration. */ - judge_model: EvaluatorModel | ModelRef; - /** Inference parameters for the judge. */ - inference?: InferenceParams; - /** If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse/output formatting failures are always converted to NaN. */ - ignore_request_failure?: boolean; - type?: 'noise_sensitivity'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: NoiseSensitivityMetricResponseLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: NoiseSensitivityMetricResponseSupportedJobTypesItem[]; - /** Optional Jinja template for rendering the input payload for RAGAS evaluation. */ - input_template?: NoiseSensitivityMetricResponseInputTemplate; -} diff --git a/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetricResponseInputTemplate.ts b/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetricResponseInputTemplate.ts deleted file mode 100644 index 19035d15a2..0000000000 --- a/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetricResponseInputTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional Jinja template for rendering the input payload for RAGAS evaluation. - */ -export type NoiseSensitivityMetricResponseInputTemplate = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetricResponseLabels.ts b/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetricResponseLabels.ts deleted file mode 100644 index 2d6abea52a..0000000000 --- a/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetricResponseLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type NoiseSensitivityMetricResponseLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetricResponseSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetricResponseSupportedJobTypesItem.ts deleted file mode 100644 index 74548a2023..0000000000 --- a/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetricResponseSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type NoiseSensitivityMetricResponseSupportedJobTypesItem = - (typeof NoiseSensitivityMetricResponseSupportedJobTypesItem)[keyof typeof NoiseSensitivityMetricResponseSupportedJobTypesItem]; - -export const NoiseSensitivityMetricResponseSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetricSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetricSupportedJobTypesItem.ts deleted file mode 100644 index c8c0821af8..0000000000 --- a/web/packages/sdk/generated/platform/schema/NoiseSensitivityMetricSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type NoiseSensitivityMetricSupportedJobTypesItem = - (typeof NoiseSensitivityMetricSupportedJobTypesItem)[keyof typeof NoiseSensitivityMetricSupportedJobTypesItem]; - -export const NoiseSensitivityMetricSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/NumberCheckMetric.ts b/web/packages/sdk/generated/platform/schema/NumberCheckMetric.ts deleted file mode 100644 index c0feb08e15..0000000000 --- a/web/packages/sdk/generated/platform/schema/NumberCheckMetric.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { NumberCheckMetricLabels } from './NumberCheckMetricLabels'; -import type { NumberCheckMetricOperation } from './NumberCheckMetricOperation'; -import type { NumberCheckMetricSupportedJobTypesItem } from './NumberCheckMetricSupportedJobTypesItem'; - -/** - * Persisted number check metric. - */ -export interface NumberCheckMetric { - /** Entity name within the workspace */ - name?: string; - /** - * Workspace identifier - * @pattern ^[\w\-\+.@:]+$ - */ - workspace: string; - /** The name of the project associated with this entity. */ - project?: string; - type?: 'number-check'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: NumberCheckMetricLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: NumberCheckMetricSupportedJobTypesItem[]; - /** The operation to compute for the metric. */ - operation: NumberCheckMetricOperation; - /** The template to use for rendering the left value of the operator to compute the metric. */ - left_template: string; - /** The template to use for rendering the right value of the operator to compute the metric. */ - right_template: string; - /** Specify the tolerance for the absolute difference of values. */ - epsilon?: number; - readonly id: string; - readonly created_at: string; - readonly created_by: string | null; - readonly updated_at: string; - readonly updated_by: string | null; - /** Alias for id for backwards compatibility. */ - readonly entity_id: string; - /** Parent entity ID for nested entities. */ - readonly parent: string; -} diff --git a/web/packages/sdk/generated/platform/schema/NumberCheckMetricInput.ts b/web/packages/sdk/generated/platform/schema/NumberCheckMetricInput.ts deleted file mode 100644 index 62d32252f4..0000000000 --- a/web/packages/sdk/generated/platform/schema/NumberCheckMetricInput.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { NumberCheckMetricInputLabels } from './NumberCheckMetricInputLabels'; -import type { NumberCheckMetricInputOperation } from './NumberCheckMetricInputOperation'; -import type { NumberCheckMetricInputSupportedJobTypesItem } from './NumberCheckMetricInputSupportedJobTypesItem'; - -/** - * Request type for NumberCheckMetric. Numeric-comparison metric with template-driven operands. - */ -export interface NumberCheckMetricInput { - type?: 'number-check'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: NumberCheckMetricInputLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: NumberCheckMetricInputSupportedJobTypesItem[]; - /** The operation to compute for the metric. */ - operation: NumberCheckMetricInputOperation; - /** The template to use for rendering the left value of the operator to compute the metric. */ - left_template: string; - /** The template to use for rendering the right value of the operator to compute the metric. */ - right_template: string; - /** Specify the tolerance for the absolute difference of values. */ - epsilon?: number; -} diff --git a/web/packages/sdk/generated/platform/schema/NumberCheckMetricInputLabels.ts b/web/packages/sdk/generated/platform/schema/NumberCheckMetricInputLabels.ts deleted file mode 100644 index b9fe79fde7..0000000000 --- a/web/packages/sdk/generated/platform/schema/NumberCheckMetricInputLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type NumberCheckMetricInputLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/NumberCheckMetricInputOperation.ts b/web/packages/sdk/generated/platform/schema/NumberCheckMetricInputOperation.ts deleted file mode 100644 index 32aeeea9ae..0000000000 --- a/web/packages/sdk/generated/platform/schema/NumberCheckMetricInputOperation.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * The operation to compute for the metric. - */ -export type NumberCheckMetricInputOperation = - (typeof NumberCheckMetricInputOperation)[keyof typeof NumberCheckMetricInputOperation]; - -export const NumberCheckMetricInputOperation = { - equals: 'equals', - '==': '==', - '!=': '!=', - '<>': '<>', - not_equals: 'not equals', - '>=': '>=', - gte: 'gte', - greater_than_or_equal: 'greater than or equal', - '>': '>', - gt: 'gt', - greater_than: 'greater than', - '<=': '<=', - lte: 'lte', - less_than_or_equal: 'less than or equal', - '<': '<', - lt: 'lt', - less_than: 'less than', - absolute_difference: 'absolute difference', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/NumberCheckMetricInputSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/NumberCheckMetricInputSupportedJobTypesItem.ts deleted file mode 100644 index d6b7ea89be..0000000000 --- a/web/packages/sdk/generated/platform/schema/NumberCheckMetricInputSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type NumberCheckMetricInputSupportedJobTypesItem = - (typeof NumberCheckMetricInputSupportedJobTypesItem)[keyof typeof NumberCheckMetricInputSupportedJobTypesItem]; - -export const NumberCheckMetricInputSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/NumberCheckMetricLabels.ts b/web/packages/sdk/generated/platform/schema/NumberCheckMetricLabels.ts deleted file mode 100644 index 0c4897877f..0000000000 --- a/web/packages/sdk/generated/platform/schema/NumberCheckMetricLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type NumberCheckMetricLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/NumberCheckMetricOperation.ts b/web/packages/sdk/generated/platform/schema/NumberCheckMetricOperation.ts deleted file mode 100644 index ee263e1371..0000000000 --- a/web/packages/sdk/generated/platform/schema/NumberCheckMetricOperation.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * The operation to compute for the metric. - */ -export type NumberCheckMetricOperation = - (typeof NumberCheckMetricOperation)[keyof typeof NumberCheckMetricOperation]; - -export const NumberCheckMetricOperation = { - equals: 'equals', - '==': '==', - '!=': '!=', - '<>': '<>', - not_equals: 'not equals', - '>=': '>=', - gte: 'gte', - greater_than_or_equal: 'greater than or equal', - '>': '>', - gt: 'gt', - greater_than: 'greater than', - '<=': '<=', - lte: 'lte', - less_than_or_equal: 'less than or equal', - '<': '<', - lt: 'lt', - less_than: 'less than', - absolute_difference: 'absolute difference', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/NumberCheckMetricResponse.ts b/web/packages/sdk/generated/platform/schema/NumberCheckMetricResponse.ts deleted file mode 100644 index 2f3f5559a7..0000000000 --- a/web/packages/sdk/generated/platform/schema/NumberCheckMetricResponse.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { NumberCheckMetricResponseLabels } from './NumberCheckMetricResponseLabels'; -import type { NumberCheckMetricResponseOperation } from './NumberCheckMetricResponseOperation'; -import type { NumberCheckMetricResponseSupportedJobTypesItem } from './NumberCheckMetricResponseSupportedJobTypesItem'; - -/** - * Response type for NumberCheckMetric. - */ -export interface NumberCheckMetricResponse { - /** Entity name within the workspace */ - name?: string; - /** Workspace identifier */ - workspace?: string; - /** The name of the project associated with this entity. */ - project?: string; - /** Entity name within the workspace */ - id?: string; - created_at?: string; - updated_at?: string; - parent?: string; - type?: 'number-check'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: NumberCheckMetricResponseLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: NumberCheckMetricResponseSupportedJobTypesItem[]; - /** The operation to compute for the metric. */ - operation: NumberCheckMetricResponseOperation; - /** The template to use for rendering the left value of the operator to compute the metric. */ - left_template: string; - /** The template to use for rendering the right value of the operator to compute the metric. */ - right_template: string; - /** Specify the tolerance for the absolute difference of values. */ - epsilon?: number; -} diff --git a/web/packages/sdk/generated/platform/schema/NumberCheckMetricResponseLabels.ts b/web/packages/sdk/generated/platform/schema/NumberCheckMetricResponseLabels.ts deleted file mode 100644 index 4b28efc30c..0000000000 --- a/web/packages/sdk/generated/platform/schema/NumberCheckMetricResponseLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type NumberCheckMetricResponseLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/NumberCheckMetricResponseOperation.ts b/web/packages/sdk/generated/platform/schema/NumberCheckMetricResponseOperation.ts deleted file mode 100644 index 644c57107d..0000000000 --- a/web/packages/sdk/generated/platform/schema/NumberCheckMetricResponseOperation.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * The operation to compute for the metric. - */ -export type NumberCheckMetricResponseOperation = - (typeof NumberCheckMetricResponseOperation)[keyof typeof NumberCheckMetricResponseOperation]; - -export const NumberCheckMetricResponseOperation = { - equals: 'equals', - '==': '==', - '!=': '!=', - '<>': '<>', - not_equals: 'not equals', - '>=': '>=', - gte: 'gte', - greater_than_or_equal: 'greater than or equal', - '>': '>', - gt: 'gt', - greater_than: 'greater than', - '<=': '<=', - lte: 'lte', - less_than_or_equal: 'less than or equal', - '<': '<', - lt: 'lt', - less_than: 'less than', - absolute_difference: 'absolute difference', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/NumberCheckMetricResponseSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/NumberCheckMetricResponseSupportedJobTypesItem.ts deleted file mode 100644 index 610322d71a..0000000000 --- a/web/packages/sdk/generated/platform/schema/NumberCheckMetricResponseSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type NumberCheckMetricResponseSupportedJobTypesItem = - (typeof NumberCheckMetricResponseSupportedJobTypesItem)[keyof typeof NumberCheckMetricResponseSupportedJobTypesItem]; - -export const NumberCheckMetricResponseSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/NumberCheckMetricSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/NumberCheckMetricSupportedJobTypesItem.ts deleted file mode 100644 index 99d273b091..0000000000 --- a/web/packages/sdk/generated/platform/schema/NumberCheckMetricSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type NumberCheckMetricSupportedJobTypesItem = - (typeof NumberCheckMetricSupportedJobTypesItem)[keyof typeof NumberCheckMetricSupportedJobTypesItem]; - -export const NumberCheckMetricSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/OIDCDiscoveryResponse.ts b/web/packages/sdk/generated/platform/schema/OIDCDiscoveryResponse.ts deleted file mode 100644 index a47d5b078a..0000000000 --- a/web/packages/sdk/generated/platform/schema/OIDCDiscoveryResponse.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * OIDC discovery response for CLI/SDK. - */ -export interface OIDCDiscoveryResponse { - issuer: string; - authorization_endpoint?: string; - token_endpoint?: string; - device_authorization_endpoint?: string; - userinfo_endpoint?: string; - client_id: string; - default_scopes?: string; - scope_prefix?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/OpenAIListModelsResp.ts b/web/packages/sdk/generated/platform/schema/OpenAIListModelsResp.ts deleted file mode 100644 index e865b58206..0000000000 --- a/web/packages/sdk/generated/platform/schema/OpenAIListModelsResp.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { OpenAIModelResp } from './OpenAIModelResp'; - -/** - * Duplicated structure for an OpenAI /v1/models response. - */ -export interface OpenAIListModelsResp { - data: OpenAIModelResp[]; - object?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/OpenAIModelResp.ts b/web/packages/sdk/generated/platform/schema/OpenAIModelResp.ts deleted file mode 100644 index 1b74befa86..0000000000 --- a/web/packages/sdk/generated/platform/schema/OpenAIModelResp.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Duplicated structure for an OpenAI /v1/models individual model response. - */ -export interface OpenAIModelResp { - id: string; - owned_by: string; - object?: string; - created?: number; -} diff --git a/web/packages/sdk/generated/platform/schema/OpenaiProxyPatch200.ts b/web/packages/sdk/generated/platform/schema/OpenaiProxyPatch200.ts deleted file mode 100644 index 940170ca25..0000000000 --- a/web/packages/sdk/generated/platform/schema/OpenaiProxyPatch200.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type OpenaiProxyPatch200 = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/OpenaiProxyPatchBody.ts b/web/packages/sdk/generated/platform/schema/OpenaiProxyPatchBody.ts deleted file mode 100644 index e2e5ff38fd..0000000000 --- a/web/packages/sdk/generated/platform/schema/OpenaiProxyPatchBody.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type OpenaiProxyPatchBody = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/OpenaiProxyPost200.ts b/web/packages/sdk/generated/platform/schema/OpenaiProxyPost200.ts deleted file mode 100644 index 420a3d3aea..0000000000 --- a/web/packages/sdk/generated/platform/schema/OpenaiProxyPost200.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type OpenaiProxyPost200 = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/OpenaiProxyPostBody.ts b/web/packages/sdk/generated/platform/schema/OpenaiProxyPostBody.ts deleted file mode 100644 index ef9faa4b1d..0000000000 --- a/web/packages/sdk/generated/platform/schema/OpenaiProxyPostBody.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type OpenaiProxyPostBody = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/OpenaiProxyPut200.ts b/web/packages/sdk/generated/platform/schema/OpenaiProxyPut200.ts deleted file mode 100644 index 4659078a09..0000000000 --- a/web/packages/sdk/generated/platform/schema/OpenaiProxyPut200.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type OpenaiProxyPut200 = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/OpenaiProxyPutBody.ts b/web/packages/sdk/generated/platform/schema/OpenaiProxyPutBody.ts deleted file mode 100644 index 2186fe30d3..0000000000 --- a/web/packages/sdk/generated/platform/schema/OpenaiProxyPutBody.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type OpenaiProxyPutBody = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/OtelExportLogsPartialSuccess.ts b/web/packages/sdk/generated/platform/schema/OtelExportLogsPartialSuccess.ts deleted file mode 100644 index 29fb23cd98..0000000000 --- a/web/packages/sdk/generated/platform/schema/OtelExportLogsPartialSuccess.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Partial success response details. - */ -export interface OtelExportLogsPartialSuccess { - /** Number of rejected log records */ - rejectedLogRecords?: number; - /** Human-readable error message */ - errorMessage?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/OtelExportLogsServiceResponse.ts b/web/packages/sdk/generated/platform/schema/OtelExportLogsServiceResponse.ts deleted file mode 100644 index 9d4b3c10f9..0000000000 --- a/web/packages/sdk/generated/platform/schema/OtelExportLogsServiceResponse.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { OtelExportLogsPartialSuccess } from './OtelExportLogsPartialSuccess'; - -/** - * Response for log export requests. - -Per OTLP spec, successful responses should be empty or contain partial_success info. - */ -export interface OtelExportLogsServiceResponse { - partialSuccess?: OtelExportLogsPartialSuccess; -} diff --git a/web/packages/sdk/generated/platform/schema/OutputRails.ts b/web/packages/sdk/generated/platform/schema/OutputRails.ts deleted file mode 100644 index 9fdabd3379..0000000000 --- a/web/packages/sdk/generated/platform/schema/OutputRails.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { OutputRailsStreamingConfig } from './OutputRailsStreamingConfig'; - -/** - * Configuration of output rails. - */ -export interface OutputRails { - /** If True, the output rails are executed in parallel. */ - parallel?: boolean; - /** The names of all the flows that implement output rails. */ - flows?: string[]; - /** Configuration for streaming output rails. */ - streaming?: OutputRailsStreamingConfig; - /** If True, output rails will apply guardrails to both reasoning traces and output response. If False, output rails will only apply guardrails to the output response excluding the reasoning traces, thus keeping reasoning traces unaltered. */ - apply_to_reasoning_traces?: boolean; -} diff --git a/web/packages/sdk/generated/platform/schema/OutputRailsStreamingConfig.ts b/web/packages/sdk/generated/platform/schema/OutputRailsStreamingConfig.ts deleted file mode 100644 index 4620b32e95..0000000000 --- a/web/packages/sdk/generated/platform/schema/OutputRailsStreamingConfig.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Configuration for managing streaming output of LLM tokens. - */ -export interface OutputRailsStreamingConfig { - /** Enables streaming mode when True. */ - enabled?: boolean; - /** The number of tokens in each processing chunk. This is the size of the token block on which output rails are applied. */ - chunk_size?: number; - /** The number of tokens carried over from the previous chunk to provide context for continuity in processing. */ - context_size?: number; - /** If True, token chunks are streamed immediately before output rails are applied. */ - stream_first?: boolean; -} diff --git a/web/packages/sdk/generated/platform/schema/PaginationData.ts b/web/packages/sdk/generated/platform/schema/PaginationData.ts deleted file mode 100644 index 4c4fbeb954..0000000000 --- a/web/packages/sdk/generated/platform/schema/PaginationData.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export interface PaginationData { - /** The current page number. */ - page: number; - /** The page size used for the query. */ - page_size: number; - /** The size for the current page. */ - current_page_size: number; - /** The total number of pages. */ - total_pages: number; - /** The total number of results. */ - total_results: number; -} diff --git a/web/packages/sdk/generated/platform/schema/PangeaRailConfig.ts b/web/packages/sdk/generated/platform/schema/PangeaRailConfig.ts deleted file mode 100644 index 5ca0f0ecef..0000000000 --- a/web/packages/sdk/generated/platform/schema/PangeaRailConfig.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { PangeaRailOptions } from './PangeaRailOptions'; - -/** - * Configuration data for the Pangea AI Guard API - */ -export interface PangeaRailConfig { - /** Pangea configuration for an Input Guardrail */ - input?: PangeaRailOptions; - /** Pangea configuration for an Output Guardrail */ - output?: PangeaRailOptions; -} diff --git a/web/packages/sdk/generated/platform/schema/PangeaRailOptions.ts b/web/packages/sdk/generated/platform/schema/PangeaRailOptions.ts deleted file mode 100644 index 0307a2a718..0000000000 --- a/web/packages/sdk/generated/platform/schema/PangeaRailOptions.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Configuration data for the Pangea AI Guard API - */ -export interface PangeaRailOptions { - /** Recipe key of a configuration of data types and settings defined in the Pangea User Console. It - specifies the rules that are to be applied to the text, such as defang malicious URLs. */ - recipe: string; -} diff --git a/web/packages/sdk/generated/platform/schema/Parameter.ts b/web/packages/sdk/generated/platform/schema/Parameter.ts deleted file mode 100644 index 57bffd9f1f..0000000000 --- a/web/packages/sdk/generated/platform/schema/Parameter.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ParameterSchema } from './ParameterSchema'; -import type { ParameterType } from './ParameterType'; - -export interface Parameter { - /** Name of the parameter. */ - name: string; - /** The value type of the parameter. */ - type: ParameterType; - /** Description of the parameter. */ - description?: string; - /** The default value of the parameter. */ - default?: boolean | string | number; - /** The JSON schema for parameters with object type. */ - schema?: ParameterSchema; -} diff --git a/web/packages/sdk/generated/platform/schema/ParameterSchema.ts b/web/packages/sdk/generated/platform/schema/ParameterSchema.ts deleted file mode 100644 index e55da9ff0b..0000000000 --- a/web/packages/sdk/generated/platform/schema/ParameterSchema.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * The JSON schema for parameters with object type. - */ -export type ParameterSchema = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/ParameterType.ts b/web/packages/sdk/generated/platform/schema/ParameterType.ts deleted file mode 100644 index 7b13e927e4..0000000000 --- a/web/packages/sdk/generated/platform/schema/ParameterType.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * The value type of the parameter. - */ -export type ParameterType = (typeof ParameterType)[keyof typeof ParameterType]; - -export const ParameterType = { - boolean: 'boolean', - string: 'string', - number: 'number', - integer: 'integer', - object: 'object', - secret: 'secret', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/PatronusEvaluateApiParams.ts b/web/packages/sdk/generated/platform/schema/PatronusEvaluateApiParams.ts deleted file mode 100644 index 4647d3c7ce..0000000000 --- a/web/packages/sdk/generated/platform/schema/PatronusEvaluateApiParams.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { PatronusEvaluateApiParamsParams } from './PatronusEvaluateApiParamsParams'; -import type { PatronusEvaluationSuccessStrategy } from './PatronusEvaluationSuccessStrategy'; - -/** - * Config to parameterize the Patronus Evaluate API call - */ -export interface PatronusEvaluateApiParams { - /** Strategy to determine whether the Patronus Evaluate API Guardrail passes or not. */ - success_strategy?: PatronusEvaluationSuccessStrategy; - /** Parameters to the Patronus Evaluate API */ - params?: PatronusEvaluateApiParamsParams; -} diff --git a/web/packages/sdk/generated/platform/schema/PatronusEvaluateApiParamsParams.ts b/web/packages/sdk/generated/platform/schema/PatronusEvaluateApiParamsParams.ts deleted file mode 100644 index 3477f29f3f..0000000000 --- a/web/packages/sdk/generated/platform/schema/PatronusEvaluateApiParamsParams.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Parameters to the Patronus Evaluate API - */ -export type PatronusEvaluateApiParamsParams = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/PatronusEvaluateConfigInput.ts b/web/packages/sdk/generated/platform/schema/PatronusEvaluateConfigInput.ts deleted file mode 100644 index b761fc03b5..0000000000 --- a/web/packages/sdk/generated/platform/schema/PatronusEvaluateConfigInput.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { PatronusEvaluateApiParams } from './PatronusEvaluateApiParams'; - -/** - * Config for the Patronus Evaluate API call - */ -export interface PatronusEvaluateConfigInput { - /** Configuration passed to the Patronus Evaluate API */ - evaluate_config?: PatronusEvaluateApiParams; -} diff --git a/web/packages/sdk/generated/platform/schema/PatronusEvaluateConfigOutput.ts b/web/packages/sdk/generated/platform/schema/PatronusEvaluateConfigOutput.ts deleted file mode 100644 index 760f48b3b4..0000000000 --- a/web/packages/sdk/generated/platform/schema/PatronusEvaluateConfigOutput.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { PatronusEvaluateApiParams } from './PatronusEvaluateApiParams'; - -/** - * Config for the Patronus Evaluate API call - */ -export interface PatronusEvaluateConfigOutput { - /** Configuration passed to the Patronus Evaluate API */ - evaluate_config?: PatronusEvaluateApiParams; -} diff --git a/web/packages/sdk/generated/platform/schema/PatronusEvaluationSuccessStrategy.ts b/web/packages/sdk/generated/platform/schema/PatronusEvaluationSuccessStrategy.ts deleted file mode 100644 index 9de31a214e..0000000000 --- a/web/packages/sdk/generated/platform/schema/PatronusEvaluationSuccessStrategy.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Strategy for determining whether a Patronus Evaluation API -request should pass, especially when multiple evaluators -are called in a single request. -ALL_PASS requires all evaluators to pass for success. -ANY_PASS requires only one evaluator to pass for success. - */ -export type PatronusEvaluationSuccessStrategy = - (typeof PatronusEvaluationSuccessStrategy)[keyof typeof PatronusEvaluationSuccessStrategy]; - -export const PatronusEvaluationSuccessStrategy = { - all_pass: 'all_pass', - any_pass: 'any_pass', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/PatronusRailConfigInput.ts b/web/packages/sdk/generated/platform/schema/PatronusRailConfigInput.ts deleted file mode 100644 index 87fa842c00..0000000000 --- a/web/packages/sdk/generated/platform/schema/PatronusRailConfigInput.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { PatronusEvaluateConfigInput } from './PatronusEvaluateConfigInput'; - -/** - * Configuration data for the Patronus Evaluate API - */ -export interface PatronusRailConfigInput { - /** Patronus Evaluate API configuration for an Input Guardrail */ - input?: PatronusEvaluateConfigInput; - /** Patronus Evaluate API configuration for an Output Guardrail */ - output?: PatronusEvaluateConfigInput; -} diff --git a/web/packages/sdk/generated/platform/schema/PatronusRailConfigOutput.ts b/web/packages/sdk/generated/platform/schema/PatronusRailConfigOutput.ts deleted file mode 100644 index 8f4a56deb5..0000000000 --- a/web/packages/sdk/generated/platform/schema/PatronusRailConfigOutput.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { PatronusEvaluateConfigOutput } from './PatronusEvaluateConfigOutput'; - -/** - * Configuration data for the Patronus Evaluate API - */ -export interface PatronusRailConfigOutput { - /** Patronus Evaluate API configuration for an Input Guardrail */ - input?: PatronusEvaluateConfigOutput; - /** Patronus Evaluate API configuration for an Output Guardrail */ - output?: PatronusEvaluateConfigOutput; -} diff --git a/web/packages/sdk/generated/platform/schema/Percentiles.ts b/web/packages/sdk/generated/platform/schema/Percentiles.ts deleted file mode 100644 index ba143857da..0000000000 --- a/web/packages/sdk/generated/platform/schema/Percentiles.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Percentile distribution of scores. - */ -export interface Percentiles { - /** 10th percentile. */ - p10: number; - /** 20th percentile. */ - p20: number; - /** 30th percentile. */ - p30: number; - /** 40th percentile. */ - p40: number; - /** 50th percentile (median). */ - p50: number; - /** 60th percentile. */ - p60: number; - /** 70th percentile. */ - p70: number; - /** 80th percentile. */ - p80: number; - /** 90th percentile. */ - p90: number; - /** 100th percentile. */ - p100: number; -} diff --git a/web/packages/sdk/generated/platform/schema/PiiReplacerConfig.ts b/web/packages/sdk/generated/platform/schema/PiiReplacerConfig.ts deleted file mode 100644 index 9aad1b8930..0000000000 --- a/web/packages/sdk/generated/platform/schema/PiiReplacerConfig.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { Globals } from './Globals'; -import type { StepDefinition } from './StepDefinition'; - -/** - * Configuration for PII replacer. - -Defines how PII data should be detected and replaced in a dataset. - */ -export interface PiiReplacerConfig { - /** Global configuration options. */ - globals?: Globals; - /** - * List of transformation steps to perform on input data. - * @minItems 1 - * @maxItems 10 - */ - steps: StepDefinition[]; -} diff --git a/web/packages/sdk/generated/platform/schema/PlatformJobEnvironmentVariable.ts b/web/packages/sdk/generated/platform/schema/PlatformJobEnvironmentVariable.ts deleted file mode 100644 index f3c1910c27..0000000000 --- a/web/packages/sdk/generated/platform/schema/PlatformJobEnvironmentVariable.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { PlatformJobSecretEnvironmentVariableRef } from './PlatformJobSecretEnvironmentVariableRef'; - -/** - * Environment variable for a job step - */ -export interface PlatformJobEnvironmentVariable { - /** The environment variable name */ - name: string; - /** The environment variable value */ - value?: string; - /** Reference to a secret environment variable to populate the environment variable */ - from_secret?: PlatformJobSecretEnvironmentVariableRef; -} diff --git a/web/packages/sdk/generated/platform/schema/PlatformJobListResultResponse.ts b/web/packages/sdk/generated/platform/schema/PlatformJobListResultResponse.ts deleted file mode 100644 index 220adf3726..0000000000 --- a/web/packages/sdk/generated/platform/schema/PlatformJobListResultResponse.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { PlatformJobResultResponse } from './PlatformJobResultResponse'; - -export interface PlatformJobListResultResponse { - data: PlatformJobResultResponse[]; -} diff --git a/web/packages/sdk/generated/platform/schema/PlatformJobListTaskResponse.ts b/web/packages/sdk/generated/platform/schema/PlatformJobListTaskResponse.ts deleted file mode 100644 index 62013ff81c..0000000000 --- a/web/packages/sdk/generated/platform/schema/PlatformJobListTaskResponse.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { PlatformJobTask } from './PlatformJobTask'; - -/** - * Response model for listing job tasks. - */ -export interface PlatformJobListTaskResponse { - data: PlatformJobTask[]; -} diff --git a/web/packages/sdk/generated/platform/schema/PlatformJobLog.ts b/web/packages/sdk/generated/platform/schema/PlatformJobLog.ts deleted file mode 100644 index 166a08dca1..0000000000 --- a/web/packages/sdk/generated/platform/schema/PlatformJobLog.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export interface PlatformJobLog { - timestamp: string; - job: string; - job_step: string; - job_task: string; - message: string; -} diff --git a/web/packages/sdk/generated/platform/schema/PlatformJobLogPage.ts b/web/packages/sdk/generated/platform/schema/PlatformJobLogPage.ts deleted file mode 100644 index e51e24b37a..0000000000 --- a/web/packages/sdk/generated/platform/schema/PlatformJobLogPage.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { PlatformJobLog } from './PlatformJobLog'; - -export interface PlatformJobLogPage { - data: PlatformJobLog[]; - total: number; - next_page: string; - prev_page: string; -} diff --git a/web/packages/sdk/generated/platform/schema/PlatformJobResponse.ts b/web/packages/sdk/generated/platform/schema/PlatformJobResponse.ts deleted file mode 100644 index 002bc7bbc9..0000000000 --- a/web/packages/sdk/generated/platform/schema/PlatformJobResponse.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { PlatformJobResponseCustomFields } from './PlatformJobResponseCustomFields'; -import type { PlatformJobResponseErrorDetails } from './PlatformJobResponseErrorDetails'; -import type { PlatformJobResponseOwnership } from './PlatformJobResponseOwnership'; -import type { PlatformJobResponseSpec } from './PlatformJobResponseSpec'; -import type { PlatformJobResponseStatusDetails } from './PlatformJobResponseStatusDetails'; -import type { PlatformJobSpecOutput } from './PlatformJobSpecOutput'; -import type { PlatformJobStatus } from './PlatformJobStatus'; - -/** - * Response model for a platform job. - */ -export interface PlatformJobResponse { - id: string; - attempt_id: string; - name: string; - /** Workspace identifier */ - workspace: string; - /** Project URN */ - project?: string; - description?: string; - source: string; - /** Job Spec */ - spec?: PlatformJobResponseSpec; - platform_spec: PlatformJobSpecOutput; - /** Fileset ID for storing job artifacts */ - fileset: string; - status: PlatformJobStatus; - /** Details about the job status */ - status_details?: PlatformJobResponseStatusDetails; - error_details?: PlatformJobResponseErrorDetails; - created_at?: string; - updated_at?: string; - ownership?: PlatformJobResponseOwnership; - /** Custom Fields */ - custom_fields?: PlatformJobResponseCustomFields; -} diff --git a/web/packages/sdk/generated/platform/schema/PlatformJobResponseCustomFields.ts b/web/packages/sdk/generated/platform/schema/PlatformJobResponseCustomFields.ts deleted file mode 100644 index 159fc272b3..0000000000 --- a/web/packages/sdk/generated/platform/schema/PlatformJobResponseCustomFields.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Custom Fields - */ -export type PlatformJobResponseCustomFields = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/PlatformJobResponseErrorDetails.ts b/web/packages/sdk/generated/platform/schema/PlatformJobResponseErrorDetails.ts deleted file mode 100644 index dfda0c544d..0000000000 --- a/web/packages/sdk/generated/platform/schema/PlatformJobResponseErrorDetails.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type PlatformJobResponseErrorDetails = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/PlatformJobResponseOwnership.ts b/web/packages/sdk/generated/platform/schema/PlatformJobResponseOwnership.ts deleted file mode 100644 index 8484fb6035..0000000000 --- a/web/packages/sdk/generated/platform/schema/PlatformJobResponseOwnership.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type PlatformJobResponseOwnership = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/PlatformJobResponseSpec.ts b/web/packages/sdk/generated/platform/schema/PlatformJobResponseSpec.ts deleted file mode 100644 index 15d255b6f0..0000000000 --- a/web/packages/sdk/generated/platform/schema/PlatformJobResponseSpec.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Job Spec - */ -export type PlatformJobResponseSpec = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/PlatformJobResponseStatusDetails.ts b/web/packages/sdk/generated/platform/schema/PlatformJobResponseStatusDetails.ts deleted file mode 100644 index af505cfebc..0000000000 --- a/web/packages/sdk/generated/platform/schema/PlatformJobResponseStatusDetails.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Details about the job status - */ -export type PlatformJobResponseStatusDetails = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/PlatformJobResponsesPage.ts b/web/packages/sdk/generated/platform/schema/PlatformJobResponsesPage.ts deleted file mode 100644 index 135ff662f1..0000000000 --- a/web/packages/sdk/generated/platform/schema/PlatformJobResponsesPage.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { PaginationData } from './PaginationData'; -import type { PlatformJobResponse } from './PlatformJobResponse'; -import type { PlatformJobResponsesPageFilter } from './PlatformJobResponsesPageFilter'; - -export interface PlatformJobResponsesPage { - data: PlatformJobResponse[]; - /** Pagination information. */ - pagination?: PaginationData; - /** The field on which the results are sorted. */ - sort?: string; - /** Filtering information. */ - filter?: PlatformJobResponsesPageFilter; -} diff --git a/web/packages/sdk/generated/platform/schema/PlatformJobResponsesPageFilter.ts b/web/packages/sdk/generated/platform/schema/PlatformJobResponsesPageFilter.ts deleted file mode 100644 index 430ecbe7df..0000000000 --- a/web/packages/sdk/generated/platform/schema/PlatformJobResponsesPageFilter.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Filtering information. - */ -export type PlatformJobResponsesPageFilter = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/PlatformJobResultCreateRequest.ts b/web/packages/sdk/generated/platform/schema/PlatformJobResultCreateRequest.ts deleted file mode 100644 index ccb63fd609..0000000000 --- a/web/packages/sdk/generated/platform/schema/PlatformJobResultCreateRequest.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { FileStorageType } from './FileStorageType'; - -export interface PlatformJobResultCreateRequest { - artifact_url: string; - artifact_storage_type: FileStorageType; -} diff --git a/web/packages/sdk/generated/platform/schema/PlatformJobResultResponse.ts b/web/packages/sdk/generated/platform/schema/PlatformJobResultResponse.ts deleted file mode 100644 index 883a5bd542..0000000000 --- a/web/packages/sdk/generated/platform/schema/PlatformJobResultResponse.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { FileStorageType } from './FileStorageType'; - -export interface PlatformJobResultResponse { - name: string; - job: string; - workspace: string; - project?: string; - created_at?: string; - updated_at?: string; - artifact_url: string; - artifact_storage_type: FileStorageType; - download_url?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/PlatformJobSecretEnvironmentVariableRef.ts b/web/packages/sdk/generated/platform/schema/PlatformJobSecretEnvironmentVariableRef.ts deleted file mode 100644 index 8f632d2429..0000000000 --- a/web/packages/sdk/generated/platform/schema/PlatformJobSecretEnvironmentVariableRef.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Reference to a secret to populate an environment variable for a job step. - */ -export interface PlatformJobSecretEnvironmentVariableRef { - /** The name of the secret to reference */ - name: string; -} diff --git a/web/packages/sdk/generated/platform/schema/PlatformJobSortField.ts b/web/packages/sdk/generated/platform/schema/PlatformJobSortField.ts deleted file mode 100644 index cfd1d15001..0000000000 --- a/web/packages/sdk/generated/platform/schema/PlatformJobSortField.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type PlatformJobSortField = (typeof PlatformJobSortField)[keyof typeof PlatformJobSortField]; - -export const PlatformJobSortField = { - created_at: 'created_at', - '-created_at': '-created_at', - updated_at: 'updated_at', - '-updated_at': '-updated_at', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/PlatformJobSpecInput.ts b/web/packages/sdk/generated/platform/schema/PlatformJobSpecInput.ts deleted file mode 100644 index d4a8fbb9d5..0000000000 --- a/web/packages/sdk/generated/platform/schema/PlatformJobSpecInput.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { PlatformJobStepSpecInput } from './PlatformJobStepSpecInput'; - -/** - * Specification for a platform job, containing steps and secrets. - */ -export interface PlatformJobSpecInput { - /** List of steps to be executed in the job */ - steps: PlatformJobStepSpecInput[]; -} diff --git a/web/packages/sdk/generated/platform/schema/PlatformJobSpecOutput.ts b/web/packages/sdk/generated/platform/schema/PlatformJobSpecOutput.ts deleted file mode 100644 index 8f8c13d1d2..0000000000 --- a/web/packages/sdk/generated/platform/schema/PlatformJobSpecOutput.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { PlatformJobStepSpecOutput } from './PlatformJobStepSpecOutput'; - -/** - * Specification for a platform job, containing steps and secrets. - */ -export interface PlatformJobSpecOutput { - /** List of steps to be executed in the job */ - steps: PlatformJobStepSpecOutput[]; -} diff --git a/web/packages/sdk/generated/platform/schema/PlatformJobStatus.ts b/web/packages/sdk/generated/platform/schema/PlatformJobStatus.ts deleted file mode 100644 index aca2b35fa1..0000000000 --- a/web/packages/sdk/generated/platform/schema/PlatformJobStatus.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Enumeration of possible job statuses. - -This enum represents the various states a job can be in during its lifecycle, -from creation to a terminal state. - */ -export type PlatformJobStatus = (typeof PlatformJobStatus)[keyof typeof PlatformJobStatus]; - -export const PlatformJobStatus = { - created: 'created', - pending: 'pending', - active: 'active', - cancelled: 'cancelled', - cancelling: 'cancelling', - error: 'error', - completed: 'completed', - paused: 'paused', - pausing: 'pausing', - resuming: 'resuming', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/PlatformJobStatusResponse.ts b/web/packages/sdk/generated/platform/schema/PlatformJobStatusResponse.ts deleted file mode 100644 index 3ffa04b6c1..0000000000 --- a/web/packages/sdk/generated/platform/schema/PlatformJobStatusResponse.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { PlatformJobStatus } from './PlatformJobStatus'; -import type { PlatformJobStatusResponseErrorDetails } from './PlatformJobStatusResponseErrorDetails'; -import type { PlatformJobStatusResponseStatusDetails } from './PlatformJobStatusResponseStatusDetails'; -import type { PlatformJobStepStatusResponse } from './PlatformJobStepStatusResponse'; - -export interface PlatformJobStatusResponse { - id: string; - name: string; - status: PlatformJobStatus; - status_details: PlatformJobStatusResponseStatusDetails; - error_details: PlatformJobStatusResponseErrorDetails; - steps: PlatformJobStepStatusResponse[]; - created_at: string; - updated_at: string; -} diff --git a/web/packages/sdk/generated/platform/schema/PlatformJobStatusResponseErrorDetails.ts b/web/packages/sdk/generated/platform/schema/PlatformJobStatusResponseErrorDetails.ts deleted file mode 100644 index 7bf37ee2af..0000000000 --- a/web/packages/sdk/generated/platform/schema/PlatformJobStatusResponseErrorDetails.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type PlatformJobStatusResponseErrorDetails = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/PlatformJobStatusResponseStatusDetails.ts b/web/packages/sdk/generated/platform/schema/PlatformJobStatusResponseStatusDetails.ts deleted file mode 100644 index 898cdbd6cd..0000000000 --- a/web/packages/sdk/generated/platform/schema/PlatformJobStatusResponseStatusDetails.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type PlatformJobStatusResponseStatusDetails = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/PlatformJobStatusUpdateRequest.ts b/web/packages/sdk/generated/platform/schema/PlatformJobStatusUpdateRequest.ts deleted file mode 100644 index 8eae32df99..0000000000 --- a/web/packages/sdk/generated/platform/schema/PlatformJobStatusUpdateRequest.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { PlatformJobStatus } from './PlatformJobStatus'; -import type { PlatformJobStatusUpdateRequestErrorDetails } from './PlatformJobStatusUpdateRequestErrorDetails'; -import type { PlatformJobStatusUpdateRequestStatusDetails } from './PlatformJobStatusUpdateRequestStatusDetails'; - -/** - * Request model for updating job status. - */ -export interface PlatformJobStatusUpdateRequest { - /** The new status to set for the job. */ - status: PlatformJobStatus; - /** Optional status details related to the status update. */ - status_details?: PlatformJobStatusUpdateRequestStatusDetails; - /** Optional error details related to the status update. */ - error_details?: PlatformJobStatusUpdateRequestErrorDetails; -} diff --git a/web/packages/sdk/generated/platform/schema/PlatformJobStatusUpdateRequestErrorDetails.ts b/web/packages/sdk/generated/platform/schema/PlatformJobStatusUpdateRequestErrorDetails.ts deleted file mode 100644 index 2e6a4e2383..0000000000 --- a/web/packages/sdk/generated/platform/schema/PlatformJobStatusUpdateRequestErrorDetails.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional error details related to the status update. - */ -export type PlatformJobStatusUpdateRequestErrorDetails = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/PlatformJobStatusUpdateRequestStatusDetails.ts b/web/packages/sdk/generated/platform/schema/PlatformJobStatusUpdateRequestStatusDetails.ts deleted file mode 100644 index 6f124b797c..0000000000 --- a/web/packages/sdk/generated/platform/schema/PlatformJobStatusUpdateRequestStatusDetails.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional status details related to the status update. - */ -export type PlatformJobStatusUpdateRequestStatusDetails = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/PlatformJobStep.ts b/web/packages/sdk/generated/platform/schema/PlatformJobStep.ts deleted file mode 100644 index 402cae6c85..0000000000 --- a/web/packages/sdk/generated/platform/schema/PlatformJobStep.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { PlatformJobStatus } from './PlatformJobStatus'; -import type { PlatformJobStepConfig } from './PlatformJobStepConfig'; -import type { PlatformJobStepErrorDetails } from './PlatformJobStepErrorDetails'; -import type { PlatformJobStepStatusDetails } from './PlatformJobStepStatusDetails'; - -/** - * A single step within an attempt. - -Parent-scoped: unique within (workspace, entity_type, parent=attempt_id). - */ -export interface PlatformJobStep { - /** Entity name within the workspace */ - name?: string; - /** - * Workspace identifier - * @pattern ^[\w\-\+.@:]+$ - */ - workspace: string; - /** The name of the project associated with this entity. */ - project?: string; - /** Parent attempt ID */ - attempt_id: string; - /** Configuration for the step */ - config?: PlatformJobStepConfig; - /** Step status */ - status?: PlatformJobStatus; - /** Status details */ - status_details?: PlatformJobStepStatusDetails; - /** Error details if applicable */ - error_details?: PlatformJobStepErrorDetails; - readonly id: string; - readonly created_at: string; - readonly created_by: string | null; - readonly updated_at: string; - readonly updated_by: string | null; - /** Alias for id for backwards compatibility. */ - readonly entity_id: string; - /** Parent entity ID for nested entities. */ - readonly parent: string; -} diff --git a/web/packages/sdk/generated/platform/schema/PlatformJobStepConfig.ts b/web/packages/sdk/generated/platform/schema/PlatformJobStepConfig.ts deleted file mode 100644 index 9de889f5e8..0000000000 --- a/web/packages/sdk/generated/platform/schema/PlatformJobStepConfig.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Configuration for the step - */ -export type PlatformJobStepConfig = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/PlatformJobStepErrorDetails.ts b/web/packages/sdk/generated/platform/schema/PlatformJobStepErrorDetails.ts deleted file mode 100644 index 72352d0c1d..0000000000 --- a/web/packages/sdk/generated/platform/schema/PlatformJobStepErrorDetails.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Error details if applicable - */ -export type PlatformJobStepErrorDetails = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/PlatformJobStepSpecInput.ts b/web/packages/sdk/generated/platform/schema/PlatformJobStepSpecInput.ts deleted file mode 100644 index 52d4ee50e9..0000000000 --- a/web/packages/sdk/generated/platform/schema/PlatformJobStepSpecInput.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { CPUExecutionProviderInput } from './CPUExecutionProviderInput'; -import type { DistributedGPUExecutionProviderInput } from './DistributedGPUExecutionProviderInput'; -import type { GPUExecutionProviderInput } from './GPUExecutionProviderInput'; -import type { PlatformJobEnvironmentVariable } from './PlatformJobEnvironmentVariable'; -import type { PlatformJobStepSpecInputConfig } from './PlatformJobStepSpecInputConfig'; -import type { StepLifecycle } from './StepLifecycle'; -import type { SubprocessExecutionProvider } from './SubprocessExecutionProvider'; - -/** - * Specification for a single step in a platform job. - */ -export interface PlatformJobStepSpecInput { - /** - * The name of the step. Must be unique for all steps in a job. Name must start with a lowercase letter, be 2-63 characters, and contain only lowercase letters, digits, and hyphens (no consecutive hyphens, cannot end with a hyphen). - * @pattern ^[a-z](?!.*--)[a-z0-9\-@.+_]{1,62}(? traces) for content safety models. If False, use low-latency mode without reasoning traces. */ - enabled?: boolean; -} diff --git a/web/packages/sdk/generated/platform/schema/ReasoningParams.ts b/web/packages/sdk/generated/platform/schema/ReasoningParams.ts deleted file mode 100644 index bea7e7fff5..0000000000 --- a/web/packages/sdk/generated/platform/schema/ReasoningParams.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Custom settings that control the model's reasoning behavior. - */ -export interface ReasoningParams { - /** Configure the end token to trim reasoning context based on the model's reasoning API. Example for Nemotron models: '' */ - end_token?: string; - /** Configure whether to include reasoning context if the model has not finished reasoning. */ - include_if_not_finished?: boolean; - /** Option for OpenAI models to specify low, medium, or high reasoning effort. */ - effort?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/RegexDetection.ts b/web/packages/sdk/generated/platform/schema/RegexDetection.ts deleted file mode 100644 index 6a816b47e1..0000000000 --- a/web/packages/sdk/generated/platform/schema/RegexDetection.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { RegexDetectionOptions } from './RegexDetectionOptions'; - -/** - * Configuration for regex pattern detection. - */ -export interface RegexDetection { - /** Configuration for regex patterns to detect on user input. */ - input?: RegexDetectionOptions; - /** Configuration for regex patterns to detect on bot output. */ - output?: RegexDetectionOptions; - /** Configuration for regex patterns to detect on retrieved relevant chunks. */ - retrieval?: RegexDetectionOptions; -} diff --git a/web/packages/sdk/generated/platform/schema/RegexDetectionOptions.ts b/web/packages/sdk/generated/platform/schema/RegexDetectionOptions.ts deleted file mode 100644 index 04207f0830..0000000000 --- a/web/packages/sdk/generated/platform/schema/RegexDetectionOptions.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Configuration options for regex pattern detection on a specific source. - */ -export interface RegexDetectionOptions { - /** List of regex patterns to match against the text. */ - patterns?: string[]; - /** Whether to perform case-insensitive matching. */ - case_insensitive?: boolean; -} diff --git a/web/packages/sdk/generated/platform/schema/RegexScoreParser.ts b/web/packages/sdk/generated/platform/schema/RegexScoreParser.ts deleted file mode 100644 index 85bbf50dda..0000000000 --- a/web/packages/sdk/generated/platform/schema/RegexScoreParser.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { RegexScoreParserMethod } from './RegexScoreParserMethod'; - -/** - * Parse a score from content in any format using regular expression. - */ -export interface RegexScoreParser { - type?: 'regex'; - /** The regular expression to parse the score from the judge response. */ - pattern: string; - /** The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning. */ - method?: RegexScoreParserMethod; -} diff --git a/web/packages/sdk/generated/platform/schema/RegexScoreParserMethod.ts b/web/packages/sdk/generated/platform/schema/RegexScoreParserMethod.ts deleted file mode 100644 index 3121525e27..0000000000 --- a/web/packages/sdk/generated/platform/schema/RegexScoreParserMethod.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning. - */ -export type RegexScoreParserMethod = - (typeof RegexScoreParserMethod)[keyof typeof RegexScoreParserMethod]; - -export const RegexScoreParserMethod = { - search: 'search', - match: 'match', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/RemoteMetric.ts b/web/packages/sdk/generated/platform/schema/RemoteMetric.ts deleted file mode 100644 index 1dcd917ae2..0000000000 --- a/web/packages/sdk/generated/platform/schema/RemoteMetric.ts +++ /dev/null @@ -1,56 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { RemoteMetricBody } from './RemoteMetricBody'; -import type { RemoteMetricLabels } from './RemoteMetricLabels'; -import type { RemoteMetricSupportedJobTypesItem } from './RemoteMetricSupportedJobTypesItem'; -import type { RemoteScore } from './RemoteScore'; -import type { SecretRef } from './SecretRef'; - -/** - * Persisted Remote metric. - */ -export interface RemoteMetric { - /** Entity name within the workspace */ - name?: string; - /** - * Workspace identifier - * @pattern ^[\w\-\+.@:]+$ - */ - workspace: string; - /** The name of the project associated with this entity. */ - project?: string; - type?: 'remote'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: RemoteMetricLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: RemoteMetricSupportedJobTypesItem[]; - /** The URL of the remote endpoint. */ - url: string; - /** Optional secret reference of an API key for authentication. Format: workspace/secret_name or secret_name within the job workspace. */ - api_key_secret?: SecretRef; - /** Request timeout in seconds. */ - timeout_seconds?: number; - /** Maximum number of retry attempts. */ - max_retries?: number; - /** Jinja template for request payload */ - body: RemoteMetricBody; - /** List of scores to extract from the remote response */ - scores: RemoteScore[]; - readonly id: string; - readonly created_at: string; - readonly created_by: string | null; - readonly updated_at: string; - readonly updated_by: string | null; - /** Alias for id for backwards compatibility. */ - readonly entity_id: string; - /** Parent entity ID for nested entities. */ - readonly parent: string; -} diff --git a/web/packages/sdk/generated/platform/schema/RemoteMetricBody.ts b/web/packages/sdk/generated/platform/schema/RemoteMetricBody.ts deleted file mode 100644 index b5beca9aa8..0000000000 --- a/web/packages/sdk/generated/platform/schema/RemoteMetricBody.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Jinja template for request payload - */ -export type RemoteMetricBody = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/RemoteMetricInput.ts b/web/packages/sdk/generated/platform/schema/RemoteMetricInput.ts deleted file mode 100644 index e331637a71..0000000000 --- a/web/packages/sdk/generated/platform/schema/RemoteMetricInput.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { RemoteMetricInputBody } from './RemoteMetricInputBody'; -import type { RemoteMetricInputLabels } from './RemoteMetricInputLabels'; -import type { RemoteMetricInputSupportedJobTypesItem } from './RemoteMetricInputSupportedJobTypesItem'; -import type { RemoteScore } from './RemoteScore'; -import type { SecretRef } from './SecretRef'; - -/** - * Request type for RemoteMetric. A metric that computes scores via a remote endpoint. - */ -export interface RemoteMetricInput { - type?: 'remote'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: RemoteMetricInputLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: RemoteMetricInputSupportedJobTypesItem[]; - /** The URL of the remote endpoint. */ - url: string; - /** Optional secret reference of an API key for authentication. Format: workspace/secret_name or secret_name within the job workspace. */ - api_key_secret?: SecretRef; - /** Request timeout in seconds. */ - timeout_seconds?: number; - /** Maximum number of retry attempts. */ - max_retries?: number; - /** Jinja template for request payload */ - body: RemoteMetricInputBody; - /** List of scores to extract from the remote response */ - scores: RemoteScore[]; -} diff --git a/web/packages/sdk/generated/platform/schema/RemoteMetricInputBody.ts b/web/packages/sdk/generated/platform/schema/RemoteMetricInputBody.ts deleted file mode 100644 index b283791eff..0000000000 --- a/web/packages/sdk/generated/platform/schema/RemoteMetricInputBody.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Jinja template for request payload - */ -export type RemoteMetricInputBody = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/RemoteMetricInputLabels.ts b/web/packages/sdk/generated/platform/schema/RemoteMetricInputLabels.ts deleted file mode 100644 index c015263bba..0000000000 --- a/web/packages/sdk/generated/platform/schema/RemoteMetricInputLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type RemoteMetricInputLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/RemoteMetricInputSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/RemoteMetricInputSupportedJobTypesItem.ts deleted file mode 100644 index 7c4f5f7a72..0000000000 --- a/web/packages/sdk/generated/platform/schema/RemoteMetricInputSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type RemoteMetricInputSupportedJobTypesItem = - (typeof RemoteMetricInputSupportedJobTypesItem)[keyof typeof RemoteMetricInputSupportedJobTypesItem]; - -export const RemoteMetricInputSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/RemoteMetricLabels.ts b/web/packages/sdk/generated/platform/schema/RemoteMetricLabels.ts deleted file mode 100644 index b97d72fd79..0000000000 --- a/web/packages/sdk/generated/platform/schema/RemoteMetricLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type RemoteMetricLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/RemoteMetricResponse.ts b/web/packages/sdk/generated/platform/schema/RemoteMetricResponse.ts deleted file mode 100644 index 90c7cd975b..0000000000 --- a/web/packages/sdk/generated/platform/schema/RemoteMetricResponse.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { RemoteMetricResponseBody } from './RemoteMetricResponseBody'; -import type { RemoteMetricResponseLabels } from './RemoteMetricResponseLabels'; -import type { RemoteMetricResponseSupportedJobTypesItem } from './RemoteMetricResponseSupportedJobTypesItem'; -import type { RemoteScore } from './RemoteScore'; -import type { SecretRef } from './SecretRef'; - -/** - * Response type for RemoteMetric. - */ -export interface RemoteMetricResponse { - /** Entity name within the workspace */ - name?: string; - /** Workspace identifier */ - workspace?: string; - /** The name of the project associated with this entity. */ - project?: string; - /** Entity name within the workspace */ - id?: string; - created_at?: string; - updated_at?: string; - parent?: string; - type?: 'remote'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: RemoteMetricResponseLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: RemoteMetricResponseSupportedJobTypesItem[]; - /** The URL of the remote endpoint. */ - url: string; - /** Optional secret reference of an API key for authentication. Format: workspace/secret_name or secret_name within the job workspace. */ - api_key_secret?: SecretRef; - /** Request timeout in seconds. */ - timeout_seconds?: number; - /** Maximum number of retry attempts. */ - max_retries?: number; - /** Jinja template for request payload */ - body: RemoteMetricResponseBody; - /** List of scores to extract from the remote response */ - scores: RemoteScore[]; -} diff --git a/web/packages/sdk/generated/platform/schema/RemoteMetricResponseBody.ts b/web/packages/sdk/generated/platform/schema/RemoteMetricResponseBody.ts deleted file mode 100644 index 0bf3ba9d2e..0000000000 --- a/web/packages/sdk/generated/platform/schema/RemoteMetricResponseBody.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Jinja template for request payload - */ -export type RemoteMetricResponseBody = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/RemoteMetricResponseLabels.ts b/web/packages/sdk/generated/platform/schema/RemoteMetricResponseLabels.ts deleted file mode 100644 index d477c128d4..0000000000 --- a/web/packages/sdk/generated/platform/schema/RemoteMetricResponseLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type RemoteMetricResponseLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/RemoteMetricResponseSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/RemoteMetricResponseSupportedJobTypesItem.ts deleted file mode 100644 index fa55b44a49..0000000000 --- a/web/packages/sdk/generated/platform/schema/RemoteMetricResponseSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type RemoteMetricResponseSupportedJobTypesItem = - (typeof RemoteMetricResponseSupportedJobTypesItem)[keyof typeof RemoteMetricResponseSupportedJobTypesItem]; - -export const RemoteMetricResponseSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/RemoteMetricSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/RemoteMetricSupportedJobTypesItem.ts deleted file mode 100644 index 5c72ad4274..0000000000 --- a/web/packages/sdk/generated/platform/schema/RemoteMetricSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type RemoteMetricSupportedJobTypesItem = - (typeof RemoteMetricSupportedJobTypesItem)[keyof typeof RemoteMetricSupportedJobTypesItem]; - -export const RemoteMetricSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/RemoteScore.ts b/web/packages/sdk/generated/platform/schema/RemoteScore.ts deleted file mode 100644 index 557be04f68..0000000000 --- a/web/packages/sdk/generated/platform/schema/RemoteScore.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { JSONScoreParser } from './JSONScoreParser'; - -/** - * Score configuration for remote metrics. - -Unlike RangeScore, minimum and maximum are optional (default to None = no bounds). -This avoids JSON serialization issues with infinity values. - */ -export interface RemoteScore { - /** - * The name of the score. Only lowercase letters, numbers, and underscores allowed. - * @pattern ^[a-z0-9_]+$ - */ - name: string; - /** Human-readable description of the score. */ - description?: string; - /** The method to parse the score. Only JSON parsing is supported for remote metrics. */ - parser?: JSONScoreParser; - /** Minimum value for the score range. Defaults to None (no lower bound). */ - minimum?: number; - /** Maximum value for the score range. Defaults to None (no upper bound). */ - maximum?: number; -} diff --git a/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetric.ts b/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetric.ts deleted file mode 100644 index 08ac7383c5..0000000000 --- a/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetric.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { EvaluatorModel } from './EvaluatorModel'; -import type { InferenceParams } from './InferenceParams'; -import type { ResponseGroundednessMetricInputTemplate } from './ResponseGroundednessMetricInputTemplate'; -import type { ResponseGroundednessMetricLabels } from './ResponseGroundednessMetricLabels'; -import type { ResponseGroundednessMetricSupportedJobTypesItem } from './ResponseGroundednessMetricSupportedJobTypesItem'; - -/** - * RAGAS metric for measuring response groundedness. - */ -export interface ResponseGroundednessMetric { - /** Entity name within the workspace */ - name?: string; - /** - * Workspace identifier - * @pattern ^[\w\-\+.@:]+$ - */ - workspace: string; - /** The name of the project associated with this entity. */ - project?: string; - /** The LLM model to use as judge. */ - judge_model: EvaluatorModel; - /** Inference parameters for the judge. */ - inference?: InferenceParams; - /** If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse/output formatting failures are always converted to NaN. */ - ignore_request_failure?: boolean; - type?: 'response_groundedness'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: ResponseGroundednessMetricLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: ResponseGroundednessMetricSupportedJobTypesItem[]; - /** Optional Jinja template for rendering the input payload for RAGAS evaluation. */ - input_template?: ResponseGroundednessMetricInputTemplate; - readonly id: string; - readonly created_at: string; - readonly created_by: string | null; - readonly updated_at: string; - readonly updated_by: string | null; - /** Alias for id for backwards compatibility. */ - readonly entity_id: string; - /** Parent entity ID for nested entities. */ - readonly parent: string; -} diff --git a/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetricInput.ts b/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetricInput.ts deleted file mode 100644 index a81745dc66..0000000000 --- a/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetricInput.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { EvaluatorModel } from './EvaluatorModel'; -import type { InferenceParams } from './InferenceParams'; -import type { ModelRef } from './ModelRef'; -import type { ResponseGroundednessMetricInputInputTemplate } from './ResponseGroundednessMetricInputInputTemplate'; -import type { ResponseGroundednessMetricInputLabels } from './ResponseGroundednessMetricInputLabels'; -import type { ResponseGroundednessMetricInputSupportedJobTypesItem } from './ResponseGroundednessMetricInputSupportedJobTypesItem'; - -/** - * Request type for ResponseGroundedness metrics. - */ -export interface ResponseGroundednessMetricInput { - /** The judge model configuration. */ - judge_model: EvaluatorModel | ModelRef; - /** Inference parameters for the judge. */ - inference?: InferenceParams; - /** If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse/output formatting failures are always converted to NaN. */ - ignore_request_failure?: boolean; - type?: 'response_groundedness'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: ResponseGroundednessMetricInputLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: ResponseGroundednessMetricInputSupportedJobTypesItem[]; - /** Optional Jinja template for rendering the input payload for RAGAS evaluation. */ - input_template?: ResponseGroundednessMetricInputInputTemplate; -} diff --git a/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetricInputInputTemplate.ts b/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetricInputInputTemplate.ts deleted file mode 100644 index 9afb1c6950..0000000000 --- a/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetricInputInputTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional Jinja template for rendering the input payload for RAGAS evaluation. - */ -export type ResponseGroundednessMetricInputInputTemplate = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetricInputLabels.ts b/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetricInputLabels.ts deleted file mode 100644 index d8d8c88f7e..0000000000 --- a/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetricInputLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type ResponseGroundednessMetricInputLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetricInputSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetricInputSupportedJobTypesItem.ts deleted file mode 100644 index 52a13b0288..0000000000 --- a/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetricInputSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type ResponseGroundednessMetricInputSupportedJobTypesItem = - (typeof ResponseGroundednessMetricInputSupportedJobTypesItem)[keyof typeof ResponseGroundednessMetricInputSupportedJobTypesItem]; - -export const ResponseGroundednessMetricInputSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetricInputTemplate.ts b/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetricInputTemplate.ts deleted file mode 100644 index 0deab8a9b0..0000000000 --- a/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetricInputTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional Jinja template for rendering the input payload for RAGAS evaluation. - */ -export type ResponseGroundednessMetricInputTemplate = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetricLabels.ts b/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetricLabels.ts deleted file mode 100644 index 94ba696016..0000000000 --- a/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetricLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type ResponseGroundednessMetricLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetricResponse.ts b/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetricResponse.ts deleted file mode 100644 index 9576e8f7c1..0000000000 --- a/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetricResponse.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { EvaluatorModel } from './EvaluatorModel'; -import type { InferenceParams } from './InferenceParams'; -import type { ModelRef } from './ModelRef'; -import type { ResponseGroundednessMetricResponseInputTemplate } from './ResponseGroundednessMetricResponseInputTemplate'; -import type { ResponseGroundednessMetricResponseLabels } from './ResponseGroundednessMetricResponseLabels'; -import type { ResponseGroundednessMetricResponseSupportedJobTypesItem } from './ResponseGroundednessMetricResponseSupportedJobTypesItem'; - -/** - * Response type for ResponseGroundedness metrics. - */ -export interface ResponseGroundednessMetricResponse { - /** Entity name within the workspace */ - name?: string; - /** Workspace identifier */ - workspace?: string; - /** The name of the project associated with this entity. */ - project?: string; - /** Entity name within the workspace */ - id?: string; - created_at?: string; - updated_at?: string; - parent?: string; - /** The judge model configuration. */ - judge_model: EvaluatorModel | ModelRef; - /** Inference parameters for the judge. */ - inference?: InferenceParams; - /** If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse/output formatting failures are always converted to NaN. */ - ignore_request_failure?: boolean; - type?: 'response_groundedness'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: ResponseGroundednessMetricResponseLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: ResponseGroundednessMetricResponseSupportedJobTypesItem[]; - /** Optional Jinja template for rendering the input payload for RAGAS evaluation. */ - input_template?: ResponseGroundednessMetricResponseInputTemplate; -} diff --git a/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetricResponseInputTemplate.ts b/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetricResponseInputTemplate.ts deleted file mode 100644 index 3fb643a543..0000000000 --- a/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetricResponseInputTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional Jinja template for rendering the input payload for RAGAS evaluation. - */ -export type ResponseGroundednessMetricResponseInputTemplate = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetricResponseLabels.ts b/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetricResponseLabels.ts deleted file mode 100644 index 7f25580c42..0000000000 --- a/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetricResponseLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type ResponseGroundednessMetricResponseLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetricResponseSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetricResponseSupportedJobTypesItem.ts deleted file mode 100644 index 3b561e61a8..0000000000 --- a/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetricResponseSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type ResponseGroundednessMetricResponseSupportedJobTypesItem = - (typeof ResponseGroundednessMetricResponseSupportedJobTypesItem)[keyof typeof ResponseGroundednessMetricResponseSupportedJobTypesItem]; - -export const ResponseGroundednessMetricResponseSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetricSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetricSupportedJobTypesItem.ts deleted file mode 100644 index cae9d86328..0000000000 --- a/web/packages/sdk/generated/platform/schema/ResponseGroundednessMetricSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type ResponseGroundednessMetricSupportedJobTypesItem = - (typeof ResponseGroundednessMetricSupportedJobTypesItem)[keyof typeof ResponseGroundednessMetricSupportedJobTypesItem]; - -export const ResponseGroundednessMetricSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetric.ts b/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetric.ts deleted file mode 100644 index b7cb82d2ac..0000000000 --- a/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetric.ts +++ /dev/null @@ -1,56 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { EvaluatorModel } from './EvaluatorModel'; -import type { InferenceParams } from './InferenceParams'; -import type { ResponseRelevancyMetricInputTemplate } from './ResponseRelevancyMetricInputTemplate'; -import type { ResponseRelevancyMetricLabels } from './ResponseRelevancyMetricLabels'; -import type { ResponseRelevancyMetricSupportedJobTypesItem } from './ResponseRelevancyMetricSupportedJobTypesItem'; - -/** - * RAGAS metric for measuring response relevancy. - */ -export interface ResponseRelevancyMetric { - /** Entity name within the workspace */ - name?: string; - /** - * Workspace identifier - * @pattern ^[\w\-\+.@:]+$ - */ - workspace: string; - /** The name of the project associated with this entity. */ - project?: string; - /** The embeddings model to use. */ - embeddings_model: EvaluatorModel; - /** The LLM model to use as judge. */ - judge_model: EvaluatorModel; - /** Inference parameters for the judge. */ - inference?: InferenceParams; - /** If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse/output formatting failures are always converted to NaN. */ - ignore_request_failure?: boolean; - type?: 'response_relevancy'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: ResponseRelevancyMetricLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: ResponseRelevancyMetricSupportedJobTypesItem[]; - /** Optional Jinja template for rendering the input payload for RAGAS evaluation. */ - input_template?: ResponseRelevancyMetricInputTemplate; - /** Number of parallel questions generated. NIM can only generate 1. */ - strictness?: number; - readonly id: string; - readonly created_at: string; - readonly created_by: string | null; - readonly updated_at: string; - readonly updated_by: string | null; - /** Alias for id for backwards compatibility. */ - readonly entity_id: string; - /** Parent entity ID for nested entities. */ - readonly parent: string; -} diff --git a/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetricInput.ts b/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetricInput.ts deleted file mode 100644 index 8f333f4980..0000000000 --- a/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetricInput.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { EvaluatorModel } from './EvaluatorModel'; -import type { InferenceParams } from './InferenceParams'; -import type { ModelRef } from './ModelRef'; -import type { ResponseRelevancyMetricInputInputTemplate } from './ResponseRelevancyMetricInputInputTemplate'; -import type { ResponseRelevancyMetricInputLabels } from './ResponseRelevancyMetricInputLabels'; -import type { ResponseRelevancyMetricInputSupportedJobTypesItem } from './ResponseRelevancyMetricInputSupportedJobTypesItem'; - -/** - * Request type for ResponseRelevancy metrics. - */ -export interface ResponseRelevancyMetricInput { - /** The embeddings model configuration. */ - embeddings_model: EvaluatorModel | ModelRef; - /** The judge model configuration. */ - judge_model: EvaluatorModel | ModelRef; - /** Inference parameters for the judge. */ - inference?: InferenceParams; - /** If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse/output formatting failures are always converted to NaN. */ - ignore_request_failure?: boolean; - type?: 'response_relevancy'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: ResponseRelevancyMetricInputLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: ResponseRelevancyMetricInputSupportedJobTypesItem[]; - /** Optional Jinja template for rendering the input payload for RAGAS evaluation. */ - input_template?: ResponseRelevancyMetricInputInputTemplate; - /** Number of parallel questions generated. NIM can only generate 1. */ - strictness?: number; -} diff --git a/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetricInputInputTemplate.ts b/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetricInputInputTemplate.ts deleted file mode 100644 index 877b6e3f7f..0000000000 --- a/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetricInputInputTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional Jinja template for rendering the input payload for RAGAS evaluation. - */ -export type ResponseRelevancyMetricInputInputTemplate = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetricInputLabels.ts b/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetricInputLabels.ts deleted file mode 100644 index 8e4e22fb8f..0000000000 --- a/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetricInputLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type ResponseRelevancyMetricInputLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetricInputSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetricInputSupportedJobTypesItem.ts deleted file mode 100644 index fc7da0dea6..0000000000 --- a/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetricInputSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type ResponseRelevancyMetricInputSupportedJobTypesItem = - (typeof ResponseRelevancyMetricInputSupportedJobTypesItem)[keyof typeof ResponseRelevancyMetricInputSupportedJobTypesItem]; - -export const ResponseRelevancyMetricInputSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetricInputTemplate.ts b/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetricInputTemplate.ts deleted file mode 100644 index 9d5b107387..0000000000 --- a/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetricInputTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional Jinja template for rendering the input payload for RAGAS evaluation. - */ -export type ResponseRelevancyMetricInputTemplate = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetricLabels.ts b/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetricLabels.ts deleted file mode 100644 index 301bdf02c9..0000000000 --- a/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetricLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type ResponseRelevancyMetricLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetricResponse.ts b/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetricResponse.ts deleted file mode 100644 index 63dfe8bc26..0000000000 --- a/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetricResponse.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { EvaluatorModel } from './EvaluatorModel'; -import type { InferenceParams } from './InferenceParams'; -import type { ModelRef } from './ModelRef'; -import type { ResponseRelevancyMetricResponseInputTemplate } from './ResponseRelevancyMetricResponseInputTemplate'; -import type { ResponseRelevancyMetricResponseLabels } from './ResponseRelevancyMetricResponseLabels'; -import type { ResponseRelevancyMetricResponseSupportedJobTypesItem } from './ResponseRelevancyMetricResponseSupportedJobTypesItem'; - -/** - * Response type for ResponseRelevancy metrics. - */ -export interface ResponseRelevancyMetricResponse { - /** Entity name within the workspace */ - name?: string; - /** Workspace identifier */ - workspace?: string; - /** The name of the project associated with this entity. */ - project?: string; - /** Entity name within the workspace */ - id?: string; - created_at?: string; - updated_at?: string; - parent?: string; - /** The embeddings model configuration. */ - embeddings_model: EvaluatorModel | ModelRef; - /** The judge model configuration. */ - judge_model: EvaluatorModel | ModelRef; - /** Inference parameters for the judge. */ - inference?: InferenceParams; - /** If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse/output formatting failures are always converted to NaN. */ - ignore_request_failure?: boolean; - type?: 'response_relevancy'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: ResponseRelevancyMetricResponseLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: ResponseRelevancyMetricResponseSupportedJobTypesItem[]; - /** Optional Jinja template for rendering the input payload for RAGAS evaluation. */ - input_template?: ResponseRelevancyMetricResponseInputTemplate; - /** Number of parallel questions generated. NIM can only generate 1. */ - strictness?: number; -} diff --git a/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetricResponseInputTemplate.ts b/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetricResponseInputTemplate.ts deleted file mode 100644 index b12507fd8e..0000000000 --- a/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetricResponseInputTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional Jinja template for rendering the input payload for RAGAS evaluation. - */ -export type ResponseRelevancyMetricResponseInputTemplate = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetricResponseLabels.ts b/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetricResponseLabels.ts deleted file mode 100644 index 202c32c8bb..0000000000 --- a/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetricResponseLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type ResponseRelevancyMetricResponseLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetricResponseSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetricResponseSupportedJobTypesItem.ts deleted file mode 100644 index e9b496e4ab..0000000000 --- a/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetricResponseSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type ResponseRelevancyMetricResponseSupportedJobTypesItem = - (typeof ResponseRelevancyMetricResponseSupportedJobTypesItem)[keyof typeof ResponseRelevancyMetricResponseSupportedJobTypesItem]; - -export const ResponseRelevancyMetricResponseSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetricSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetricSupportedJobTypesItem.ts deleted file mode 100644 index ce3b923311..0000000000 --- a/web/packages/sdk/generated/platform/schema/ResponseRelevancyMetricSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type ResponseRelevancyMetricSupportedJobTypesItem = - (typeof ResponseRelevancyMetricSupportedJobTypesItem)[keyof typeof ResponseRelevancyMetricSupportedJobTypesItem]; - -export const ResponseRelevancyMetricSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/RetrievalRails.ts b/web/packages/sdk/generated/platform/schema/RetrievalRails.ts deleted file mode 100644 index 4b0914f564..0000000000 --- a/web/packages/sdk/generated/platform/schema/RetrievalRails.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Configuration of retrieval rails. - */ -export interface RetrievalRails { - /** The names of all the flows that implement retrieval rails. */ - flows?: string[]; -} diff --git a/web/packages/sdk/generated/platform/schema/RetrieverPipelineInput.ts b/web/packages/sdk/generated/platform/schema/RetrieverPipelineInput.ts deleted file mode 100644 index a78178237b..0000000000 --- a/web/packages/sdk/generated/platform/schema/RetrieverPipelineInput.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { EvaluatorModel } from './EvaluatorModel'; -import type { ModelRef } from './ModelRef'; - -/** - * Pipeline configuration for retriever-based evaluations. - */ -export interface RetrieverPipelineInput { - /** The embeddings model configuration. */ - embeddings_model: EvaluatorModel | ModelRef; -} diff --git a/web/packages/sdk/generated/platform/schema/ReviewerAnnotationEvent.ts b/web/packages/sdk/generated/platform/schema/ReviewerAnnotationEvent.ts deleted file mode 100644 index fa7e4d7a61..0000000000 --- a/web/packages/sdk/generated/platform/schema/ReviewerAnnotationEvent.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ReviewerAnnotationEventCategories } from './ReviewerAnnotationEventCategories'; -import type { ReviewerAnnotationEventCreatedBy } from './ReviewerAnnotationEventCreatedBy'; -import type { ReviewerAnnotationEventResponseOverride } from './ReviewerAnnotationEventResponseOverride'; -import type { ThumbDirection } from './ThumbDirection'; - -/** - * Structured annotation supplied by a reviewer or expert evaluator. - -A reviewer annotation is similar to user feedback but includes an additional capability -to provide a complete replacement response. This is useful when human experts need to -correct not just the text but also structured elements like tool calls, function outputs, -or other response metadata. - -Inherits all feedback fields from UserFeedbackEvent (thumb, rating, opinion, rewrite, -chosen_index, categories) and adds response_override for full response replacement. - */ -export interface ReviewerAnnotationEvent { - /** Unique identifier for the event. Populated when retrieved from database. */ - id?: string; - /** UTC timestamp when the record was created. */ - created_at?: string; - /** Identifier of the user or system that generated the record. Can be set of key-value pairs. */ - created_by?: ReviewerAnnotationEventCreatedBy; - event_type?: 'reviewer_annotation'; - /** Binary feedback: "up" for šŸ‘ or "down" for šŸ‘Ž. Mutually exclusive with `rating`. Use this for simple thumbs up/down UI elements. */ - thumb?: ThumbDirection; - /** - * Numeric rating (e.g., 1-5 stars) provided by the end user. Mutually exclusive with `thumb`. Use this for star ratings or numeric scales. - * @minimum 0 - */ - rating?: number; - /** - * Free-text comment from the end user describing their opinion of the response. - * @minLength 1 - * @maxLength 2000 - */ - opinion?: string; - /** - * End-user's suggested text replacement for the generated response. This is the user's idea of what the response should have been. - * @minLength 1 - * @maxLength 10000 - */ - rewrite?: string; - /** - * Zero-based index of the response option the user selected when multiple responses were returned. Use this when showing users multiple completion choices and tracking which one they picked. - * @minimum 0 - */ - chosen_index?: number; - /** Application-specific category ratings as key-value pairs. Use this for custom rating dimensions (e.g., {'helpfulness': 4, 'accuracy': 5, 'tone': 'professional'}). Useful for radio buttons, dropdowns, or multi-dimensional rating systems. */ - categories?: ReviewerAnnotationEventCategories; - /** Complete JSON object that replaces the original model response when exporting data. Unlike the `rewrite` field (which is just text), this can include tool calls, function outputs, and all other response metadata. When an entry with response_override is exported, you can choose to use this corrected response instead of the original. Example: {'choices': [{'message': {'role': 'assistant', 'content': 'Corrected text', 'tool_calls': [...]}}]} */ - response_override?: ReviewerAnnotationEventResponseOverride; -} diff --git a/web/packages/sdk/generated/platform/schema/ReviewerAnnotationEventCategories.ts b/web/packages/sdk/generated/platform/schema/ReviewerAnnotationEventCategories.ts deleted file mode 100644 index 11d2be4c66..0000000000 --- a/web/packages/sdk/generated/platform/schema/ReviewerAnnotationEventCategories.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Application-specific category ratings as key-value pairs. Use this for custom rating dimensions (e.g., {'helpfulness': 4, 'accuracy': 5, 'tone': 'professional'}). Useful for radio buttons, dropdowns, or multi-dimensional rating systems. - */ -export type ReviewerAnnotationEventCategories = { [key: string]: number | string }; diff --git a/web/packages/sdk/generated/platform/schema/ReviewerAnnotationEventCreatedBy.ts b/web/packages/sdk/generated/platform/schema/ReviewerAnnotationEventCreatedBy.ts deleted file mode 100644 index 3d42648ec6..0000000000 --- a/web/packages/sdk/generated/platform/schema/ReviewerAnnotationEventCreatedBy.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Identifier of the user or system that generated the record. Can be set of key-value pairs. - */ -export type ReviewerAnnotationEventCreatedBy = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/ReviewerAnnotationEventResponseOverride.ts b/web/packages/sdk/generated/platform/schema/ReviewerAnnotationEventResponseOverride.ts deleted file mode 100644 index 0b2541b2d1..0000000000 --- a/web/packages/sdk/generated/platform/schema/ReviewerAnnotationEventResponseOverride.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Complete JSON object that replaces the original model response when exporting data. Unlike the `rewrite` field (which is just text), this can include tool calls, function outputs, and all other response metadata. When an entry with response_override is exported, you can choose to use this corrected response instead of the original. Example: {'choices': [{'message': {'role': 'assistant', 'content': 'Corrected text', 'tool_calls': [...]}}]} - */ -export type ReviewerAnnotationEventResponseOverride = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/RoleBinding.ts b/web/packages/sdk/generated/platform/schema/RoleBinding.ts deleted file mode 100644 index 55c067b15e..0000000000 --- a/web/packages/sdk/generated/platform/schema/RoleBinding.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Role binding response model. - */ -export interface RoleBinding { - id: string; - name: string; - principal: string; - workspace: string; - role: string; - granted_by: string; - granted_at: string; - revoked_at: string; -} diff --git a/web/packages/sdk/generated/platform/schema/RoleBindingFilter.ts b/web/packages/sdk/generated/platform/schema/RoleBindingFilter.ts deleted file mode 100644 index e23b2f6a45..0000000000 --- a/web/packages/sdk/generated/platform/schema/RoleBindingFilter.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { DateRangeFilter } from './DateRangeFilter'; - -/** - * Filter for role bindings. - */ -export interface RoleBindingFilter { - /** Filter by principal ID */ - principal?: string; - /** Filter by workspace */ - workspace?: string; - /** Filter by role */ - role?: string; - /** Filter by who granted the role */ - granted_by?: string; - /** Filter for active (True) or revoked (False) bindings */ - is_active?: boolean; - /** Filter by granted date range */ - granted_at?: DateRangeFilter; - /** Filter by revoked date range */ - revoked_at?: DateRangeFilter; -} diff --git a/web/packages/sdk/generated/platform/schema/RoleBindingInput.ts b/web/packages/sdk/generated/platform/schema/RoleBindingInput.ts deleted file mode 100644 index da6e3ea3ae..0000000000 --- a/web/packages/sdk/generated/platform/schema/RoleBindingInput.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Input schema for creating a role binding. - */ -export interface RoleBindingInput { - /** The principal identifier (email, user ID, or group ID) */ - principal: string; - /** The workspace this binding applies to. None for platform-level roles. */ - workspace?: string; - /** The role name (e.g., 'Viewer', 'Editor', 'Admin') */ - role: string; -} diff --git a/web/packages/sdk/generated/platform/schema/RoleBindingsPage.ts b/web/packages/sdk/generated/platform/schema/RoleBindingsPage.ts deleted file mode 100644 index 89c5c39073..0000000000 --- a/web/packages/sdk/generated/platform/schema/RoleBindingsPage.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { PaginationData } from './PaginationData'; -import type { RoleBinding } from './RoleBinding'; -import type { RoleBindingsPageFilter } from './RoleBindingsPageFilter'; - -export interface RoleBindingsPage { - data: RoleBinding[]; - /** Pagination information. */ - pagination?: PaginationData; - /** The field on which the results are sorted. */ - sort?: string; - /** Filtering information. */ - filter?: RoleBindingsPageFilter; -} diff --git a/web/packages/sdk/generated/platform/schema/RoleBindingsPageFilter.ts b/web/packages/sdk/generated/platform/schema/RoleBindingsPageFilter.ts deleted file mode 100644 index cb11a3d288..0000000000 --- a/web/packages/sdk/generated/platform/schema/RoleBindingsPageFilter.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Filtering information. - */ -export type RoleBindingsPageFilter = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/Row.ts b/web/packages/sdk/generated/platform/schema/Row.ts deleted file mode 100644 index 3a555c22ec..0000000000 --- a/web/packages/sdk/generated/platform/schema/Row.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Rule matcher for selecting rows by name, condition, entity, or type. - */ -export interface Row { - /** Row name. */ - name?: string | string[]; - /** Row condition match. */ - condition?: string; - /** Foreach expression. */ - foreach?: string; - /** Row value definition. */ - value?: string; - /** Row entity match. */ - entity?: string | string[]; - /** Row type match. */ - type?: string | string[]; - /** Row fallback value. */ - fallback_value?: string; - /** Rule description for human consumption. */ - description?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/RowActions.ts b/web/packages/sdk/generated/platform/schema/RowActions.ts deleted file mode 100644 index b49617fd88..0000000000 --- a/web/packages/sdk/generated/platform/schema/RowActions.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { Row } from './Row'; - -/** - * Container for row drop and update operations. - */ -export interface RowActions { - /** Rows to drop. */ - drop?: Row[]; - /** Rows to update. */ - update?: Row[]; -} diff --git a/web/packages/sdk/generated/platform/schema/RowScore.ts b/web/packages/sdk/generated/platform/schema/RowScore.ts deleted file mode 100644 index 34f86fd57b..0000000000 --- a/web/packages/sdk/generated/platform/schema/RowScore.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { RowScoreItem } from './RowScoreItem'; -import type { RowScoreMetricErrors } from './RowScoreMetricErrors'; -import type { RowScoreMetrics } from './RowScoreMetrics'; -import type { RowScoreRequestsItem } from './RowScoreRequestsItem'; -import type { RowScoreSample } from './RowScoreSample'; - -/** - * Normalized row-level score payload for metric/benchmark job results. - */ -export interface RowScore { - /** - * Stable row position used for result alignment. - * @minimum 0 - */ - row_index?: number; - /** Input item metadata for the evaluated row. */ - item: RowScoreItem; - /** Sample output payload for the evaluated row. */ - sample: RowScoreSample; - /** Metric-level row outputs by metric key. */ - metrics: RowScoreMetrics; - /** Request details captured during evaluation. */ - requests: RowScoreRequestsItem[]; - /** Full row-level error text keyed by metric for summary rendering. */ - metric_errors?: RowScoreMetricErrors; - [key: string]: unknown; -} diff --git a/web/packages/sdk/generated/platform/schema/RowScoreItem.ts b/web/packages/sdk/generated/platform/schema/RowScoreItem.ts deleted file mode 100644 index b65d59fc4c..0000000000 --- a/web/packages/sdk/generated/platform/schema/RowScoreItem.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Input item metadata for the evaluated row. - */ -export type RowScoreItem = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/RowScoreMetricErrors.ts b/web/packages/sdk/generated/platform/schema/RowScoreMetricErrors.ts deleted file mode 100644 index 49b7ebddb2..0000000000 --- a/web/packages/sdk/generated/platform/schema/RowScoreMetricErrors.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Full row-level error text keyed by metric for summary rendering. - */ -export type RowScoreMetricErrors = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/RowScoreMetrics.ts b/web/packages/sdk/generated/platform/schema/RowScoreMetrics.ts deleted file mode 100644 index 276fe03ce1..0000000000 --- a/web/packages/sdk/generated/platform/schema/RowScoreMetrics.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { MetricOutput } from './MetricOutput'; - -/** - * Metric-level row outputs by metric key. - */ -export type RowScoreMetrics = { [key: string]: MetricOutput[] }; diff --git a/web/packages/sdk/generated/platform/schema/RowScoreRequestsItem.ts b/web/packages/sdk/generated/platform/schema/RowScoreRequestsItem.ts deleted file mode 100644 index bf70c44294..0000000000 --- a/web/packages/sdk/generated/platform/schema/RowScoreRequestsItem.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type RowScoreRequestsItem = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/RowScoreSample.ts b/web/packages/sdk/generated/platform/schema/RowScoreSample.ts deleted file mode 100644 index b48c547398..0000000000 --- a/web/packages/sdk/generated/platform/schema/RowScoreSample.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Sample output payload for the evaluated row. - */ -export type RowScoreSample = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/Rubric.ts b/web/packages/sdk/generated/platform/schema/Rubric.ts deleted file mode 100644 index 6a12f45033..0000000000 --- a/web/packages/sdk/generated/platform/schema/Rubric.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export interface Rubric { - /** The label to use for the level of the rubric grading criteria. (e.g., "helpful", "not_helpful", "positive") */ - label: string; - /** Describe the semantic meaning of each criteria for the given rubric. If no judge template is set, the input description for labels are included in the generated judge prompt. */ - description?: string; - /** The score value to assign for the criteria used for aggregation and ranking. */ - value: number; -} diff --git a/web/packages/sdk/generated/platform/schema/RubricScore.ts b/web/packages/sdk/generated/platform/schema/RubricScore.ts deleted file mode 100644 index a5e9e8038c..0000000000 --- a/web/packages/sdk/generated/platform/schema/RubricScore.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { JSONScoreParser } from './JSONScoreParser'; -import type { RegexScoreParser } from './RegexScoreParser'; -import type { Rubric } from './Rubric'; - -/** - * Score definition for a rubric with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters - */ -export interface RubricScore { - /** - * The name of the score. Only lowercase letters, numbers, and underscores allowed. - * @pattern ^[a-z0-9_]+$ - */ - name: string; - /** Human-readable description of the score. */ - description?: string; - /** The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters. */ - parser?: JSONScoreParser | RegexScoreParser; - /** - * The rubric for the score. - * @minItems 2 - */ - rubric: Rubric[]; -} diff --git a/web/packages/sdk/generated/platform/schema/RubricScoreStat.ts b/web/packages/sdk/generated/platform/schema/RubricScoreStat.ts deleted file mode 100644 index 4d4c3d2a90..0000000000 --- a/web/packages/sdk/generated/platform/schema/RubricScoreStat.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Rubric score with count statistics. - */ -export interface RubricScoreStat { - /** The label to use for the level of the rubric grading criteria. */ - label: string; - /** Describe the semantic meaning of each criteria for the given rubric. */ - description?: string; - /** The score value to assign for the criteria. */ - value: number; - /** The number of samples evaluated with the rubric level. */ - count?: number; -} diff --git a/web/packages/sdk/generated/platform/schema/RunConfig.ts b/web/packages/sdk/generated/platform/schema/RunConfig.ts deleted file mode 100644 index dcd2f12c74..0000000000 --- a/web/packages/sdk/generated/platform/schema/RunConfig.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Job parameters. - */ -export interface RunConfig { - /** - * Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model. - * @minimum 1 - */ - parallelism?: number; - /** - * Limit number of evaluation samples, taking the first `limit` samples from the dataset. - * @minimum 1 - */ - limit_samples?: number; -} diff --git a/web/packages/sdk/generated/platform/schema/RunConfigOnline.ts b/web/packages/sdk/generated/platform/schema/RunConfigOnline.ts deleted file mode 100644 index b65f131118..0000000000 --- a/web/packages/sdk/generated/platform/schema/RunConfigOnline.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Job parameters for online evaluation. - */ -export interface RunConfigOnline { - /** - * Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model. - * @minimum 1 - */ - parallelism?: number; - /** - * Limit number of evaluation samples, taking the first `limit` samples from the dataset. - * @minimum 1 - */ - limit_samples?: number; - /** If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception. */ - ignore_request_failure?: boolean; - /** The timeout to be used for requests made to the model. */ - request_timeout?: number; - /** - * Maximum number of retries for failed requests. - * @minimum 0 - */ - max_retries?: number; -} diff --git a/web/packages/sdk/generated/platform/schema/RunConfigOnlineModel.ts b/web/packages/sdk/generated/platform/schema/RunConfigOnlineModel.ts deleted file mode 100644 index 877589895d..0000000000 --- a/web/packages/sdk/generated/platform/schema/RunConfigOnlineModel.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { InferenceParams } from './InferenceParams'; -import type { ReasoningParams } from './ReasoningParams'; -import type { RunConfigOnlineModelStructuredOutput } from './RunConfigOnlineModelStructuredOutput'; - -/** - * Job parameters for model online evaluation. - */ -export interface RunConfigOnlineModel { - /** - * Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model. - * @minimum 1 - */ - parallelism?: number; - /** - * Limit number of evaluation samples, taking the first `limit` samples from the dataset. - * @minimum 1 - */ - limit_samples?: number; - /** If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception. */ - ignore_request_failure?: boolean; - /** The timeout to be used for requests made to the model. */ - request_timeout?: number; - /** - * Maximum number of retries for failed requests. - * @minimum 0 - */ - max_retries?: number; - /** Custom settings that control the model's text generation behavior. */ - inference?: InferenceParams; - /** Initial instructions that define the model's role and behavior for the conversation. */ - system_prompt?: string; - /** Custom settings that control the model's reasoning behavior. */ - reasoning?: ReasoningParams; - /** JSON schema to apply structured output for the model. */ - structured_output?: RunConfigOnlineModelStructuredOutput; -} diff --git a/web/packages/sdk/generated/platform/schema/RunConfigOnlineModelStructuredOutput.ts b/web/packages/sdk/generated/platform/schema/RunConfigOnlineModelStructuredOutput.ts deleted file mode 100644 index 1f2a2ad492..0000000000 --- a/web/packages/sdk/generated/platform/schema/RunConfigOnlineModelStructuredOutput.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * JSON schema to apply structured output for the model. - */ -export type RunConfigOnlineModelStructuredOutput = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/S3StorageConfig.ts b/web/packages/sdk/generated/platform/schema/S3StorageConfig.ts deleted file mode 100644 index 1e1e985069..0000000000 --- a/web/packages/sdk/generated/platform/schema/S3StorageConfig.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { S3StorageConfigSignatureVersion } from './S3StorageConfigSignatureVersion'; -import type { SecretRef } from './SecretRef'; - -export interface S3StorageConfig { - /** Chunk size in bytes for reading/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB. */ - read_chunk_size?: number; - type?: 's3'; - /** S3 bucket name */ - bucket: string; - /** Optional prefix (folder path) within the bucket. All operations will be relative to this prefix. */ - prefix?: string; - /** AWS region. If not specified, uses SDK default (env vars, instance metadata, etc.) */ - region?: string; - /** Custom endpoint URL for S3-compatible storage (e.g., MinIO, Garage, RustFS). If not specified, uses AWS S3. */ - endpoint_url?: string; - /** Use AWS SDK credential chain for authentication (env vars like AWS_ACCESS_KEY_ID, IAM roles, instance profiles, etc.). This option is only available for the platform's default storage backend. User-provided S3 storage must use explicit credentials via access_key_id_secret and secret_access_key_secret. */ - use_sdk_auth?: boolean; - /** Secret reference for AWS access key ID. Requires use_sdk_auth=False. */ - access_key_id_secret?: SecretRef; - /** Secret reference for AWS secret access key. Requires use_sdk_auth=False. */ - secret_access_key_secret?: SecretRef; - /** AWS signature version for request signing. Use 's3' for legacy systems that only support signature v2. */ - signature_version?: S3StorageConfigSignatureVersion; -} diff --git a/web/packages/sdk/generated/platform/schema/S3StorageConfigSignatureVersion.ts b/web/packages/sdk/generated/platform/schema/S3StorageConfigSignatureVersion.ts deleted file mode 100644 index f2940fc1cd..0000000000 --- a/web/packages/sdk/generated/platform/schema/S3StorageConfigSignatureVersion.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * AWS signature version for request signing. Use 's3' for legacy systems that only support signature v2. - */ -export type S3StorageConfigSignatureVersion = - (typeof S3StorageConfigSignatureVersion)[keyof typeof S3StorageConfigSignatureVersion]; - -export const S3StorageConfigSignatureVersion = { - s3v4: 's3v4', - s3: 's3', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/SafeSynthesizerGetJobLogsParams.ts b/web/packages/sdk/generated/platform/schema/SafeSynthesizerGetJobLogsParams.ts deleted file mode 100644 index 7fae0d3c95..0000000000 --- a/web/packages/sdk/generated/platform/schema/SafeSynthesizerGetJobLogsParams.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type SafeSynthesizerGetJobLogsParams = { - limit?: number; - page_cursor?: string; -}; diff --git a/web/packages/sdk/generated/platform/schema/SafeSynthesizerJob.ts b/web/packages/sdk/generated/platform/schema/SafeSynthesizerJob.ts deleted file mode 100644 index 3ce4c87f41..0000000000 --- a/web/packages/sdk/generated/platform/schema/SafeSynthesizerJob.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { PlatformJobStatus } from './PlatformJobStatus'; -import type { SafeSynthesizerJobConfig } from './SafeSynthesizerJobConfig'; -import type { SafeSynthesizerJobCustomFields } from './SafeSynthesizerJobCustomFields'; -import type { SafeSynthesizerJobErrorDetails } from './SafeSynthesizerJobErrorDetails'; -import type { SafeSynthesizerJobOwnership } from './SafeSynthesizerJobOwnership'; -import type { SafeSynthesizerJobStatusDetails } from './SafeSynthesizerJobStatusDetails'; - -export interface SafeSynthesizerJob { - id?: string; - name: string; - description?: string; - project?: string; - workspace?: string; - created_at?: string; - updated_at?: string; - spec: SafeSynthesizerJobConfig; - status?: PlatformJobStatus; - status_details?: SafeSynthesizerJobStatusDetails; - error_details?: SafeSynthesizerJobErrorDetails; - ownership?: SafeSynthesizerJobOwnership; - custom_fields?: SafeSynthesizerJobCustomFields; -} diff --git a/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobConfig.ts b/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobConfig.ts deleted file mode 100644 index d7e40f1732..0000000000 --- a/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobConfig.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { SafeSynthesizerParameters } from './SafeSynthesizerParameters'; - -/** - * Configuration model for Safe Synthesizer jobs. - -Used primarily internally to configure a run submitted to the NeMo Jobs -Microservice. - */ -export interface SafeSynthesizerJobConfig { - /** The data source for the job. */ - data_source: string; - /** The Safe Synthesizer parameters configuration. */ - config: SafeSynthesizerParameters; - /** Name of platform secret containing the HuggingFace token. Must exist in the same workspace as the job. */ - hf_token_secret?: string; - /** Whether to run LLM training and generation phases. When False the task only performs PII replacement and returns the processed data. */ - enable_synthesis?: boolean; -} diff --git a/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobCustomFields.ts b/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobCustomFields.ts deleted file mode 100644 index 96a8b55bf7..0000000000 --- a/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobCustomFields.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type SafeSynthesizerJobCustomFields = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobErrorDetails.ts b/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobErrorDetails.ts deleted file mode 100644 index 7c111dfa63..0000000000 --- a/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobErrorDetails.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type SafeSynthesizerJobErrorDetails = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobOwnership.ts b/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobOwnership.ts deleted file mode 100644 index 29f3bbc63c..0000000000 --- a/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobOwnership.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type SafeSynthesizerJobOwnership = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobRequest.ts b/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobRequest.ts deleted file mode 100644 index c4f6f63036..0000000000 --- a/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobRequest.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { SafeSynthesizerJobConfig } from './SafeSynthesizerJobConfig'; -import type { SafeSynthesizerJobRequestCustomFields } from './SafeSynthesizerJobRequestCustomFields'; -import type { SafeSynthesizerJobRequestOwnership } from './SafeSynthesizerJobRequestOwnership'; - -export interface SafeSynthesizerJobRequest { - name?: string; - description?: string; - project?: string; - spec: SafeSynthesizerJobConfig; - ownership?: SafeSynthesizerJobRequestOwnership; - custom_fields?: SafeSynthesizerJobRequestCustomFields; -} diff --git a/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobRequestCustomFields.ts b/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobRequestCustomFields.ts deleted file mode 100644 index 2f1c84d84f..0000000000 --- a/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobRequestCustomFields.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type SafeSynthesizerJobRequestCustomFields = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobRequestOwnership.ts b/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobRequestOwnership.ts deleted file mode 100644 index 2b12bc2283..0000000000 --- a/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobRequestOwnership.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type SafeSynthesizerJobRequestOwnership = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobStatusDetails.ts b/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobStatusDetails.ts deleted file mode 100644 index 6a820578c1..0000000000 --- a/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobStatusDetails.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type SafeSynthesizerJobStatusDetails = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobsListFilter.ts b/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobsListFilter.ts deleted file mode 100644 index 45ec0f2d57..0000000000 --- a/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobsListFilter.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { DatetimeFilter } from './DatetimeFilter'; -import type { PlatformJobStatus } from './PlatformJobStatus'; - -export interface SafeSynthesizerJobsListFilter { - /** Jobs created at 'gte' datetime or 'lte' datetime. */ - created_at?: DatetimeFilter; - /** Name of the job. */ - name?: string; - /** Workspace of the job. */ - workspace?: string; - /** Project containing the job. */ - project?: string; - /** The current status. */ - status?: PlatformJobStatus; - /** Jobs updated at 'gte' datetime or 'lte' datetime. */ - updated_at?: DatetimeFilter; -} diff --git a/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobsPage.ts b/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobsPage.ts deleted file mode 100644 index e6fdb8bbb3..0000000000 --- a/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobsPage.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { PaginationData } from './PaginationData'; -import type { SafeSynthesizerJob } from './SafeSynthesizerJob'; -import type { SafeSynthesizerJobsPageFilter } from './SafeSynthesizerJobsPageFilter'; - -export interface SafeSynthesizerJobsPage { - data: SafeSynthesizerJob[]; - /** Pagination information. */ - pagination?: PaginationData; - /** The field on which the results are sorted. */ - sort?: string; - /** Filtering information. */ - filter?: SafeSynthesizerJobsPageFilter; -} diff --git a/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobsPageFilter.ts b/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobsPageFilter.ts deleted file mode 100644 index 689b79d3c8..0000000000 --- a/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobsPageFilter.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Filtering information. - */ -export type SafeSynthesizerJobsPageFilter = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobsSortField.ts b/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobsSortField.ts deleted file mode 100644 index ee5696c309..0000000000 --- a/web/packages/sdk/generated/platform/schema/SafeSynthesizerJobsSortField.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type SafeSynthesizerJobsSortField = - (typeof SafeSynthesizerJobsSortField)[keyof typeof SafeSynthesizerJobsSortField]; - -export const SafeSynthesizerJobsSortField = { - created_at: 'created_at', - '-created_at': '-created_at', - updated_at: 'updated_at', - '-updated_at': '-updated_at', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/SafeSynthesizerListJobsParams.ts b/web/packages/sdk/generated/platform/schema/SafeSynthesizerListJobsParams.ts deleted file mode 100644 index 18634ce754..0000000000 --- a/web/packages/sdk/generated/platform/schema/SafeSynthesizerListJobsParams.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { SafeSynthesizerJobsListFilter } from './SafeSynthesizerJobsListFilter'; -import type { SafeSynthesizerJobsSortField } from './SafeSynthesizerJobsSortField'; - -export type SafeSynthesizerListJobsParams = { - /** - * Page number. - * @exclusiveMinimum 0 - */ - page?: number; - /** - * Page size. - * @exclusiveMinimum 0 - */ - page_size?: number; - /** - * The field to sort by. To sort in decreasing order, use `-` in front of the field name. - */ - sort?: SafeSynthesizerJobsSortField; - /** - * Filter jobs on various criteria. - */ - filter?: SafeSynthesizerJobsListFilter; -}; diff --git a/web/packages/sdk/generated/platform/schema/SafeSynthesizerParameters.ts b/web/packages/sdk/generated/platform/schema/SafeSynthesizerParameters.ts deleted file mode 100644 index f838b83e80..0000000000 --- a/web/packages/sdk/generated/platform/schema/SafeSynthesizerParameters.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { DataParameters } from './DataParameters'; -import type { DifferentialPrivacyHyperparams } from './DifferentialPrivacyHyperparams'; -import type { EvaluationParameters } from './EvaluationParameters'; -import type { GenerateParameters } from './GenerateParameters'; -import type { PiiReplacerConfig } from './PiiReplacerConfig'; -import type { TimeSeriesParameters } from './TimeSeriesParameters'; -import type { TrainingHyperparams } from './TrainingHyperparams'; - -/** - * Main configuration class for the Safe Synthesizer pipeline. - -This is the top-level configuration class that orchestrates all aspects of -synthetic data generation including training, generation, privacy, evaluation, -and data handling. It provides validation to ensure parameter compatibility. - */ -export interface SafeSynthesizerParameters { - /** Configuration controlling how input data is grouped and split for training and evaluation. */ - data?: DataParameters; - /** Parameters for evaluating the quality of generated synthetic data. */ - evaluation?: EvaluationParameters; - /** Hyperparameters for model training such as learning rate, batch size, and LoRA adapter settings. */ - training?: TrainingHyperparams; - /** Parameters governing synthetic data generation including temperature, top-p, and number of records to produce. */ - generation?: GenerateParameters; - /** Differential-privacy hyperparameters. When ``None``, differential privacy is disabled entirely. */ - privacy?: DifferentialPrivacyHyperparams; - /** Configuration for time-series mode. Time-series pipeline is currently experimental. */ - time_series?: TimeSeriesParameters; - /** PII replacement configuration. When ``None``, PII replacement is skipped. */ - replace_pii?: PiiReplacerConfig; -} diff --git a/web/packages/sdk/generated/platform/schema/SafeSynthesizerSummary.ts b/web/packages/sdk/generated/platform/schema/SafeSynthesizerSummary.ts deleted file mode 100644 index 4e04ca1a28..0000000000 --- a/web/packages/sdk/generated/platform/schema/SafeSynthesizerSummary.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { SafeSynthesizerTiming } from './SafeSynthesizerTiming'; - -/** - * Aggregated quality, privacy, and record-count metrics for a pipeline run. - */ -export interface SafeSynthesizerSummary { - /** Weighted composite of the five sub-scores below (SQS). Higher is better (0--10 scale). */ - synthetic_data_quality_score?: number; - /** How closely pairwise column correlations in synthetic data match the original for numeric and categorical columns. */ - column_correlation_stability_score?: number; - /** PCA-based comparison of multivariate structure between real and synthetic data for numeric and categorical columns. */ - deep_structure_stability_score?: number; - /** Per-column Jensen-Shannon distance between training and synthetic distributions averaged across all numeric and categorical columns. */ - column_distribution_stability_score?: number; - /** Embedding-based semantic closeness between real and synthetic free-text columns. */ - text_semantic_similarity_score?: number; - /** Jensen-Shannon divergence over sentence count, words-per-sentence, and characters-per-word distributions between real and synthetic free-text columns. */ - text_structure_similarity_score?: number; - /** Composite of MIA and AIA protection scores. */ - data_privacy_score?: number; - /** Resistance to attacks that try to determine whether a record was in the training set. */ - membership_inference_protection_score?: number; - /** Resistance to attacks that try to infer sensitive attributes from quasi-identifiers. */ - attribute_inference_protection_score?: number; - /** Count of synthetic records that passed schema and format validation. */ - num_valid_records?: number; - /** Count of synthetic records filtered out during validation. */ - num_invalid_records?: number; - /** Total LLM generation prompts issued. */ - num_prompts?: number; - /** Ratio of valid records: ``num_valid_records / (num_valid_records + num_invalid_records)``. */ - valid_record_fraction?: number; - /** Per-stage wall-clock durations. */ - timing: SafeSynthesizerTiming; -} diff --git a/web/packages/sdk/generated/platform/schema/SafeSynthesizerTiming.ts b/web/packages/sdk/generated/platform/schema/SafeSynthesizerTiming.ts deleted file mode 100644 index f5feec768a..0000000000 --- a/web/packages/sdk/generated/platform/schema/SafeSynthesizerTiming.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Wall-clock durations for each pipeline stage. - */ -export interface SafeSynthesizerTiming { - /** Total end-to-end pipeline duration in seconds. */ - total_time_sec?: number; - /** Time spent on PII replacement. */ - pii_replacer_time_sec?: number; - /** Time spent on model training. */ - training_time_sec?: number; - /** Time spent generating synthetic records. */ - generation_time_sec?: number; - /** Time spent evaluating synthetic data quality. */ - evaluation_time_sec?: number; -} diff --git a/web/packages/sdk/generated/platform/schema/SecretRef.ts b/web/packages/sdk/generated/platform/schema/SecretRef.ts deleted file mode 100644 index e292159323..0000000000 --- a/web/packages/sdk/generated/platform/schema/SecretRef.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace/secret_name' (explicit workspace). - * @pattern ^[a-z0-9_-]+(/[a-z0-9_-]+)?$ - */ -export type SecretRef = string; diff --git a/web/packages/sdk/generated/platform/schema/SecretsListSecretsParams.ts b/web/packages/sdk/generated/platform/schema/SecretsListSecretsParams.ts deleted file mode 100644 index b49d2244f3..0000000000 --- a/web/packages/sdk/generated/platform/schema/SecretsListSecretsParams.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type SecretsListSecretsParams = { - /** - * Page number. - * @exclusiveMinimum 0 - */ - page?: number; - /** - * Page size. - * @exclusiveMinimum 0 - */ - page_size?: number; -}; diff --git a/web/packages/sdk/generated/platform/schema/SensitiveDataDetection.ts b/web/packages/sdk/generated/platform/schema/SensitiveDataDetection.ts deleted file mode 100644 index afe471c6e2..0000000000 --- a/web/packages/sdk/generated/platform/schema/SensitiveDataDetection.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { SensitiveDataDetectionOptions } from './SensitiveDataDetectionOptions'; -import type { SensitiveDataDetectionRecognizersItem } from './SensitiveDataDetectionRecognizersItem'; - -/** - * Configuration of what sensitive data should be detected. - */ -export interface SensitiveDataDetection { - /** Additional custom recognizers. Check out https://microsoft.github.io/presidio/tutorial/08_no_code/ for more details. */ - recognizers?: SensitiveDataDetectionRecognizersItem[]; - /** Configuration of the entities to be detected on the user input. */ - input?: SensitiveDataDetectionOptions; - /** Configuration of the entities to be detected on the bot output. */ - output?: SensitiveDataDetectionOptions; - /** Configuration of the entities to be detected on retrieved relevant chunks. */ - retrieval?: SensitiveDataDetectionOptions; -} diff --git a/web/packages/sdk/generated/platform/schema/SensitiveDataDetectionOptions.ts b/web/packages/sdk/generated/platform/schema/SensitiveDataDetectionOptions.ts deleted file mode 100644 index b70fec2341..0000000000 --- a/web/packages/sdk/generated/platform/schema/SensitiveDataDetectionOptions.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export interface SensitiveDataDetectionOptions { - /** The list of entities that should be detected. Check out https://microsoft.github.io/presidio/supported_entities/ forthe list of supported entities. */ - entities?: string[]; - /** The token that should be used to mask the sensitive data. */ - mask_token?: string; - /** The score threshold that should be used to detect the sensitive data. */ - score_threshold?: number; -} diff --git a/web/packages/sdk/generated/platform/schema/SensitiveDataDetectionRecognizersItem.ts b/web/packages/sdk/generated/platform/schema/SensitiveDataDetectionRecognizersItem.ts deleted file mode 100644 index 7a8f01b9ff..0000000000 --- a/web/packages/sdk/generated/platform/schema/SensitiveDataDetectionRecognizersItem.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type SensitiveDataDetectionRecognizersItem = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/ServedModelMapping.ts b/web/packages/sdk/generated/platform/schema/ServedModelMapping.ts deleted file mode 100644 index 9159d3e52b..0000000000 --- a/web/packages/sdk/generated/platform/schema/ServedModelMapping.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Mapping between a Model Entity and how it's served by this provider. - */ -export interface ServedModelMapping { - /** - * Model Entity identifier as workspace/name (e.g., 'my-ws/my-model') - * @maxLength 255 - */ - model_entity_id: string; - /** - * The actual model name to send to the backend endpoint in the 'model' field - * @maxLength 255 - */ - served_model_name: string; -} diff --git a/web/packages/sdk/generated/platform/schema/SingleCallConfig.ts b/web/packages/sdk/generated/platform/schema/SingleCallConfig.ts deleted file mode 100644 index 11a658ea8f..0000000000 --- a/web/packages/sdk/generated/platform/schema/SingleCallConfig.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Configuration for the single LLM call option for topical rails. - */ -export interface SingleCallConfig { - enabled?: boolean; - /** Whether to fall back to multiple calls if a single call is not possible. */ - fallback_to_multiple_calls?: boolean; -} diff --git a/web/packages/sdk/generated/platform/schema/SlidingWindowConfig.ts b/web/packages/sdk/generated/platform/schema/SlidingWindowConfig.ts deleted file mode 100644 index b9321d0b3c..0000000000 --- a/web/packages/sdk/generated/platform/schema/SlidingWindowConfig.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Sliding window attention configuration. - */ -export interface SlidingWindowConfig { - /** Sliding window size (attends to last N tokens) */ - window_size: number; -} diff --git a/web/packages/sdk/generated/platform/schema/Span.ts b/web/packages/sdk/generated/platform/schema/Span.ts deleted file mode 100644 index 2c47b0ad48..0000000000 --- a/web/packages/sdk/generated/platform/schema/Span.ts +++ /dev/null @@ -1,56 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { SpanCostDetails } from './SpanCostDetails'; -import type { SpanEvaluationContext } from './SpanEvaluationContext'; -import type { SpanKind } from './SpanKind'; -import type { SpanStatus } from './SpanStatus'; -import type { SpanUsageDetails } from './SpanUsageDetails'; - -export interface Span { - span_id: string; - session_id: string; - workspace: string; - project?: string; - evaluation_context?: SpanEvaluationContext; - parent_span_id?: string; - kind: SpanKind; - name?: string; - source: string; - trace_id?: string; - started_at: string; - ended_at?: string; - status: SpanStatus; - error_type?: string; - error_message?: string; - provider?: string; - model?: string; - prompt_id?: string; - prompt_name?: string; - prompt_version?: string; - agent_id?: string; - agent_name?: string; - tool_name?: string; - /** @minimum 0 */ - input_tokens?: number; - /** @minimum 0 */ - output_tokens?: number; - /** @minimum 0 */ - cached_tokens?: number; - /** @minimum 0 */ - total_tokens?: number; - usage_details?: SpanUsageDetails; - cost_total_usd?: number; - cost_input_usd?: number; - cost_output_usd?: number; - cost_details?: SpanCostDetails; - input?: string; - output?: string; - raw_attributes?: string; - ingested_at: string; -} diff --git a/web/packages/sdk/generated/platform/schema/SpanCostDetails.ts b/web/packages/sdk/generated/platform/schema/SpanCostDetails.ts deleted file mode 100644 index 31abb34986..0000000000 --- a/web/packages/sdk/generated/platform/schema/SpanCostDetails.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type SpanCostDetails = { [key: string]: number }; diff --git a/web/packages/sdk/generated/platform/schema/SpanEvaluationContext.ts b/web/packages/sdk/generated/platform/schema/SpanEvaluationContext.ts deleted file mode 100644 index 930d013dc6..0000000000 --- a/web/packages/sdk/generated/platform/schema/SpanEvaluationContext.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { SpanEvaluationContextMetadata } from './SpanEvaluationContextMetadata'; - -export interface SpanEvaluationContext { - evaluation_id?: string; - evaluation_sha?: string; - evaluation_run_id?: string; - dataset_id?: string; - dataset_name?: string; - dataset_version?: string; - test_case_id?: string; - metadata?: SpanEvaluationContextMetadata; -} diff --git a/web/packages/sdk/generated/platform/schema/SpanEvaluationContextMetadata.ts b/web/packages/sdk/generated/platform/schema/SpanEvaluationContextMetadata.ts deleted file mode 100644 index 07ba83ad47..0000000000 --- a/web/packages/sdk/generated/platform/schema/SpanEvaluationContextMetadata.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type SpanEvaluationContextMetadata = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/SpanFilter.ts b/web/packages/sdk/generated/platform/schema/SpanFilter.ts deleted file mode 100644 index 011dbd1c2d..0000000000 --- a/web/packages/sdk/generated/platform/schema/SpanFilter.ts +++ /dev/null @@ -1,56 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { DatetimeFilter } from './DatetimeFilter'; -import type { SpanKind } from './SpanKind'; -import type { SpanStatus } from './SpanStatus'; - -export interface SpanFilter { - /** Filter by span session id. */ - session_id?: string; - /** Filter by project name. */ - project?: string; - /** Filter by evaluation id. */ - evaluation_id?: string; - /** Filter by evaluation sha. */ - evaluation_sha?: string; - /** Filter by evaluation run id. ATIF evaluation context is stored on root trajectory spans; use session_id from a matched root to fetch the full trace tree. */ - evaluation_run_id?: string; - /** Filter by dataset id. */ - dataset_id?: string; - /** Filter by dataset name. */ - dataset_name?: string; - /** Filter by dataset version. */ - dataset_version?: string; - /** Filter by dataset test case id. */ - test_case_id?: string; - /** Filter by ingest source (e.g. 'otel', 'atif', 'chat_completions'). */ - source?: string; - /** Filter by normalized span kind. */ - kind?: SpanKind; - /** Filter by normalized span status. */ - status?: SpanStatus; - /** Filter by model name. */ - model?: string; - /** Filter by tool name. */ - tool_name?: string; - /** Filter by provider (e.g. 'openai', 'nim', 'anthropic'). */ - provider?: string; - /** Filter by agent identifier. */ - agent_id?: string; - /** Filter by agent application name (e.g. 'claude-code', 'codex'). */ - agent_name?: string; - /** Filter by prompt template name. */ - prompt_name?: string; - /** Filter by prompt template version. */ - prompt_version?: string; - /** Filter by parent span id. Use to fetch direct children of a span. */ - parent_span_id?: string; - /** Filter by span start timestamp. */ - started_at?: DatetimeFilter; -} diff --git a/web/packages/sdk/generated/platform/schema/SpanKind.ts b/web/packages/sdk/generated/platform/schema/SpanKind.ts deleted file mode 100644 index 7d10f486a2..0000000000 --- a/web/packages/sdk/generated/platform/schema/SpanKind.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type SpanKind = (typeof SpanKind)[keyof typeof SpanKind]; - -export const SpanKind = { - LLM: 'LLM', - CHAIN: 'CHAIN', - TOOL: 'TOOL', - RETRIEVER: 'RETRIEVER', - EMBEDDING: 'EMBEDDING', - AGENT: 'AGENT', - RERANKER: 'RERANKER', - EVALUATOR: 'EVALUATOR', - GUARDRAIL: 'GUARDRAIL', - UNKNOWN: 'UNKNOWN', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/SpanSortField.ts b/web/packages/sdk/generated/platform/schema/SpanSortField.ts deleted file mode 100644 index c1711e4601..0000000000 --- a/web/packages/sdk/generated/platform/schema/SpanSortField.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type SpanSortField = (typeof SpanSortField)[keyof typeof SpanSortField]; - -export const SpanSortField = { - started_at: 'started_at', - '-started_at': '-started_at', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/SpanStatus.ts b/web/packages/sdk/generated/platform/schema/SpanStatus.ts deleted file mode 100644 index 53974ecee1..0000000000 --- a/web/packages/sdk/generated/platform/schema/SpanStatus.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type SpanStatus = (typeof SpanStatus)[keyof typeof SpanStatus]; - -export const SpanStatus = { - success: 'success', - error: 'error', - cancelled: 'cancelled', - unknown: 'unknown', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/SpanUsageDetails.ts b/web/packages/sdk/generated/platform/schema/SpanUsageDetails.ts deleted file mode 100644 index 80164ca1cb..0000000000 --- a/web/packages/sdk/generated/platform/schema/SpanUsageDetails.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type SpanUsageDetails = { [key: string]: number }; diff --git a/web/packages/sdk/generated/platform/schema/SpansPage.ts b/web/packages/sdk/generated/platform/schema/SpansPage.ts deleted file mode 100644 index 5c86bbb5c4..0000000000 --- a/web/packages/sdk/generated/platform/schema/SpansPage.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { PaginationData } from './PaginationData'; -import type { Span } from './Span'; -import type { SpansPageFilter } from './SpansPageFilter'; - -export interface SpansPage { - data: Span[]; - /** Pagination information. */ - pagination?: PaginationData; - /** The field on which the results are sorted. */ - sort?: string; - /** Filtering information. */ - filter?: SpansPageFilter; -} diff --git a/web/packages/sdk/generated/platform/schema/SpansPageFilter.ts b/web/packages/sdk/generated/platform/schema/SpansPageFilter.ts deleted file mode 100644 index 5af7467485..0000000000 --- a/web/packages/sdk/generated/platform/schema/SpansPageFilter.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Filtering information. - */ -export type SpansPageFilter = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/StatusEnum.ts b/web/packages/sdk/generated/platform/schema/StatusEnum.ts deleted file mode 100644 index 158bb6f312..0000000000 --- a/web/packages/sdk/generated/platform/schema/StatusEnum.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type StatusEnum = (typeof StatusEnum)[keyof typeof StatusEnum]; - -export const StatusEnum = { - blocked: 'blocked', - success: 'success', - unknown: 'unknown', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/StepDefinition.ts b/web/packages/sdk/generated/platform/schema/StepDefinition.ts deleted file mode 100644 index 4fd1283507..0000000000 --- a/web/packages/sdk/generated/platform/schema/StepDefinition.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ColumnActions } from './ColumnActions'; -import type { RowActions } from './RowActions'; -import type { StepDefinitionVars } from './StepDefinitionVars'; - -/** - * Single transformation step with optional variables, column actions, and row actions. - */ -export interface StepDefinition { - /** Variable names and templates. */ - vars?: StepDefinitionVars; - /** Columns transform configuration. */ - columns?: ColumnActions; - /** Rows transform configurations. */ - rows?: RowActions; -} diff --git a/web/packages/sdk/generated/platform/schema/StepDefinitionVars.ts b/web/packages/sdk/generated/platform/schema/StepDefinitionVars.ts deleted file mode 100644 index e2d1978b72..0000000000 --- a/web/packages/sdk/generated/platform/schema/StepDefinitionVars.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Variable names and templates. - */ -export type StepDefinitionVars = { [key: string]: string | { [key: string]: unknown } | unknown[] }; diff --git a/web/packages/sdk/generated/platform/schema/StepLifecycle.ts b/web/packages/sdk/generated/platform/schema/StepLifecycle.ts deleted file mode 100644 index bbe89f63e1..0000000000 --- a/web/packages/sdk/generated/platform/schema/StepLifecycle.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Controller-level lifecycle configuration for a job step. - -These settings control how the jobs controller manages the step, -as opposed to ``config`` which is the task payload forwarded to -the container. - */ -export interface StepLifecycle { - /** If every active task in the step goes this many seconds without an update, the step is terminated. A value of 0 disables staleness detection. */ - staleness_timeout_seconds?: number; -} diff --git a/web/packages/sdk/generated/platform/schema/StorageConfigType.ts b/web/packages/sdk/generated/platform/schema/StorageConfigType.ts deleted file mode 100644 index 67f6b7a64a..0000000000 --- a/web/packages/sdk/generated/platform/schema/StorageConfigType.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type StorageConfigType = (typeof StorageConfigType)[keyof typeof StorageConfigType]; - -export const StorageConfigType = { - local: 'local', - ngc: 'ngc', - huggingface: 'huggingface', - s3: 's3', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/StringCheckMetric.ts b/web/packages/sdk/generated/platform/schema/StringCheckMetric.ts deleted file mode 100644 index e8d3b94182..0000000000 --- a/web/packages/sdk/generated/platform/schema/StringCheckMetric.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { StringCheckMetricLabels } from './StringCheckMetricLabels'; -import type { StringCheckMetricOperation } from './StringCheckMetricOperation'; -import type { StringCheckMetricSupportedJobTypesItem } from './StringCheckMetricSupportedJobTypesItem'; - -/** - * Persisted string check metric. - */ -export interface StringCheckMetric { - /** Entity name within the workspace */ - name?: string; - /** - * Workspace identifier - * @pattern ^[\w\-\+.@:]+$ - */ - workspace: string; - /** The name of the project associated with this entity. */ - project?: string; - type?: 'string-check'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: StringCheckMetricLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: StringCheckMetricSupportedJobTypesItem[]; - /** The operation to compute for the metric. */ - operation: StringCheckMetricOperation; - /** The template to use for rendering the left value of the operator to compute the metric. */ - left_template: string; - /** The template to use for rendering the right value of the operator to compute the metric. */ - right_template: string; - readonly id: string; - readonly created_at: string; - readonly created_by: string | null; - readonly updated_at: string; - readonly updated_by: string | null; - /** Alias for id for backwards compatibility. */ - readonly entity_id: string; - /** Parent entity ID for nested entities. */ - readonly parent: string; -} diff --git a/web/packages/sdk/generated/platform/schema/StringCheckMetricInput.ts b/web/packages/sdk/generated/platform/schema/StringCheckMetricInput.ts deleted file mode 100644 index 14c4db11b6..0000000000 --- a/web/packages/sdk/generated/platform/schema/StringCheckMetricInput.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { StringCheckMetricInputLabels } from './StringCheckMetricInputLabels'; -import type { StringCheckMetricInputOperation } from './StringCheckMetricInputOperation'; -import type { StringCheckMetricInputSupportedJobTypesItem } from './StringCheckMetricInputSupportedJobTypesItem'; - -/** - * Request type for StringCheckMetric. String-comparison metric with operator-based checks. - */ -export interface StringCheckMetricInput { - type?: 'string-check'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: StringCheckMetricInputLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: StringCheckMetricInputSupportedJobTypesItem[]; - /** The operation to compute for the metric. */ - operation: StringCheckMetricInputOperation; - /** The template to use for rendering the left value of the operator to compute the metric. */ - left_template: string; - /** The template to use for rendering the right value of the operator to compute the metric. */ - right_template: string; -} diff --git a/web/packages/sdk/generated/platform/schema/StringCheckMetricInputLabels.ts b/web/packages/sdk/generated/platform/schema/StringCheckMetricInputLabels.ts deleted file mode 100644 index 9a61d3cbb2..0000000000 --- a/web/packages/sdk/generated/platform/schema/StringCheckMetricInputLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type StringCheckMetricInputLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/StringCheckMetricInputOperation.ts b/web/packages/sdk/generated/platform/schema/StringCheckMetricInputOperation.ts deleted file mode 100644 index 61249269e5..0000000000 --- a/web/packages/sdk/generated/platform/schema/StringCheckMetricInputOperation.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * The operation to compute for the metric. - */ -export type StringCheckMetricInputOperation = - (typeof StringCheckMetricInputOperation)[keyof typeof StringCheckMetricInputOperation]; - -export const StringCheckMetricInputOperation = { - equals: 'equals', - '==': '==', - '!=': '!=', - '<>': '<>', - not_equals: 'not equals', - contains: 'contains', - not_contains: 'not contains', - startswith: 'startswith', - endswith: 'endswith', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/StringCheckMetricInputSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/StringCheckMetricInputSupportedJobTypesItem.ts deleted file mode 100644 index f4d031b234..0000000000 --- a/web/packages/sdk/generated/platform/schema/StringCheckMetricInputSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type StringCheckMetricInputSupportedJobTypesItem = - (typeof StringCheckMetricInputSupportedJobTypesItem)[keyof typeof StringCheckMetricInputSupportedJobTypesItem]; - -export const StringCheckMetricInputSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/StringCheckMetricLabels.ts b/web/packages/sdk/generated/platform/schema/StringCheckMetricLabels.ts deleted file mode 100644 index 22eb34afe2..0000000000 --- a/web/packages/sdk/generated/platform/schema/StringCheckMetricLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type StringCheckMetricLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/StringCheckMetricOperation.ts b/web/packages/sdk/generated/platform/schema/StringCheckMetricOperation.ts deleted file mode 100644 index 91477db8b8..0000000000 --- a/web/packages/sdk/generated/platform/schema/StringCheckMetricOperation.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * The operation to compute for the metric. - */ -export type StringCheckMetricOperation = - (typeof StringCheckMetricOperation)[keyof typeof StringCheckMetricOperation]; - -export const StringCheckMetricOperation = { - equals: 'equals', - '==': '==', - '!=': '!=', - '<>': '<>', - not_equals: 'not equals', - contains: 'contains', - not_contains: 'not contains', - startswith: 'startswith', - endswith: 'endswith', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/StringCheckMetricResponse.ts b/web/packages/sdk/generated/platform/schema/StringCheckMetricResponse.ts deleted file mode 100644 index 84828f8f04..0000000000 --- a/web/packages/sdk/generated/platform/schema/StringCheckMetricResponse.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { StringCheckMetricResponseLabels } from './StringCheckMetricResponseLabels'; -import type { StringCheckMetricResponseOperation } from './StringCheckMetricResponseOperation'; -import type { StringCheckMetricResponseSupportedJobTypesItem } from './StringCheckMetricResponseSupportedJobTypesItem'; - -/** - * Response type for StringCheckMetric. - */ -export interface StringCheckMetricResponse { - /** Entity name within the workspace */ - name?: string; - /** Workspace identifier */ - workspace?: string; - /** The name of the project associated with this entity. */ - project?: string; - /** Entity name within the workspace */ - id?: string; - created_at?: string; - updated_at?: string; - parent?: string; - type?: 'string-check'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: StringCheckMetricResponseLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: StringCheckMetricResponseSupportedJobTypesItem[]; - /** The operation to compute for the metric. */ - operation: StringCheckMetricResponseOperation; - /** The template to use for rendering the left value of the operator to compute the metric. */ - left_template: string; - /** The template to use for rendering the right value of the operator to compute the metric. */ - right_template: string; -} diff --git a/web/packages/sdk/generated/platform/schema/StringCheckMetricResponseLabels.ts b/web/packages/sdk/generated/platform/schema/StringCheckMetricResponseLabels.ts deleted file mode 100644 index 221b045d80..0000000000 --- a/web/packages/sdk/generated/platform/schema/StringCheckMetricResponseLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type StringCheckMetricResponseLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/StringCheckMetricResponseOperation.ts b/web/packages/sdk/generated/platform/schema/StringCheckMetricResponseOperation.ts deleted file mode 100644 index cd3fc13cdb..0000000000 --- a/web/packages/sdk/generated/platform/schema/StringCheckMetricResponseOperation.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * The operation to compute for the metric. - */ -export type StringCheckMetricResponseOperation = - (typeof StringCheckMetricResponseOperation)[keyof typeof StringCheckMetricResponseOperation]; - -export const StringCheckMetricResponseOperation = { - equals: 'equals', - '==': '==', - '!=': '!=', - '<>': '<>', - not_equals: 'not equals', - contains: 'contains', - not_contains: 'not contains', - startswith: 'startswith', - endswith: 'endswith', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/StringCheckMetricResponseSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/StringCheckMetricResponseSupportedJobTypesItem.ts deleted file mode 100644 index a3d5a998ac..0000000000 --- a/web/packages/sdk/generated/platform/schema/StringCheckMetricResponseSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type StringCheckMetricResponseSupportedJobTypesItem = - (typeof StringCheckMetricResponseSupportedJobTypesItem)[keyof typeof StringCheckMetricResponseSupportedJobTypesItem]; - -export const StringCheckMetricResponseSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/StringCheckMetricSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/StringCheckMetricSupportedJobTypesItem.ts deleted file mode 100644 index 3daa296dbf..0000000000 --- a/web/packages/sdk/generated/platform/schema/StringCheckMetricSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type StringCheckMetricSupportedJobTypesItem = - (typeof StringCheckMetricSupportedJobTypesItem)[keyof typeof StringCheckMetricSupportedJobTypesItem]; - -export const StringCheckMetricSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/SubprocessExecutionProvider.ts b/web/packages/sdk/generated/platform/schema/SubprocessExecutionProvider.ts deleted file mode 100644 index 9a0413325c..0000000000 --- a/web/packages/sdk/generated/platform/schema/SubprocessExecutionProvider.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Host subprocess execution provider. - */ -export interface SubprocessExecutionProvider { - provider?: 'subprocess'; - profile?: string; - command: string[]; -} diff --git a/web/packages/sdk/generated/platform/schema/SubprocessJobExecutionProfile.ts b/web/packages/sdk/generated/platform/schema/SubprocessJobExecutionProfile.ts deleted file mode 100644 index 5f33606caa..0000000000 --- a/web/packages/sdk/generated/platform/schema/SubprocessJobExecutionProfile.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { SubprocessJobExecutionProfileConfig } from './SubprocessJobExecutionProfileConfig'; - -export interface SubprocessJobExecutionProfile { - provider?: 'subprocess'; - /** The profile name for the executor, e.g., high_priority_a100, low_priority, etc. */ - profile?: string; - backend?: 'subprocess'; - /** Additional configuration for the subprocess executor */ - config?: SubprocessJobExecutionProfileConfig; -} diff --git a/web/packages/sdk/generated/platform/schema/SubprocessJobExecutionProfileConfig.ts b/web/packages/sdk/generated/platform/schema/SubprocessJobExecutionProfileConfig.ts deleted file mode 100644 index 9226cef310..0000000000 --- a/web/packages/sdk/generated/platform/schema/SubprocessJobExecutionProfileConfig.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { SubprocessJobExecutionProfileConfigEnv } from './SubprocessJobExecutionProfileConfigEnv'; - -export interface SubprocessJobExecutionProfileConfig { - ttl_seconds_before_active?: number; - ttl_seconds_active?: number; - ttl_seconds_after_finished?: number; - /** Keep subprocess working directories by default so runs remain inspectable. */ - cleanup_completed_jobs_immediately?: boolean; - /** Path to the jobs launcher tool */ - launcher_tool_path?: string; - /** Optional env vars applied to all jobs (e.g. HOME=/tmp). Keys must not conflict with platform-reserved names. Job steps may override these variables. */ - env?: SubprocessJobExecutionProfileConfigEnv; - /** Root directory for subprocess job state, config, storage, and logs. */ - working_directory?: string; - /** How long to wait after SIGTERM before force killing the process group. */ - graceful_shutdown_timeout_seconds?: number; -} diff --git a/web/packages/sdk/generated/platform/schema/SubprocessJobExecutionProfileConfigEnv.ts b/web/packages/sdk/generated/platform/schema/SubprocessJobExecutionProfileConfigEnv.ts deleted file mode 100644 index 0bfe29a343..0000000000 --- a/web/packages/sdk/generated/platform/schema/SubprocessJobExecutionProfileConfigEnv.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional env vars applied to all jobs (e.g. HOME=/tmp). Keys must not conflict with platform-reserved names. Job steps may override these variables. - */ -export type SubprocessJobExecutionProfileConfigEnv = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/SystemBenchmark.ts b/web/packages/sdk/generated/platform/schema/SystemBenchmark.ts deleted file mode 100644 index 742d5bbc24..0000000000 --- a/web/packages/sdk/generated/platform/schema/SystemBenchmark.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { Parameter } from './Parameter'; -import type { SystemBenchmarkLabels } from './SystemBenchmarkLabels'; -import type { SystemBenchmarkSupportedJobTypesItem } from './SystemBenchmarkSupportedJobTypesItem'; - -/** - * System Benchmark response schema. - */ -export interface SystemBenchmark { - /** Benchmark name */ - name: string; - workspace?: string; - /** The name of the project associated with this entity. */ - project?: string; - /** Human-readable description of the benchmark. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: SystemBenchmarkLabels; - /** List of required parameters for running an evaluation with the benchmark. */ - required_params?: Parameter[]; - /** List of required parameters for running an evaluation with the benchmark. */ - optional_params?: Parameter[]; - /** A benchmark can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: SystemBenchmarkSupportedJobTypesItem[]; - readonly id: string; - readonly created_at: string; - readonly created_by: string | null; - readonly updated_at: string; - readonly updated_by: string | null; - /** Alias for id for backwards compatibility. */ - readonly entity_id: string; - /** Parent entity ID for nested entities. */ - readonly parent: string; -} diff --git a/web/packages/sdk/generated/platform/schema/SystemBenchmarkLabels.ts b/web/packages/sdk/generated/platform/schema/SystemBenchmarkLabels.ts deleted file mode 100644 index fa258a871b..0000000000 --- a/web/packages/sdk/generated/platform/schema/SystemBenchmarkLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type SystemBenchmarkLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/SystemBenchmarkOfflineJob.ts b/web/packages/sdk/generated/platform/schema/SystemBenchmarkOfflineJob.ts deleted file mode 100644 index b7edae48cc..0000000000 --- a/web/packages/sdk/generated/platform/schema/SystemBenchmarkOfflineJob.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { BenchmarkRef } from './BenchmarkRef'; -import type { FilesetRef } from './FilesetRef'; -import type { RunConfig } from './RunConfig'; -import type { SystemBenchmarkOfflineJobBenchmarkParams } from './SystemBenchmarkOfflineJobBenchmarkParams'; - -/** - * Input for an offline system benchmark evaluation job. - -Evaluates the benchmark's standard dataset against all pre-defined metrics in the benchmark. - */ -export interface SystemBenchmarkOfflineJob { - /** Reference to the benchmark for evaluation (format: workspace/name). */ - benchmark: BenchmarkRef; - /** Reference to a Fileset in the Files API (format: workspace/fileset-name). The fileset contains the pre-generated outputs to evaluate this benchmark on. */ - dataset: FilesetRef; - /** Execution parameters for the benchmark job. */ - params?: RunConfig; - /** Additional parameters specific to the benchmark. */ - benchmark_params?: SystemBenchmarkOfflineJobBenchmarkParams; -} diff --git a/web/packages/sdk/generated/platform/schema/SystemBenchmarkOfflineJobBenchmarkParams.ts b/web/packages/sdk/generated/platform/schema/SystemBenchmarkOfflineJobBenchmarkParams.ts deleted file mode 100644 index d21f8c86a9..0000000000 --- a/web/packages/sdk/generated/platform/schema/SystemBenchmarkOfflineJobBenchmarkParams.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Additional parameters specific to the benchmark. - */ -export type SystemBenchmarkOfflineJobBenchmarkParams = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/SystemBenchmarkOnlineJob.ts b/web/packages/sdk/generated/platform/schema/SystemBenchmarkOnlineJob.ts deleted file mode 100644 index 400d4406ff..0000000000 --- a/web/packages/sdk/generated/platform/schema/SystemBenchmarkOnlineJob.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { BenchmarkRef } from './BenchmarkRef'; -import type { EvaluatorModel } from './EvaluatorModel'; -import type { ModelRef } from './ModelRef'; -import type { RunConfigOnlineModel } from './RunConfigOnlineModel'; -import type { SystemBenchmarkOnlineJobBenchmarkParams } from './SystemBenchmarkOnlineJobBenchmarkParams'; - -/** - * Input for an online system benchmark evaluation job. - -Evaluates the benchmark's standard dataset against all pre-defined metrics in the benchmark. - */ -export interface SystemBenchmarkOnlineJob { - /** Reference to the benchmark for evaluation (format: workspace/name). */ - benchmark: BenchmarkRef; - /** The model to evaluate. */ - model: EvaluatorModel | ModelRef; - /** Execution parameters for the benchmark job. */ - params?: RunConfigOnlineModel; - /** Additional parameters specific to the benchmark. */ - benchmark_params?: SystemBenchmarkOnlineJobBenchmarkParams; -} diff --git a/web/packages/sdk/generated/platform/schema/SystemBenchmarkOnlineJobBenchmarkParams.ts b/web/packages/sdk/generated/platform/schema/SystemBenchmarkOnlineJobBenchmarkParams.ts deleted file mode 100644 index b4e4aef865..0000000000 --- a/web/packages/sdk/generated/platform/schema/SystemBenchmarkOnlineJobBenchmarkParams.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Additional parameters specific to the benchmark. - */ -export type SystemBenchmarkOnlineJobBenchmarkParams = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/SystemBenchmarkSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/SystemBenchmarkSupportedJobTypesItem.ts deleted file mode 100644 index 436b15c5ef..0000000000 --- a/web/packages/sdk/generated/platform/schema/SystemBenchmarkSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type SystemBenchmarkSupportedJobTypesItem = - (typeof SystemBenchmarkSupportedJobTypesItem)[keyof typeof SystemBenchmarkSupportedJobTypesItem]; - -export const SystemBenchmarkSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/SystemMetric.ts b/web/packages/sdk/generated/platform/schema/SystemMetric.ts deleted file mode 100644 index e5772bd1a9..0000000000 --- a/web/packages/sdk/generated/platform/schema/SystemMetric.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { Parameter } from './Parameter'; -import type { SystemMetricLabels } from './SystemMetricLabels'; -import type { SystemMetricSupportedJobTypesItem } from './SystemMetricSupportedJobTypesItem'; -import type { SystemMetricType } from './SystemMetricType'; - -export interface SystemMetric { - name?: string; - workspace?: string; - /** The name of the project associated with this entity. */ - project?: string; - type?: SystemMetricType; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: SystemMetricLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: SystemMetricSupportedJobTypesItem[]; - /** List of required parameters for running an evaluation with the metric. */ - required_params?: Parameter[]; - /** List of optional parameters for running an evaluation with the metric. */ - optional_params?: Parameter[]; - readonly id: string; - readonly created_at: string; - readonly created_by: string | null; - readonly updated_at: string; - readonly updated_by: string | null; - /** Alias for id for backwards compatibility. */ - readonly entity_id: string; - /** Parent entity ID for nested entities. */ - readonly parent: string; -} diff --git a/web/packages/sdk/generated/platform/schema/SystemMetricInput.ts b/web/packages/sdk/generated/platform/schema/SystemMetricInput.ts deleted file mode 100644 index e8e66ddb26..0000000000 --- a/web/packages/sdk/generated/platform/schema/SystemMetricInput.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { Parameter } from './Parameter'; -import type { SystemMetricInputLabels } from './SystemMetricInputLabels'; -import type { SystemMetricInputSupportedJobTypesItem } from './SystemMetricInputSupportedJobTypesItem'; -import type { SystemMetricInputType } from './SystemMetricInputType'; - -/** - * Metric entity for system metric that have pre-defined dataset. - */ -export interface SystemMetricInput { - type?: SystemMetricInputType; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: SystemMetricInputLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: SystemMetricInputSupportedJobTypesItem[]; - name?: string; - /** List of required parameters for running an evaluation with the metric. */ - required_params?: Parameter[]; - /** List of optional parameters for running an evaluation with the metric. */ - optional_params?: Parameter[]; -} diff --git a/web/packages/sdk/generated/platform/schema/SystemMetricInputLabels.ts b/web/packages/sdk/generated/platform/schema/SystemMetricInputLabels.ts deleted file mode 100644 index 9ec0fb7def..0000000000 --- a/web/packages/sdk/generated/platform/schema/SystemMetricInputLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type SystemMetricInputLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/SystemMetricInputSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/SystemMetricInputSupportedJobTypesItem.ts deleted file mode 100644 index 4b906f4a7b..0000000000 --- a/web/packages/sdk/generated/platform/schema/SystemMetricInputSupportedJobTypesItem.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type SystemMetricInputSupportedJobTypesItem = - (typeof SystemMetricInputSupportedJobTypesItem)[keyof typeof SystemMetricInputSupportedJobTypesItem]; - -export const SystemMetricInputSupportedJobTypesItem = { - online: 'online', - offline: 'offline', - retriever: 'retriever', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/SystemMetricInputType.ts b/web/packages/sdk/generated/platform/schema/SystemMetricInputType.ts deleted file mode 100644 index 69acdcd378..0000000000 --- a/web/packages/sdk/generated/platform/schema/SystemMetricInputType.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type SystemMetricInputType = - (typeof SystemMetricInputType)[keyof typeof SystemMetricInputType]; - -export const SystemMetricInputType = { - system: 'system', - 'system-retriever': 'system-retriever', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/SystemMetricLabels.ts b/web/packages/sdk/generated/platform/schema/SystemMetricLabels.ts deleted file mode 100644 index d125c5ee91..0000000000 --- a/web/packages/sdk/generated/platform/schema/SystemMetricLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type SystemMetricLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/SystemMetricResponse.ts b/web/packages/sdk/generated/platform/schema/SystemMetricResponse.ts deleted file mode 100644 index 876f7c0df4..0000000000 --- a/web/packages/sdk/generated/platform/schema/SystemMetricResponse.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { Parameter } from './Parameter'; -import type { SystemMetricResponseLabels } from './SystemMetricResponseLabels'; -import type { SystemMetricResponseSupportedJobTypesItem } from './SystemMetricResponseSupportedJobTypesItem'; -import type { SystemMetricResponseType } from './SystemMetricResponseType'; - -/** - * Response type for SystemMetric. - */ -export interface SystemMetricResponse { - name?: string; - /** Workspace identifier */ - workspace?: string; - /** The name of the project associated with this entity. */ - project?: string; - /** Entity name within the workspace */ - id?: string; - created_at?: string; - updated_at?: string; - parent?: string; - type?: SystemMetricResponseType; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: SystemMetricResponseLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: SystemMetricResponseSupportedJobTypesItem[]; - /** List of required parameters for running an evaluation with the metric. */ - required_params?: Parameter[]; - /** List of optional parameters for running an evaluation with the metric. */ - optional_params?: Parameter[]; -} diff --git a/web/packages/sdk/generated/platform/schema/SystemMetricResponseLabels.ts b/web/packages/sdk/generated/platform/schema/SystemMetricResponseLabels.ts deleted file mode 100644 index b9a4f35e6c..0000000000 --- a/web/packages/sdk/generated/platform/schema/SystemMetricResponseLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type SystemMetricResponseLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/SystemMetricResponseSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/SystemMetricResponseSupportedJobTypesItem.ts deleted file mode 100644 index fb6131f7a7..0000000000 --- a/web/packages/sdk/generated/platform/schema/SystemMetricResponseSupportedJobTypesItem.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type SystemMetricResponseSupportedJobTypesItem = - (typeof SystemMetricResponseSupportedJobTypesItem)[keyof typeof SystemMetricResponseSupportedJobTypesItem]; - -export const SystemMetricResponseSupportedJobTypesItem = { - online: 'online', - offline: 'offline', - retriever: 'retriever', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/SystemMetricResponseType.ts b/web/packages/sdk/generated/platform/schema/SystemMetricResponseType.ts deleted file mode 100644 index 11838c2bfa..0000000000 --- a/web/packages/sdk/generated/platform/schema/SystemMetricResponseType.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type SystemMetricResponseType = - (typeof SystemMetricResponseType)[keyof typeof SystemMetricResponseType]; - -export const SystemMetricResponseType = { - system: 'system', - 'system-retriever': 'system-retriever', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/SystemMetricSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/SystemMetricSupportedJobTypesItem.ts deleted file mode 100644 index 8e43d884c4..0000000000 --- a/web/packages/sdk/generated/platform/schema/SystemMetricSupportedJobTypesItem.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type SystemMetricSupportedJobTypesItem = - (typeof SystemMetricSupportedJobTypesItem)[keyof typeof SystemMetricSupportedJobTypesItem]; - -export const SystemMetricSupportedJobTypesItem = { - online: 'online', - offline: 'offline', - retriever: 'retriever', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/SystemMetricType.ts b/web/packages/sdk/generated/platform/schema/SystemMetricType.ts deleted file mode 100644 index 1b00ed7b00..0000000000 --- a/web/packages/sdk/generated/platform/schema/SystemMetricType.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type SystemMetricType = (typeof SystemMetricType)[keyof typeof SystemMetricType]; - -export const SystemMetricType = { - system: 'system', - 'system-retriever': 'system-retriever', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/Task.ts b/web/packages/sdk/generated/platform/schema/Task.ts deleted file mode 100644 index ab0e8df5f2..0000000000 --- a/web/packages/sdk/generated/platform/schema/Task.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Schema for Task responses. - */ -export interface Task { - /** Unique identifier */ - id: string; - /** Task name */ - name: string; - /** Workspace identifier */ - workspace: string; - /** Parent app reference (workspace/name) */ - app: string; - /** Task description */ - description?: string; - /** The name of the project associated with this task */ - project?: string; - /** Lock status */ - locked?: boolean; - /** Creation timestamp */ - created_at?: string; - /** Last update timestamp */ - updated_at?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/TaskFilter.ts b/web/packages/sdk/generated/platform/schema/TaskFilter.ts deleted file mode 100644 index bf6b1dde5e..0000000000 --- a/web/packages/sdk/generated/platform/schema/TaskFilter.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { DatetimeFilter } from './DatetimeFilter'; - -/** - * Filter for Tasks. - */ -export interface TaskFilter { - /** Filter by workspace id. */ - workspace?: string; - /** Filter by task name. */ - name?: string; - /** Filter by app reference (workspace/name). */ - app?: string; - /** Filter by project name. */ - project?: string; - /** Filter by task description. */ - description?: string; - /** Filter entities based on creation date. */ - created_at?: DatetimeFilter; - /** Filter entities based on update date. */ - updated_at?: DatetimeFilter; -} diff --git a/web/packages/sdk/generated/platform/schema/TaskInput.ts b/web/packages/sdk/generated/platform/schema/TaskInput.ts deleted file mode 100644 index 8ece151ef8..0000000000 --- a/web/packages/sdk/generated/platform/schema/TaskInput.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Schema for creating a new Task. - -Note: workspace and app are automatically set from the URL path. - */ -export interface TaskInput { - /** Task name */ - name: string; - /** Task description */ - description?: string; - /** The name of the project associated with this task */ - project?: string; - /** If true, this record cannot be automatically updated when entries are ingested. */ - locked?: boolean; -} diff --git a/web/packages/sdk/generated/platform/schema/TaskPrompt.ts b/web/packages/sdk/generated/platform/schema/TaskPrompt.ts deleted file mode 100644 index e0f9346c42..0000000000 --- a/web/packages/sdk/generated/platform/schema/TaskPrompt.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { MessageTemplate } from './MessageTemplate'; - -/** - * Configuration for prompts that will be used for a specific task. - */ -export interface TaskPrompt { - /** The id of the task associated with this prompt. */ - task: string; - /** The content of the prompt, if it's a string. */ - content?: string; - /** The list of messages included in the prompt. Used for chat models. */ - messages?: (MessageTemplate | string)[]; - /** If specified, the prompt will be used only for the given LLM engines/models. The format is a list of strings with the format: or /. */ - models?: string[]; - /** The name of the output parser to use for this prompt. */ - output_parser?: string; - /** - * The maximum length of the prompt in number of characters. - * @minimum 1 - */ - max_length?: number; - /** Corresponds to the `prompting_mode` for which this prompt is fetched. Default is 'standard'. */ - mode?: string; - /** If specified, will be configure stop tokens for models that support this. */ - stop?: string[]; - /** - * The maximum number of tokens that can be generated in the chat completion. - * @minimum 1 - */ - max_tokens?: number; -} diff --git a/web/packages/sdk/generated/platform/schema/TaskSortField.ts b/web/packages/sdk/generated/platform/schema/TaskSortField.ts deleted file mode 100644 index 0bc2218b72..0000000000 --- a/web/packages/sdk/generated/platform/schema/TaskSortField.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Sort fields for Tasks. - */ -export type TaskSortField = (typeof TaskSortField)[keyof typeof TaskSortField]; - -export const TaskSortField = { - created_at: 'created_at', - '-created_at': '-created_at', - name: 'name', - '-name': '-name', - updated_at: 'updated_at', - '-updated_at': '-updated_at', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/TaskUpdate.ts b/web/packages/sdk/generated/platform/schema/TaskUpdate.ts deleted file mode 100644 index 2778dbf273..0000000000 --- a/web/packages/sdk/generated/platform/schema/TaskUpdate.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Schema for updating an existing Task. - */ -export interface TaskUpdate { - /** Task description */ - description?: string; - /** The name of the project associated with this task */ - project?: string; - /** Lock status */ - locked?: boolean; -} diff --git a/web/packages/sdk/generated/platform/schema/TasksPage.ts b/web/packages/sdk/generated/platform/schema/TasksPage.ts deleted file mode 100644 index 8b9e6c3967..0000000000 --- a/web/packages/sdk/generated/platform/schema/TasksPage.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { PaginationData } from './PaginationData'; -import type { Task } from './Task'; -import type { TasksPageFilter } from './TasksPageFilter'; - -export interface TasksPage { - data: Task[]; - /** Pagination information. */ - pagination?: PaginationData; - /** The field on which the results are sorted. */ - sort?: string; - /** Filtering information. */ - filter?: TasksPageFilter; -} diff --git a/web/packages/sdk/generated/platform/schema/TasksPageFilter.ts b/web/packages/sdk/generated/platform/schema/TasksPageFilter.ts deleted file mode 100644 index 843565cac5..0000000000 --- a/web/packages/sdk/generated/platform/schema/TasksPageFilter.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Filtering information. - */ -export type TasksPageFilter = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/ThumbDirection.ts b/web/packages/sdk/generated/platform/schema/ThumbDirection.ts deleted file mode 100644 index 3effde6398..0000000000 --- a/web/packages/sdk/generated/platform/schema/ThumbDirection.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Possible thumb feedback choices. - */ -export type ThumbDirection = (typeof ThumbDirection)[keyof typeof ThumbDirection]; - -export const ThumbDirection = { - up: 'up', - down: 'down', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/TimeSeriesParameters.ts b/web/packages/sdk/generated/platform/schema/TimeSeriesParameters.ts deleted file mode 100644 index 9f413a1f9a..0000000000 --- a/web/packages/sdk/generated/platform/schema/TimeSeriesParameters.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Configuration for time-series mode in the Safe Synthesizer pipeline. - -Controls whether a dataset is treated as time-series data, including -timestamp column selection, interval inference, and format validation. -The time-series pipeline is currently experimental. - */ -export interface TimeSeriesParameters { - /** Whether to treat the dataset as time series. When enabled, either ``timestamp_column`` or ``timestamp_interval_seconds`` is required. For grouped time series, ``group_training_examples_by`` needs to be set. */ - is_timeseries?: boolean; - /** Name of the column containing timestamps used to order records when ``is_timeseries`` is ``True``. Required only when ``is_timeseries`` is ``True`` and ``timestamp_interval_seconds`` is not provided. */ - timestamp_column?: string; - /** Interval in seconds between timestamps. If not provided, the timestamp column will be used to infer the interval. */ - timestamp_interval_seconds?: number; - /** Format of the timestamp column. Accepts either: (1) Python strftime format codes for string timestamps (e.g., '%Y-%m-%d %H:%M:%S', '%m/%d/%Y'), or (2) 'elapsed_seconds' for numeric (int/float) timestamps representing seconds as an increasing counter (e.g., 0, 60, 120 for 1-minute intervals). If not provided, the format will be inferred from the data. */ - timestamp_format?: string; - /** Start timestamp. If not provided, the first timestamp in the timestamp column will be used. */ - start_timestamp?: string | number; - /** Stop timestamp. If not provided, the last timestamp in the timestamp column will be used. */ - stop_timestamp?: string | number; -} diff --git a/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetric.ts b/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetric.ts deleted file mode 100644 index 96c3ca4e83..0000000000 --- a/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetric.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ToolCallAccuracyMetricInputTemplate } from './ToolCallAccuracyMetricInputTemplate'; -import type { ToolCallAccuracyMetricLabels } from './ToolCallAccuracyMetricLabels'; -import type { ToolCallAccuracyMetricSupportedJobTypesItem } from './ToolCallAccuracyMetricSupportedJobTypesItem'; - -/** - * RAGAS metric for measuring tool call accuracy. - */ -export interface ToolCallAccuracyMetric { - /** Entity name within the workspace */ - name?: string; - /** - * Workspace identifier - * @pattern ^[\w\-\+.@:]+$ - */ - workspace: string; - /** The name of the project associated with this entity. */ - project?: string; - type?: 'tool_call_accuracy'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: ToolCallAccuracyMetricLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: ToolCallAccuracyMetricSupportedJobTypesItem[]; - /** Optional Jinja template for rendering the input payload for RAGAS evaluation. */ - input_template?: ToolCallAccuracyMetricInputTemplate; - readonly id: string; - readonly created_at: string; - readonly created_by: string | null; - readonly updated_at: string; - readonly updated_by: string | null; - /** Alias for id for backwards compatibility. */ - readonly entity_id: string; - /** Parent entity ID for nested entities. */ - readonly parent: string; -} diff --git a/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetricInput.ts b/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetricInput.ts deleted file mode 100644 index b8311f8c0d..0000000000 --- a/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetricInput.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ToolCallAccuracyMetricInputInputTemplate } from './ToolCallAccuracyMetricInputInputTemplate'; -import type { ToolCallAccuracyMetricInputLabels } from './ToolCallAccuracyMetricInputLabels'; -import type { ToolCallAccuracyMetricInputSupportedJobTypesItem } from './ToolCallAccuracyMetricInputSupportedJobTypesItem'; - -/** - * Request type for ToolCallAccuracy metrics (no judge required). - */ -export interface ToolCallAccuracyMetricInput { - type?: 'tool_call_accuracy'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: ToolCallAccuracyMetricInputLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: ToolCallAccuracyMetricInputSupportedJobTypesItem[]; - /** Optional Jinja template for rendering the input payload for RAGAS evaluation. */ - input_template?: ToolCallAccuracyMetricInputInputTemplate; -} diff --git a/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetricInputInputTemplate.ts b/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetricInputInputTemplate.ts deleted file mode 100644 index 12efd57087..0000000000 --- a/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetricInputInputTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional Jinja template for rendering the input payload for RAGAS evaluation. - */ -export type ToolCallAccuracyMetricInputInputTemplate = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetricInputLabels.ts b/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetricInputLabels.ts deleted file mode 100644 index 45ee657d9a..0000000000 --- a/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetricInputLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type ToolCallAccuracyMetricInputLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetricInputSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetricInputSupportedJobTypesItem.ts deleted file mode 100644 index b7b53f76b1..0000000000 --- a/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetricInputSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type ToolCallAccuracyMetricInputSupportedJobTypesItem = - (typeof ToolCallAccuracyMetricInputSupportedJobTypesItem)[keyof typeof ToolCallAccuracyMetricInputSupportedJobTypesItem]; - -export const ToolCallAccuracyMetricInputSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetricInputTemplate.ts b/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetricInputTemplate.ts deleted file mode 100644 index 6700407f8a..0000000000 --- a/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetricInputTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional Jinja template for rendering the input payload for RAGAS evaluation. - */ -export type ToolCallAccuracyMetricInputTemplate = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetricLabels.ts b/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetricLabels.ts deleted file mode 100644 index 670c098415..0000000000 --- a/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetricLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type ToolCallAccuracyMetricLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetricResponse.ts b/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetricResponse.ts deleted file mode 100644 index 72f29b9e55..0000000000 --- a/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetricResponse.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ToolCallAccuracyMetricResponseInputTemplate } from './ToolCallAccuracyMetricResponseInputTemplate'; -import type { ToolCallAccuracyMetricResponseLabels } from './ToolCallAccuracyMetricResponseLabels'; -import type { ToolCallAccuracyMetricResponseSupportedJobTypesItem } from './ToolCallAccuracyMetricResponseSupportedJobTypesItem'; - -/** - * Response type for ToolCallAccuracy metrics (no judge required). - */ -export interface ToolCallAccuracyMetricResponse { - /** Entity name within the workspace */ - name?: string; - /** Workspace identifier */ - workspace?: string; - /** The name of the project associated with this entity. */ - project?: string; - /** Entity name within the workspace */ - id?: string; - created_at?: string; - updated_at?: string; - parent?: string; - type?: 'tool_call_accuracy'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: ToolCallAccuracyMetricResponseLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: ToolCallAccuracyMetricResponseSupportedJobTypesItem[]; - /** Optional Jinja template for rendering the input payload for RAGAS evaluation. */ - input_template?: ToolCallAccuracyMetricResponseInputTemplate; -} diff --git a/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetricResponseInputTemplate.ts b/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetricResponseInputTemplate.ts deleted file mode 100644 index 9bad93b7c9..0000000000 --- a/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetricResponseInputTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional Jinja template for rendering the input payload for RAGAS evaluation. - */ -export type ToolCallAccuracyMetricResponseInputTemplate = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetricResponseLabels.ts b/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetricResponseLabels.ts deleted file mode 100644 index 11778340ef..0000000000 --- a/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetricResponseLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type ToolCallAccuracyMetricResponseLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetricResponseSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetricResponseSupportedJobTypesItem.ts deleted file mode 100644 index f7bfa524ae..0000000000 --- a/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetricResponseSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type ToolCallAccuracyMetricResponseSupportedJobTypesItem = - (typeof ToolCallAccuracyMetricResponseSupportedJobTypesItem)[keyof typeof ToolCallAccuracyMetricResponseSupportedJobTypesItem]; - -export const ToolCallAccuracyMetricResponseSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetricSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetricSupportedJobTypesItem.ts deleted file mode 100644 index 1ceedcbee0..0000000000 --- a/web/packages/sdk/generated/platform/schema/ToolCallAccuracyMetricSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type ToolCallAccuracyMetricSupportedJobTypesItem = - (typeof ToolCallAccuracyMetricSupportedJobTypesItem)[keyof typeof ToolCallAccuracyMetricSupportedJobTypesItem]; - -export const ToolCallAccuracyMetricSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/ToolCallConfig.ts b/web/packages/sdk/generated/platform/schema/ToolCallConfig.ts deleted file mode 100644 index 24db6d5dd6..0000000000 --- a/web/packages/sdk/generated/platform/schema/ToolCallConfig.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Configuration for tool calling support in NIM deployments. - */ -export interface ToolCallConfig { - /** - * Name of the tool call parser to use (e.g., 'openai', 'hermes', 'pythonic', 'llama3_json', 'mistral'). - * @maxLength 255 - */ - tool_call_parser?: string; - /** - * Reference to a fileset containing the custom tool call plugin Python file. Expected format: '{workspace}/{fileset_name}'. The fileset is mounted separately from the model checkpoint at deployment time. - * @maxLength 255 - */ - tool_call_plugin?: string; - /** Whether to enable automatic tool choice. When enabled, the model can decide to call tools without explicit user instruction. */ - auto_tool_choice?: boolean; -} diff --git a/web/packages/sdk/generated/platform/schema/ToolCallingMetadataContent.ts b/web/packages/sdk/generated/platform/schema/ToolCallingMetadataContent.ts deleted file mode 100644 index a92a2c8ed9..0000000000 --- a/web/packages/sdk/generated/platform/schema/ToolCallingMetadataContent.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Content for tool-calling configuration on model filesets. - -Stores chat template and tool calling settings that are merged into -the ModelSpec during checkpoint analysis. - */ -export interface ToolCallingMetadataContent { - /** Jinja2 chat template for the model. */ - chat_template?: string; - /** Name of the tool call parser (e.g., 'openai', 'hermes', 'pythonic', 'llama3_json', 'mistral'). */ - tool_call_parser?: string; - /** Reference to a fileset containing a custom tool call plugin Python file. Expected format: '{workspace}/{fileset_name}'. */ - tool_call_plugin?: string; - /** Whether to enable automatic tool choice. */ - auto_tool_choice?: boolean; -} diff --git a/web/packages/sdk/generated/platform/schema/ToolCallingMetric.ts b/web/packages/sdk/generated/platform/schema/ToolCallingMetric.ts deleted file mode 100644 index 2231db8209..0000000000 --- a/web/packages/sdk/generated/platform/schema/ToolCallingMetric.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ToolCallingMetricLabels } from './ToolCallingMetricLabels'; -import type { ToolCallingMetricSupportedJobTypesItem } from './ToolCallingMetricSupportedJobTypesItem'; - -/** - * Persisted Tool Calling metric. - */ -export interface ToolCallingMetric { - /** Entity name within the workspace */ - name?: string; - /** - * Workspace identifier - * @pattern ^[\w\-\+.@:]+$ - */ - workspace: string; - /** The name of the project associated with this entity. */ - project?: string; - type?: 'tool-calling'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: ToolCallingMetricLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: ToolCallingMetricSupportedJobTypesItem[]; - /** The template for the ground truth reference to evaluate tool calling accuracy. */ - reference: string; - readonly id: string; - readonly created_at: string; - readonly created_by: string | null; - readonly updated_at: string; - readonly updated_by: string | null; - /** Alias for id for backwards compatibility. */ - readonly entity_id: string; - /** Parent entity ID for nested entities. */ - readonly parent: string; -} diff --git a/web/packages/sdk/generated/platform/schema/ToolCallingMetricInput.ts b/web/packages/sdk/generated/platform/schema/ToolCallingMetricInput.ts deleted file mode 100644 index 84ec4a8c4c..0000000000 --- a/web/packages/sdk/generated/platform/schema/ToolCallingMetricInput.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ToolCallingMetricInputLabels } from './ToolCallingMetricInputLabels'; -import type { ToolCallingMetricInputSupportedJobTypesItem } from './ToolCallingMetricInputSupportedJobTypesItem'; - -/** - * Request type for ToolCallingMetric. Tool-calling accuracy metric for structured function calls. - */ -export interface ToolCallingMetricInput { - type?: 'tool-calling'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: ToolCallingMetricInputLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: ToolCallingMetricInputSupportedJobTypesItem[]; - /** The template for the ground truth reference to evaluate tool calling accuracy. */ - reference: string; -} diff --git a/web/packages/sdk/generated/platform/schema/ToolCallingMetricInputLabels.ts b/web/packages/sdk/generated/platform/schema/ToolCallingMetricInputLabels.ts deleted file mode 100644 index 3afe3e303b..0000000000 --- a/web/packages/sdk/generated/platform/schema/ToolCallingMetricInputLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type ToolCallingMetricInputLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/ToolCallingMetricInputSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/ToolCallingMetricInputSupportedJobTypesItem.ts deleted file mode 100644 index 9fbb25e347..0000000000 --- a/web/packages/sdk/generated/platform/schema/ToolCallingMetricInputSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type ToolCallingMetricInputSupportedJobTypesItem = - (typeof ToolCallingMetricInputSupportedJobTypesItem)[keyof typeof ToolCallingMetricInputSupportedJobTypesItem]; - -export const ToolCallingMetricInputSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/ToolCallingMetricLabels.ts b/web/packages/sdk/generated/platform/schema/ToolCallingMetricLabels.ts deleted file mode 100644 index e989a6fc02..0000000000 --- a/web/packages/sdk/generated/platform/schema/ToolCallingMetricLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type ToolCallingMetricLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/ToolCallingMetricResponse.ts b/web/packages/sdk/generated/platform/schema/ToolCallingMetricResponse.ts deleted file mode 100644 index 947add72eb..0000000000 --- a/web/packages/sdk/generated/platform/schema/ToolCallingMetricResponse.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ToolCallingMetricResponseLabels } from './ToolCallingMetricResponseLabels'; -import type { ToolCallingMetricResponseSupportedJobTypesItem } from './ToolCallingMetricResponseSupportedJobTypesItem'; - -/** - * Response type for ToolCallingMetric. - */ -export interface ToolCallingMetricResponse { - /** Entity name within the workspace */ - name?: string; - /** Workspace identifier */ - workspace?: string; - /** The name of the project associated with this entity. */ - project?: string; - /** Entity name within the workspace */ - id?: string; - created_at?: string; - updated_at?: string; - parent?: string; - type?: 'tool-calling'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: ToolCallingMetricResponseLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: ToolCallingMetricResponseSupportedJobTypesItem[]; - /** The template for the ground truth reference to evaluate tool calling accuracy. */ - reference: string; -} diff --git a/web/packages/sdk/generated/platform/schema/ToolCallingMetricResponseLabels.ts b/web/packages/sdk/generated/platform/schema/ToolCallingMetricResponseLabels.ts deleted file mode 100644 index 32df88f23c..0000000000 --- a/web/packages/sdk/generated/platform/schema/ToolCallingMetricResponseLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type ToolCallingMetricResponseLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/ToolCallingMetricResponseSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/ToolCallingMetricResponseSupportedJobTypesItem.ts deleted file mode 100644 index 747f41c02f..0000000000 --- a/web/packages/sdk/generated/platform/schema/ToolCallingMetricResponseSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type ToolCallingMetricResponseSupportedJobTypesItem = - (typeof ToolCallingMetricResponseSupportedJobTypesItem)[keyof typeof ToolCallingMetricResponseSupportedJobTypesItem]; - -export const ToolCallingMetricResponseSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/ToolCallingMetricSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/ToolCallingMetricSupportedJobTypesItem.ts deleted file mode 100644 index ccfd6e0392..0000000000 --- a/web/packages/sdk/generated/platform/schema/ToolCallingMetricSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type ToolCallingMetricSupportedJobTypesItem = - (typeof ToolCallingMetricSupportedJobTypesItem)[keyof typeof ToolCallingMetricSupportedJobTypesItem]; - -export const ToolCallingMetricSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/ToolInputRails.ts b/web/packages/sdk/generated/platform/schema/ToolInputRails.ts deleted file mode 100644 index 27083b4f0e..0000000000 --- a/web/packages/sdk/generated/platform/schema/ToolInputRails.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Configuration of tool input rails. -Tool input rails are applied to tool results before they are processed. -They can validate, filter, or transform tool outputs for security and safety. - */ -export interface ToolInputRails { - /** The names of all the flows that implement tool input rails. */ - flows?: string[]; - /** If True, the tool input rails are executed in parallel. */ - parallel?: boolean; -} diff --git a/web/packages/sdk/generated/platform/schema/ToolOutputRails.ts b/web/packages/sdk/generated/platform/schema/ToolOutputRails.ts deleted file mode 100644 index 53e76b0540..0000000000 --- a/web/packages/sdk/generated/platform/schema/ToolOutputRails.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Configuration of tool output rails. -Tool output rails are applied to tool calls before they are executed. -They can validate tool names, parameters, and context to ensure safe tool usage. - */ -export interface ToolOutputRails { - /** The names of all the flows that implement tool output rails. */ - flows?: string[]; - /** If True, the tool output rails are executed in parallel. */ - parallel?: boolean; -} diff --git a/web/packages/sdk/generated/platform/schema/TopicAdherenceMetric.ts b/web/packages/sdk/generated/platform/schema/TopicAdherenceMetric.ts deleted file mode 100644 index 39fc287ee8..0000000000 --- a/web/packages/sdk/generated/platform/schema/TopicAdherenceMetric.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { EvaluatorModel } from './EvaluatorModel'; -import type { InferenceParams } from './InferenceParams'; -import type { TopicAdherenceMetricInputTemplate } from './TopicAdherenceMetricInputTemplate'; -import type { TopicAdherenceMetricLabels } from './TopicAdherenceMetricLabels'; -import type { TopicAdherenceMetricMetricMode } from './TopicAdherenceMetricMetricMode'; -import type { TopicAdherenceMetricSupportedJobTypesItem } from './TopicAdherenceMetricSupportedJobTypesItem'; - -/** - * RAGAS metric for measuring topic adherence. - */ -export interface TopicAdherenceMetric { - /** Entity name within the workspace */ - name?: string; - /** - * Workspace identifier - * @pattern ^[\w\-\+.@:]+$ - */ - workspace: string; - /** The name of the project associated with this entity. */ - project?: string; - /** The LLM model to use as judge. */ - judge_model: EvaluatorModel; - /** Inference parameters for the judge. */ - inference?: InferenceParams; - /** If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse/output formatting failures are always converted to NaN. */ - ignore_request_failure?: boolean; - type?: 'topic_adherence'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: TopicAdherenceMetricLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: TopicAdherenceMetricSupportedJobTypesItem[]; - /** Optional Jinja template for rendering the input payload for RAGAS evaluation. */ - input_template?: TopicAdherenceMetricInputTemplate; - /** The mode for computing topic adherence score. */ - metric_mode?: TopicAdherenceMetricMetricMode; - readonly id: string; - readonly created_at: string; - readonly created_by: string | null; - readonly updated_at: string; - readonly updated_by: string | null; - /** Alias for id for backwards compatibility. */ - readonly entity_id: string; - /** Parent entity ID for nested entities. */ - readonly parent: string; -} diff --git a/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricInput.ts b/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricInput.ts deleted file mode 100644 index f446379055..0000000000 --- a/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricInput.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { EvaluatorModel } from './EvaluatorModel'; -import type { InferenceParams } from './InferenceParams'; -import type { ModelRef } from './ModelRef'; -import type { TopicAdherenceMetricInputInputTemplate } from './TopicAdherenceMetricInputInputTemplate'; -import type { TopicAdherenceMetricInputLabels } from './TopicAdherenceMetricInputLabels'; -import type { TopicAdherenceMetricInputMetricMode } from './TopicAdherenceMetricInputMetricMode'; -import type { TopicAdherenceMetricInputSupportedJobTypesItem } from './TopicAdherenceMetricInputSupportedJobTypesItem'; - -/** - * Request type for TopicAdherence metrics. - */ -export interface TopicAdherenceMetricInput { - /** The judge model configuration. */ - judge_model: EvaluatorModel | ModelRef; - /** Inference parameters for the judge. */ - inference?: InferenceParams; - /** If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse/output formatting failures are always converted to NaN. */ - ignore_request_failure?: boolean; - type?: 'topic_adherence'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: TopicAdherenceMetricInputLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: TopicAdherenceMetricInputSupportedJobTypesItem[]; - /** Optional Jinja template for rendering the input payload for RAGAS evaluation. */ - input_template?: TopicAdherenceMetricInputInputTemplate; - /** The mode for computing topic adherence score. */ - metric_mode?: TopicAdherenceMetricInputMetricMode; -} diff --git a/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricInputInputTemplate.ts b/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricInputInputTemplate.ts deleted file mode 100644 index 2046318362..0000000000 --- a/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricInputInputTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional Jinja template for rendering the input payload for RAGAS evaluation. - */ -export type TopicAdherenceMetricInputInputTemplate = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricInputLabels.ts b/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricInputLabels.ts deleted file mode 100644 index 94badcd0cb..0000000000 --- a/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricInputLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type TopicAdherenceMetricInputLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricInputMetricMode.ts b/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricInputMetricMode.ts deleted file mode 100644 index cdc9c284ff..0000000000 --- a/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricInputMetricMode.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * The mode for computing topic adherence score. - */ -export type TopicAdherenceMetricInputMetricMode = - (typeof TopicAdherenceMetricInputMetricMode)[keyof typeof TopicAdherenceMetricInputMetricMode]; - -export const TopicAdherenceMetricInputMetricMode = { - f1: 'f1', - precision: 'precision', - recall: 'recall', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricInputSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricInputSupportedJobTypesItem.ts deleted file mode 100644 index 68d871c638..0000000000 --- a/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricInputSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type TopicAdherenceMetricInputSupportedJobTypesItem = - (typeof TopicAdherenceMetricInputSupportedJobTypesItem)[keyof typeof TopicAdherenceMetricInputSupportedJobTypesItem]; - -export const TopicAdherenceMetricInputSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricInputTemplate.ts b/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricInputTemplate.ts deleted file mode 100644 index ea899484b1..0000000000 --- a/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricInputTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional Jinja template for rendering the input payload for RAGAS evaluation. - */ -export type TopicAdherenceMetricInputTemplate = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricLabels.ts b/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricLabels.ts deleted file mode 100644 index ad86c84c0f..0000000000 --- a/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type TopicAdherenceMetricLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricMetricMode.ts b/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricMetricMode.ts deleted file mode 100644 index 3c3f79accd..0000000000 --- a/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricMetricMode.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * The mode for computing topic adherence score. - */ -export type TopicAdherenceMetricMetricMode = - (typeof TopicAdherenceMetricMetricMode)[keyof typeof TopicAdherenceMetricMetricMode]; - -export const TopicAdherenceMetricMetricMode = { - f1: 'f1', - precision: 'precision', - recall: 'recall', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricResponse.ts b/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricResponse.ts deleted file mode 100644 index 423932a1f7..0000000000 --- a/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricResponse.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { EvaluatorModel } from './EvaluatorModel'; -import type { InferenceParams } from './InferenceParams'; -import type { ModelRef } from './ModelRef'; -import type { TopicAdherenceMetricResponseInputTemplate } from './TopicAdherenceMetricResponseInputTemplate'; -import type { TopicAdherenceMetricResponseLabels } from './TopicAdherenceMetricResponseLabels'; -import type { TopicAdherenceMetricResponseMetricMode } from './TopicAdherenceMetricResponseMetricMode'; -import type { TopicAdherenceMetricResponseSupportedJobTypesItem } from './TopicAdherenceMetricResponseSupportedJobTypesItem'; - -/** - * Response type for TopicAdherence metrics. - */ -export interface TopicAdherenceMetricResponse { - /** Entity name within the workspace */ - name?: string; - /** Workspace identifier */ - workspace?: string; - /** The name of the project associated with this entity. */ - project?: string; - /** Entity name within the workspace */ - id?: string; - created_at?: string; - updated_at?: string; - parent?: string; - /** The judge model configuration. */ - judge_model: EvaluatorModel | ModelRef; - /** Inference parameters for the judge. */ - inference?: InferenceParams; - /** If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse/output formatting failures are always converted to NaN. */ - ignore_request_failure?: boolean; - type?: 'topic_adherence'; - /** Human-readable description of the metric. */ - description?: string; - /** Labels are key-value pairs that can be used for grouping and filtering. */ - labels?: TopicAdherenceMetricResponseLabels; - /** A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations. */ - supported_job_types?: TopicAdherenceMetricResponseSupportedJobTypesItem[]; - /** Optional Jinja template for rendering the input payload for RAGAS evaluation. */ - input_template?: TopicAdherenceMetricResponseInputTemplate; - /** The mode for computing topic adherence score. */ - metric_mode?: TopicAdherenceMetricResponseMetricMode; -} diff --git a/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricResponseInputTemplate.ts b/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricResponseInputTemplate.ts deleted file mode 100644 index 9a0209f62e..0000000000 --- a/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricResponseInputTemplate.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional Jinja template for rendering the input payload for RAGAS evaluation. - */ -export type TopicAdherenceMetricResponseInputTemplate = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricResponseLabels.ts b/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricResponseLabels.ts deleted file mode 100644 index 3454ca7d62..0000000000 --- a/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricResponseLabels.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Labels are key-value pairs that can be used for grouping and filtering. - */ -export type TopicAdherenceMetricResponseLabels = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricResponseMetricMode.ts b/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricResponseMetricMode.ts deleted file mode 100644 index 9f4615f5af..0000000000 --- a/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricResponseMetricMode.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * The mode for computing topic adherence score. - */ -export type TopicAdherenceMetricResponseMetricMode = - (typeof TopicAdherenceMetricResponseMetricMode)[keyof typeof TopicAdherenceMetricResponseMetricMode]; - -export const TopicAdherenceMetricResponseMetricMode = { - f1: 'f1', - precision: 'precision', - recall: 'recall', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricResponseSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricResponseSupportedJobTypesItem.ts deleted file mode 100644 index 0edc756286..0000000000 --- a/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricResponseSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type TopicAdherenceMetricResponseSupportedJobTypesItem = - (typeof TopicAdherenceMetricResponseSupportedJobTypesItem)[keyof typeof TopicAdherenceMetricResponseSupportedJobTypesItem]; - -export const TopicAdherenceMetricResponseSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricSupportedJobTypesItem.ts b/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricSupportedJobTypesItem.ts deleted file mode 100644 index 6eb0f7be15..0000000000 --- a/web/packages/sdk/generated/platform/schema/TopicAdherenceMetricSupportedJobTypesItem.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type TopicAdherenceMetricSupportedJobTypesItem = - (typeof TopicAdherenceMetricSupportedJobTypesItem)[keyof typeof TopicAdherenceMetricSupportedJobTypesItem]; - -export const TopicAdherenceMetricSupportedJobTypesItem = { - online: 'online', - offline: 'offline', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/Trace.ts b/web/packages/sdk/generated/platform/schema/Trace.ts deleted file mode 100644 index d4ae0b7a20..0000000000 --- a/web/packages/sdk/generated/platform/schema/Trace.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { SpanEvaluationContext } from './SpanEvaluationContext'; -import type { SpanStatus } from './SpanStatus'; - -export interface Trace { - id: string; - root_span_id?: string; - session_id: string; - workspace: string; - name?: string; - evaluation_context?: SpanEvaluationContext; - started_at: string; - ended_at?: string; - duration_ms?: number; - status: SpanStatus; - /** @minimum 0 */ - input_tokens?: number; - /** @minimum 0 */ - output_tokens?: number; - /** @minimum 0 */ - cached_tokens?: number; - /** @minimum 0 */ - total_tokens?: number; - cost_usd?: number; - cost_input_usd?: number; - cost_output_usd?: number; - /** @minimum 0 */ - span_count?: number; - /** @minimum 0 */ - error_count?: number; -} diff --git a/web/packages/sdk/generated/platform/schema/TraceFilter.ts b/web/packages/sdk/generated/platform/schema/TraceFilter.ts deleted file mode 100644 index 56d2074135..0000000000 --- a/web/packages/sdk/generated/platform/schema/TraceFilter.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { DatetimeFilter } from './DatetimeFilter'; -import type { SpanStatus } from './SpanStatus'; - -export interface TraceFilter { - /** Filter by canonical Intake trace id. */ - id?: string; - /** Filter by session id. */ - session_id?: string; - /** Filter by rolled-up trace status. */ - status?: SpanStatus; - /** Filter by root span start timestamp. */ - started_at?: DatetimeFilter; - /** Filter by root-span evaluation id. */ - evaluation_id?: string; - /** Filter by root-span evaluation sha. */ - evaluation_sha?: string; - /** Filter by root-span evaluation run id. */ - evaluation_run_id?: string; - /** Filter by root-span dataset id. */ - dataset_id?: string; - /** Filter by root-span dataset name. */ - dataset_name?: string; - /** Filter by root-span dataset version. */ - dataset_version?: string; - /** Filter by root-span dataset test case id. */ - test_case_id?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/TraceSortField.ts b/web/packages/sdk/generated/platform/schema/TraceSortField.ts deleted file mode 100644 index ecd2dccec5..0000000000 --- a/web/packages/sdk/generated/platform/schema/TraceSortField.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type TraceSortField = (typeof TraceSortField)[keyof typeof TraceSortField]; - -export const TraceSortField = { - started_at: 'started_at', - '-started_at': '-started_at', -} as const; diff --git a/web/packages/sdk/generated/platform/schema/TracesPage.ts b/web/packages/sdk/generated/platform/schema/TracesPage.ts deleted file mode 100644 index 0b5c6d6a7c..0000000000 --- a/web/packages/sdk/generated/platform/schema/TracesPage.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { PaginationData } from './PaginationData'; -import type { Trace } from './Trace'; -import type { TracesPageFilter } from './TracesPageFilter'; - -export interface TracesPage { - data: Trace[]; - /** Pagination information. */ - pagination?: PaginationData; - /** The field on which the results are sorted. */ - sort?: string; - /** Filtering information. */ - filter?: TracesPageFilter; -} diff --git a/web/packages/sdk/generated/platform/schema/TracesPageFilter.ts b/web/packages/sdk/generated/platform/schema/TracesPageFilter.ts deleted file mode 100644 index 6135cb09ff..0000000000 --- a/web/packages/sdk/generated/platform/schema/TracesPageFilter.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Filtering information. - */ -export type TracesPageFilter = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/TracingConfig.ts b/web/packages/sdk/generated/platform/schema/TracingConfig.ts deleted file mode 100644 index 9c2b271971..0000000000 --- a/web/packages/sdk/generated/platform/schema/TracingConfig.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { LogAdapterConfig } from './LogAdapterConfig'; - -export interface TracingConfig { - enabled?: boolean; - /** The list of tracing adapters to use. If not specified, the default adapters are used. */ - adapters?: LogAdapterConfig[]; - /** The span format to use. Options are 'legacy' (simple metrics) or 'opentelemetry' (OpenTelemetry semantic conventions). */ - span_format?: string; - /** Capture prompts and responses (user/assistant/tool message content) in tracing/telemetry events. Disabled by default for privacy and alignment with OpenTelemetry GenAI semantic conventions. WARNING: Enabling this may include PII and sensitive data in your telemetry backend. */ - enable_content_capture?: boolean; -} diff --git a/web/packages/sdk/generated/platform/schema/TrainingHyperparams.ts b/web/packages/sdk/generated/platform/schema/TrainingHyperparams.ts deleted file mode 100644 index eec74bd8ab..0000000000 --- a/web/packages/sdk/generated/platform/schema/TrainingHyperparams.ts +++ /dev/null @@ -1,59 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { TrainingHyperparamsQuantizationBits } from './TrainingHyperparamsQuantizationBits'; - -/** - * Hyperparameters that control the training process behavior. - -This class contains all the fine-tuning hyperparameters that control how the model -learns, including learning rates, batch sizes, LoRA configuration, and optimization -settings. These parameters directly affect training performance and quality. - */ -export interface TrainingHyperparams { - /** Number of records the model will see during training. This parameter is a proxy for training time. For example, if its value is the same size as the input dataset, this is like training for a single epoch. If its value is larger, this is like training for multiple (possibly fractional) epochs. If its value is smaller, this is like training for a fraction of an epoch. Supports 'auto' where a reasonable value is chosen based on other config params and data. */ - num_input_records_to_sample?: 'auto' | number; - /** The batch size per device for training. Must be >= 1. */ - batch_size?: number; - /** Number of update steps to accumulate the gradients for, before performing a backward/update pass. This technique increases the effective batch size that will fit into GPU memory. Must be >= 1. */ - gradient_accumulation_steps?: number; - /** The weight decay to apply to all layers except all bias and LayerNorm weights in the AdamW optimizer. Must be in (0, 1). */ - weight_decay?: number; - /** Ratio of total training steps used for a linear warmup from 0 to the learning rate. Must be > 0. */ - warmup_ratio?: number; - /** The scheduler type to use. See the HuggingFace documentation of ``SchedulerType`` for all possible values. */ - lr_scheduler?: string; - /** The initial learning rate for `AdamW` optimizer. Must be in (0, 1). Setting to 'auto' uses a model-specific default if one exists. */ - learning_rate?: 'auto' | number; - /** The rank of the LoRA update matrices. Lower rank results in smaller update matrices with fewer trainable parameters. Must be > 0. */ - lora_r?: number; - /** The ratio of the LoRA scaling factor (alpha) to the LoRA rank. Empirically, this parameter works well when set to 0.5, 1, or 2. Must be in [0.5, 3]. */ - lora_alpha_over_r?: number; - /** The list of transformer modules to apply LoRA to. Possible modules: 'q_proj', 'k_proj', 'v_proj', 'o_proj', 'gate_proj', 'up_proj', 'down_proj'. */ - lora_target_modules?: string[]; - /** Whether to use Unsloth for optimized training. */ - use_unsloth?: 'auto' | boolean; - /** Scale the base LLM's context length by this factor using RoPE scaling. Must be >= 1 or 'auto'. */ - rope_scaling_factor?: 'auto' | number; - /** The fraction of the training data used for validation. Must be in [0, 1]. If set to 0, no validation will be performed. If set larger than 0, validation loss will be computed and reported throughout training. */ - validation_ratio?: number; - /** The number of steps between validation checks for the HF Trainer arguments. Must be > 0. */ - validation_steps?: number; - /** Pretrained model to use for fine-tuning. Defaults to SmolLM3. May be a Hugging Face model ID (loaded from the Hugging Face Hub or cache) or a local path. See security note in docs before using untrusted sources. */ - pretrained_model?: string; - /** Whether to quantize the model during training. This can reduce memory usage and potentially speed up training, but may also impact model accuracy. */ - quantize_model?: boolean; - /** The number of bits to use for quantization if ``quantize_model`` is ``True``. Accepts 8 or 4. */ - quantization_bits?: TrainingHyperparamsQuantizationBits; - /** The PEFT (Parameter-Efficient Fine-Tuning) implementation to use. Options: 'lora' for Low-Rank Adaptation, 'QLORA' for Quantized LoRA. */ - peft_implementation?: string; - /** The fraction of the total VRAM to use for training. Modify this to allow longer sequences. Must be in [0, 1]. */ - max_vram_fraction?: number; - /** The attention implementation to use for model loading. Default uses Flash Attention 3 via the HuggingFace Kernels Hub (requires the 'kernels' pip package; falls back to 'sdpa' if the 'kernels' package is not installed). Other common values: 'flash_attention_2' (requires flash-attn pip package), 'sdpa' (PyTorch scaled dot product attention), 'eager' (standard PyTorch). Custom HuggingFace Kernels Hub paths (e.g. 'kernels-community/flash-attn2') are also supported. */ - attn_implementation?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/TrainingHyperparamsQuantizationBits.ts b/web/packages/sdk/generated/platform/schema/TrainingHyperparamsQuantizationBits.ts deleted file mode 100644 index e00220e87b..0000000000 --- a/web/packages/sdk/generated/platform/schema/TrainingHyperparamsQuantizationBits.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * The number of bits to use for quantization if ``quantize_model`` is ``True``. Accepts 8 or 4. - */ -export type TrainingHyperparamsQuantizationBits = - (typeof TrainingHyperparamsQuantizationBits)[keyof typeof TrainingHyperparamsQuantizationBits]; - -export const TrainingHyperparamsQuantizationBits = { - NUMBER_4: 4, - NUMBER_8: 8, -} as const; diff --git a/web/packages/sdk/generated/platform/schema/TrendMicroRailConfig.ts b/web/packages/sdk/generated/platform/schema/TrendMicroRailConfig.ts deleted file mode 100644 index 3e4c749a72..0000000000 --- a/web/packages/sdk/generated/platform/schema/TrendMicroRailConfig.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Configuration data for the Trend Micro AI Guard API - */ -export interface TrendMicroRailConfig { - /** The endpoint for the Trend Micro AI Guard API. For other regions, use: https://api.{region}.xdr.trendmicro.com/v3.0/aiSecurity/applyGuardrails where region is eu, jp, au, in, sg, or mea. */ - v1_url?: string; - /** Environment variable containing API key for Trend Micro AI Guard */ - api_key_env_var?: string; - /** - * Application name for TMV1-Application-Name header (REQUIRED). Must contain only letters, numbers, hyphens, and underscores, with a maximum length of 64 characters. - * @maxLength 64 - * @pattern ^[a-zA-Z0-9_-]+$ - */ - application_name?: string; - /** If True, returns detailed AI Guard results with confidence scores (Prefer: return=representation). If False, returns minimal response with only action and reasons (Prefer: return=minimal). */ - detailed_response?: boolean; -} diff --git a/web/packages/sdk/generated/platform/schema/UpdateAdapterRequest.ts b/web/packages/sdk/generated/platform/schema/UpdateAdapterRequest.ts deleted file mode 100644 index e2480243bb..0000000000 --- a/web/packages/sdk/generated/platform/schema/UpdateAdapterRequest.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Request model for updating Adapter Sub Entity metadata. - */ -export interface UpdateAdapterRequest { - /** - * Optional description of the adapter - * @maxLength 1000 - */ - description?: string; - /** Whether to make this adapter available for inference post training */ - enabled?: boolean; - /** Updated fileset for the adapter */ - fileset?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/UpdateFilesetRequest.ts b/web/packages/sdk/generated/platform/schema/UpdateFilesetRequest.ts deleted file mode 100644 index aa7096da4d..0000000000 --- a/web/packages/sdk/generated/platform/schema/UpdateFilesetRequest.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { FilesetMetadataInput } from './FilesetMetadataInput'; -import type { FilesetPurpose } from './FilesetPurpose'; -import type { UpdateFilesetRequestCustomFields } from './UpdateFilesetRequestCustomFields'; - -export interface UpdateFilesetRequest { - /** - * The description of the fileset. - * @maxLength 255 - */ - description?: string; - /** The name of the project associated with this fileset. */ - project?: string; - /** The purpose of the fileset. */ - purpose?: FilesetPurpose; - /** Purpose-specific metadata. Use the purpose as the key (e.g., {dataset: {...}}). */ - metadata?: FilesetMetadataInput; - /** Custom fields for the fileset. */ - custom_fields?: UpdateFilesetRequestCustomFields; -} diff --git a/web/packages/sdk/generated/platform/schema/UpdateFilesetRequestCustomFields.ts b/web/packages/sdk/generated/platform/schema/UpdateFilesetRequestCustomFields.ts deleted file mode 100644 index 5f4c3eda76..0000000000 --- a/web/packages/sdk/generated/platform/schema/UpdateFilesetRequestCustomFields.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Custom fields for the fileset. - */ -export type UpdateFilesetRequestCustomFields = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/UpdateModelDeploymentConfigRequest.ts b/web/packages/sdk/generated/platform/schema/UpdateModelDeploymentConfigRequest.ts deleted file mode 100644 index 97815de4dc..0000000000 --- a/web/packages/sdk/generated/platform/schema/UpdateModelDeploymentConfigRequest.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { NIMDeployment } from './NIMDeployment'; - -/** - * Request model for updating a ModelDeploymentConfig (creates new version). - */ -export interface UpdateModelDeploymentConfigRequest { - /** - * Optional description of the deployment configuration - * @maxLength 1000 - */ - description?: string; - /** Configuration for NIM-based deployment */ - nim_deployment: NIMDeployment; - /** - * Optional reference to the base model entity ID for this deployment - * @maxLength 255 - */ - model_entity_id?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/UpdateModelDeploymentRequest.ts b/web/packages/sdk/generated/platform/schema/UpdateModelDeploymentRequest.ts deleted file mode 100644 index dbfca213ac..0000000000 --- a/web/packages/sdk/generated/platform/schema/UpdateModelDeploymentRequest.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Request model for updating a ModelDeployment (creates new version). - */ -export interface UpdateModelDeploymentRequest { - /** - * Reference to the ModelDeploymentConfig name - * @maxLength 255 - */ - config: string; - /** Reference to a specific ModelDeploymentConfig version. If not specified, uses latest. */ - config_version?: number; -} diff --git a/web/packages/sdk/generated/platform/schema/UpdateModelDeploymentStatusRequest.ts b/web/packages/sdk/generated/platform/schema/UpdateModelDeploymentStatusRequest.ts deleted file mode 100644 index e594705b20..0000000000 --- a/web/packages/sdk/generated/platform/schema/UpdateModelDeploymentStatusRequest.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ModelDeploymentStatus } from './ModelDeploymentStatus'; - -/** - * Request model for updating ModelDeployment status. - */ -export interface UpdateModelDeploymentStatusRequest { - /** New status for the deployment */ - status: ModelDeploymentStatus; - /** - * Detailed status message - * @maxLength 1000 - */ - status_message?: string; - /** - * Optional reference to the auto-created ModelProvider workspace/name (format: workspace/name) - * @maxLength 255 - */ - model_provider_id?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/UpdateModelEntityRequest.ts b/web/packages/sdk/generated/platform/schema/UpdateModelEntityRequest.ts deleted file mode 100644 index 1f4eb72c24..0000000000 --- a/web/packages/sdk/generated/platform/schema/UpdateModelEntityRequest.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { APIEndpointData } from './APIEndpointData'; -import type { BackendFormat } from './BackendFormat'; -import type { FinetuningType } from './FinetuningType'; -import type { ModelSpec } from './ModelSpec'; -import type { PromptData } from './PromptData'; -import type { UpdateModelEntityRequestCustomFields } from './UpdateModelEntityRequestCustomFields'; -import type { UpdateModelEntityRequestOwnership } from './UpdateModelEntityRequestOwnership'; - -/** - * Request model for updating Model Entity metadata. - */ -export interface UpdateModelEntityRequest { - /** - * Optional description of the model - * @maxLength 1000 - */ - description?: string; - /** Detailed specification for the model */ - spec?: ModelSpec; - /** A set of checkpoint files, configs, and other auxiliary info associated with this model - expected format {workspace}/{fileset_name} */ - fileset?: string; - /** Set for full weight finetuned models */ - finetuning_type?: FinetuningType; - /** Link to another model which is used as a base for the current model */ - base_model?: string; - /** Data about the inference endpoint for this model */ - api_endpoint?: APIEndpointData; - /** Inference API wire format expected by the backend. If unset, inference routing treats the model as OPENAI_CHAT. */ - backend_format?: BackendFormat | null; - /** Configuration for prompt engineering */ - prompt?: PromptData; - /** Custom fields for additional metadata */ - custom_fields?: UpdateModelEntityRequestCustomFields; - /** Ownership information for the model */ - ownership?: UpdateModelEntityRequestOwnership; - /** List of ModelProvider workspace/name resource names that provide inference for this Model Entity */ - model_providers?: string[]; - /** Whether to trust remote code for the checkpoint. - Some models without support in certain libraries such as Transformers require additional custom Python code to execute. - Due to security ramifications of running arbitrary code, this can only be set to true on one of the following conditions: - (1) the model's fileset's source is pre-approved in the platform config, or - (2) the user creating this model is an administrator. - */ - trust_remote_code?: boolean; -} diff --git a/web/packages/sdk/generated/platform/schema/UpdateModelEntityRequestCustomFields.ts b/web/packages/sdk/generated/platform/schema/UpdateModelEntityRequestCustomFields.ts deleted file mode 100644 index fc244fd9a8..0000000000 --- a/web/packages/sdk/generated/platform/schema/UpdateModelEntityRequestCustomFields.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Custom fields for additional metadata - */ -export type UpdateModelEntityRequestCustomFields = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/UpdateModelEntityRequestOwnership.ts b/web/packages/sdk/generated/platform/schema/UpdateModelEntityRequestOwnership.ts deleted file mode 100644 index 8bba6e3eac..0000000000 --- a/web/packages/sdk/generated/platform/schema/UpdateModelEntityRequestOwnership.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Ownership information for the model - */ -export type UpdateModelEntityRequestOwnership = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/UpdateModelProviderStatusRequest.ts b/web/packages/sdk/generated/platform/schema/UpdateModelProviderStatusRequest.ts deleted file mode 100644 index e9c99305a1..0000000000 --- a/web/packages/sdk/generated/platform/schema/UpdateModelProviderStatusRequest.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ModelProviderStatus } from './ModelProviderStatus'; -import type { ServedModelMapping } from './ServedModelMapping'; - -/** - * Request model for updating ModelProvider status and autodiscovery fields. - -This endpoint supports partial updates for fields managed by Models Controller. - */ -export interface UpdateModelProviderStatusRequest { - /** - * Reference to the ModelDeployment ID if this provider is associated with a deployment - * @maxLength 255 - */ - model_deployment_id?: string; - /** List of models served by this provider with routing information for IGW */ - served_models?: ServedModelMapping[]; - /** Status of the model provider */ - status?: ModelProviderStatus; - /** - * Status message. If status is provided without status_message, defaults to empty string. - * @maxLength 1000 - */ - status_message?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/UpdateVirtualModelRequest.ts b/web/packages/sdk/generated/platform/schema/UpdateVirtualModelRequest.ts deleted file mode 100644 index 933b14d439..0000000000 --- a/web/packages/sdk/generated/platform/schema/UpdateVirtualModelRequest.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { MiddlewareCall } from './MiddlewareCall'; -import type { VirtualModelInferenceConfig } from './VirtualModelInferenceConfig'; - -/** - * Request body for partially updating an existing VirtualModel (PATCH). - -Only fields present in the request body are updated. Omitted fields -retain their current values. ``model_fields_set`` is used in the handler -to distinguish an intentional ``[]`` (clear the list) from a missing field -(leave unchanged). Set ``default_model_entity`` or ``override_proxy`` to -``null`` explicitly to clear them. - */ -export interface UpdateVirtualModelRequest { - /** Model entity to route to, in "workspace/name" format. Written into request["model"] before the request middleware pipeline runs. If omitted, a request middleware plugin must handle backend routing itself. Set to null to clear an existing value. */ - default_model_entity?: string; - /** Marks this VirtualModel as controller-managed. The Models controller will delete it once no ModelProvider serves the matching entity. Setting this manually opts the VirtualModel into that cleanup behavior. */ - autoprovisioned?: boolean; - /** Model entity references used by this VirtualModel. A per-entry backend_format overrides the referenced ModelEntity backend_format when IGW resolves the backend format for a request. */ - models?: VirtualModelInferenceConfig[]; - /** Ordered list of middleware plugins applied before proxying to the backend. Each entry is a MiddlewareCall with a "name" (plugin identifier) and optional "config_type" and "config_id" fields that reference a stored plugin configuration. */ - request_middleware?: MiddlewareCall[]; - /** Ordered list of middleware plugins applied after the backend response is received, before returning it to the caller. */ - response_middleware?: MiddlewareCall[]; - /** Ordered list of middleware plugins invoked after the response has been returned to the caller. Intended for fire-and-forget work (logging, analytics) that must not block or modify the response. */ - post_response_middleware?: MiddlewareCall[]; - /** Plugin-provided proxy implementation for IGW to use instead of its default aiohttp proxy. Format: "plugin-name.proxy-name". Leave unset to use the default IGW proxy. Set to null to clear an existing value. */ - override_proxy?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/UpsertModelProviderRequest.ts b/web/packages/sdk/generated/platform/schema/UpsertModelProviderRequest.ts deleted file mode 100644 index 00945cf18d..0000000000 --- a/web/packages/sdk/generated/platform/schema/UpsertModelProviderRequest.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ModelProviderStatus } from './ModelProviderStatus'; -import type { UpsertModelProviderRequestDefaultExtraBody } from './UpsertModelProviderRequestDefaultExtraBody'; -import type { UpsertModelProviderRequestDefaultExtraHeaders } from './UpsertModelProviderRequestDefaultExtraHeaders'; -import type { UpsertModelProviderRequestRequiredExtraBody } from './UpsertModelProviderRequestRequiredExtraBody'; -import type { UpsertModelProviderRequestRequiredExtraHeaders } from './UpsertModelProviderRequestRequiredExtraHeaders'; - -/** - * Request model for upserting a ModelProvider (PUT /apis/models/v2/workspaces/{workspace}/providers/{name}). - -All fields must be provided - partial updates are not supported for security reasons. -Use PUT /status endpoint to update status-related fields only. - */ -export interface UpsertModelProviderRequest { - /** - * The URN of the project associated with this model provider - * @maxLength 255 - * @pattern ^[\w\-./]+$ - */ - project?: string; - /** - * Optional description of the model provider - * @maxLength 1000 - */ - description?: string; - /** - * The network endpoint URL for the model provider - * @maxLength 2048 - */ - host_url: string; - /** - * Reference to an API key secret stored in the Secrets service. Create the secret first via secrets API, then pass the secret name here. - * @maxLength 255 - */ - api_key_secret_name?: string; - /** Optional list of specific models to enable from this provider */ - enabled_models?: string[]; - /** Default body parameters for inference requests. Can be overridden by user requests. */ - default_extra_body?: UpsertModelProviderRequestDefaultExtraBody; - /** Default headers for inference requests. Can be overridden by user requests. */ - default_extra_headers?: UpsertModelProviderRequestDefaultExtraHeaders; - /** Required body parameters for inference requests. Cannot be overridden by user requests. */ - required_extra_body?: UpsertModelProviderRequestRequiredExtraBody; - /** Required headers for inference requests. Cannot be overridden by user requests. */ - required_extra_headers?: UpsertModelProviderRequestRequiredExtraHeaders; - /** - * Optional reference to the ModelDeployment ID if this provider is associated with a deployment - * @maxLength 255 - */ - model_deployment_id?: string; - /** Status of the model provider */ - status?: ModelProviderStatus; - /** - * Status message - * @maxLength 1000 - */ - status_message?: string; - /** - * Jinja2 template string controlling how the API key secret is sent to the upstream. Must contain exactly one variable named `auth_secret`, which is substituted with the resolved secret value at request time. Example: `'X-Api-Key: {{ auth_secret }}'`. If not set, defaults to `'Authorization: Bearer {{ auth_secret }}'`. - * @maxLength 1024 - */ - auth_header_format?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/UpsertModelProviderRequestDefaultExtraBody.ts b/web/packages/sdk/generated/platform/schema/UpsertModelProviderRequestDefaultExtraBody.ts deleted file mode 100644 index c2a3d659d7..0000000000 --- a/web/packages/sdk/generated/platform/schema/UpsertModelProviderRequestDefaultExtraBody.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Default body parameters for inference requests. Can be overridden by user requests. - */ -export type UpsertModelProviderRequestDefaultExtraBody = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/UpsertModelProviderRequestDefaultExtraHeaders.ts b/web/packages/sdk/generated/platform/schema/UpsertModelProviderRequestDefaultExtraHeaders.ts deleted file mode 100644 index b3e5f2f540..0000000000 --- a/web/packages/sdk/generated/platform/schema/UpsertModelProviderRequestDefaultExtraHeaders.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Default headers for inference requests. Can be overridden by user requests. - */ -export type UpsertModelProviderRequestDefaultExtraHeaders = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/UpsertModelProviderRequestRequiredExtraBody.ts b/web/packages/sdk/generated/platform/schema/UpsertModelProviderRequestRequiredExtraBody.ts deleted file mode 100644 index 0bfa9a8cb5..0000000000 --- a/web/packages/sdk/generated/platform/schema/UpsertModelProviderRequestRequiredExtraBody.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Required body parameters for inference requests. Cannot be overridden by user requests. - */ -export type UpsertModelProviderRequestRequiredExtraBody = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/UpsertModelProviderRequestRequiredExtraHeaders.ts b/web/packages/sdk/generated/platform/schema/UpsertModelProviderRequestRequiredExtraHeaders.ts deleted file mode 100644 index e4ef3481da..0000000000 --- a/web/packages/sdk/generated/platform/schema/UpsertModelProviderRequestRequiredExtraHeaders.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Required headers for inference requests. Cannot be overridden by user requests. - */ -export type UpsertModelProviderRequestRequiredExtraHeaders = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/Usage.ts b/web/packages/sdk/generated/platform/schema/Usage.ts deleted file mode 100644 index 0e75cb1d90..0000000000 --- a/web/packages/sdk/generated/platform/schema/Usage.ts +++ /dev/null @@ -1,59 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Structured usage metrics captured at log time. - -Every field is optional so producers can populate whatever they have without -schema breakage. Stored as the entry-level ``usage`` field so filters can -reach it via ``data.usage.`` entity-store paths. - */ -export interface Usage { - /** The actual model that served the request (after any routing). May differ from the model in the request body. */ - model?: string; - /** UTC timestamp when the upstream LLM call started. */ - started_at?: string; - /** UTC timestamp when the upstream LLM call ended. */ - ended_at?: string; - /** - * Wall-clock latency of the upstream LLM call, in milliseconds. - * @minimum 0 - */ - latency_ms?: number; - /** - * Total estimated cost of this call, in USD. - * @minimum 0 - */ - cost_usd?: number; - /** - * Estimated cost attributed to input tokens, in USD. - * @minimum 0 - */ - cost_input_usd?: number; - /** - * Estimated cost attributed to output tokens, in USD. - * @minimum 0 - */ - cost_output_usd?: number; - /** - * Number of input tokens consumed. - * @minimum 0 - */ - input_tokens?: number; - /** - * Number of output tokens produced. - * @minimum 0 - */ - output_tokens?: number; - /** - * Number of input tokens served from a prompt cache (subset of input_tokens). - * @minimum 0 - */ - cached_tokens?: number; -} diff --git a/web/packages/sdk/generated/platform/schema/UserActionEvent.ts b/web/packages/sdk/generated/platform/schema/UserActionEvent.ts deleted file mode 100644 index 0cf3851cb4..0000000000 --- a/web/packages/sdk/generated/platform/schema/UserActionEvent.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { UserActionEventCreatedBy } from './UserActionEventCreatedBy'; -import type { UserActionEventMetadata } from './UserActionEventMetadata'; - -/** - * Free-form user action captured by the client application. - -Use this to track arbitrary user interactions with AI responses, such as copying code, -clicking share buttons, making purchases, or any other measurable action. - -The action identifier must be ≤256 characters and should use snake-case or kebab-case -for consistency (e.g., ``share_clicked``, ``code_copied``, ``purchase_made``). - */ -export interface UserActionEvent { - /** Unique identifier for the event. Populated when retrieved from database. */ - id?: string; - /** UTC timestamp when the record was created. */ - created_at?: string; - /** Identifier of the user or system that generated the record. Can be set of key-value pairs. */ - created_by?: UserActionEventCreatedBy; - event_type?: 'user_action'; - /** - * Descriptive name for the action taken by the user (e.g., 'share_clicked', 'code_copied', 'link_followed'). Use snake-case or kebab-case. This is a label, not a unique identifier—multiple events can have the same action name. - * @maxLength 256 - */ - action: string; - /** Optional key-value pairs with additional context about the action (max 16 entries). Use this for details like user IDs, item IDs, timestamps, A/B test variants, or any other information useful for downstream training or evaluation pipelines. Example: {'user_id': '12345', 'experiment': 'variant_b', 'item_purchased': 'product_456'}. */ - metadata?: UserActionEventMetadata; -} diff --git a/web/packages/sdk/generated/platform/schema/UserActionEventCreatedBy.ts b/web/packages/sdk/generated/platform/schema/UserActionEventCreatedBy.ts deleted file mode 100644 index 5161d6e7e0..0000000000 --- a/web/packages/sdk/generated/platform/schema/UserActionEventCreatedBy.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Identifier of the user or system that generated the record. Can be set of key-value pairs. - */ -export type UserActionEventCreatedBy = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/UserActionEventMetadata.ts b/web/packages/sdk/generated/platform/schema/UserActionEventMetadata.ts deleted file mode 100644 index b3681e1c08..0000000000 --- a/web/packages/sdk/generated/platform/schema/UserActionEventMetadata.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional key-value pairs with additional context about the action (max 16 entries). Use this for details like user IDs, item IDs, timestamps, A/B test variants, or any other information useful for downstream training or evaluation pipelines. Example: {'user_id': '12345', 'experiment': 'variant_b', 'item_purchased': 'product_456'}. - */ -export type UserActionEventMetadata = { [key: string]: string | string[] | boolean | number }; diff --git a/web/packages/sdk/generated/platform/schema/UserFeedbackEvent.ts b/web/packages/sdk/generated/platform/schema/UserFeedbackEvent.ts deleted file mode 100644 index 52a57b0c28..0000000000 --- a/web/packages/sdk/generated/platform/schema/UserFeedbackEvent.ts +++ /dev/null @@ -1,57 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ThumbDirection } from './ThumbDirection'; -import type { UserFeedbackEventCategories } from './UserFeedbackEventCategories'; -import type { UserFeedbackEventCreatedBy } from './UserFeedbackEventCreatedBy'; - -/** - * Structured feedback supplied by an end-user. - -This event captures various forms of end-user feedback about a model's response, -including binary thumbs up/down ratings, numeric scores, free-text opinions, -suggested rewrites, and structured category ratings. - -Either `thumb` or `rating` should be provided (they are mutually exclusive), but all -feedback fields are optional to accommodate different feedback collection patterns. - */ -export interface UserFeedbackEvent { - /** Unique identifier for the event. Populated when retrieved from database. */ - id?: string; - /** UTC timestamp when the record was created. */ - created_at?: string; - /** Identifier of the user or system that generated the record. Can be set of key-value pairs. */ - created_by?: UserFeedbackEventCreatedBy; - event_type?: 'user_feedback'; - /** Binary feedback: "up" for šŸ‘ or "down" for šŸ‘Ž. Mutually exclusive with `rating`. Use this for simple thumbs up/down UI elements. */ - thumb?: ThumbDirection; - /** - * Numeric rating (e.g., 1-5 stars) provided by the end user. Mutually exclusive with `thumb`. Use this for star ratings or numeric scales. - * @minimum 0 - */ - rating?: number; - /** - * Free-text comment from the end user describing their opinion of the response. - * @minLength 1 - * @maxLength 2000 - */ - opinion?: string; - /** - * End-user's suggested text replacement for the generated response. This is the user's idea of what the response should have been. - * @minLength 1 - * @maxLength 10000 - */ - rewrite?: string; - /** - * Zero-based index of the response option the user selected when multiple responses were returned. Use this when showing users multiple completion choices and tracking which one they picked. - * @minimum 0 - */ - chosen_index?: number; - /** Application-specific category ratings as key-value pairs. Use this for custom rating dimensions (e.g., {'helpfulness': 4, 'accuracy': 5, 'tone': 'professional'}). Useful for radio buttons, dropdowns, or multi-dimensional rating systems. */ - categories?: UserFeedbackEventCategories; -} diff --git a/web/packages/sdk/generated/platform/schema/UserFeedbackEventCategories.ts b/web/packages/sdk/generated/platform/schema/UserFeedbackEventCategories.ts deleted file mode 100644 index 637fb26783..0000000000 --- a/web/packages/sdk/generated/platform/schema/UserFeedbackEventCategories.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Application-specific category ratings as key-value pairs. Use this for custom rating dimensions (e.g., {'helpfulness': 4, 'accuracy': 5, 'tone': 'professional'}). Useful for radio buttons, dropdowns, or multi-dimensional rating systems. - */ -export type UserFeedbackEventCategories = { [key: string]: number | string }; diff --git a/web/packages/sdk/generated/platform/schema/UserFeedbackEventCreatedBy.ts b/web/packages/sdk/generated/platform/schema/UserFeedbackEventCreatedBy.ts deleted file mode 100644 index 52f3874628..0000000000 --- a/web/packages/sdk/generated/platform/schema/UserFeedbackEventCreatedBy.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Identifier of the user or system that generated the record. Can be set of key-value pairs. - */ -export type UserFeedbackEventCreatedBy = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/UserMessagesConfig.ts b/web/packages/sdk/generated/platform/schema/UserMessagesConfig.ts deleted file mode 100644 index aacadd7abb..0000000000 --- a/web/packages/sdk/generated/platform/schema/UserMessagesConfig.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Configuration for how the user messages are interpreted. - */ -export interface UserMessagesConfig { - /** Whether to use only embeddings for computing the user canonical form messages. */ - embeddings_only?: boolean; - /** - * The similarity threshold to use when using only embeddings for computing the user canonical form messages. - * @minimum 0 - * @maximum 1 - */ - embeddings_only_similarity_threshold?: number; - /** Defines the fallback intent when the similarity is below the threshold. If set to None, the user intent is computed normally using the LLM. If set to a string value, that string is used as the intent. */ - embeddings_only_fallback_intent?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/UserRating.ts b/web/packages/sdk/generated/platform/schema/UserRating.ts deleted file mode 100644 index 6a3fe7bac4..0000000000 --- a/web/packages/sdk/generated/platform/schema/UserRating.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ThumbDirection } from './ThumbDirection'; -import type { UserRatingCategories } from './UserRatingCategories'; - -/** - * User's rating/evaluation of an AI response. - -This captures various forms of end-user feedback about a model's response, including -binary thumbs up/down ratings, numeric scores, free-text opinions, suggested rewrites, -and structured category ratings. - -Either `thumb` or `rating` should be provided (they are mutually exclusive), but all -fields are optional to accommodate different feedback collection patterns. - */ -export interface UserRating { - /** Binary feedback: "up" for šŸ‘ or "down" for šŸ‘Ž. Mutually exclusive with `rating`. Use this for simple thumbs up/down UI elements. */ - thumb?: ThumbDirection; - /** - * Numeric rating (e.g., 1-5 stars) provided by the end user. Mutually exclusive with `thumb`. Use this for star ratings or numeric scales. - * @minimum 0 - */ - rating?: number; - /** - * Free-text comment from the end user describing their opinion of the response. - * @minLength 1 - * @maxLength 2000 - */ - opinion?: string; - /** - * End-user's suggested text replacement for the generated response. This is the user's idea of what the response should have been. - * @minLength 1 - * @maxLength 10000 - */ - rewrite?: string; - /** - * Zero-based index of the response option the user selected when multiple responses were returned. Use this when showing users multiple completion choices and tracking which one they picked. - * @minimum 0 - */ - chosen_index?: number; - /** Application-specific category ratings as key-value pairs. Use this for custom rating dimensions (e.g., {'helpfulness': 4, 'accuracy': 5, 'tone': 'professional'}). Useful for radio buttons, dropdowns, or multi-dimensional rating systems. */ - categories?: UserRatingCategories; -} diff --git a/web/packages/sdk/generated/platform/schema/UserRatingCategories.ts b/web/packages/sdk/generated/platform/schema/UserRatingCategories.ts deleted file mode 100644 index ea72d97d72..0000000000 --- a/web/packages/sdk/generated/platform/schema/UserRatingCategories.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Application-specific category ratings as key-value pairs. Use this for custom rating dimensions (e.g., {'helpfulness': 4, 'accuracy': 5, 'tone': 'professional'}). Useful for radio buttons, dropdowns, or multi-dimensional rating systems. - */ -export type UserRatingCategories = { [key: string]: number | string }; diff --git a/web/packages/sdk/generated/platform/schema/ValidationError.ts b/web/packages/sdk/generated/platform/schema/ValidationError.ts deleted file mode 100644 index a72b8a0c5b..0000000000 --- a/web/packages/sdk/generated/platform/schema/ValidationError.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ValidationErrorCtx } from './ValidationErrorCtx'; - -export interface ValidationError { - loc: (string | number)[]; - msg: string; - type: string; - input?: unknown; - ctx?: ValidationErrorCtx; -} diff --git a/web/packages/sdk/generated/platform/schema/ValidationErrorCtx.ts b/web/packages/sdk/generated/platform/schema/ValidationErrorCtx.ts deleted file mode 100644 index 5c9dffa187..0000000000 --- a/web/packages/sdk/generated/platform/schema/ValidationErrorCtx.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type ValidationErrorCtx = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/ValidationParameters.ts b/web/packages/sdk/generated/platform/schema/ValidationParameters.ts deleted file mode 100644 index 3cb8a4ed8f..0000000000 --- a/web/packages/sdk/generated/platform/schema/ValidationParameters.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Configuration for record and sequence validation. - -These parameters control the validation and automatic fixes when going -from LLM output to tabular data. - */ -export interface ValidationParameters { - /** Whether to accept completions without both beginning and end of sequence delineators as a single sequence. */ - group_by_accept_no_delineator?: boolean; - /** Whether to ignore invalid records in a sequence and proceed with the valid records. */ - group_by_ignore_invalid_records?: boolean; - /** Whether to automatically fix non-unique group-by values in a sequence by using the first unique value for all records. */ - group_by_fix_non_unique_value?: boolean; - /** Whether to automatically fix unordered records in a sequence by sorting the records. */ - group_by_fix_unordered_records?: boolean; -} diff --git a/web/packages/sdk/generated/platform/schema/VirtualModel.ts b/web/packages/sdk/generated/platform/schema/VirtualModel.ts deleted file mode 100644 index 493fdcca93..0000000000 --- a/web/packages/sdk/generated/platform/schema/VirtualModel.ts +++ /dev/null @@ -1,59 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { MiddlewareCall } from './MiddlewareCall'; -import type { VirtualModelInferenceConfig } from './VirtualModelInferenceConfig'; - -/** - * Logical inference route. - -Maps a user-facing model name to an optional default model entity and -defines ordered middleware pipelines for the request, response, and -post-response phases. - -When a caller sets ``model: "workspace/my-virtual-model"`` in an inference -request, IGW resolves the ``VirtualModel`` instead of a ``ModelEntity`` -directly. If ``default_model_entity`` is set, IGW writes it into -``request["model"]`` before the request middleware pipeline runs. Middleware -may mutate ``request["model"]`` freely. After the pipeline completes, IGW -reads ``request["model"]``, resolves it to a ``ModelProvider`` via the -``ModelCache``, and proxies. - -The ``ModelProviderReconciler`` auto-creates a passthrough ``VirtualModel`` -for each discovered model (same workspace and name as the ``ModelEntity``, -empty middleware lists, ``default_model_entity`` pointing to that entity). -All existing inference requests continue to work without changes. - */ -export interface VirtualModel { - /** Entity name within the workspace */ - name?: string; - /** - * Workspace identifier - * @pattern ^[\w\-\+.@:]+$ - */ - workspace: string; - /** The name of the project associated with this entity. */ - project?: string; - default_model_entity?: string; - /** Marks this VirtualModel as controller-managed. The Models controller will delete it once no ModelProvider serves the matching entity. Setting this manually opts the VirtualModel into that cleanup behavior. */ - autoprovisioned?: boolean; - models?: VirtualModelInferenceConfig[]; - request_middleware?: MiddlewareCall[]; - response_middleware?: MiddlewareCall[]; - post_response_middleware?: MiddlewareCall[]; - override_proxy?: string; - readonly id: string; - readonly created_at: string; - readonly created_by: string | null; - readonly updated_at: string; - readonly updated_by: string | null; - /** Alias for id for backwards compatibility. */ - readonly entity_id: string; - /** Parent entity ID for nested entities. */ - readonly parent: string; -} diff --git a/web/packages/sdk/generated/platform/schema/VirtualModelInferenceConfig.ts b/web/packages/sdk/generated/platform/schema/VirtualModelInferenceConfig.ts deleted file mode 100644 index 4ec91a32f8..0000000000 --- a/web/packages/sdk/generated/platform/schema/VirtualModelInferenceConfig.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { BackendFormat } from './BackendFormat'; - -/** - * Inference configuration for one model entity referenced by a VirtualModel. - */ -export interface VirtualModelInferenceConfig { - model: string; - /** Optional backend format override for this VirtualModel entry. */ - backend_format?: BackendFormat | null; -} diff --git a/web/packages/sdk/generated/platform/schema/VirtualModelsPage.ts b/web/packages/sdk/generated/platform/schema/VirtualModelsPage.ts deleted file mode 100644 index f611ffd2f0..0000000000 --- a/web/packages/sdk/generated/platform/schema/VirtualModelsPage.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { PaginationData } from './PaginationData'; -import type { VirtualModel } from './VirtualModel'; -import type { VirtualModelsPageFilter } from './VirtualModelsPageFilter'; - -export interface VirtualModelsPage { - data: VirtualModel[]; - /** Pagination information. */ - pagination?: PaginationData; - /** The field on which the results are sorted. */ - sort?: string; - /** Filtering information. */ - filter?: VirtualModelsPageFilter; -} diff --git a/web/packages/sdk/generated/platform/schema/VirtualModelsPageFilter.ts b/web/packages/sdk/generated/platform/schema/VirtualModelsPageFilter.ts deleted file mode 100644 index b04abf93c8..0000000000 --- a/web/packages/sdk/generated/platform/schema/VirtualModelsPageFilter.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Filtering information. - */ -export type VirtualModelsPageFilter = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/VolcanoJobExecutionProfile.ts b/web/packages/sdk/generated/platform/schema/VolcanoJobExecutionProfile.ts deleted file mode 100644 index ab945d02ac..0000000000 --- a/web/packages/sdk/generated/platform/schema/VolcanoJobExecutionProfile.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { VolcanoJobExecutionProfileConfig } from './VolcanoJobExecutionProfileConfig'; - -/** - * Volcano Job Execution Profile - */ -export interface VolcanoJobExecutionProfile { - /** The compute provider for the executor, e.g., cpu, gpu */ - provider?: string; - /** The profile name for the executor, e.g., high_priority_a100, low_priority, etc. */ - profile?: string; - backend?: 'volcano_job'; - /** Additional configuration for the kubernetes executor */ - config: VolcanoJobExecutionProfileConfig; -} diff --git a/web/packages/sdk/generated/platform/schema/VolcanoJobExecutionProfileConfig.ts b/web/packages/sdk/generated/platform/schema/VolcanoJobExecutionProfileConfig.ts deleted file mode 100644 index f08eb8107d..0000000000 --- a/web/packages/sdk/generated/platform/schema/VolcanoJobExecutionProfileConfig.ts +++ /dev/null @@ -1,68 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import type { ComputeResources } from './ComputeResources'; -import type { ImagePullSecret } from './ImagePullSecret'; -import type { KubernetesJobStorageConfig } from './KubernetesJobStorageConfig'; -import type { KubernetesObjectMetadata } from './KubernetesObjectMetadata'; -import type { VolcanoJobExecutionProfileConfigAffinity } from './VolcanoJobExecutionProfileConfigAffinity'; -import type { VolcanoJobExecutionProfileConfigEnv } from './VolcanoJobExecutionProfileConfigEnv'; -import type { VolcanoJobExecutionProfileConfigNodeSelector } from './VolcanoJobExecutionProfileConfigNodeSelector'; -import type { VolcanoJobExecutionProfileConfigPlugins } from './VolcanoJobExecutionProfileConfigPlugins'; -import type { VolcanoJobExecutionProfileConfigPodSecurityContext } from './VolcanoJobExecutionProfileConfigPodSecurityContext'; -import type { VolcanoJobExecutionProfileConfigTolerationsItem } from './VolcanoJobExecutionProfileConfigTolerationsItem'; - -/** - * Configuration for Volcano Job Execution Profile - */ -export interface VolcanoJobExecutionProfileConfig { - ttl_seconds_before_active?: number; - ttl_seconds_active?: number; - ttl_seconds_after_finished?: number; - cleanup_completed_jobs_immediately?: boolean; - /** Path to the jobs launcher tool */ - launcher_tool_path?: string; - /** Optional env vars applied to all jobs (e.g. HOME=/tmp). Keys must not conflict with platform-reserved names. Job steps may override these variables. */ - env?: VolcanoJobExecutionProfileConfigEnv; - /** Kubernetes namespace to submit the job to. If not set, it will be determined from the environment. */ - namespace?: string; - /** Kubernetes service account name for job pods. Uses the Kubernetes default service account when set to 'default'. */ - service_account_name?: string; - /** Tolerations for the Kubernetes job pods. */ - tolerations?: VolcanoJobExecutionProfileConfigTolerationsItem[]; - /** Node selector for the Kubernetes job pods. */ - node_selector?: VolcanoJobExecutionProfileConfigNodeSelector; - /** Affinity for the Kubernetes job pods. */ - affinity?: VolcanoJobExecutionProfileConfigAffinity; - /** Resource requests and limits for the Kubernetes job pods. */ - resources?: ComputeResources; - /** Pod security context for the Kubernetes job pods. */ - pod_security_context?: VolcanoJobExecutionProfileConfigPodSecurityContext; - /** Image pull secrets for the Kubernetes job pods. */ - image_pull_secrets?: ImagePullSecret[]; - /** Metadata to add to each job object in the Kubernetes job. */ - job_metadata?: KubernetesObjectMetadata; - /** Metadata to add to each pod in the Kubernetes job. */ - pod_metadata?: KubernetesObjectMetadata; - /** Storage configuration for the Kubernetes job pods. */ - storage?: KubernetesJobStorageConfig; - /** Number of GPUs to request for the job */ - num_gpus?: number; - /** The scheduler name to use for the Volcano job. */ - scheduler_name?: string; - /** Container image that contains the jobs-launcher binary. */ - launcher_image?: string; - /** The Volcano queue to submit the job to. */ - queue?: string; - /** maxRetry indicates the maximum number of retries allowed by the job */ - max_retry?: number; - /** plugins indicates the plugins used by Volcano when the job is scheduled. We always add the pytorch plugin if more than one node. */ - plugins?: VolcanoJobExecutionProfileConfigPlugins; - /** Enable multi-node networking injection. Sets annotations to trigger Kyverno policy mutations. */ - enable_multi_node_networking?: boolean; -} diff --git a/web/packages/sdk/generated/platform/schema/VolcanoJobExecutionProfileConfigAffinity.ts b/web/packages/sdk/generated/platform/schema/VolcanoJobExecutionProfileConfigAffinity.ts deleted file mode 100644 index 60acc9d45e..0000000000 --- a/web/packages/sdk/generated/platform/schema/VolcanoJobExecutionProfileConfigAffinity.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Affinity for the Kubernetes job pods. - */ -export type VolcanoJobExecutionProfileConfigAffinity = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/VolcanoJobExecutionProfileConfigEnv.ts b/web/packages/sdk/generated/platform/schema/VolcanoJobExecutionProfileConfigEnv.ts deleted file mode 100644 index 9faff71e27..0000000000 --- a/web/packages/sdk/generated/platform/schema/VolcanoJobExecutionProfileConfigEnv.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Optional env vars applied to all jobs (e.g. HOME=/tmp). Keys must not conflict with platform-reserved names. Job steps may override these variables. - */ -export type VolcanoJobExecutionProfileConfigEnv = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/VolcanoJobExecutionProfileConfigNodeSelector.ts b/web/packages/sdk/generated/platform/schema/VolcanoJobExecutionProfileConfigNodeSelector.ts deleted file mode 100644 index 983ba290b8..0000000000 --- a/web/packages/sdk/generated/platform/schema/VolcanoJobExecutionProfileConfigNodeSelector.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Node selector for the Kubernetes job pods. - */ -export type VolcanoJobExecutionProfileConfigNodeSelector = { [key: string]: string }; diff --git a/web/packages/sdk/generated/platform/schema/VolcanoJobExecutionProfileConfigPlugins.ts b/web/packages/sdk/generated/platform/schema/VolcanoJobExecutionProfileConfigPlugins.ts deleted file mode 100644 index bce06296d8..0000000000 --- a/web/packages/sdk/generated/platform/schema/VolcanoJobExecutionProfileConfigPlugins.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * plugins indicates the plugins used by Volcano when the job is scheduled. We always add the pytorch plugin if more than one node. - */ -export type VolcanoJobExecutionProfileConfigPlugins = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/VolcanoJobExecutionProfileConfigPodSecurityContext.ts b/web/packages/sdk/generated/platform/schema/VolcanoJobExecutionProfileConfigPodSecurityContext.ts deleted file mode 100644 index 42deac0422..0000000000 --- a/web/packages/sdk/generated/platform/schema/VolcanoJobExecutionProfileConfigPodSecurityContext.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Pod security context for the Kubernetes job pods. - */ -export type VolcanoJobExecutionProfileConfigPodSecurityContext = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/VolcanoJobExecutionProfileConfigTolerationsItem.ts b/web/packages/sdk/generated/platform/schema/VolcanoJobExecutionProfileConfigTolerationsItem.ts deleted file mode 100644 index 1cf3a2b113..0000000000 --- a/web/packages/sdk/generated/platform/schema/VolcanoJobExecutionProfileConfigTolerationsItem.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -export type VolcanoJobExecutionProfileConfigTolerationsItem = { [key: string]: unknown }; diff --git a/web/packages/sdk/generated/platform/schema/Workspace.ts b/web/packages/sdk/generated/platform/schema/Workspace.ts deleted file mode 100644 index 4385132909..0000000000 --- a/web/packages/sdk/generated/platform/schema/Workspace.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Workspace schema for API responses. - */ -export interface Workspace { - /** System-generated UUID */ - id: string; - /** Workspace name (user-provided) */ - name: string; - /** Optional description */ - description?: string; - /** Timestamp of workspace creation */ - created_at: string; - /** Principal id for workspace creator */ - created_by?: string; - /** Timestamp of last workspace update */ - updated_at: string; - /** Principal id for last workspace update */ - updated_by?: string; -} diff --git a/web/packages/sdk/generated/platform/schema/WorkspaceInput.ts b/web/packages/sdk/generated/platform/schema/WorkspaceInput.ts deleted file mode 100644 index 7a62b6c8b3..0000000000 --- a/web/packages/sdk/generated/platform/schema/WorkspaceInput.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ - -/** - * Schema for creating a new workspace. - */ -export interface WorkspaceInput { - /** - * Workspace name (unique identifier). Name must start with a lowercase letter, be 2-63 characters, and contain only lowercase letters, digits, and hyphens (no consecutive hyphens, cannot end with a hyphen). - * @pattern ^[a-z](?!.*--)[a-z0-9\-@.+_]{1,62}(?500 with operators : ~ > >= < <= IN NOT IN AND OR and negation prefix -\n- Object (JSON): {\"name\":{\"$like\":\"value\"}} with operators $eq, $like, $lt, $lte, $gt, $gte, $in, $nin, $and, $or, $not\n- Bracket notation: ?filter[name][$like]=value\n- Relationship traversal: ?filter[relationship][$exists]=true or ?filter[relationship][field]=value' - ), -}); - -export const EntitiesListWorkspacesResponse = zod.object({ - data: zod.array( - zod - .object({ - id: zod.string().describe('System-generated UUID'), - name: zod.string().describe('Workspace name (user-provided)'), - description: zod.string().optional().describe('Optional description'), - created_at: zod.string().datetime({}).describe('Timestamp of workspace creation'), - created_by: zod.string().optional().describe('Principal id for workspace creator'), - updated_at: zod.string().datetime({}).describe('Timestamp of last workspace update'), - updated_by: zod.string().optional().describe('Principal id for last workspace update'), - }) - .describe('Workspace schema for API responses.') - ), - pagination: zod - .object({ - page: zod.number().describe('The current page number.'), - page_size: zod.number().describe('The page size used for the query.'), - current_page_size: zod.number().describe('The size for the current page.'), - total_pages: zod.number().describe('The total number of pages.'), - total_results: zod.number().describe('The total number of results.'), - }) - .optional() - .describe('Pagination information.'), - sort: zod.string().optional().describe('The field on which the results are sorted.'), - filter: zod.record(zod.string(), zod.unknown()).optional().describe('Filtering information.'), -}); - -/** - * Get a specific workspace by ID. - -Example: -``` -GET /apis/entities/v2/workspaces/ml-team -``` - * @summary Get workspace by ID - */ -export const EntitiesGetWorkspaceParams = zod.object({ - name: zod.string(), -}); - -export const EntitiesGetWorkspaceResponse = zod - .object({ - id: zod.string().describe('System-generated UUID'), - name: zod.string().describe('Workspace name (user-provided)'), - description: zod.string().optional().describe('Optional description'), - created_at: zod.string().datetime({}).describe('Timestamp of workspace creation'), - created_by: zod.string().optional().describe('Principal id for workspace creator'), - updated_at: zod.string().datetime({}).describe('Timestamp of last workspace update'), - updated_by: zod.string().optional().describe('Principal id for last workspace update'), - }) - .describe('Workspace schema for API responses.'); - -/** - * Update a workspace's description. - -Example: -``` -PUT /apis/entities/v2/workspaces/ml-team -{ - "description": "Updated description for ML Team" -} -``` - * @summary Update workspace - */ -export const EntitiesUpdateWorkspaceParams = zod.object({ - name: zod.string(), -}); - -export const EntitiesUpdateWorkspaceBody = zod - .object({ - description: zod.string().optional().describe('Updated description'), - }) - .describe('Schema for updating a workspace.'); - -export const EntitiesUpdateWorkspaceResponse = zod - .object({ - id: zod.string().describe('System-generated UUID'), - name: zod.string().describe('Workspace name (user-provided)'), - description: zod.string().optional().describe('Optional description'), - created_at: zod.string().datetime({}).describe('Timestamp of workspace creation'), - created_by: zod.string().optional().describe('Principal id for workspace creator'), - updated_at: zod.string().datetime({}).describe('Timestamp of last workspace update'), - updated_by: zod.string().optional().describe('Principal id for last workspace update'), - }) - .describe('Workspace schema for API responses.'); - -/** - * Delete a workspace. - -This marks the workspace for deletion and returns immediately. The workspace -will no longer be accessible via the API. An asynchronous cleanup controller -will handle deletion of all entities and external resources. - -Role bindings are immediately deleted to revoke access. - -Example: -``` -DELETE /apis/entities/v2/workspaces/ml-team -``` - * @summary Delete workspace - */ -export const EntitiesDeleteWorkspaceParams = zod.object({ - name: zod.string(), -}); - -export const entitiesDeleteWorkspaceResponseMessageDefault = `Resource deleted successfully.`; - -export const EntitiesDeleteWorkspaceResponse = zod.object({ - message: zod.string().default(entitiesDeleteWorkspaceResponseMessageDefault), - id: zod.string().optional().describe('The ID of the deleted resource.'), - deleted_at: zod - .string() - .datetime({}) - .optional() - .describe('The timestamp when the resource was deleted.'), -}); - -/** - * Create a new entity of the specified type in the given workspace. - -If name is not provided, it will be auto-generated based on the entity type. - -Example: -``` -POST /apis/entities/v2/workspaces/default/entities/customization_config -{ - "name": "my-config", - "data": { - "target_id": "llama-2-7b", - "training_options": {"learning_rate": 0.01} - } -} -``` - * @summary Create a new entity - */ -export const EntitiesCreateEntityParams = zod.object({ - workspace: zod.string(), - entity_type: zod.string(), -}); - -export const entitiesCreateEntityBodyNameRegExp = new RegExp( - '^[a-z](?!.\*--)[a-z0-9\\-@.+_]{1,62}(?500 with operators : ~ > >= < <= IN NOT IN AND OR and negation prefix -\n- Object (JSON): {\"name\":{\"$like\":\"value\"}} with operators $eq, $like, $lt, $lte, $gt, $gte, $in, $nin, $and, $or, $not\n- Bracket notation: ?filter[name][$like]=value\n- Relationship traversal: ?filter[relationship][$exists]=true or ?filter[relationship][field]=value' - ), -}); - -export const EntitiesListEntitiesResponse = zod.object({ - data: zod.array( - zod - .object({ - entity_type: zod.string().describe('Entity type identifier'), - id: zod.string().describe('UUID identifier'), - workspace: zod.string().describe('Workspace identifier'), - parent: zod.string().optional().describe('Parent entity ID for nested entities'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity'), - name: zod.string().describe('Entity name'), - data: zod.record(zod.string(), zod.unknown()).describe('Entity data'), - created_at: zod.string().datetime({}).describe('Timestamp of entity creation'), - created_by: zod.string().optional().describe('Principal id for entity creator'), - updated_at: zod.string().datetime({}).describe('Timestamp of last entity update'), - updated_by: zod.string().optional().describe('Principal id for last entity update'), - db_version: zod.number().describe('Database version of the entity for optimistic locking.'), - }) - .describe('Entity schema for API responses.') - ), - pagination: zod - .object({ - page: zod.number().describe('The current page number.'), - page_size: zod.number().describe('The page size used for the query.'), - current_page_size: zod.number().describe('The size for the current page.'), - total_pages: zod.number().describe('The total number of pages.'), - total_results: zod.number().describe('The total number of results.'), - }) - .optional() - .describe('Pagination information.'), - sort: zod.string().optional().describe('The field on which the results are sorted.'), - filter: zod.record(zod.string(), zod.unknown()).optional().describe('Filtering information.'), -}); - -/** - * Get a specific entity by its workspace, type, and name. - -Example: -``` -GET /apis/entities/v2/workspaces/default/entities/customization_config/my-config -``` - * @summary Get entity by name - */ -export const EntitiesGetEntityByNameParams = zod.object({ - workspace: zod.string(), - entity_type: zod.string(), - name: zod.string(), -}); - -export const EntitiesGetEntityByNameQueryParams = zod.object({ - parent: zod.string().optional().describe('Parent entity ID for nested entities'), -}); - -export const EntitiesGetEntityByNameResponse = zod - .object({ - entity_type: zod.string().describe('Entity type identifier'), - id: zod.string().describe('UUID identifier'), - workspace: zod.string().describe('Workspace identifier'), - parent: zod.string().optional().describe('Parent entity ID for nested entities'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity'), - name: zod.string().describe('Entity name'), - data: zod.record(zod.string(), zod.unknown()).describe('Entity data'), - created_at: zod.string().datetime({}).describe('Timestamp of entity creation'), - created_by: zod.string().optional().describe('Principal id for entity creator'), - updated_at: zod.string().datetime({}).describe('Timestamp of last entity update'), - updated_by: zod.string().optional().describe('Principal id for last entity update'), - db_version: zod.number().describe('Database version of the entity for optimistic locking.'), - }) - .describe('Entity schema for API responses.'); - -/** - * Update an entity by its name. Optionally change the entity's name. - -Example: -``` -PUT /apis/entities/v2/workspaces/default/entities/customization_config/my-config -{ - "data": { - "target_id": "llama-2-7b", - "training_options": {"learning_rate": 0.02} - } -} -``` - * @summary Update entity by name - */ -export const EntitiesUpdateEntityByNameParams = zod.object({ - workspace: zod.string(), - entity_type: zod.string(), - name: zod.string(), -}); - -export const EntitiesUpdateEntityByNameQueryParams = zod.object({ - parent: zod.string().optional().describe('Parent entity ID for nested entities'), -}); - -export const entitiesUpdateEntityByNameBodyNewNameRegExp = new RegExp( - '^[a-z](?!.\*--)[a-z0-9\\-@.+_]{1,62}(?500 with operators : ~ > >= < <= IN NOT IN AND OR and negation prefix -\n- Object (JSON): {\"name\":{\"$like\":\"value\"}} with operators $eq, $like, $lt, $lte, $gt, $gte, $in, $nin, $and, $or, $not\n- Bracket notation: ?filter[name][$like]=value\n- Relationship traversal: ?filter[relationship][$exists]=true or ?filter[relationship][field]=value' - ), -}); - -export const EntitiesListProjectsResponse = zod.object({ - data: zod.array( - zod - .object({ - id: zod.string().describe('Unique identifier'), - name: zod.string().describe('Project name'), - workspace: zod.string().describe('Workspace identifier'), - description: zod.string().optional().describe('Project description'), - created_at: zod.string().datetime({}).describe('Creation timestamp'), - updated_at: zod.string().datetime({}).describe('Last update timestamp'), - }) - .describe('Schema for Project responses.') - ), - pagination: zod - .object({ - page: zod.number().describe('The current page number.'), - page_size: zod.number().describe('The page size used for the query.'), - current_page_size: zod.number().describe('The size for the current page.'), - total_pages: zod.number().describe('The total number of pages.'), - total_results: zod.number().describe('The total number of results.'), - }) - .optional() - .describe('Pagination information.'), - sort: zod.string().optional().describe('The field on which the results are sorted.'), - filter: zod.record(zod.string(), zod.unknown()).optional().describe('Filtering information.'), -}); - -/** - * Get a specific project by its workspace and name. - -Example: -``` -GET /apis/entities/v2/workspaces/default/projects/ml-project -``` - * @summary Get project by name - */ -export const EntitiesGetProjectParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const EntitiesGetProjectResponse = zod - .object({ - id: zod.string().describe('Unique identifier'), - name: zod.string().describe('Project name'), - workspace: zod.string().describe('Workspace identifier'), - description: zod.string().optional().describe('Project description'), - created_at: zod.string().datetime({}).describe('Creation timestamp'), - updated_at: zod.string().datetime({}).describe('Last update timestamp'), - }) - .describe('Schema for Project responses.'); - -/** - * Update a project's description. - -Example: -``` -PUT /apis/entities/v2/workspaces/default/projects/ml-project -{ - "description": "Updated description for ML project" -} -``` - * @summary Update project - */ -export const EntitiesUpdateProjectParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const EntitiesUpdateProjectBody = zod - .object({ - description: zod.string().optional().describe('Updated description'), - }) - .describe('Schema for updating a project.'); - -export const EntitiesUpdateProjectResponse = zod - .object({ - id: zod.string().describe('Unique identifier'), - name: zod.string().describe('Project name'), - workspace: zod.string().describe('Workspace identifier'), - description: zod.string().optional().describe('Project description'), - created_at: zod.string().datetime({}).describe('Creation timestamp'), - updated_at: zod.string().datetime({}).describe('Last update timestamp'), - }) - .describe('Schema for Project responses.'); - -/** - * Delete a project. - -Example: -``` -DELETE /apis/entities/v2/workspaces/default/projects/ml-project -``` - * @summary Delete project - */ -export const EntitiesDeleteProjectParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const entitiesDeleteProjectResponseMessageDefault = `Resource deleted successfully.`; - -export const EntitiesDeleteProjectResponse = zod.object({ - message: zod.string().default(entitiesDeleteProjectResponseMessageDefault), - id: zod.string().optional().describe('The ID of the deleted resource.'), - deleted_at: zod - .string() - .datetime({}) - .optional() - .describe('The timestamp when the resource was deleted.'), -}); diff --git a/web/packages/sdk/generated/platform/zod/entries.ts b/web/packages/sdk/generated/platform/zod/entries.ts deleted file mode 100644 index 6f2a9dde11..0000000000 --- a/web/packages/sdk/generated/platform/zod/entries.ts +++ /dev/null @@ -1,4138 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import * as zod from 'zod'; - -/** - * List all entries with filtering capabilities. - -When longest_per_thread=true is set in filters, returns only the longest entry -(by message count) for each unique thread_id. - * @summary List Entries - */ -export const ListEntriesParams = zod.object({ - workspace: zod.string(), -}); - -export const listEntriesQueryPageDefault = 1; -export const listEntriesQueryPageSizeDefault = 10; -export const listEntriesQuerySortDefault = `created_at`; - -export const ListEntriesQueryParams = zod.object({ - page: zod.number().default(listEntriesQueryPageDefault).describe('Page number.'), - page_size: zod.number().default(listEntriesQueryPageSizeDefault).describe('Page size.'), - sort: zod - .enum(['created_at', '-created_at', 'updated_at', '-updated_at']) - .describe('Sort fields for Entries.') - .default(listEntriesQuerySortDefault) - .describe( - 'The field to sort by. To sort in decreasing order, use `-` in front of the field name.' - ), - filter: zod - .object({ - id: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .optional() - .describe( - "Filter by entry ID. Supports operators like {'in': ['entry-ABC', 'entry-XYZ']} for multiple IDs." - ), - workspace: zod.string().optional().describe('Filter by workspace id.'), - project: zod.string().optional().describe('Filter by project name.'), - external_id: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .optional() - .describe( - "Filter by external ID. Supports operators like {'in': ['id1', 'id2']} for multiple IDs." - ), - context: zod - .object({ - app: zod.string().optional().describe('Filter by app reference (workspace\/name).'), - task: zod.string().optional().describe('Filter by task reference.'), - thread_id: zod.string().optional().describe('Filter by thread ID.'), - user_id: zod.string().optional().describe('Filter by user ID.'), - session_id: zod.string().optional().describe('Filter by session ID.'), - }) - .describe('Filter for entry context fields.') - .optional() - .describe('Filter by context fields.'), - user_rating: zod - .object({ - thumb: zod - .enum(['up', 'down']) - .describe('Possible thumb feedback choices.') - .optional() - .describe('Filter by thumb direction.'), - }) - .describe('Filter for entry user rating fields.') - .optional() - .describe('Filter by user rating fields.'), - model: zod - .string() - .optional() - .describe( - "Filter by the served model recorded in usage (e.g., 'gpt-4o', 'meta\/llama-3.1-70b-instruct')." - ), - has_thumb: zod.boolean().optional().describe('Filter by presence of thumb feedback.'), - has_rating: zod.boolean().optional().describe('Filter by presence of rating.'), - has_opinion: zod.boolean().optional().describe('Filter by presence of opinion.'), - has_rewrite: zod.boolean().optional().describe('Filter by presence of rewrite.'), - has_events: zod.boolean().optional().describe('Filter by presence of any events.'), - longest_per_thread: zod - .boolean() - .optional() - .describe('If true, return only the longest entry per thread (based on message count).'), - created_at: zod - .object({ - $gte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results greater than or equal to this datetime.'), - $lte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results less than or equal to this datetime.'), - }) - .optional() - .describe('Filter entities based on creation date.'), - updated_at: zod - .object({ - $gte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results greater than or equal to this datetime.'), - $lte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results less than or equal to this datetime.'), - }) - .optional() - .describe('Filter entities based on update date.'), - }) - .optional() - .describe( - 'Filter entries by id, project, external_id, created_at, updated_at, usage fields (model), context fields, and user_rating fields.' - ), -}); - -export const listEntriesResponseDataItemUsageOneLatencyMsMin = 0; - -export const listEntriesResponseDataItemUsageOneCostUsdMin = 0; - -export const listEntriesResponseDataItemUsageOneCostInputUsdMin = 0; - -export const listEntriesResponseDataItemUsageOneCostOutputUsdMin = 0; - -export const listEntriesResponseDataItemUsageOneInputTokensMin = 0; - -export const listEntriesResponseDataItemUsageOneOutputTokensMin = 0; - -export const listEntriesResponseDataItemUsageOneCachedTokensMin = 0; - -export const listEntriesResponseDataItemUserRatingOneRatingMin = 0; - -export const listEntriesResponseDataItemUserRatingOneOpinionMax = 2000; - -export const listEntriesResponseDataItemUserRatingOneRewriteMax = 10000; - -export const listEntriesResponseDataItemUserRatingOneChosenIndexMin = 0; - -export const listEntriesResponseDataItemEventsItemOneEventTypeDefault = `user_feedback`; -export const listEntriesResponseDataItemEventsItemOneRatingMin = 0; - -export const listEntriesResponseDataItemEventsItemOneOpinionMax = 2000; - -export const listEntriesResponseDataItemEventsItemOneRewriteMax = 10000; - -export const listEntriesResponseDataItemEventsItemOneChosenIndexMin = 0; - -export const listEntriesResponseDataItemEventsItemTwoEventTypeDefault = `user_action`; -export const listEntriesResponseDataItemEventsItemTwoActionMax = 256; - -export const listEntriesResponseDataItemEventsItemTwoMetadataOneMax = 256; - -export const listEntriesResponseDataItemEventsItemTwoMetadataTwoItemMax = 256; - -export const listEntriesResponseDataItemEventsItemThreeEventTypeDefault = `reviewer_annotation`; -export const listEntriesResponseDataItemEventsItemThreeRatingMin = 0; - -export const listEntriesResponseDataItemEventsItemThreeOpinionMax = 2000; - -export const listEntriesResponseDataItemEventsItemThreeRewriteMax = 10000; - -export const listEntriesResponseDataItemEventsItemThreeChosenIndexMin = 0; - -export const listEntriesResponseDataItemEventsItemFourEventTypeDefault = `evaluator_result`; -export const listEntriesResponseDataItemEventsItemFourNameMax = 256; - -export const ListEntriesResponse = zod.object({ - data: zod.array( - zod - .object({ - id: zod.string().describe('Unique identifier'), - name: zod.string().describe('Entry name (auto-generated)'), - workspace: zod.string().describe('Workspace identifier'), - external_id: zod.string().optional().describe('Client-provided identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entry'), - data: zod - .object({ - request: zod - .object({ - messages: zod - .array( - zod - .object({ - role: zod - .enum(['user', 'system', 'assistant', 'developer', 'tool', 'function']) - .describe('Valid role values for entry request messages.') - .describe( - 'The role of the message sender. Must be one of: user, system, assistant, developer, tool, or function.' - ), - }) - .describe( - 'A flexible message model that requires a valid role field but allows any other fields.\n\nThis flexibility enables the Intake service to store messages from various LLM providers\nand future model types without requiring schema updates. Additional fields like `content`,\n`name`, `tool_calls`, `tool_call_id`, etc. are all accepted.\n\nExamples of additional fields:\n- `content`: The message text or content\n- `name`: Name of the user or function\n- `tool_calls`: Tool\/function calls in the message\n- `tool_call_id`: ID of the tool call being responded to' - ) - ) - .describe( - 'A list of messages comprising the conversation. Each message must have a valid role. Additional fields like `content`, `tool_calls`, etc. are provider-specific.' - ), - model: zod - .string() - .describe( - "The model identifier used for this request (e.g., 'gpt-4', 'llama-3-70b', 'claude-3-opus')." - ), - }) - .describe( - 'Flexible entry request that accepts any object shape.\n\nThis flexibility enables the Intake service to store requests from various LLM providers\n(OpenAI, Anthropic, NIM, etc.) and future model types (embeddings, multimodal, etc.)\nwithout requiring schema updates.\n\nRequired fields: `messages` and `model`\nCommon optional fields: `temperature`, `max_tokens`, `top_p`, `tools`, `tool_choice`,\n`stream`, `response_format`, etc.' - ) - .describe('Raw request payload recorded from the client.'), - response: zod - .union([zod.unknown(), zod.unknown()]) - .and( - zod.object({ - choices: zod - .array(zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'A list of response choices generated by the model. Each choice typically contains a message object with role, content, and optional tool_calls. The structure varies by provider but commonly includes fields like `index`, `message`, and `finish_reason`.' - ), - error: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - "Error envelope returned by the provider when the call failed (e.g., OpenAI's `{message, type, code, param}` shape). Mutually exclusive with `choices`: a response carries one or the other." - ), - }) - ) - .describe( - 'Flexible entry response that accepts any object shape.\n\nThis flexibility enables the Intake service to store responses from various LLM providers\nand future model types without requiring schema updates.\n\nRequired: either `choices` (successful response) or `error` (failed call).\nCommon optional fields: `id`, `created`, `model`, `usage`, `system_fingerprint`, etc.' - ) - .describe('Raw response payload generated by the model.'), - }) - .describe('Entry data containing the request and response for an LLM interaction.') - .describe('Entry data containing request and response'), - usage: zod - .object({ - model: zod - .string() - .optional() - .describe( - 'The actual model that served the request (after any routing). May differ from the model in the request body.' - ), - started_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the upstream LLM call started.'), - ended_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the upstream LLM call ended.'), - latency_ms: zod - .number() - .min(listEntriesResponseDataItemUsageOneLatencyMsMin) - .optional() - .describe('Wall-clock latency of the upstream LLM call, in milliseconds.'), - cost_usd: zod - .number() - .min(listEntriesResponseDataItemUsageOneCostUsdMin) - .optional() - .describe('Total estimated cost of this call, in USD.'), - cost_input_usd: zod - .number() - .min(listEntriesResponseDataItemUsageOneCostInputUsdMin) - .optional() - .describe('Estimated cost attributed to input tokens, in USD.'), - cost_output_usd: zod - .number() - .min(listEntriesResponseDataItemUsageOneCostOutputUsdMin) - .optional() - .describe('Estimated cost attributed to output tokens, in USD.'), - input_tokens: zod - .number() - .min(listEntriesResponseDataItemUsageOneInputTokensMin) - .optional() - .describe('Number of input tokens consumed.'), - output_tokens: zod - .number() - .min(listEntriesResponseDataItemUsageOneOutputTokensMin) - .optional() - .describe('Number of output tokens produced.'), - cached_tokens: zod - .number() - .min(listEntriesResponseDataItemUsageOneCachedTokensMin) - .optional() - .describe( - 'Number of input tokens served from a prompt cache (subset of input_tokens).' - ), - }) - .describe( - 'Structured usage metrics captured at log time.\n\nEvery field is optional so producers can populate whatever they have without\nschema breakage. Stored as the entry-level ``usage`` field so filters can\nreach it via ``data.usage.`` entity-store paths.' - ) - .optional() - .describe('Structured usage metrics (model served, latency, cost, token counts).'), - context: zod - .object({ - app: zod - .string() - .describe( - "Reference to the app that produced this entry, in the form `workspace\/name`. If the app doesn't exist, it will be automatically created when the entry is ingested." - ), - task: zod - .string() - .describe( - "Name of the task within the app (e.g., 'chat', 'completion', 'tool-call'). If the task doesn't exist, it will be automatically created when the entry is ingested." - ), - thread_id: zod - .string() - .optional() - .describe( - 'Logical thread identifier that groups related entries in a multi-turn conversation. If provided, entries with the same thread_id are treated as part of the same conversation. If omitted, the entry is treated as a single-turn interaction (e.g., a standalone tool call or completion).' - ), - user_id: zod - .string() - .optional() - .describe( - "Identifier of the application's end-user who triggered this LLM interaction. This represents the person using your application (e.g., 'customer_123', 'employee@company.com'), NOT the service account that created the entry record (see ownership.created_by for that). Use this to track which of your users a conversation belongs to, filter entries by user, and enable per-user analytics. Format is application-defined." - ), - trace_id: zod - .string() - .optional() - .describe( - 'Distributed trace identifier (e.g., W3C traceparent). Intake stores it verbatim and does not use it at ingestion time; helps with later cross-system joins.' - ), - session_id: zod - .string() - .optional() - .describe( - 'Long-lived session identifier (e.g., user account or browser session). Stored for post-processing analytics; not used by the Intake service at runtime.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the entry was created.'), - }) - .describe( - 'Contextual metadata attached to every entry record.\n\nKeeping these grouped in a dedicated object avoids polluting the top-level\nentity schema and makes it trivial to extend without breaking compatibility.' - ) - .describe('Metadata describing producer, task, trace'), - user_rating: zod - .object({ - thumb: zod - .enum(['up', 'down']) - .describe('Possible thumb feedback choices.') - .optional() - .describe( - 'Binary feedback: \"up\" for šŸ‘ or \"down\" for šŸ‘Ž. Mutually exclusive with `rating`. Use this for simple thumbs up\/down UI elements.' - ), - rating: zod - .number() - .min(listEntriesResponseDataItemUserRatingOneRatingMin) - .optional() - .describe( - 'Numeric rating (e.g., 1-5 stars) provided by the end user. Mutually exclusive with `thumb`. Use this for star ratings or numeric scales.' - ), - opinion: zod - .string() - .min(1) - .max(listEntriesResponseDataItemUserRatingOneOpinionMax) - .optional() - .describe( - 'Free-text comment from the end user describing their opinion of the response.' - ), - rewrite: zod - .string() - .min(1) - .max(listEntriesResponseDataItemUserRatingOneRewriteMax) - .optional() - .describe( - "End-user's suggested text replacement for the generated response. This is the user's idea of what the response should have been." - ), - chosen_index: zod - .number() - .min(listEntriesResponseDataItemUserRatingOneChosenIndexMin) - .optional() - .describe( - 'Zero-based index of the response option the user selected when multiple responses were returned. Use this when showing users multiple completion choices and tracking which one they picked.' - ), - categories: zod - .record(zod.string(), zod.union([zod.number(), zod.string()])) - .optional() - .describe( - "Application-specific category ratings as key-value pairs. Use this for custom rating dimensions (e.g., {'helpfulness': 4, 'accuracy': 5, 'tone': 'professional'}). Useful for radio buttons, dropdowns, or multi-dimensional rating systems." - ), - }) - .describe( - "User's rating\/evaluation of an AI response.\n\nThis captures various forms of end-user feedback about a model's response, including\nbinary thumbs up\/down ratings, numeric scores, free-text opinions, suggested rewrites,\nand structured category ratings.\n\nEither `thumb` or `rating` should be provided (they are mutually exclusive), but all\nfields are optional to accommodate different feedback collection patterns." - ) - .optional() - .describe("User's rating\/evaluation"), - events: zod - .array( - zod.union([ - zod - .object({ - id: zod - .string() - .optional() - .describe( - 'Unique identifier for the event. Populated when retrieved from database.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the record was created.'), - created_by: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Identifier of the user or system that generated the record. Can be set of key-value pairs.' - ), - event_type: zod - .literal('user_feedback') - .default(listEntriesResponseDataItemEventsItemOneEventTypeDefault), - thumb: zod - .enum(['up', 'down']) - .describe('Possible thumb feedback choices.') - .optional() - .describe( - 'Binary feedback: \"up\" for šŸ‘ or \"down\" for šŸ‘Ž. Mutually exclusive with `rating`. Use this for simple thumbs up\/down UI elements.' - ), - rating: zod - .number() - .min(listEntriesResponseDataItemEventsItemOneRatingMin) - .optional() - .describe( - 'Numeric rating (e.g., 1-5 stars) provided by the end user. Mutually exclusive with `thumb`. Use this for star ratings or numeric scales.' - ), - opinion: zod - .string() - .min(1) - .max(listEntriesResponseDataItemEventsItemOneOpinionMax) - .optional() - .describe( - 'Free-text comment from the end user describing their opinion of the response.' - ), - rewrite: zod - .string() - .min(1) - .max(listEntriesResponseDataItemEventsItemOneRewriteMax) - .optional() - .describe( - "End-user's suggested text replacement for the generated response. This is the user's idea of what the response should have been." - ), - chosen_index: zod - .number() - .min(listEntriesResponseDataItemEventsItemOneChosenIndexMin) - .optional() - .describe( - 'Zero-based index of the response option the user selected when multiple responses were returned. Use this when showing users multiple completion choices and tracking which one they picked.' - ), - categories: zod - .record(zod.string(), zod.union([zod.number(), zod.string()])) - .optional() - .describe( - "Application-specific category ratings as key-value pairs. Use this for custom rating dimensions (e.g., {'helpfulness': 4, 'accuracy': 5, 'tone': 'professional'}). Useful for radio buttons, dropdowns, or multi-dimensional rating systems." - ), - }) - .describe( - "Structured feedback supplied by an end-user.\n\nThis event captures various forms of end-user feedback about a model's response,\nincluding binary thumbs up\/down ratings, numeric scores, free-text opinions,\nsuggested rewrites, and structured category ratings.\n\nEither `thumb` or `rating` should be provided (they are mutually exclusive), but all\nfeedback fields are optional to accommodate different feedback collection patterns." - ), - zod - .object({ - id: zod - .string() - .optional() - .describe( - 'Unique identifier for the event. Populated when retrieved from database.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the record was created.'), - created_by: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Identifier of the user or system that generated the record. Can be set of key-value pairs.' - ), - event_type: zod - .literal('user_action') - .default(listEntriesResponseDataItemEventsItemTwoEventTypeDefault), - action: zod - .string() - .max(listEntriesResponseDataItemEventsItemTwoActionMax) - .describe( - "Descriptive name for the action taken by the user (e.g., 'share_clicked', 'code_copied', 'link_followed'). Use snake-case or kebab-case. This is a label, not a unique identifier—multiple events can have the same action name." - ), - metadata: zod - .record( - zod.string(), - zod.union([ - zod.string().max(listEntriesResponseDataItemEventsItemTwoMetadataOneMax), - zod.array( - zod - .string() - .max(listEntriesResponseDataItemEventsItemTwoMetadataTwoItemMax) - ), - zod.boolean(), - zod.number(), - zod.number(), - ]) - ) - .optional() - .describe( - "Optional key-value pairs with additional context about the action (max 16 entries). Use this for details like user IDs, item IDs, timestamps, A\/B test variants, or any other information useful for downstream training or evaluation pipelines. Example: {'user_id': '12345', 'experiment': 'variant_b', 'item_purchased': 'product_456'}." - ), - }) - .describe( - 'Free-form user action captured by the client application.\n\nUse this to track arbitrary user interactions with AI responses, such as copying code,\nclicking share buttons, making purchases, or any other measurable action.\n\nThe action identifier must be ≤256 characters and should use snake-case or kebab-case\nfor consistency (e.g., ``share_clicked``, ``code_copied``, ``purchase_made``).' - ), - zod - .object({ - id: zod - .string() - .optional() - .describe( - 'Unique identifier for the event. Populated when retrieved from database.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the record was created.'), - created_by: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Identifier of the user or system that generated the record. Can be set of key-value pairs.' - ), - event_type: zod - .literal('reviewer_annotation') - .default(listEntriesResponseDataItemEventsItemThreeEventTypeDefault), - thumb: zod - .enum(['up', 'down']) - .describe('Possible thumb feedback choices.') - .optional() - .describe( - 'Binary feedback: \"up\" for šŸ‘ or \"down\" for šŸ‘Ž. Mutually exclusive with `rating`. Use this for simple thumbs up\/down UI elements.' - ), - rating: zod - .number() - .min(listEntriesResponseDataItemEventsItemThreeRatingMin) - .optional() - .describe( - 'Numeric rating (e.g., 1-5 stars) provided by the end user. Mutually exclusive with `thumb`. Use this for star ratings or numeric scales.' - ), - opinion: zod - .string() - .min(1) - .max(listEntriesResponseDataItemEventsItemThreeOpinionMax) - .optional() - .describe( - 'Free-text comment from the end user describing their opinion of the response.' - ), - rewrite: zod - .string() - .min(1) - .max(listEntriesResponseDataItemEventsItemThreeRewriteMax) - .optional() - .describe( - "End-user's suggested text replacement for the generated response. This is the user's idea of what the response should have been." - ), - chosen_index: zod - .number() - .min(listEntriesResponseDataItemEventsItemThreeChosenIndexMin) - .optional() - .describe( - 'Zero-based index of the response option the user selected when multiple responses were returned. Use this when showing users multiple completion choices and tracking which one they picked.' - ), - categories: zod - .record(zod.string(), zod.union([zod.number(), zod.string()])) - .optional() - .describe( - "Application-specific category ratings as key-value pairs. Use this for custom rating dimensions (e.g., {'helpfulness': 4, 'accuracy': 5, 'tone': 'professional'}). Useful for radio buttons, dropdowns, or multi-dimensional rating systems." - ), - response_override: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - "Complete JSON object that replaces the original model response when exporting data. Unlike the `rewrite` field (which is just text), this can include tool calls, function outputs, and all other response metadata. When an entry with response_override is exported, you can choose to use this corrected response instead of the original. Example: {'choices': [{'message': {'role': 'assistant', 'content': 'Corrected text', 'tool_calls': [...]}}]}" - ), - }) - .describe( - 'Structured annotation supplied by a reviewer or expert evaluator.\n\nA reviewer annotation is similar to user feedback but includes an additional capability\nto provide a complete replacement response. This is useful when human experts need to\ncorrect not just the text but also structured elements like tool calls, function outputs,\nor other response metadata.\n\nInherits all feedback fields from UserFeedbackEvent (thumb, rating, opinion, rewrite,\nchosen_index, categories) and adds response_override for full response replacement.' - ), - zod - .object({ - id: zod - .string() - .optional() - .describe( - 'Unique identifier for the event. Populated when retrieved from database.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the record was created.'), - created_by: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Identifier of the user or system that generated the record. Can be set of key-value pairs.' - ), - event_type: zod - .literal('evaluator_result') - .default(listEntriesResponseDataItemEventsItemFourEventTypeDefault), - name: zod - .string() - .max(listEntriesResponseDataItemEventsItemFourNameMax) - .describe( - "Identifier of the evaluator that produced this result (e.g., 'harbor.verifier', 'evaluator.llm_judge', 'auditor.pii_probe')." - ), - score: zod - .union([zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - "The result value: a number (e.g., reward, rating, probability) or a string (e.g., 'pass', 'fail', a category label). Semantics are defined by the evaluator." - ), - metadata: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Free-form additional context about this result (e.g., supporting metrics, trial_name, rubric_version, evaluator config snapshot).' - ), - }) - .describe( - 'Result produced by an automated evaluator.\n\nUse this for any non-human scorer that emits a judgement about an entry:\neval-framework verifier rewards, LLM-judge ratings, auditor probe results, etc.\nDistinct from UserFeedbackEvent (human end-user feedback) and ReviewerAnnotationEvent\n(human expert annotation).' - ), - ]) - ) - .optional() - .describe('Events associated with this entry'), - custom_fields: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Free-form metadata bag for client-defined fields.'), - created_at: zod.string().datetime({}).optional().describe('Creation timestamp'), - updated_at: zod.string().datetime({}).optional().describe('Last update timestamp'), - }) - .describe('Schema for Entry responses.') - ), - pagination: zod - .object({ - page: zod.number().describe('The current page number.'), - page_size: zod.number().describe('The page size used for the query.'), - current_page_size: zod.number().describe('The size for the current page.'), - total_pages: zod.number().describe('The total number of pages.'), - total_results: zod.number().describe('The total number of results.'), - }) - .optional() - .describe('Pagination information.'), - sort: zod.string().optional().describe('The field on which the results are sorted.'), - filter: zod.record(zod.string(), zod.unknown()).optional().describe('Filtering information.'), -}); - -/** - * Create a new entry. - -Apps and tasks referenced in the entry context will be auto-created if they don't exist. - * @summary Create Entry - */ -export const CreateEntryParams = zod.object({ - workspace: zod.string(), -}); - -export const createEntryBodyUsageOneLatencyMsMin = 0; - -export const createEntryBodyUsageOneCostUsdMin = 0; - -export const createEntryBodyUsageOneCostInputUsdMin = 0; - -export const createEntryBodyUsageOneCostOutputUsdMin = 0; - -export const createEntryBodyUsageOneInputTokensMin = 0; - -export const createEntryBodyUsageOneOutputTokensMin = 0; - -export const createEntryBodyUsageOneCachedTokensMin = 0; - -export const createEntryBodyUserRatingOneRatingMin = 0; - -export const createEntryBodyUserRatingOneOpinionMax = 2000; - -export const createEntryBodyUserRatingOneRewriteMax = 10000; - -export const createEntryBodyUserRatingOneChosenIndexMin = 0; - -export const createEntryBodyEventsItemOneEventTypeDefault = `user_feedback`; -export const createEntryBodyEventsItemOneRatingMin = 0; - -export const createEntryBodyEventsItemOneOpinionMax = 2000; - -export const createEntryBodyEventsItemOneRewriteMax = 10000; - -export const createEntryBodyEventsItemOneChosenIndexMin = 0; - -export const createEntryBodyEventsItemTwoEventTypeDefault = `user_action`; -export const createEntryBodyEventsItemTwoActionMax = 256; - -export const createEntryBodyEventsItemTwoMetadataOneMax = 256; - -export const createEntryBodyEventsItemTwoMetadataTwoItemMax = 256; - -export const createEntryBodyEventsItemThreeEventTypeDefault = `reviewer_annotation`; -export const createEntryBodyEventsItemThreeRatingMin = 0; - -export const createEntryBodyEventsItemThreeOpinionMax = 2000; - -export const createEntryBodyEventsItemThreeRewriteMax = 10000; - -export const createEntryBodyEventsItemThreeChosenIndexMin = 0; - -export const createEntryBodyEventsItemFourEventTypeDefault = `evaluator_result`; -export const createEntryBodyEventsItemFourNameMax = 256; - -export const CreateEntryBody = zod - .object({ - external_id: zod - .string() - .optional() - .describe('Optional client-provided identifier (e.g., completion_id from an LLM provider)'), - project: zod.string().optional().describe('The name of the project associated with this entry'), - data: zod - .object({ - request: zod - .object({ - messages: zod - .array( - zod - .object({ - role: zod - .enum(['user', 'system', 'assistant', 'developer', 'tool', 'function']) - .describe('Valid role values for entry request messages.') - .describe( - 'The role of the message sender. Must be one of: user, system, assistant, developer, tool, or function.' - ), - }) - .describe( - 'A flexible message model that requires a valid role field but allows any other fields.\n\nThis flexibility enables the Intake service to store messages from various LLM providers\nand future model types without requiring schema updates. Additional fields like `content`,\n`name`, `tool_calls`, `tool_call_id`, etc. are all accepted.\n\nExamples of additional fields:\n- `content`: The message text or content\n- `name`: Name of the user or function\n- `tool_calls`: Tool\/function calls in the message\n- `tool_call_id`: ID of the tool call being responded to' - ) - ) - .describe( - 'A list of messages comprising the conversation. Each message must have a valid role. Additional fields like `content`, `tool_calls`, etc. are provider-specific.' - ), - model: zod - .string() - .describe( - "The model identifier used for this request (e.g., 'gpt-4', 'llama-3-70b', 'claude-3-opus')." - ), - }) - .describe( - 'Flexible entry request that accepts any object shape.\n\nThis flexibility enables the Intake service to store requests from various LLM providers\n(OpenAI, Anthropic, NIM, etc.) and future model types (embeddings, multimodal, etc.)\nwithout requiring schema updates.\n\nRequired fields: `messages` and `model`\nCommon optional fields: `temperature`, `max_tokens`, `top_p`, `tools`, `tool_choice`,\n`stream`, `response_format`, etc.' - ) - .describe('Raw request payload recorded from the client.'), - response: zod - .union([zod.unknown(), zod.unknown()]) - .and( - zod.object({ - choices: zod - .array(zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'A list of response choices generated by the model. Each choice typically contains a message object with role, content, and optional tool_calls. The structure varies by provider but commonly includes fields like `index`, `message`, and `finish_reason`.' - ), - error: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - "Error envelope returned by the provider when the call failed (e.g., OpenAI's `{message, type, code, param}` shape). Mutually exclusive with `choices`: a response carries one or the other." - ), - }) - ) - .describe( - 'Flexible entry response that accepts any object shape.\n\nThis flexibility enables the Intake service to store responses from various LLM providers\nand future model types without requiring schema updates.\n\nRequired: either `choices` (successful response) or `error` (failed call).\nCommon optional fields: `id`, `created`, `model`, `usage`, `system_fingerprint`, etc.' - ) - .describe('Raw response payload generated by the model.'), - }) - .describe('Entry data containing the request and response for an LLM interaction.') - .describe('Entry data containing request and response'), - usage: zod - .object({ - model: zod - .string() - .optional() - .describe( - 'The actual model that served the request (after any routing). May differ from the model in the request body.' - ), - started_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the upstream LLM call started.'), - ended_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the upstream LLM call ended.'), - latency_ms: zod - .number() - .min(createEntryBodyUsageOneLatencyMsMin) - .optional() - .describe('Wall-clock latency of the upstream LLM call, in milliseconds.'), - cost_usd: zod - .number() - .min(createEntryBodyUsageOneCostUsdMin) - .optional() - .describe('Total estimated cost of this call, in USD.'), - cost_input_usd: zod - .number() - .min(createEntryBodyUsageOneCostInputUsdMin) - .optional() - .describe('Estimated cost attributed to input tokens, in USD.'), - cost_output_usd: zod - .number() - .min(createEntryBodyUsageOneCostOutputUsdMin) - .optional() - .describe('Estimated cost attributed to output tokens, in USD.'), - input_tokens: zod - .number() - .min(createEntryBodyUsageOneInputTokensMin) - .optional() - .describe('Number of input tokens consumed.'), - output_tokens: zod - .number() - .min(createEntryBodyUsageOneOutputTokensMin) - .optional() - .describe('Number of output tokens produced.'), - cached_tokens: zod - .number() - .min(createEntryBodyUsageOneCachedTokensMin) - .optional() - .describe('Number of input tokens served from a prompt cache (subset of input_tokens).'), - }) - .describe( - 'Structured usage metrics captured at log time.\n\nEvery field is optional so producers can populate whatever they have without\nschema breakage. Stored as the entry-level ``usage`` field so filters can\nreach it via ``data.usage.`` entity-store paths.' - ) - .optional() - .describe('Structured usage metrics (model served, latency, cost, token counts).'), - context: zod - .object({ - app: zod - .string() - .describe( - "Reference to the app that produced this entry, in the form `workspace\/name`. If the app doesn't exist, it will be automatically created when the entry is ingested." - ), - task: zod - .string() - .describe( - "Name of the task within the app (e.g., 'chat', 'completion', 'tool-call'). If the task doesn't exist, it will be automatically created when the entry is ingested." - ), - thread_id: zod - .string() - .optional() - .describe( - 'Logical thread identifier that groups related entries in a multi-turn conversation. If provided, entries with the same thread_id are treated as part of the same conversation. If omitted, the entry is treated as a single-turn interaction (e.g., a standalone tool call or completion).' - ), - user_id: zod - .string() - .optional() - .describe( - "Identifier of the application's end-user who triggered this LLM interaction. This represents the person using your application (e.g., 'customer_123', 'employee@company.com'), NOT the service account that created the entry record (see ownership.created_by for that). Use this to track which of your users a conversation belongs to, filter entries by user, and enable per-user analytics. Format is application-defined." - ), - trace_id: zod - .string() - .optional() - .describe( - 'Distributed trace identifier (e.g., W3C traceparent). Intake stores it verbatim and does not use it at ingestion time; helps with later cross-system joins.' - ), - session_id: zod - .string() - .optional() - .describe( - 'Long-lived session identifier (e.g., user account or browser session). Stored for post-processing analytics; not used by the Intake service at runtime.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the entry was created.'), - }) - .describe( - 'Contextual metadata attached to every entry record.\n\nKeeping these grouped in a dedicated object avoids polluting the top-level\nentity schema and makes it trivial to extend without breaking compatibility.' - ) - .describe('Metadata describing producer, task, trace'), - user_rating: zod - .object({ - thumb: zod - .enum(['up', 'down']) - .describe('Possible thumb feedback choices.') - .optional() - .describe( - 'Binary feedback: \"up\" for šŸ‘ or \"down\" for šŸ‘Ž. Mutually exclusive with `rating`. Use this for simple thumbs up\/down UI elements.' - ), - rating: zod - .number() - .min(createEntryBodyUserRatingOneRatingMin) - .optional() - .describe( - 'Numeric rating (e.g., 1-5 stars) provided by the end user. Mutually exclusive with `thumb`. Use this for star ratings or numeric scales.' - ), - opinion: zod - .string() - .min(1) - .max(createEntryBodyUserRatingOneOpinionMax) - .optional() - .describe( - 'Free-text comment from the end user describing their opinion of the response.' - ), - rewrite: zod - .string() - .min(1) - .max(createEntryBodyUserRatingOneRewriteMax) - .optional() - .describe( - "End-user's suggested text replacement for the generated response. This is the user's idea of what the response should have been." - ), - chosen_index: zod - .number() - .min(createEntryBodyUserRatingOneChosenIndexMin) - .optional() - .describe( - 'Zero-based index of the response option the user selected when multiple responses were returned. Use this when showing users multiple completion choices and tracking which one they picked.' - ), - categories: zod - .record(zod.string(), zod.union([zod.number(), zod.string()])) - .optional() - .describe( - "Application-specific category ratings as key-value pairs. Use this for custom rating dimensions (e.g., {'helpfulness': 4, 'accuracy': 5, 'tone': 'professional'}). Useful for radio buttons, dropdowns, or multi-dimensional rating systems." - ), - }) - .describe( - "User's rating\/evaluation of an AI response.\n\nThis captures various forms of end-user feedback about a model's response, including\nbinary thumbs up\/down ratings, numeric scores, free-text opinions, suggested rewrites,\nand structured category ratings.\n\nEither `thumb` or `rating` should be provided (they are mutually exclusive), but all\nfields are optional to accommodate different feedback collection patterns." - ) - .optional() - .describe("User's rating\/evaluation of the AI response"), - events: zod - .array( - zod.union([ - zod - .object({ - id: zod - .string() - .optional() - .describe( - 'Unique identifier for the event. Populated when retrieved from database.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the record was created.'), - created_by: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Identifier of the user or system that generated the record. Can be set of key-value pairs.' - ), - event_type: zod - .literal('user_feedback') - .default(createEntryBodyEventsItemOneEventTypeDefault), - thumb: zod - .enum(['up', 'down']) - .describe('Possible thumb feedback choices.') - .optional() - .describe( - 'Binary feedback: \"up\" for šŸ‘ or \"down\" for šŸ‘Ž. Mutually exclusive with `rating`. Use this for simple thumbs up\/down UI elements.' - ), - rating: zod - .number() - .min(createEntryBodyEventsItemOneRatingMin) - .optional() - .describe( - 'Numeric rating (e.g., 1-5 stars) provided by the end user. Mutually exclusive with `thumb`. Use this for star ratings or numeric scales.' - ), - opinion: zod - .string() - .min(1) - .max(createEntryBodyEventsItemOneOpinionMax) - .optional() - .describe( - 'Free-text comment from the end user describing their opinion of the response.' - ), - rewrite: zod - .string() - .min(1) - .max(createEntryBodyEventsItemOneRewriteMax) - .optional() - .describe( - "End-user's suggested text replacement for the generated response. This is the user's idea of what the response should have been." - ), - chosen_index: zod - .number() - .min(createEntryBodyEventsItemOneChosenIndexMin) - .optional() - .describe( - 'Zero-based index of the response option the user selected when multiple responses were returned. Use this when showing users multiple completion choices and tracking which one they picked.' - ), - categories: zod - .record(zod.string(), zod.union([zod.number(), zod.string()])) - .optional() - .describe( - "Application-specific category ratings as key-value pairs. Use this for custom rating dimensions (e.g., {'helpfulness': 4, 'accuracy': 5, 'tone': 'professional'}). Useful for radio buttons, dropdowns, or multi-dimensional rating systems." - ), - }) - .describe( - "Structured feedback supplied by an end-user.\n\nThis event captures various forms of end-user feedback about a model's response,\nincluding binary thumbs up\/down ratings, numeric scores, free-text opinions,\nsuggested rewrites, and structured category ratings.\n\nEither `thumb` or `rating` should be provided (they are mutually exclusive), but all\nfeedback fields are optional to accommodate different feedback collection patterns." - ), - zod - .object({ - id: zod - .string() - .optional() - .describe( - 'Unique identifier for the event. Populated when retrieved from database.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the record was created.'), - created_by: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Identifier of the user or system that generated the record. Can be set of key-value pairs.' - ), - event_type: zod - .literal('user_action') - .default(createEntryBodyEventsItemTwoEventTypeDefault), - action: zod - .string() - .max(createEntryBodyEventsItemTwoActionMax) - .describe( - "Descriptive name for the action taken by the user (e.g., 'share_clicked', 'code_copied', 'link_followed'). Use snake-case or kebab-case. This is a label, not a unique identifier—multiple events can have the same action name." - ), - metadata: zod - .record( - zod.string(), - zod.union([ - zod.string().max(createEntryBodyEventsItemTwoMetadataOneMax), - zod.array(zod.string().max(createEntryBodyEventsItemTwoMetadataTwoItemMax)), - zod.boolean(), - zod.number(), - zod.number(), - ]) - ) - .optional() - .describe( - "Optional key-value pairs with additional context about the action (max 16 entries). Use this for details like user IDs, item IDs, timestamps, A\/B test variants, or any other information useful for downstream training or evaluation pipelines. Example: {'user_id': '12345', 'experiment': 'variant_b', 'item_purchased': 'product_456'}." - ), - }) - .describe( - 'Free-form user action captured by the client application.\n\nUse this to track arbitrary user interactions with AI responses, such as copying code,\nclicking share buttons, making purchases, or any other measurable action.\n\nThe action identifier must be ≤256 characters and should use snake-case or kebab-case\nfor consistency (e.g., ``share_clicked``, ``code_copied``, ``purchase_made``).' - ), - zod - .object({ - id: zod - .string() - .optional() - .describe( - 'Unique identifier for the event. Populated when retrieved from database.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the record was created.'), - created_by: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Identifier of the user or system that generated the record. Can be set of key-value pairs.' - ), - event_type: zod - .literal('reviewer_annotation') - .default(createEntryBodyEventsItemThreeEventTypeDefault), - thumb: zod - .enum(['up', 'down']) - .describe('Possible thumb feedback choices.') - .optional() - .describe( - 'Binary feedback: \"up\" for šŸ‘ or \"down\" for šŸ‘Ž. Mutually exclusive with `rating`. Use this for simple thumbs up\/down UI elements.' - ), - rating: zod - .number() - .min(createEntryBodyEventsItemThreeRatingMin) - .optional() - .describe( - 'Numeric rating (e.g., 1-5 stars) provided by the end user. Mutually exclusive with `thumb`. Use this for star ratings or numeric scales.' - ), - opinion: zod - .string() - .min(1) - .max(createEntryBodyEventsItemThreeOpinionMax) - .optional() - .describe( - 'Free-text comment from the end user describing their opinion of the response.' - ), - rewrite: zod - .string() - .min(1) - .max(createEntryBodyEventsItemThreeRewriteMax) - .optional() - .describe( - "End-user's suggested text replacement for the generated response. This is the user's idea of what the response should have been." - ), - chosen_index: zod - .number() - .min(createEntryBodyEventsItemThreeChosenIndexMin) - .optional() - .describe( - 'Zero-based index of the response option the user selected when multiple responses were returned. Use this when showing users multiple completion choices and tracking which one they picked.' - ), - categories: zod - .record(zod.string(), zod.union([zod.number(), zod.string()])) - .optional() - .describe( - "Application-specific category ratings as key-value pairs. Use this for custom rating dimensions (e.g., {'helpfulness': 4, 'accuracy': 5, 'tone': 'professional'}). Useful for radio buttons, dropdowns, or multi-dimensional rating systems." - ), - response_override: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - "Complete JSON object that replaces the original model response when exporting data. Unlike the `rewrite` field (which is just text), this can include tool calls, function outputs, and all other response metadata. When an entry with response_override is exported, you can choose to use this corrected response instead of the original. Example: {'choices': [{'message': {'role': 'assistant', 'content': 'Corrected text', 'tool_calls': [...]}}]}" - ), - }) - .describe( - 'Structured annotation supplied by a reviewer or expert evaluator.\n\nA reviewer annotation is similar to user feedback but includes an additional capability\nto provide a complete replacement response. This is useful when human experts need to\ncorrect not just the text but also structured elements like tool calls, function outputs,\nor other response metadata.\n\nInherits all feedback fields from UserFeedbackEvent (thumb, rating, opinion, rewrite,\nchosen_index, categories) and adds response_override for full response replacement.' - ), - zod - .object({ - id: zod - .string() - .optional() - .describe( - 'Unique identifier for the event. Populated when retrieved from database.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the record was created.'), - created_by: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Identifier of the user or system that generated the record. Can be set of key-value pairs.' - ), - event_type: zod - .literal('evaluator_result') - .default(createEntryBodyEventsItemFourEventTypeDefault), - name: zod - .string() - .max(createEntryBodyEventsItemFourNameMax) - .describe( - "Identifier of the evaluator that produced this result (e.g., 'harbor.verifier', 'evaluator.llm_judge', 'auditor.pii_probe')." - ), - score: zod - .union([zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - "The result value: a number (e.g., reward, rating, probability) or a string (e.g., 'pass', 'fail', a category label). Semantics are defined by the evaluator." - ), - metadata: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Free-form additional context about this result (e.g., supporting metrics, trial_name, rubric_version, evaluator config snapshot).' - ), - }) - .describe( - 'Result produced by an automated evaluator.\n\nUse this for any non-human scorer that emits a judgement about an entry:\neval-framework verifier rewards, LLM-judge ratings, auditor probe results, etc.\nDistinct from UserFeedbackEvent (human end-user feedback) and ReviewerAnnotationEvent\n(human expert annotation).' - ), - ]) - ) - .optional() - .describe('Events associated with this entry'), - custom_fields: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Free-form metadata bag for client-defined fields (e.g., external experiment metadata).' - ), - }) - .describe('Schema for creating a new Entry.'); - -/** - * Delete a specific event from an entry. - -Entry can be referenced by ID or external_id using `external:{external_id}` prefix. - * @summary Delete Event - */ -export const DeleteEventParams = zod.object({ - workspace: zod.string(), - entry: zod.string(), - name: zod.string(), -}); - -export const deleteEventResponseUsageOneLatencyMsMin = 0; - -export const deleteEventResponseUsageOneCostUsdMin = 0; - -export const deleteEventResponseUsageOneCostInputUsdMin = 0; - -export const deleteEventResponseUsageOneCostOutputUsdMin = 0; - -export const deleteEventResponseUsageOneInputTokensMin = 0; - -export const deleteEventResponseUsageOneOutputTokensMin = 0; - -export const deleteEventResponseUsageOneCachedTokensMin = 0; - -export const deleteEventResponseUserRatingOneRatingMin = 0; - -export const deleteEventResponseUserRatingOneOpinionMax = 2000; - -export const deleteEventResponseUserRatingOneRewriteMax = 10000; - -export const deleteEventResponseUserRatingOneChosenIndexMin = 0; - -export const deleteEventResponseEventsItemOneEventTypeDefault = `user_feedback`; -export const deleteEventResponseEventsItemOneRatingMin = 0; - -export const deleteEventResponseEventsItemOneOpinionMax = 2000; - -export const deleteEventResponseEventsItemOneRewriteMax = 10000; - -export const deleteEventResponseEventsItemOneChosenIndexMin = 0; - -export const deleteEventResponseEventsItemTwoEventTypeDefault = `user_action`; -export const deleteEventResponseEventsItemTwoActionMax = 256; - -export const deleteEventResponseEventsItemTwoMetadataOneMax = 256; - -export const deleteEventResponseEventsItemTwoMetadataTwoItemMax = 256; - -export const deleteEventResponseEventsItemThreeEventTypeDefault = `reviewer_annotation`; -export const deleteEventResponseEventsItemThreeRatingMin = 0; - -export const deleteEventResponseEventsItemThreeOpinionMax = 2000; - -export const deleteEventResponseEventsItemThreeRewriteMax = 10000; - -export const deleteEventResponseEventsItemThreeChosenIndexMin = 0; - -export const deleteEventResponseEventsItemFourEventTypeDefault = `evaluator_result`; -export const deleteEventResponseEventsItemFourNameMax = 256; - -export const DeleteEventResponse = zod - .object({ - id: zod.string().describe('Unique identifier'), - name: zod.string().describe('Entry name (auto-generated)'), - workspace: zod.string().describe('Workspace identifier'), - external_id: zod.string().optional().describe('Client-provided identifier'), - project: zod.string().optional().describe('The name of the project associated with this entry'), - data: zod - .object({ - request: zod - .object({ - messages: zod - .array( - zod - .object({ - role: zod - .enum(['user', 'system', 'assistant', 'developer', 'tool', 'function']) - .describe('Valid role values for entry request messages.') - .describe( - 'The role of the message sender. Must be one of: user, system, assistant, developer, tool, or function.' - ), - }) - .describe( - 'A flexible message model that requires a valid role field but allows any other fields.\n\nThis flexibility enables the Intake service to store messages from various LLM providers\nand future model types without requiring schema updates. Additional fields like `content`,\n`name`, `tool_calls`, `tool_call_id`, etc. are all accepted.\n\nExamples of additional fields:\n- `content`: The message text or content\n- `name`: Name of the user or function\n- `tool_calls`: Tool\/function calls in the message\n- `tool_call_id`: ID of the tool call being responded to' - ) - ) - .describe( - 'A list of messages comprising the conversation. Each message must have a valid role. Additional fields like `content`, `tool_calls`, etc. are provider-specific.' - ), - model: zod - .string() - .describe( - "The model identifier used for this request (e.g., 'gpt-4', 'llama-3-70b', 'claude-3-opus')." - ), - }) - .describe( - 'Flexible entry request that accepts any object shape.\n\nThis flexibility enables the Intake service to store requests from various LLM providers\n(OpenAI, Anthropic, NIM, etc.) and future model types (embeddings, multimodal, etc.)\nwithout requiring schema updates.\n\nRequired fields: `messages` and `model`\nCommon optional fields: `temperature`, `max_tokens`, `top_p`, `tools`, `tool_choice`,\n`stream`, `response_format`, etc.' - ) - .describe('Raw request payload recorded from the client.'), - response: zod - .union([zod.unknown(), zod.unknown()]) - .and( - zod.object({ - choices: zod - .array(zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'A list of response choices generated by the model. Each choice typically contains a message object with role, content, and optional tool_calls. The structure varies by provider but commonly includes fields like `index`, `message`, and `finish_reason`.' - ), - error: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - "Error envelope returned by the provider when the call failed (e.g., OpenAI's `{message, type, code, param}` shape). Mutually exclusive with `choices`: a response carries one or the other." - ), - }) - ) - .describe( - 'Flexible entry response that accepts any object shape.\n\nThis flexibility enables the Intake service to store responses from various LLM providers\nand future model types without requiring schema updates.\n\nRequired: either `choices` (successful response) or `error` (failed call).\nCommon optional fields: `id`, `created`, `model`, `usage`, `system_fingerprint`, etc.' - ) - .describe('Raw response payload generated by the model.'), - }) - .describe('Entry data containing the request and response for an LLM interaction.') - .describe('Entry data containing request and response'), - usage: zod - .object({ - model: zod - .string() - .optional() - .describe( - 'The actual model that served the request (after any routing). May differ from the model in the request body.' - ), - started_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the upstream LLM call started.'), - ended_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the upstream LLM call ended.'), - latency_ms: zod - .number() - .min(deleteEventResponseUsageOneLatencyMsMin) - .optional() - .describe('Wall-clock latency of the upstream LLM call, in milliseconds.'), - cost_usd: zod - .number() - .min(deleteEventResponseUsageOneCostUsdMin) - .optional() - .describe('Total estimated cost of this call, in USD.'), - cost_input_usd: zod - .number() - .min(deleteEventResponseUsageOneCostInputUsdMin) - .optional() - .describe('Estimated cost attributed to input tokens, in USD.'), - cost_output_usd: zod - .number() - .min(deleteEventResponseUsageOneCostOutputUsdMin) - .optional() - .describe('Estimated cost attributed to output tokens, in USD.'), - input_tokens: zod - .number() - .min(deleteEventResponseUsageOneInputTokensMin) - .optional() - .describe('Number of input tokens consumed.'), - output_tokens: zod - .number() - .min(deleteEventResponseUsageOneOutputTokensMin) - .optional() - .describe('Number of output tokens produced.'), - cached_tokens: zod - .number() - .min(deleteEventResponseUsageOneCachedTokensMin) - .optional() - .describe('Number of input tokens served from a prompt cache (subset of input_tokens).'), - }) - .describe( - 'Structured usage metrics captured at log time.\n\nEvery field is optional so producers can populate whatever they have without\nschema breakage. Stored as the entry-level ``usage`` field so filters can\nreach it via ``data.usage.`` entity-store paths.' - ) - .optional() - .describe('Structured usage metrics (model served, latency, cost, token counts).'), - context: zod - .object({ - app: zod - .string() - .describe( - "Reference to the app that produced this entry, in the form `workspace\/name`. If the app doesn't exist, it will be automatically created when the entry is ingested." - ), - task: zod - .string() - .describe( - "Name of the task within the app (e.g., 'chat', 'completion', 'tool-call'). If the task doesn't exist, it will be automatically created when the entry is ingested." - ), - thread_id: zod - .string() - .optional() - .describe( - 'Logical thread identifier that groups related entries in a multi-turn conversation. If provided, entries with the same thread_id are treated as part of the same conversation. If omitted, the entry is treated as a single-turn interaction (e.g., a standalone tool call or completion).' - ), - user_id: zod - .string() - .optional() - .describe( - "Identifier of the application's end-user who triggered this LLM interaction. This represents the person using your application (e.g., 'customer_123', 'employee@company.com'), NOT the service account that created the entry record (see ownership.created_by for that). Use this to track which of your users a conversation belongs to, filter entries by user, and enable per-user analytics. Format is application-defined." - ), - trace_id: zod - .string() - .optional() - .describe( - 'Distributed trace identifier (e.g., W3C traceparent). Intake stores it verbatim and does not use it at ingestion time; helps with later cross-system joins.' - ), - session_id: zod - .string() - .optional() - .describe( - 'Long-lived session identifier (e.g., user account or browser session). Stored for post-processing analytics; not used by the Intake service at runtime.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the entry was created.'), - }) - .describe( - 'Contextual metadata attached to every entry record.\n\nKeeping these grouped in a dedicated object avoids polluting the top-level\nentity schema and makes it trivial to extend without breaking compatibility.' - ) - .describe('Metadata describing producer, task, trace'), - user_rating: zod - .object({ - thumb: zod - .enum(['up', 'down']) - .describe('Possible thumb feedback choices.') - .optional() - .describe( - 'Binary feedback: \"up\" for šŸ‘ or \"down\" for šŸ‘Ž. Mutually exclusive with `rating`. Use this for simple thumbs up\/down UI elements.' - ), - rating: zod - .number() - .min(deleteEventResponseUserRatingOneRatingMin) - .optional() - .describe( - 'Numeric rating (e.g., 1-5 stars) provided by the end user. Mutually exclusive with `thumb`. Use this for star ratings or numeric scales.' - ), - opinion: zod - .string() - .min(1) - .max(deleteEventResponseUserRatingOneOpinionMax) - .optional() - .describe( - 'Free-text comment from the end user describing their opinion of the response.' - ), - rewrite: zod - .string() - .min(1) - .max(deleteEventResponseUserRatingOneRewriteMax) - .optional() - .describe( - "End-user's suggested text replacement for the generated response. This is the user's idea of what the response should have been." - ), - chosen_index: zod - .number() - .min(deleteEventResponseUserRatingOneChosenIndexMin) - .optional() - .describe( - 'Zero-based index of the response option the user selected when multiple responses were returned. Use this when showing users multiple completion choices and tracking which one they picked.' - ), - categories: zod - .record(zod.string(), zod.union([zod.number(), zod.string()])) - .optional() - .describe( - "Application-specific category ratings as key-value pairs. Use this for custom rating dimensions (e.g., {'helpfulness': 4, 'accuracy': 5, 'tone': 'professional'}). Useful for radio buttons, dropdowns, or multi-dimensional rating systems." - ), - }) - .describe( - "User's rating\/evaluation of an AI response.\n\nThis captures various forms of end-user feedback about a model's response, including\nbinary thumbs up\/down ratings, numeric scores, free-text opinions, suggested rewrites,\nand structured category ratings.\n\nEither `thumb` or `rating` should be provided (they are mutually exclusive), but all\nfields are optional to accommodate different feedback collection patterns." - ) - .optional() - .describe("User's rating\/evaluation"), - events: zod - .array( - zod.union([ - zod - .object({ - id: zod - .string() - .optional() - .describe( - 'Unique identifier for the event. Populated when retrieved from database.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the record was created.'), - created_by: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Identifier of the user or system that generated the record. Can be set of key-value pairs.' - ), - event_type: zod - .literal('user_feedback') - .default(deleteEventResponseEventsItemOneEventTypeDefault), - thumb: zod - .enum(['up', 'down']) - .describe('Possible thumb feedback choices.') - .optional() - .describe( - 'Binary feedback: \"up\" for šŸ‘ or \"down\" for šŸ‘Ž. Mutually exclusive with `rating`. Use this for simple thumbs up\/down UI elements.' - ), - rating: zod - .number() - .min(deleteEventResponseEventsItemOneRatingMin) - .optional() - .describe( - 'Numeric rating (e.g., 1-5 stars) provided by the end user. Mutually exclusive with `thumb`. Use this for star ratings or numeric scales.' - ), - opinion: zod - .string() - .min(1) - .max(deleteEventResponseEventsItemOneOpinionMax) - .optional() - .describe( - 'Free-text comment from the end user describing their opinion of the response.' - ), - rewrite: zod - .string() - .min(1) - .max(deleteEventResponseEventsItemOneRewriteMax) - .optional() - .describe( - "End-user's suggested text replacement for the generated response. This is the user's idea of what the response should have been." - ), - chosen_index: zod - .number() - .min(deleteEventResponseEventsItemOneChosenIndexMin) - .optional() - .describe( - 'Zero-based index of the response option the user selected when multiple responses were returned. Use this when showing users multiple completion choices and tracking which one they picked.' - ), - categories: zod - .record(zod.string(), zod.union([zod.number(), zod.string()])) - .optional() - .describe( - "Application-specific category ratings as key-value pairs. Use this for custom rating dimensions (e.g., {'helpfulness': 4, 'accuracy': 5, 'tone': 'professional'}). Useful for radio buttons, dropdowns, or multi-dimensional rating systems." - ), - }) - .describe( - "Structured feedback supplied by an end-user.\n\nThis event captures various forms of end-user feedback about a model's response,\nincluding binary thumbs up\/down ratings, numeric scores, free-text opinions,\nsuggested rewrites, and structured category ratings.\n\nEither `thumb` or `rating` should be provided (they are mutually exclusive), but all\nfeedback fields are optional to accommodate different feedback collection patterns." - ), - zod - .object({ - id: zod - .string() - .optional() - .describe( - 'Unique identifier for the event. Populated when retrieved from database.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the record was created.'), - created_by: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Identifier of the user or system that generated the record. Can be set of key-value pairs.' - ), - event_type: zod - .literal('user_action') - .default(deleteEventResponseEventsItemTwoEventTypeDefault), - action: zod - .string() - .max(deleteEventResponseEventsItemTwoActionMax) - .describe( - "Descriptive name for the action taken by the user (e.g., 'share_clicked', 'code_copied', 'link_followed'). Use snake-case or kebab-case. This is a label, not a unique identifier—multiple events can have the same action name." - ), - metadata: zod - .record( - zod.string(), - zod.union([ - zod.string().max(deleteEventResponseEventsItemTwoMetadataOneMax), - zod.array(zod.string().max(deleteEventResponseEventsItemTwoMetadataTwoItemMax)), - zod.boolean(), - zod.number(), - zod.number(), - ]) - ) - .optional() - .describe( - "Optional key-value pairs with additional context about the action (max 16 entries). Use this for details like user IDs, item IDs, timestamps, A\/B test variants, or any other information useful for downstream training or evaluation pipelines. Example: {'user_id': '12345', 'experiment': 'variant_b', 'item_purchased': 'product_456'}." - ), - }) - .describe( - 'Free-form user action captured by the client application.\n\nUse this to track arbitrary user interactions with AI responses, such as copying code,\nclicking share buttons, making purchases, or any other measurable action.\n\nThe action identifier must be ≤256 characters and should use snake-case or kebab-case\nfor consistency (e.g., ``share_clicked``, ``code_copied``, ``purchase_made``).' - ), - zod - .object({ - id: zod - .string() - .optional() - .describe( - 'Unique identifier for the event. Populated when retrieved from database.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the record was created.'), - created_by: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Identifier of the user or system that generated the record. Can be set of key-value pairs.' - ), - event_type: zod - .literal('reviewer_annotation') - .default(deleteEventResponseEventsItemThreeEventTypeDefault), - thumb: zod - .enum(['up', 'down']) - .describe('Possible thumb feedback choices.') - .optional() - .describe( - 'Binary feedback: \"up\" for šŸ‘ or \"down\" for šŸ‘Ž. Mutually exclusive with `rating`. Use this for simple thumbs up\/down UI elements.' - ), - rating: zod - .number() - .min(deleteEventResponseEventsItemThreeRatingMin) - .optional() - .describe( - 'Numeric rating (e.g., 1-5 stars) provided by the end user. Mutually exclusive with `thumb`. Use this for star ratings or numeric scales.' - ), - opinion: zod - .string() - .min(1) - .max(deleteEventResponseEventsItemThreeOpinionMax) - .optional() - .describe( - 'Free-text comment from the end user describing their opinion of the response.' - ), - rewrite: zod - .string() - .min(1) - .max(deleteEventResponseEventsItemThreeRewriteMax) - .optional() - .describe( - "End-user's suggested text replacement for the generated response. This is the user's idea of what the response should have been." - ), - chosen_index: zod - .number() - .min(deleteEventResponseEventsItemThreeChosenIndexMin) - .optional() - .describe( - 'Zero-based index of the response option the user selected when multiple responses were returned. Use this when showing users multiple completion choices and tracking which one they picked.' - ), - categories: zod - .record(zod.string(), zod.union([zod.number(), zod.string()])) - .optional() - .describe( - "Application-specific category ratings as key-value pairs. Use this for custom rating dimensions (e.g., {'helpfulness': 4, 'accuracy': 5, 'tone': 'professional'}). Useful for radio buttons, dropdowns, or multi-dimensional rating systems." - ), - response_override: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - "Complete JSON object that replaces the original model response when exporting data. Unlike the `rewrite` field (which is just text), this can include tool calls, function outputs, and all other response metadata. When an entry with response_override is exported, you can choose to use this corrected response instead of the original. Example: {'choices': [{'message': {'role': 'assistant', 'content': 'Corrected text', 'tool_calls': [...]}}]}" - ), - }) - .describe( - 'Structured annotation supplied by a reviewer or expert evaluator.\n\nA reviewer annotation is similar to user feedback but includes an additional capability\nto provide a complete replacement response. This is useful when human experts need to\ncorrect not just the text but also structured elements like tool calls, function outputs,\nor other response metadata.\n\nInherits all feedback fields from UserFeedbackEvent (thumb, rating, opinion, rewrite,\nchosen_index, categories) and adds response_override for full response replacement.' - ), - zod - .object({ - id: zod - .string() - .optional() - .describe( - 'Unique identifier for the event. Populated when retrieved from database.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the record was created.'), - created_by: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Identifier of the user or system that generated the record. Can be set of key-value pairs.' - ), - event_type: zod - .literal('evaluator_result') - .default(deleteEventResponseEventsItemFourEventTypeDefault), - name: zod - .string() - .max(deleteEventResponseEventsItemFourNameMax) - .describe( - "Identifier of the evaluator that produced this result (e.g., 'harbor.verifier', 'evaluator.llm_judge', 'auditor.pii_probe')." - ), - score: zod - .union([zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - "The result value: a number (e.g., reward, rating, probability) or a string (e.g., 'pass', 'fail', a category label). Semantics are defined by the evaluator." - ), - metadata: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Free-form additional context about this result (e.g., supporting metrics, trial_name, rubric_version, evaluator config snapshot).' - ), - }) - .describe( - 'Result produced by an automated evaluator.\n\nUse this for any non-human scorer that emits a judgement about an entry:\neval-framework verifier rewards, LLM-judge ratings, auditor probe results, etc.\nDistinct from UserFeedbackEvent (human end-user feedback) and ReviewerAnnotationEvent\n(human expert annotation).' - ), - ]) - ) - .optional() - .describe('Events associated with this entry'), - custom_fields: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Free-form metadata bag for client-defined fields.'), - created_at: zod.string().datetime({}).optional().describe('Creation timestamp'), - updated_at: zod.string().datetime({}).optional().describe('Last update timestamp'), - }) - .describe('Schema for Entry responses.'); - -/** - * Get a specific entry by ID or external_id. - -Use `external:{external_id}` to get by external_id. -Example: `/v2/workspaces/{workspace}/entries/external:chatcmpl-abc123` - * @summary Get Entry - */ -export const GetEntryParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const getEntryResponseUsageOneLatencyMsMin = 0; - -export const getEntryResponseUsageOneCostUsdMin = 0; - -export const getEntryResponseUsageOneCostInputUsdMin = 0; - -export const getEntryResponseUsageOneCostOutputUsdMin = 0; - -export const getEntryResponseUsageOneInputTokensMin = 0; - -export const getEntryResponseUsageOneOutputTokensMin = 0; - -export const getEntryResponseUsageOneCachedTokensMin = 0; - -export const getEntryResponseUserRatingOneRatingMin = 0; - -export const getEntryResponseUserRatingOneOpinionMax = 2000; - -export const getEntryResponseUserRatingOneRewriteMax = 10000; - -export const getEntryResponseUserRatingOneChosenIndexMin = 0; - -export const getEntryResponseEventsItemOneEventTypeDefault = `user_feedback`; -export const getEntryResponseEventsItemOneRatingMin = 0; - -export const getEntryResponseEventsItemOneOpinionMax = 2000; - -export const getEntryResponseEventsItemOneRewriteMax = 10000; - -export const getEntryResponseEventsItemOneChosenIndexMin = 0; - -export const getEntryResponseEventsItemTwoEventTypeDefault = `user_action`; -export const getEntryResponseEventsItemTwoActionMax = 256; - -export const getEntryResponseEventsItemTwoMetadataOneMax = 256; - -export const getEntryResponseEventsItemTwoMetadataTwoItemMax = 256; - -export const getEntryResponseEventsItemThreeEventTypeDefault = `reviewer_annotation`; -export const getEntryResponseEventsItemThreeRatingMin = 0; - -export const getEntryResponseEventsItemThreeOpinionMax = 2000; - -export const getEntryResponseEventsItemThreeRewriteMax = 10000; - -export const getEntryResponseEventsItemThreeChosenIndexMin = 0; - -export const getEntryResponseEventsItemFourEventTypeDefault = `evaluator_result`; -export const getEntryResponseEventsItemFourNameMax = 256; - -export const GetEntryResponse = zod - .object({ - id: zod.string().describe('Unique identifier'), - name: zod.string().describe('Entry name (auto-generated)'), - workspace: zod.string().describe('Workspace identifier'), - external_id: zod.string().optional().describe('Client-provided identifier'), - project: zod.string().optional().describe('The name of the project associated with this entry'), - data: zod - .object({ - request: zod - .object({ - messages: zod - .array( - zod - .object({ - role: zod - .enum(['user', 'system', 'assistant', 'developer', 'tool', 'function']) - .describe('Valid role values for entry request messages.') - .describe( - 'The role of the message sender. Must be one of: user, system, assistant, developer, tool, or function.' - ), - }) - .describe( - 'A flexible message model that requires a valid role field but allows any other fields.\n\nThis flexibility enables the Intake service to store messages from various LLM providers\nand future model types without requiring schema updates. Additional fields like `content`,\n`name`, `tool_calls`, `tool_call_id`, etc. are all accepted.\n\nExamples of additional fields:\n- `content`: The message text or content\n- `name`: Name of the user or function\n- `tool_calls`: Tool\/function calls in the message\n- `tool_call_id`: ID of the tool call being responded to' - ) - ) - .describe( - 'A list of messages comprising the conversation. Each message must have a valid role. Additional fields like `content`, `tool_calls`, etc. are provider-specific.' - ), - model: zod - .string() - .describe( - "The model identifier used for this request (e.g., 'gpt-4', 'llama-3-70b', 'claude-3-opus')." - ), - }) - .describe( - 'Flexible entry request that accepts any object shape.\n\nThis flexibility enables the Intake service to store requests from various LLM providers\n(OpenAI, Anthropic, NIM, etc.) and future model types (embeddings, multimodal, etc.)\nwithout requiring schema updates.\n\nRequired fields: `messages` and `model`\nCommon optional fields: `temperature`, `max_tokens`, `top_p`, `tools`, `tool_choice`,\n`stream`, `response_format`, etc.' - ) - .describe('Raw request payload recorded from the client.'), - response: zod - .union([zod.unknown(), zod.unknown()]) - .and( - zod.object({ - choices: zod - .array(zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'A list of response choices generated by the model. Each choice typically contains a message object with role, content, and optional tool_calls. The structure varies by provider but commonly includes fields like `index`, `message`, and `finish_reason`.' - ), - error: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - "Error envelope returned by the provider when the call failed (e.g., OpenAI's `{message, type, code, param}` shape). Mutually exclusive with `choices`: a response carries one or the other." - ), - }) - ) - .describe( - 'Flexible entry response that accepts any object shape.\n\nThis flexibility enables the Intake service to store responses from various LLM providers\nand future model types without requiring schema updates.\n\nRequired: either `choices` (successful response) or `error` (failed call).\nCommon optional fields: `id`, `created`, `model`, `usage`, `system_fingerprint`, etc.' - ) - .describe('Raw response payload generated by the model.'), - }) - .describe('Entry data containing the request and response for an LLM interaction.') - .describe('Entry data containing request and response'), - usage: zod - .object({ - model: zod - .string() - .optional() - .describe( - 'The actual model that served the request (after any routing). May differ from the model in the request body.' - ), - started_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the upstream LLM call started.'), - ended_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the upstream LLM call ended.'), - latency_ms: zod - .number() - .min(getEntryResponseUsageOneLatencyMsMin) - .optional() - .describe('Wall-clock latency of the upstream LLM call, in milliseconds.'), - cost_usd: zod - .number() - .min(getEntryResponseUsageOneCostUsdMin) - .optional() - .describe('Total estimated cost of this call, in USD.'), - cost_input_usd: zod - .number() - .min(getEntryResponseUsageOneCostInputUsdMin) - .optional() - .describe('Estimated cost attributed to input tokens, in USD.'), - cost_output_usd: zod - .number() - .min(getEntryResponseUsageOneCostOutputUsdMin) - .optional() - .describe('Estimated cost attributed to output tokens, in USD.'), - input_tokens: zod - .number() - .min(getEntryResponseUsageOneInputTokensMin) - .optional() - .describe('Number of input tokens consumed.'), - output_tokens: zod - .number() - .min(getEntryResponseUsageOneOutputTokensMin) - .optional() - .describe('Number of output tokens produced.'), - cached_tokens: zod - .number() - .min(getEntryResponseUsageOneCachedTokensMin) - .optional() - .describe('Number of input tokens served from a prompt cache (subset of input_tokens).'), - }) - .describe( - 'Structured usage metrics captured at log time.\n\nEvery field is optional so producers can populate whatever they have without\nschema breakage. Stored as the entry-level ``usage`` field so filters can\nreach it via ``data.usage.`` entity-store paths.' - ) - .optional() - .describe('Structured usage metrics (model served, latency, cost, token counts).'), - context: zod - .object({ - app: zod - .string() - .describe( - "Reference to the app that produced this entry, in the form `workspace\/name`. If the app doesn't exist, it will be automatically created when the entry is ingested." - ), - task: zod - .string() - .describe( - "Name of the task within the app (e.g., 'chat', 'completion', 'tool-call'). If the task doesn't exist, it will be automatically created when the entry is ingested." - ), - thread_id: zod - .string() - .optional() - .describe( - 'Logical thread identifier that groups related entries in a multi-turn conversation. If provided, entries with the same thread_id are treated as part of the same conversation. If omitted, the entry is treated as a single-turn interaction (e.g., a standalone tool call or completion).' - ), - user_id: zod - .string() - .optional() - .describe( - "Identifier of the application's end-user who triggered this LLM interaction. This represents the person using your application (e.g., 'customer_123', 'employee@company.com'), NOT the service account that created the entry record (see ownership.created_by for that). Use this to track which of your users a conversation belongs to, filter entries by user, and enable per-user analytics. Format is application-defined." - ), - trace_id: zod - .string() - .optional() - .describe( - 'Distributed trace identifier (e.g., W3C traceparent). Intake stores it verbatim and does not use it at ingestion time; helps with later cross-system joins.' - ), - session_id: zod - .string() - .optional() - .describe( - 'Long-lived session identifier (e.g., user account or browser session). Stored for post-processing analytics; not used by the Intake service at runtime.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the entry was created.'), - }) - .describe( - 'Contextual metadata attached to every entry record.\n\nKeeping these grouped in a dedicated object avoids polluting the top-level\nentity schema and makes it trivial to extend without breaking compatibility.' - ) - .describe('Metadata describing producer, task, trace'), - user_rating: zod - .object({ - thumb: zod - .enum(['up', 'down']) - .describe('Possible thumb feedback choices.') - .optional() - .describe( - 'Binary feedback: \"up\" for šŸ‘ or \"down\" for šŸ‘Ž. Mutually exclusive with `rating`. Use this for simple thumbs up\/down UI elements.' - ), - rating: zod - .number() - .min(getEntryResponseUserRatingOneRatingMin) - .optional() - .describe( - 'Numeric rating (e.g., 1-5 stars) provided by the end user. Mutually exclusive with `thumb`. Use this for star ratings or numeric scales.' - ), - opinion: zod - .string() - .min(1) - .max(getEntryResponseUserRatingOneOpinionMax) - .optional() - .describe( - 'Free-text comment from the end user describing their opinion of the response.' - ), - rewrite: zod - .string() - .min(1) - .max(getEntryResponseUserRatingOneRewriteMax) - .optional() - .describe( - "End-user's suggested text replacement for the generated response. This is the user's idea of what the response should have been." - ), - chosen_index: zod - .number() - .min(getEntryResponseUserRatingOneChosenIndexMin) - .optional() - .describe( - 'Zero-based index of the response option the user selected when multiple responses were returned. Use this when showing users multiple completion choices and tracking which one they picked.' - ), - categories: zod - .record(zod.string(), zod.union([zod.number(), zod.string()])) - .optional() - .describe( - "Application-specific category ratings as key-value pairs. Use this for custom rating dimensions (e.g., {'helpfulness': 4, 'accuracy': 5, 'tone': 'professional'}). Useful for radio buttons, dropdowns, or multi-dimensional rating systems." - ), - }) - .describe( - "User's rating\/evaluation of an AI response.\n\nThis captures various forms of end-user feedback about a model's response, including\nbinary thumbs up\/down ratings, numeric scores, free-text opinions, suggested rewrites,\nand structured category ratings.\n\nEither `thumb` or `rating` should be provided (they are mutually exclusive), but all\nfields are optional to accommodate different feedback collection patterns." - ) - .optional() - .describe("User's rating\/evaluation"), - events: zod - .array( - zod.union([ - zod - .object({ - id: zod - .string() - .optional() - .describe( - 'Unique identifier for the event. Populated when retrieved from database.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the record was created.'), - created_by: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Identifier of the user or system that generated the record. Can be set of key-value pairs.' - ), - event_type: zod - .literal('user_feedback') - .default(getEntryResponseEventsItemOneEventTypeDefault), - thumb: zod - .enum(['up', 'down']) - .describe('Possible thumb feedback choices.') - .optional() - .describe( - 'Binary feedback: \"up\" for šŸ‘ or \"down\" for šŸ‘Ž. Mutually exclusive with `rating`. Use this for simple thumbs up\/down UI elements.' - ), - rating: zod - .number() - .min(getEntryResponseEventsItemOneRatingMin) - .optional() - .describe( - 'Numeric rating (e.g., 1-5 stars) provided by the end user. Mutually exclusive with `thumb`. Use this for star ratings or numeric scales.' - ), - opinion: zod - .string() - .min(1) - .max(getEntryResponseEventsItemOneOpinionMax) - .optional() - .describe( - 'Free-text comment from the end user describing their opinion of the response.' - ), - rewrite: zod - .string() - .min(1) - .max(getEntryResponseEventsItemOneRewriteMax) - .optional() - .describe( - "End-user's suggested text replacement for the generated response. This is the user's idea of what the response should have been." - ), - chosen_index: zod - .number() - .min(getEntryResponseEventsItemOneChosenIndexMin) - .optional() - .describe( - 'Zero-based index of the response option the user selected when multiple responses were returned. Use this when showing users multiple completion choices and tracking which one they picked.' - ), - categories: zod - .record(zod.string(), zod.union([zod.number(), zod.string()])) - .optional() - .describe( - "Application-specific category ratings as key-value pairs. Use this for custom rating dimensions (e.g., {'helpfulness': 4, 'accuracy': 5, 'tone': 'professional'}). Useful for radio buttons, dropdowns, or multi-dimensional rating systems." - ), - }) - .describe( - "Structured feedback supplied by an end-user.\n\nThis event captures various forms of end-user feedback about a model's response,\nincluding binary thumbs up\/down ratings, numeric scores, free-text opinions,\nsuggested rewrites, and structured category ratings.\n\nEither `thumb` or `rating` should be provided (they are mutually exclusive), but all\nfeedback fields are optional to accommodate different feedback collection patterns." - ), - zod - .object({ - id: zod - .string() - .optional() - .describe( - 'Unique identifier for the event. Populated when retrieved from database.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the record was created.'), - created_by: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Identifier of the user or system that generated the record. Can be set of key-value pairs.' - ), - event_type: zod - .literal('user_action') - .default(getEntryResponseEventsItemTwoEventTypeDefault), - action: zod - .string() - .max(getEntryResponseEventsItemTwoActionMax) - .describe( - "Descriptive name for the action taken by the user (e.g., 'share_clicked', 'code_copied', 'link_followed'). Use snake-case or kebab-case. This is a label, not a unique identifier—multiple events can have the same action name." - ), - metadata: zod - .record( - zod.string(), - zod.union([ - zod.string().max(getEntryResponseEventsItemTwoMetadataOneMax), - zod.array(zod.string().max(getEntryResponseEventsItemTwoMetadataTwoItemMax)), - zod.boolean(), - zod.number(), - zod.number(), - ]) - ) - .optional() - .describe( - "Optional key-value pairs with additional context about the action (max 16 entries). Use this for details like user IDs, item IDs, timestamps, A\/B test variants, or any other information useful for downstream training or evaluation pipelines. Example: {'user_id': '12345', 'experiment': 'variant_b', 'item_purchased': 'product_456'}." - ), - }) - .describe( - 'Free-form user action captured by the client application.\n\nUse this to track arbitrary user interactions with AI responses, such as copying code,\nclicking share buttons, making purchases, or any other measurable action.\n\nThe action identifier must be ≤256 characters and should use snake-case or kebab-case\nfor consistency (e.g., ``share_clicked``, ``code_copied``, ``purchase_made``).' - ), - zod - .object({ - id: zod - .string() - .optional() - .describe( - 'Unique identifier for the event. Populated when retrieved from database.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the record was created.'), - created_by: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Identifier of the user or system that generated the record. Can be set of key-value pairs.' - ), - event_type: zod - .literal('reviewer_annotation') - .default(getEntryResponseEventsItemThreeEventTypeDefault), - thumb: zod - .enum(['up', 'down']) - .describe('Possible thumb feedback choices.') - .optional() - .describe( - 'Binary feedback: \"up\" for šŸ‘ or \"down\" for šŸ‘Ž. Mutually exclusive with `rating`. Use this for simple thumbs up\/down UI elements.' - ), - rating: zod - .number() - .min(getEntryResponseEventsItemThreeRatingMin) - .optional() - .describe( - 'Numeric rating (e.g., 1-5 stars) provided by the end user. Mutually exclusive with `thumb`. Use this for star ratings or numeric scales.' - ), - opinion: zod - .string() - .min(1) - .max(getEntryResponseEventsItemThreeOpinionMax) - .optional() - .describe( - 'Free-text comment from the end user describing their opinion of the response.' - ), - rewrite: zod - .string() - .min(1) - .max(getEntryResponseEventsItemThreeRewriteMax) - .optional() - .describe( - "End-user's suggested text replacement for the generated response. This is the user's idea of what the response should have been." - ), - chosen_index: zod - .number() - .min(getEntryResponseEventsItemThreeChosenIndexMin) - .optional() - .describe( - 'Zero-based index of the response option the user selected when multiple responses were returned. Use this when showing users multiple completion choices and tracking which one they picked.' - ), - categories: zod - .record(zod.string(), zod.union([zod.number(), zod.string()])) - .optional() - .describe( - "Application-specific category ratings as key-value pairs. Use this for custom rating dimensions (e.g., {'helpfulness': 4, 'accuracy': 5, 'tone': 'professional'}). Useful for radio buttons, dropdowns, or multi-dimensional rating systems." - ), - response_override: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - "Complete JSON object that replaces the original model response when exporting data. Unlike the `rewrite` field (which is just text), this can include tool calls, function outputs, and all other response metadata. When an entry with response_override is exported, you can choose to use this corrected response instead of the original. Example: {'choices': [{'message': {'role': 'assistant', 'content': 'Corrected text', 'tool_calls': [...]}}]}" - ), - }) - .describe( - 'Structured annotation supplied by a reviewer or expert evaluator.\n\nA reviewer annotation is similar to user feedback but includes an additional capability\nto provide a complete replacement response. This is useful when human experts need to\ncorrect not just the text but also structured elements like tool calls, function outputs,\nor other response metadata.\n\nInherits all feedback fields from UserFeedbackEvent (thumb, rating, opinion, rewrite,\nchosen_index, categories) and adds response_override for full response replacement.' - ), - zod - .object({ - id: zod - .string() - .optional() - .describe( - 'Unique identifier for the event. Populated when retrieved from database.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the record was created.'), - created_by: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Identifier of the user or system that generated the record. Can be set of key-value pairs.' - ), - event_type: zod - .literal('evaluator_result') - .default(getEntryResponseEventsItemFourEventTypeDefault), - name: zod - .string() - .max(getEntryResponseEventsItemFourNameMax) - .describe( - "Identifier of the evaluator that produced this result (e.g., 'harbor.verifier', 'evaluator.llm_judge', 'auditor.pii_probe')." - ), - score: zod - .union([zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - "The result value: a number (e.g., reward, rating, probability) or a string (e.g., 'pass', 'fail', a category label). Semantics are defined by the evaluator." - ), - metadata: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Free-form additional context about this result (e.g., supporting metrics, trial_name, rubric_version, evaluator config snapshot).' - ), - }) - .describe( - 'Result produced by an automated evaluator.\n\nUse this for any non-human scorer that emits a judgement about an entry:\neval-framework verifier rewards, LLM-judge ratings, auditor probe results, etc.\nDistinct from UserFeedbackEvent (human end-user feedback) and ReviewerAnnotationEvent\n(human expert annotation).' - ), - ]) - ) - .optional() - .describe('Events associated with this entry'), - custom_fields: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Free-form metadata bag for client-defined fields.'), - created_at: zod.string().datetime({}).optional().describe('Creation timestamp'), - updated_at: zod.string().datetime({}).optional().describe('Last update timestamp'), - }) - .describe('Schema for Entry responses.'); - -/** - * Update an existing entry by ID or external_id. - -Use `external:{external_id}` to update by external_id. -Example: `/v2/workspaces/{workspace}/entries/external:chatcmpl-abc123` - * @summary Update Entry - */ -export const UpdateEntryParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const updateEntryBodyUsageOneLatencyMsMin = 0; - -export const updateEntryBodyUsageOneCostUsdMin = 0; - -export const updateEntryBodyUsageOneCostInputUsdMin = 0; - -export const updateEntryBodyUsageOneCostOutputUsdMin = 0; - -export const updateEntryBodyUsageOneInputTokensMin = 0; - -export const updateEntryBodyUsageOneOutputTokensMin = 0; - -export const updateEntryBodyUsageOneCachedTokensMin = 0; - -export const updateEntryBodyUserRatingOneRatingMin = 0; - -export const updateEntryBodyUserRatingOneOpinionMax = 2000; - -export const updateEntryBodyUserRatingOneRewriteMax = 10000; - -export const updateEntryBodyUserRatingOneChosenIndexMin = 0; - -export const updateEntryBodyEventsItemOneEventTypeDefault = `user_feedback`; -export const updateEntryBodyEventsItemOneRatingMin = 0; - -export const updateEntryBodyEventsItemOneOpinionMax = 2000; - -export const updateEntryBodyEventsItemOneRewriteMax = 10000; - -export const updateEntryBodyEventsItemOneChosenIndexMin = 0; - -export const updateEntryBodyEventsItemTwoEventTypeDefault = `user_action`; -export const updateEntryBodyEventsItemTwoActionMax = 256; - -export const updateEntryBodyEventsItemTwoMetadataOneMax = 256; - -export const updateEntryBodyEventsItemTwoMetadataTwoItemMax = 256; - -export const updateEntryBodyEventsItemThreeEventTypeDefault = `reviewer_annotation`; -export const updateEntryBodyEventsItemThreeRatingMin = 0; - -export const updateEntryBodyEventsItemThreeOpinionMax = 2000; - -export const updateEntryBodyEventsItemThreeRewriteMax = 10000; - -export const updateEntryBodyEventsItemThreeChosenIndexMin = 0; - -export const updateEntryBodyEventsItemFourEventTypeDefault = `evaluator_result`; -export const updateEntryBodyEventsItemFourNameMax = 256; - -export const UpdateEntryBody = zod - .object({ - data: zod - .object({ - request: zod - .object({ - messages: zod - .array( - zod - .object({ - role: zod - .enum(['user', 'system', 'assistant', 'developer', 'tool', 'function']) - .describe('Valid role values for entry request messages.') - .describe( - 'The role of the message sender. Must be one of: user, system, assistant, developer, tool, or function.' - ), - }) - .describe( - 'A flexible message model that requires a valid role field but allows any other fields.\n\nThis flexibility enables the Intake service to store messages from various LLM providers\nand future model types without requiring schema updates. Additional fields like `content`,\n`name`, `tool_calls`, `tool_call_id`, etc. are all accepted.\n\nExamples of additional fields:\n- `content`: The message text or content\n- `name`: Name of the user or function\n- `tool_calls`: Tool\/function calls in the message\n- `tool_call_id`: ID of the tool call being responded to' - ) - ) - .describe( - 'A list of messages comprising the conversation. Each message must have a valid role. Additional fields like `content`, `tool_calls`, etc. are provider-specific.' - ), - model: zod - .string() - .describe( - "The model identifier used for this request (e.g., 'gpt-4', 'llama-3-70b', 'claude-3-opus')." - ), - }) - .describe( - 'Flexible entry request that accepts any object shape.\n\nThis flexibility enables the Intake service to store requests from various LLM providers\n(OpenAI, Anthropic, NIM, etc.) and future model types (embeddings, multimodal, etc.)\nwithout requiring schema updates.\n\nRequired fields: `messages` and `model`\nCommon optional fields: `temperature`, `max_tokens`, `top_p`, `tools`, `tool_choice`,\n`stream`, `response_format`, etc.' - ) - .describe('Raw request payload recorded from the client.'), - response: zod - .union([zod.unknown(), zod.unknown()]) - .and( - zod.object({ - choices: zod - .array(zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'A list of response choices generated by the model. Each choice typically contains a message object with role, content, and optional tool_calls. The structure varies by provider but commonly includes fields like `index`, `message`, and `finish_reason`.' - ), - error: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - "Error envelope returned by the provider when the call failed (e.g., OpenAI's `{message, type, code, param}` shape). Mutually exclusive with `choices`: a response carries one or the other." - ), - }) - ) - .describe( - 'Flexible entry response that accepts any object shape.\n\nThis flexibility enables the Intake service to store responses from various LLM providers\nand future model types without requiring schema updates.\n\nRequired: either `choices` (successful response) or `error` (failed call).\nCommon optional fields: `id`, `created`, `model`, `usage`, `system_fingerprint`, etc.' - ) - .describe('Raw response payload generated by the model.'), - }) - .describe('Entry data containing the request and response for an LLM interaction.') - .optional() - .describe('Entry data containing request and response'), - usage: zod - .object({ - model: zod - .string() - .optional() - .describe( - 'The actual model that served the request (after any routing). May differ from the model in the request body.' - ), - started_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the upstream LLM call started.'), - ended_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the upstream LLM call ended.'), - latency_ms: zod - .number() - .min(updateEntryBodyUsageOneLatencyMsMin) - .optional() - .describe('Wall-clock latency of the upstream LLM call, in milliseconds.'), - cost_usd: zod - .number() - .min(updateEntryBodyUsageOneCostUsdMin) - .optional() - .describe('Total estimated cost of this call, in USD.'), - cost_input_usd: zod - .number() - .min(updateEntryBodyUsageOneCostInputUsdMin) - .optional() - .describe('Estimated cost attributed to input tokens, in USD.'), - cost_output_usd: zod - .number() - .min(updateEntryBodyUsageOneCostOutputUsdMin) - .optional() - .describe('Estimated cost attributed to output tokens, in USD.'), - input_tokens: zod - .number() - .min(updateEntryBodyUsageOneInputTokensMin) - .optional() - .describe('Number of input tokens consumed.'), - output_tokens: zod - .number() - .min(updateEntryBodyUsageOneOutputTokensMin) - .optional() - .describe('Number of output tokens produced.'), - cached_tokens: zod - .number() - .min(updateEntryBodyUsageOneCachedTokensMin) - .optional() - .describe('Number of input tokens served from a prompt cache (subset of input_tokens).'), - }) - .describe( - 'Structured usage metrics captured at log time.\n\nEvery field is optional so producers can populate whatever they have without\nschema breakage. Stored as the entry-level ``usage`` field so filters can\nreach it via ``data.usage.`` entity-store paths.' - ) - .optional() - .describe('Structured usage metrics (model served, latency, cost, token counts).'), - context: zod - .object({ - app: zod - .string() - .describe( - "Reference to the app that produced this entry, in the form `workspace\/name`. If the app doesn't exist, it will be automatically created when the entry is ingested." - ), - task: zod - .string() - .describe( - "Name of the task within the app (e.g., 'chat', 'completion', 'tool-call'). If the task doesn't exist, it will be automatically created when the entry is ingested." - ), - thread_id: zod - .string() - .optional() - .describe( - 'Logical thread identifier that groups related entries in a multi-turn conversation. If provided, entries with the same thread_id are treated as part of the same conversation. If omitted, the entry is treated as a single-turn interaction (e.g., a standalone tool call or completion).' - ), - user_id: zod - .string() - .optional() - .describe( - "Identifier of the application's end-user who triggered this LLM interaction. This represents the person using your application (e.g., 'customer_123', 'employee@company.com'), NOT the service account that created the entry record (see ownership.created_by for that). Use this to track which of your users a conversation belongs to, filter entries by user, and enable per-user analytics. Format is application-defined." - ), - trace_id: zod - .string() - .optional() - .describe( - 'Distributed trace identifier (e.g., W3C traceparent). Intake stores it verbatim and does not use it at ingestion time; helps with later cross-system joins.' - ), - session_id: zod - .string() - .optional() - .describe( - 'Long-lived session identifier (e.g., user account or browser session). Stored for post-processing analytics; not used by the Intake service at runtime.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the entry was created.'), - }) - .describe( - 'Contextual metadata attached to every entry record.\n\nKeeping these grouped in a dedicated object avoids polluting the top-level\nentity schema and makes it trivial to extend without breaking compatibility.' - ) - .optional() - .describe('Metadata describing producer, task, trace'), - user_rating: zod - .object({ - thumb: zod - .enum(['up', 'down']) - .describe('Possible thumb feedback choices.') - .optional() - .describe( - 'Binary feedback: \"up\" for šŸ‘ or \"down\" for šŸ‘Ž. Mutually exclusive with `rating`. Use this for simple thumbs up\/down UI elements.' - ), - rating: zod - .number() - .min(updateEntryBodyUserRatingOneRatingMin) - .optional() - .describe( - 'Numeric rating (e.g., 1-5 stars) provided by the end user. Mutually exclusive with `thumb`. Use this for star ratings or numeric scales.' - ), - opinion: zod - .string() - .min(1) - .max(updateEntryBodyUserRatingOneOpinionMax) - .optional() - .describe( - 'Free-text comment from the end user describing their opinion of the response.' - ), - rewrite: zod - .string() - .min(1) - .max(updateEntryBodyUserRatingOneRewriteMax) - .optional() - .describe( - "End-user's suggested text replacement for the generated response. This is the user's idea of what the response should have been." - ), - chosen_index: zod - .number() - .min(updateEntryBodyUserRatingOneChosenIndexMin) - .optional() - .describe( - 'Zero-based index of the response option the user selected when multiple responses were returned. Use this when showing users multiple completion choices and tracking which one they picked.' - ), - categories: zod - .record(zod.string(), zod.union([zod.number(), zod.string()])) - .optional() - .describe( - "Application-specific category ratings as key-value pairs. Use this for custom rating dimensions (e.g., {'helpfulness': 4, 'accuracy': 5, 'tone': 'professional'}). Useful for radio buttons, dropdowns, or multi-dimensional rating systems." - ), - }) - .describe( - "User's rating\/evaluation of an AI response.\n\nThis captures various forms of end-user feedback about a model's response, including\nbinary thumbs up\/down ratings, numeric scores, free-text opinions, suggested rewrites,\nand structured category ratings.\n\nEither `thumb` or `rating` should be provided (they are mutually exclusive), but all\nfields are optional to accommodate different feedback collection patterns." - ) - .optional() - .describe("User's rating\/evaluation of the AI response"), - events: zod - .array( - zod.union([ - zod - .object({ - id: zod - .string() - .optional() - .describe( - 'Unique identifier for the event. Populated when retrieved from database.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the record was created.'), - created_by: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Identifier of the user or system that generated the record. Can be set of key-value pairs.' - ), - event_type: zod - .literal('user_feedback') - .default(updateEntryBodyEventsItemOneEventTypeDefault), - thumb: zod - .enum(['up', 'down']) - .describe('Possible thumb feedback choices.') - .optional() - .describe( - 'Binary feedback: \"up\" for šŸ‘ or \"down\" for šŸ‘Ž. Mutually exclusive with `rating`. Use this for simple thumbs up\/down UI elements.' - ), - rating: zod - .number() - .min(updateEntryBodyEventsItemOneRatingMin) - .optional() - .describe( - 'Numeric rating (e.g., 1-5 stars) provided by the end user. Mutually exclusive with `thumb`. Use this for star ratings or numeric scales.' - ), - opinion: zod - .string() - .min(1) - .max(updateEntryBodyEventsItemOneOpinionMax) - .optional() - .describe( - 'Free-text comment from the end user describing their opinion of the response.' - ), - rewrite: zod - .string() - .min(1) - .max(updateEntryBodyEventsItemOneRewriteMax) - .optional() - .describe( - "End-user's suggested text replacement for the generated response. This is the user's idea of what the response should have been." - ), - chosen_index: zod - .number() - .min(updateEntryBodyEventsItemOneChosenIndexMin) - .optional() - .describe( - 'Zero-based index of the response option the user selected when multiple responses were returned. Use this when showing users multiple completion choices and tracking which one they picked.' - ), - categories: zod - .record(zod.string(), zod.union([zod.number(), zod.string()])) - .optional() - .describe( - "Application-specific category ratings as key-value pairs. Use this for custom rating dimensions (e.g., {'helpfulness': 4, 'accuracy': 5, 'tone': 'professional'}). Useful for radio buttons, dropdowns, or multi-dimensional rating systems." - ), - }) - .describe( - "Structured feedback supplied by an end-user.\n\nThis event captures various forms of end-user feedback about a model's response,\nincluding binary thumbs up\/down ratings, numeric scores, free-text opinions,\nsuggested rewrites, and structured category ratings.\n\nEither `thumb` or `rating` should be provided (they are mutually exclusive), but all\nfeedback fields are optional to accommodate different feedback collection patterns." - ), - zod - .object({ - id: zod - .string() - .optional() - .describe( - 'Unique identifier for the event. Populated when retrieved from database.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the record was created.'), - created_by: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Identifier of the user or system that generated the record. Can be set of key-value pairs.' - ), - event_type: zod - .literal('user_action') - .default(updateEntryBodyEventsItemTwoEventTypeDefault), - action: zod - .string() - .max(updateEntryBodyEventsItemTwoActionMax) - .describe( - "Descriptive name for the action taken by the user (e.g., 'share_clicked', 'code_copied', 'link_followed'). Use snake-case or kebab-case. This is a label, not a unique identifier—multiple events can have the same action name." - ), - metadata: zod - .record( - zod.string(), - zod.union([ - zod.string().max(updateEntryBodyEventsItemTwoMetadataOneMax), - zod.array(zod.string().max(updateEntryBodyEventsItemTwoMetadataTwoItemMax)), - zod.boolean(), - zod.number(), - zod.number(), - ]) - ) - .optional() - .describe( - "Optional key-value pairs with additional context about the action (max 16 entries). Use this for details like user IDs, item IDs, timestamps, A\/B test variants, or any other information useful for downstream training or evaluation pipelines. Example: {'user_id': '12345', 'experiment': 'variant_b', 'item_purchased': 'product_456'}." - ), - }) - .describe( - 'Free-form user action captured by the client application.\n\nUse this to track arbitrary user interactions with AI responses, such as copying code,\nclicking share buttons, making purchases, or any other measurable action.\n\nThe action identifier must be ≤256 characters and should use snake-case or kebab-case\nfor consistency (e.g., ``share_clicked``, ``code_copied``, ``purchase_made``).' - ), - zod - .object({ - id: zod - .string() - .optional() - .describe( - 'Unique identifier for the event. Populated when retrieved from database.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the record was created.'), - created_by: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Identifier of the user or system that generated the record. Can be set of key-value pairs.' - ), - event_type: zod - .literal('reviewer_annotation') - .default(updateEntryBodyEventsItemThreeEventTypeDefault), - thumb: zod - .enum(['up', 'down']) - .describe('Possible thumb feedback choices.') - .optional() - .describe( - 'Binary feedback: \"up\" for šŸ‘ or \"down\" for šŸ‘Ž. Mutually exclusive with `rating`. Use this for simple thumbs up\/down UI elements.' - ), - rating: zod - .number() - .min(updateEntryBodyEventsItemThreeRatingMin) - .optional() - .describe( - 'Numeric rating (e.g., 1-5 stars) provided by the end user. Mutually exclusive with `thumb`. Use this for star ratings or numeric scales.' - ), - opinion: zod - .string() - .min(1) - .max(updateEntryBodyEventsItemThreeOpinionMax) - .optional() - .describe( - 'Free-text comment from the end user describing their opinion of the response.' - ), - rewrite: zod - .string() - .min(1) - .max(updateEntryBodyEventsItemThreeRewriteMax) - .optional() - .describe( - "End-user's suggested text replacement for the generated response. This is the user's idea of what the response should have been." - ), - chosen_index: zod - .number() - .min(updateEntryBodyEventsItemThreeChosenIndexMin) - .optional() - .describe( - 'Zero-based index of the response option the user selected when multiple responses were returned. Use this when showing users multiple completion choices and tracking which one they picked.' - ), - categories: zod - .record(zod.string(), zod.union([zod.number(), zod.string()])) - .optional() - .describe( - "Application-specific category ratings as key-value pairs. Use this for custom rating dimensions (e.g., {'helpfulness': 4, 'accuracy': 5, 'tone': 'professional'}). Useful for radio buttons, dropdowns, or multi-dimensional rating systems." - ), - response_override: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - "Complete JSON object that replaces the original model response when exporting data. Unlike the `rewrite` field (which is just text), this can include tool calls, function outputs, and all other response metadata. When an entry with response_override is exported, you can choose to use this corrected response instead of the original. Example: {'choices': [{'message': {'role': 'assistant', 'content': 'Corrected text', 'tool_calls': [...]}}]}" - ), - }) - .describe( - 'Structured annotation supplied by a reviewer or expert evaluator.\n\nA reviewer annotation is similar to user feedback but includes an additional capability\nto provide a complete replacement response. This is useful when human experts need to\ncorrect not just the text but also structured elements like tool calls, function outputs,\nor other response metadata.\n\nInherits all feedback fields from UserFeedbackEvent (thumb, rating, opinion, rewrite,\nchosen_index, categories) and adds response_override for full response replacement.' - ), - zod - .object({ - id: zod - .string() - .optional() - .describe( - 'Unique identifier for the event. Populated when retrieved from database.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the record was created.'), - created_by: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Identifier of the user or system that generated the record. Can be set of key-value pairs.' - ), - event_type: zod - .literal('evaluator_result') - .default(updateEntryBodyEventsItemFourEventTypeDefault), - name: zod - .string() - .max(updateEntryBodyEventsItemFourNameMax) - .describe( - "Identifier of the evaluator that produced this result (e.g., 'harbor.verifier', 'evaluator.llm_judge', 'auditor.pii_probe')." - ), - score: zod - .union([zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - "The result value: a number (e.g., reward, rating, probability) or a string (e.g., 'pass', 'fail', a category label). Semantics are defined by the evaluator." - ), - metadata: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Free-form additional context about this result (e.g., supporting metrics, trial_name, rubric_version, evaluator config snapshot).' - ), - }) - .describe( - 'Result produced by an automated evaluator.\n\nUse this for any non-human scorer that emits a judgement about an entry:\neval-framework verifier rewards, LLM-judge ratings, auditor probe results, etc.\nDistinct from UserFeedbackEvent (human end-user feedback) and ReviewerAnnotationEvent\n(human expert annotation).' - ), - ]) - ) - .optional() - .describe('Events associated with this entry'), - custom_fields: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Free-form metadata bag for client-defined fields (replaces existing value when provided).' - ), - }) - .describe('Schema for updating an existing Entry.'); - -export const updateEntryResponseUsageOneLatencyMsMin = 0; - -export const updateEntryResponseUsageOneCostUsdMin = 0; - -export const updateEntryResponseUsageOneCostInputUsdMin = 0; - -export const updateEntryResponseUsageOneCostOutputUsdMin = 0; - -export const updateEntryResponseUsageOneInputTokensMin = 0; - -export const updateEntryResponseUsageOneOutputTokensMin = 0; - -export const updateEntryResponseUsageOneCachedTokensMin = 0; - -export const updateEntryResponseUserRatingOneRatingMin = 0; - -export const updateEntryResponseUserRatingOneOpinionMax = 2000; - -export const updateEntryResponseUserRatingOneRewriteMax = 10000; - -export const updateEntryResponseUserRatingOneChosenIndexMin = 0; - -export const updateEntryResponseEventsItemOneEventTypeDefault = `user_feedback`; -export const updateEntryResponseEventsItemOneRatingMin = 0; - -export const updateEntryResponseEventsItemOneOpinionMax = 2000; - -export const updateEntryResponseEventsItemOneRewriteMax = 10000; - -export const updateEntryResponseEventsItemOneChosenIndexMin = 0; - -export const updateEntryResponseEventsItemTwoEventTypeDefault = `user_action`; -export const updateEntryResponseEventsItemTwoActionMax = 256; - -export const updateEntryResponseEventsItemTwoMetadataOneMax = 256; - -export const updateEntryResponseEventsItemTwoMetadataTwoItemMax = 256; - -export const updateEntryResponseEventsItemThreeEventTypeDefault = `reviewer_annotation`; -export const updateEntryResponseEventsItemThreeRatingMin = 0; - -export const updateEntryResponseEventsItemThreeOpinionMax = 2000; - -export const updateEntryResponseEventsItemThreeRewriteMax = 10000; - -export const updateEntryResponseEventsItemThreeChosenIndexMin = 0; - -export const updateEntryResponseEventsItemFourEventTypeDefault = `evaluator_result`; -export const updateEntryResponseEventsItemFourNameMax = 256; - -export const UpdateEntryResponse = zod - .object({ - id: zod.string().describe('Unique identifier'), - name: zod.string().describe('Entry name (auto-generated)'), - workspace: zod.string().describe('Workspace identifier'), - external_id: zod.string().optional().describe('Client-provided identifier'), - project: zod.string().optional().describe('The name of the project associated with this entry'), - data: zod - .object({ - request: zod - .object({ - messages: zod - .array( - zod - .object({ - role: zod - .enum(['user', 'system', 'assistant', 'developer', 'tool', 'function']) - .describe('Valid role values for entry request messages.') - .describe( - 'The role of the message sender. Must be one of: user, system, assistant, developer, tool, or function.' - ), - }) - .describe( - 'A flexible message model that requires a valid role field but allows any other fields.\n\nThis flexibility enables the Intake service to store messages from various LLM providers\nand future model types without requiring schema updates. Additional fields like `content`,\n`name`, `tool_calls`, `tool_call_id`, etc. are all accepted.\n\nExamples of additional fields:\n- `content`: The message text or content\n- `name`: Name of the user or function\n- `tool_calls`: Tool\/function calls in the message\n- `tool_call_id`: ID of the tool call being responded to' - ) - ) - .describe( - 'A list of messages comprising the conversation. Each message must have a valid role. Additional fields like `content`, `tool_calls`, etc. are provider-specific.' - ), - model: zod - .string() - .describe( - "The model identifier used for this request (e.g., 'gpt-4', 'llama-3-70b', 'claude-3-opus')." - ), - }) - .describe( - 'Flexible entry request that accepts any object shape.\n\nThis flexibility enables the Intake service to store requests from various LLM providers\n(OpenAI, Anthropic, NIM, etc.) and future model types (embeddings, multimodal, etc.)\nwithout requiring schema updates.\n\nRequired fields: `messages` and `model`\nCommon optional fields: `temperature`, `max_tokens`, `top_p`, `tools`, `tool_choice`,\n`stream`, `response_format`, etc.' - ) - .describe('Raw request payload recorded from the client.'), - response: zod - .union([zod.unknown(), zod.unknown()]) - .and( - zod.object({ - choices: zod - .array(zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'A list of response choices generated by the model. Each choice typically contains a message object with role, content, and optional tool_calls. The structure varies by provider but commonly includes fields like `index`, `message`, and `finish_reason`.' - ), - error: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - "Error envelope returned by the provider when the call failed (e.g., OpenAI's `{message, type, code, param}` shape). Mutually exclusive with `choices`: a response carries one or the other." - ), - }) - ) - .describe( - 'Flexible entry response that accepts any object shape.\n\nThis flexibility enables the Intake service to store responses from various LLM providers\nand future model types without requiring schema updates.\n\nRequired: either `choices` (successful response) or `error` (failed call).\nCommon optional fields: `id`, `created`, `model`, `usage`, `system_fingerprint`, etc.' - ) - .describe('Raw response payload generated by the model.'), - }) - .describe('Entry data containing the request and response for an LLM interaction.') - .describe('Entry data containing request and response'), - usage: zod - .object({ - model: zod - .string() - .optional() - .describe( - 'The actual model that served the request (after any routing). May differ from the model in the request body.' - ), - started_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the upstream LLM call started.'), - ended_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the upstream LLM call ended.'), - latency_ms: zod - .number() - .min(updateEntryResponseUsageOneLatencyMsMin) - .optional() - .describe('Wall-clock latency of the upstream LLM call, in milliseconds.'), - cost_usd: zod - .number() - .min(updateEntryResponseUsageOneCostUsdMin) - .optional() - .describe('Total estimated cost of this call, in USD.'), - cost_input_usd: zod - .number() - .min(updateEntryResponseUsageOneCostInputUsdMin) - .optional() - .describe('Estimated cost attributed to input tokens, in USD.'), - cost_output_usd: zod - .number() - .min(updateEntryResponseUsageOneCostOutputUsdMin) - .optional() - .describe('Estimated cost attributed to output tokens, in USD.'), - input_tokens: zod - .number() - .min(updateEntryResponseUsageOneInputTokensMin) - .optional() - .describe('Number of input tokens consumed.'), - output_tokens: zod - .number() - .min(updateEntryResponseUsageOneOutputTokensMin) - .optional() - .describe('Number of output tokens produced.'), - cached_tokens: zod - .number() - .min(updateEntryResponseUsageOneCachedTokensMin) - .optional() - .describe('Number of input tokens served from a prompt cache (subset of input_tokens).'), - }) - .describe( - 'Structured usage metrics captured at log time.\n\nEvery field is optional so producers can populate whatever they have without\nschema breakage. Stored as the entry-level ``usage`` field so filters can\nreach it via ``data.usage.`` entity-store paths.' - ) - .optional() - .describe('Structured usage metrics (model served, latency, cost, token counts).'), - context: zod - .object({ - app: zod - .string() - .describe( - "Reference to the app that produced this entry, in the form `workspace\/name`. If the app doesn't exist, it will be automatically created when the entry is ingested." - ), - task: zod - .string() - .describe( - "Name of the task within the app (e.g., 'chat', 'completion', 'tool-call'). If the task doesn't exist, it will be automatically created when the entry is ingested." - ), - thread_id: zod - .string() - .optional() - .describe( - 'Logical thread identifier that groups related entries in a multi-turn conversation. If provided, entries with the same thread_id are treated as part of the same conversation. If omitted, the entry is treated as a single-turn interaction (e.g., a standalone tool call or completion).' - ), - user_id: zod - .string() - .optional() - .describe( - "Identifier of the application's end-user who triggered this LLM interaction. This represents the person using your application (e.g., 'customer_123', 'employee@company.com'), NOT the service account that created the entry record (see ownership.created_by for that). Use this to track which of your users a conversation belongs to, filter entries by user, and enable per-user analytics. Format is application-defined." - ), - trace_id: zod - .string() - .optional() - .describe( - 'Distributed trace identifier (e.g., W3C traceparent). Intake stores it verbatim and does not use it at ingestion time; helps with later cross-system joins.' - ), - session_id: zod - .string() - .optional() - .describe( - 'Long-lived session identifier (e.g., user account or browser session). Stored for post-processing analytics; not used by the Intake service at runtime.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the entry was created.'), - }) - .describe( - 'Contextual metadata attached to every entry record.\n\nKeeping these grouped in a dedicated object avoids polluting the top-level\nentity schema and makes it trivial to extend without breaking compatibility.' - ) - .describe('Metadata describing producer, task, trace'), - user_rating: zod - .object({ - thumb: zod - .enum(['up', 'down']) - .describe('Possible thumb feedback choices.') - .optional() - .describe( - 'Binary feedback: \"up\" for šŸ‘ or \"down\" for šŸ‘Ž. Mutually exclusive with `rating`. Use this for simple thumbs up\/down UI elements.' - ), - rating: zod - .number() - .min(updateEntryResponseUserRatingOneRatingMin) - .optional() - .describe( - 'Numeric rating (e.g., 1-5 stars) provided by the end user. Mutually exclusive with `thumb`. Use this for star ratings or numeric scales.' - ), - opinion: zod - .string() - .min(1) - .max(updateEntryResponseUserRatingOneOpinionMax) - .optional() - .describe( - 'Free-text comment from the end user describing their opinion of the response.' - ), - rewrite: zod - .string() - .min(1) - .max(updateEntryResponseUserRatingOneRewriteMax) - .optional() - .describe( - "End-user's suggested text replacement for the generated response. This is the user's idea of what the response should have been." - ), - chosen_index: zod - .number() - .min(updateEntryResponseUserRatingOneChosenIndexMin) - .optional() - .describe( - 'Zero-based index of the response option the user selected when multiple responses were returned. Use this when showing users multiple completion choices and tracking which one they picked.' - ), - categories: zod - .record(zod.string(), zod.union([zod.number(), zod.string()])) - .optional() - .describe( - "Application-specific category ratings as key-value pairs. Use this for custom rating dimensions (e.g., {'helpfulness': 4, 'accuracy': 5, 'tone': 'professional'}). Useful for radio buttons, dropdowns, or multi-dimensional rating systems." - ), - }) - .describe( - "User's rating\/evaluation of an AI response.\n\nThis captures various forms of end-user feedback about a model's response, including\nbinary thumbs up\/down ratings, numeric scores, free-text opinions, suggested rewrites,\nand structured category ratings.\n\nEither `thumb` or `rating` should be provided (they are mutually exclusive), but all\nfields are optional to accommodate different feedback collection patterns." - ) - .optional() - .describe("User's rating\/evaluation"), - events: zod - .array( - zod.union([ - zod - .object({ - id: zod - .string() - .optional() - .describe( - 'Unique identifier for the event. Populated when retrieved from database.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the record was created.'), - created_by: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Identifier of the user or system that generated the record. Can be set of key-value pairs.' - ), - event_type: zod - .literal('user_feedback') - .default(updateEntryResponseEventsItemOneEventTypeDefault), - thumb: zod - .enum(['up', 'down']) - .describe('Possible thumb feedback choices.') - .optional() - .describe( - 'Binary feedback: \"up\" for šŸ‘ or \"down\" for šŸ‘Ž. Mutually exclusive with `rating`. Use this for simple thumbs up\/down UI elements.' - ), - rating: zod - .number() - .min(updateEntryResponseEventsItemOneRatingMin) - .optional() - .describe( - 'Numeric rating (e.g., 1-5 stars) provided by the end user. Mutually exclusive with `thumb`. Use this for star ratings or numeric scales.' - ), - opinion: zod - .string() - .min(1) - .max(updateEntryResponseEventsItemOneOpinionMax) - .optional() - .describe( - 'Free-text comment from the end user describing their opinion of the response.' - ), - rewrite: zod - .string() - .min(1) - .max(updateEntryResponseEventsItemOneRewriteMax) - .optional() - .describe( - "End-user's suggested text replacement for the generated response. This is the user's idea of what the response should have been." - ), - chosen_index: zod - .number() - .min(updateEntryResponseEventsItemOneChosenIndexMin) - .optional() - .describe( - 'Zero-based index of the response option the user selected when multiple responses were returned. Use this when showing users multiple completion choices and tracking which one they picked.' - ), - categories: zod - .record(zod.string(), zod.union([zod.number(), zod.string()])) - .optional() - .describe( - "Application-specific category ratings as key-value pairs. Use this for custom rating dimensions (e.g., {'helpfulness': 4, 'accuracy': 5, 'tone': 'professional'}). Useful for radio buttons, dropdowns, or multi-dimensional rating systems." - ), - }) - .describe( - "Structured feedback supplied by an end-user.\n\nThis event captures various forms of end-user feedback about a model's response,\nincluding binary thumbs up\/down ratings, numeric scores, free-text opinions,\nsuggested rewrites, and structured category ratings.\n\nEither `thumb` or `rating` should be provided (they are mutually exclusive), but all\nfeedback fields are optional to accommodate different feedback collection patterns." - ), - zod - .object({ - id: zod - .string() - .optional() - .describe( - 'Unique identifier for the event. Populated when retrieved from database.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the record was created.'), - created_by: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Identifier of the user or system that generated the record. Can be set of key-value pairs.' - ), - event_type: zod - .literal('user_action') - .default(updateEntryResponseEventsItemTwoEventTypeDefault), - action: zod - .string() - .max(updateEntryResponseEventsItemTwoActionMax) - .describe( - "Descriptive name for the action taken by the user (e.g., 'share_clicked', 'code_copied', 'link_followed'). Use snake-case or kebab-case. This is a label, not a unique identifier—multiple events can have the same action name." - ), - metadata: zod - .record( - zod.string(), - zod.union([ - zod.string().max(updateEntryResponseEventsItemTwoMetadataOneMax), - zod.array(zod.string().max(updateEntryResponseEventsItemTwoMetadataTwoItemMax)), - zod.boolean(), - zod.number(), - zod.number(), - ]) - ) - .optional() - .describe( - "Optional key-value pairs with additional context about the action (max 16 entries). Use this for details like user IDs, item IDs, timestamps, A\/B test variants, or any other information useful for downstream training or evaluation pipelines. Example: {'user_id': '12345', 'experiment': 'variant_b', 'item_purchased': 'product_456'}." - ), - }) - .describe( - 'Free-form user action captured by the client application.\n\nUse this to track arbitrary user interactions with AI responses, such as copying code,\nclicking share buttons, making purchases, or any other measurable action.\n\nThe action identifier must be ≤256 characters and should use snake-case or kebab-case\nfor consistency (e.g., ``share_clicked``, ``code_copied``, ``purchase_made``).' - ), - zod - .object({ - id: zod - .string() - .optional() - .describe( - 'Unique identifier for the event. Populated when retrieved from database.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the record was created.'), - created_by: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Identifier of the user or system that generated the record. Can be set of key-value pairs.' - ), - event_type: zod - .literal('reviewer_annotation') - .default(updateEntryResponseEventsItemThreeEventTypeDefault), - thumb: zod - .enum(['up', 'down']) - .describe('Possible thumb feedback choices.') - .optional() - .describe( - 'Binary feedback: \"up\" for šŸ‘ or \"down\" for šŸ‘Ž. Mutually exclusive with `rating`. Use this for simple thumbs up\/down UI elements.' - ), - rating: zod - .number() - .min(updateEntryResponseEventsItemThreeRatingMin) - .optional() - .describe( - 'Numeric rating (e.g., 1-5 stars) provided by the end user. Mutually exclusive with `thumb`. Use this for star ratings or numeric scales.' - ), - opinion: zod - .string() - .min(1) - .max(updateEntryResponseEventsItemThreeOpinionMax) - .optional() - .describe( - 'Free-text comment from the end user describing their opinion of the response.' - ), - rewrite: zod - .string() - .min(1) - .max(updateEntryResponseEventsItemThreeRewriteMax) - .optional() - .describe( - "End-user's suggested text replacement for the generated response. This is the user's idea of what the response should have been." - ), - chosen_index: zod - .number() - .min(updateEntryResponseEventsItemThreeChosenIndexMin) - .optional() - .describe( - 'Zero-based index of the response option the user selected when multiple responses were returned. Use this when showing users multiple completion choices and tracking which one they picked.' - ), - categories: zod - .record(zod.string(), zod.union([zod.number(), zod.string()])) - .optional() - .describe( - "Application-specific category ratings as key-value pairs. Use this for custom rating dimensions (e.g., {'helpfulness': 4, 'accuracy': 5, 'tone': 'professional'}). Useful for radio buttons, dropdowns, or multi-dimensional rating systems." - ), - response_override: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - "Complete JSON object that replaces the original model response when exporting data. Unlike the `rewrite` field (which is just text), this can include tool calls, function outputs, and all other response metadata. When an entry with response_override is exported, you can choose to use this corrected response instead of the original. Example: {'choices': [{'message': {'role': 'assistant', 'content': 'Corrected text', 'tool_calls': [...]}}]}" - ), - }) - .describe( - 'Structured annotation supplied by a reviewer or expert evaluator.\n\nA reviewer annotation is similar to user feedback but includes an additional capability\nto provide a complete replacement response. This is useful when human experts need to\ncorrect not just the text but also structured elements like tool calls, function outputs,\nor other response metadata.\n\nInherits all feedback fields from UserFeedbackEvent (thumb, rating, opinion, rewrite,\nchosen_index, categories) and adds response_override for full response replacement.' - ), - zod - .object({ - id: zod - .string() - .optional() - .describe( - 'Unique identifier for the event. Populated when retrieved from database.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the record was created.'), - created_by: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Identifier of the user or system that generated the record. Can be set of key-value pairs.' - ), - event_type: zod - .literal('evaluator_result') - .default(updateEntryResponseEventsItemFourEventTypeDefault), - name: zod - .string() - .max(updateEntryResponseEventsItemFourNameMax) - .describe( - "Identifier of the evaluator that produced this result (e.g., 'harbor.verifier', 'evaluator.llm_judge', 'auditor.pii_probe')." - ), - score: zod - .union([zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - "The result value: a number (e.g., reward, rating, probability) or a string (e.g., 'pass', 'fail', a category label). Semantics are defined by the evaluator." - ), - metadata: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Free-form additional context about this result (e.g., supporting metrics, trial_name, rubric_version, evaluator config snapshot).' - ), - }) - .describe( - 'Result produced by an automated evaluator.\n\nUse this for any non-human scorer that emits a judgement about an entry:\neval-framework verifier rewards, LLM-judge ratings, auditor probe results, etc.\nDistinct from UserFeedbackEvent (human end-user feedback) and ReviewerAnnotationEvent\n(human expert annotation).' - ), - ]) - ) - .optional() - .describe('Events associated with this entry'), - custom_fields: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Free-form metadata bag for client-defined fields.'), - created_at: zod.string().datetime({}).optional().describe('Creation timestamp'), - updated_at: zod.string().datetime({}).optional().describe('Last update timestamp'), - }) - .describe('Schema for Entry responses.'); - -/** - * Delete an entry by ID or external_id. - -Use `external:{external_id}` to delete by external_id. -Example: `/v2/workspaces/{workspace}/entries/external:chatcmpl-abc123` - * @summary Delete Entry - */ -export const DeleteEntryParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -/** - * Add events to an entry by ID or external_id. - -Use `external:{external_id}` to add events by external_id. -Example: `/v2/workspaces/{workspace}/entries/external:chatcmpl-abc123/events` - * @summary Add Events - */ -export const AddEventsParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const addEventsBodyEventsItemOneEventTypeDefault = `user_feedback`; -export const addEventsBodyEventsItemOneRatingMin = 0; - -export const addEventsBodyEventsItemOneOpinionMax = 2000; - -export const addEventsBodyEventsItemOneRewriteMax = 10000; - -export const addEventsBodyEventsItemOneChosenIndexMin = 0; - -export const addEventsBodyEventsItemTwoEventTypeDefault = `user_action`; -export const addEventsBodyEventsItemTwoActionMax = 256; - -export const addEventsBodyEventsItemTwoMetadataOneMax = 256; - -export const addEventsBodyEventsItemTwoMetadataTwoItemMax = 256; - -export const addEventsBodyEventsItemThreeEventTypeDefault = `reviewer_annotation`; -export const addEventsBodyEventsItemThreeRatingMin = 0; - -export const addEventsBodyEventsItemThreeOpinionMax = 2000; - -export const addEventsBodyEventsItemThreeRewriteMax = 10000; - -export const addEventsBodyEventsItemThreeChosenIndexMin = 0; - -export const addEventsBodyEventsItemFourEventTypeDefault = `evaluator_result`; -export const addEventsBodyEventsItemFourNameMax = 256; - -export const AddEventsBody = zod - .object({ - events: zod - .array( - zod.union([ - zod - .object({ - id: zod - .string() - .optional() - .describe( - 'Unique identifier for the event. Populated when retrieved from database.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the record was created.'), - created_by: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Identifier of the user or system that generated the record. Can be set of key-value pairs.' - ), - event_type: zod - .literal('user_feedback') - .default(addEventsBodyEventsItemOneEventTypeDefault), - thumb: zod - .enum(['up', 'down']) - .describe('Possible thumb feedback choices.') - .optional() - .describe( - 'Binary feedback: \"up\" for šŸ‘ or \"down\" for šŸ‘Ž. Mutually exclusive with `rating`. Use this for simple thumbs up\/down UI elements.' - ), - rating: zod - .number() - .min(addEventsBodyEventsItemOneRatingMin) - .optional() - .describe( - 'Numeric rating (e.g., 1-5 stars) provided by the end user. Mutually exclusive with `thumb`. Use this for star ratings or numeric scales.' - ), - opinion: zod - .string() - .min(1) - .max(addEventsBodyEventsItemOneOpinionMax) - .optional() - .describe( - 'Free-text comment from the end user describing their opinion of the response.' - ), - rewrite: zod - .string() - .min(1) - .max(addEventsBodyEventsItemOneRewriteMax) - .optional() - .describe( - "End-user's suggested text replacement for the generated response. This is the user's idea of what the response should have been." - ), - chosen_index: zod - .number() - .min(addEventsBodyEventsItemOneChosenIndexMin) - .optional() - .describe( - 'Zero-based index of the response option the user selected when multiple responses were returned. Use this when showing users multiple completion choices and tracking which one they picked.' - ), - categories: zod - .record(zod.string(), zod.union([zod.number(), zod.string()])) - .optional() - .describe( - "Application-specific category ratings as key-value pairs. Use this for custom rating dimensions (e.g., {'helpfulness': 4, 'accuracy': 5, 'tone': 'professional'}). Useful for radio buttons, dropdowns, or multi-dimensional rating systems." - ), - }) - .describe( - "Structured feedback supplied by an end-user.\n\nThis event captures various forms of end-user feedback about a model's response,\nincluding binary thumbs up\/down ratings, numeric scores, free-text opinions,\nsuggested rewrites, and structured category ratings.\n\nEither `thumb` or `rating` should be provided (they are mutually exclusive), but all\nfeedback fields are optional to accommodate different feedback collection patterns." - ), - zod - .object({ - id: zod - .string() - .optional() - .describe( - 'Unique identifier for the event. Populated when retrieved from database.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the record was created.'), - created_by: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Identifier of the user or system that generated the record. Can be set of key-value pairs.' - ), - event_type: zod - .literal('user_action') - .default(addEventsBodyEventsItemTwoEventTypeDefault), - action: zod - .string() - .max(addEventsBodyEventsItemTwoActionMax) - .describe( - "Descriptive name for the action taken by the user (e.g., 'share_clicked', 'code_copied', 'link_followed'). Use snake-case or kebab-case. This is a label, not a unique identifier—multiple events can have the same action name." - ), - metadata: zod - .record( - zod.string(), - zod.union([ - zod.string().max(addEventsBodyEventsItemTwoMetadataOneMax), - zod.array(zod.string().max(addEventsBodyEventsItemTwoMetadataTwoItemMax)), - zod.boolean(), - zod.number(), - zod.number(), - ]) - ) - .optional() - .describe( - "Optional key-value pairs with additional context about the action (max 16 entries). Use this for details like user IDs, item IDs, timestamps, A\/B test variants, or any other information useful for downstream training or evaluation pipelines. Example: {'user_id': '12345', 'experiment': 'variant_b', 'item_purchased': 'product_456'}." - ), - }) - .describe( - 'Free-form user action captured by the client application.\n\nUse this to track arbitrary user interactions with AI responses, such as copying code,\nclicking share buttons, making purchases, or any other measurable action.\n\nThe action identifier must be ≤256 characters and should use snake-case or kebab-case\nfor consistency (e.g., ``share_clicked``, ``code_copied``, ``purchase_made``).' - ), - zod - .object({ - id: zod - .string() - .optional() - .describe( - 'Unique identifier for the event. Populated when retrieved from database.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the record was created.'), - created_by: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Identifier of the user or system that generated the record. Can be set of key-value pairs.' - ), - event_type: zod - .literal('reviewer_annotation') - .default(addEventsBodyEventsItemThreeEventTypeDefault), - thumb: zod - .enum(['up', 'down']) - .describe('Possible thumb feedback choices.') - .optional() - .describe( - 'Binary feedback: \"up\" for šŸ‘ or \"down\" for šŸ‘Ž. Mutually exclusive with `rating`. Use this for simple thumbs up\/down UI elements.' - ), - rating: zod - .number() - .min(addEventsBodyEventsItemThreeRatingMin) - .optional() - .describe( - 'Numeric rating (e.g., 1-5 stars) provided by the end user. Mutually exclusive with `thumb`. Use this for star ratings or numeric scales.' - ), - opinion: zod - .string() - .min(1) - .max(addEventsBodyEventsItemThreeOpinionMax) - .optional() - .describe( - 'Free-text comment from the end user describing their opinion of the response.' - ), - rewrite: zod - .string() - .min(1) - .max(addEventsBodyEventsItemThreeRewriteMax) - .optional() - .describe( - "End-user's suggested text replacement for the generated response. This is the user's idea of what the response should have been." - ), - chosen_index: zod - .number() - .min(addEventsBodyEventsItemThreeChosenIndexMin) - .optional() - .describe( - 'Zero-based index of the response option the user selected when multiple responses were returned. Use this when showing users multiple completion choices and tracking which one they picked.' - ), - categories: zod - .record(zod.string(), zod.union([zod.number(), zod.string()])) - .optional() - .describe( - "Application-specific category ratings as key-value pairs. Use this for custom rating dimensions (e.g., {'helpfulness': 4, 'accuracy': 5, 'tone': 'professional'}). Useful for radio buttons, dropdowns, or multi-dimensional rating systems." - ), - response_override: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - "Complete JSON object that replaces the original model response when exporting data. Unlike the `rewrite` field (which is just text), this can include tool calls, function outputs, and all other response metadata. When an entry with response_override is exported, you can choose to use this corrected response instead of the original. Example: {'choices': [{'message': {'role': 'assistant', 'content': 'Corrected text', 'tool_calls': [...]}}]}" - ), - }) - .describe( - 'Structured annotation supplied by a reviewer or expert evaluator.\n\nA reviewer annotation is similar to user feedback but includes an additional capability\nto provide a complete replacement response. This is useful when human experts need to\ncorrect not just the text but also structured elements like tool calls, function outputs,\nor other response metadata.\n\nInherits all feedback fields from UserFeedbackEvent (thumb, rating, opinion, rewrite,\nchosen_index, categories) and adds response_override for full response replacement.' - ), - zod - .object({ - id: zod - .string() - .optional() - .describe( - 'Unique identifier for the event. Populated when retrieved from database.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the record was created.'), - created_by: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Identifier of the user or system that generated the record. Can be set of key-value pairs.' - ), - event_type: zod - .literal('evaluator_result') - .default(addEventsBodyEventsItemFourEventTypeDefault), - name: zod - .string() - .max(addEventsBodyEventsItemFourNameMax) - .describe( - "Identifier of the evaluator that produced this result (e.g., 'harbor.verifier', 'evaluator.llm_judge', 'auditor.pii_probe')." - ), - score: zod - .union([zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - "The result value: a number (e.g., reward, rating, probability) or a string (e.g., 'pass', 'fail', a category label). Semantics are defined by the evaluator." - ), - metadata: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Free-form additional context about this result (e.g., supporting metrics, trial_name, rubric_version, evaluator config snapshot).' - ), - }) - .describe( - 'Result produced by an automated evaluator.\n\nUse this for any non-human scorer that emits a judgement about an entry:\neval-framework verifier rewards, LLM-judge ratings, auditor probe results, etc.\nDistinct from UserFeedbackEvent (human end-user feedback) and ReviewerAnnotationEvent\n(human expert annotation).' - ), - ]) - ) - .min(1) - .describe('List of events to add to the entry.'), - }) - .describe('Request to add events to an entry.'); - -export const addEventsResponseUsageOneLatencyMsMin = 0; - -export const addEventsResponseUsageOneCostUsdMin = 0; - -export const addEventsResponseUsageOneCostInputUsdMin = 0; - -export const addEventsResponseUsageOneCostOutputUsdMin = 0; - -export const addEventsResponseUsageOneInputTokensMin = 0; - -export const addEventsResponseUsageOneOutputTokensMin = 0; - -export const addEventsResponseUsageOneCachedTokensMin = 0; - -export const addEventsResponseUserRatingOneRatingMin = 0; - -export const addEventsResponseUserRatingOneOpinionMax = 2000; - -export const addEventsResponseUserRatingOneRewriteMax = 10000; - -export const addEventsResponseUserRatingOneChosenIndexMin = 0; - -export const addEventsResponseEventsItemOneEventTypeDefault = `user_feedback`; -export const addEventsResponseEventsItemOneRatingMin = 0; - -export const addEventsResponseEventsItemOneOpinionMax = 2000; - -export const addEventsResponseEventsItemOneRewriteMax = 10000; - -export const addEventsResponseEventsItemOneChosenIndexMin = 0; - -export const addEventsResponseEventsItemTwoEventTypeDefault = `user_action`; -export const addEventsResponseEventsItemTwoActionMax = 256; - -export const addEventsResponseEventsItemTwoMetadataOneMax = 256; - -export const addEventsResponseEventsItemTwoMetadataTwoItemMax = 256; - -export const addEventsResponseEventsItemThreeEventTypeDefault = `reviewer_annotation`; -export const addEventsResponseEventsItemThreeRatingMin = 0; - -export const addEventsResponseEventsItemThreeOpinionMax = 2000; - -export const addEventsResponseEventsItemThreeRewriteMax = 10000; - -export const addEventsResponseEventsItemThreeChosenIndexMin = 0; - -export const addEventsResponseEventsItemFourEventTypeDefault = `evaluator_result`; -export const addEventsResponseEventsItemFourNameMax = 256; - -export const AddEventsResponse = zod - .object({ - id: zod.string().describe('Unique identifier'), - name: zod.string().describe('Entry name (auto-generated)'), - workspace: zod.string().describe('Workspace identifier'), - external_id: zod.string().optional().describe('Client-provided identifier'), - project: zod.string().optional().describe('The name of the project associated with this entry'), - data: zod - .object({ - request: zod - .object({ - messages: zod - .array( - zod - .object({ - role: zod - .enum(['user', 'system', 'assistant', 'developer', 'tool', 'function']) - .describe('Valid role values for entry request messages.') - .describe( - 'The role of the message sender. Must be one of: user, system, assistant, developer, tool, or function.' - ), - }) - .describe( - 'A flexible message model that requires a valid role field but allows any other fields.\n\nThis flexibility enables the Intake service to store messages from various LLM providers\nand future model types without requiring schema updates. Additional fields like `content`,\n`name`, `tool_calls`, `tool_call_id`, etc. are all accepted.\n\nExamples of additional fields:\n- `content`: The message text or content\n- `name`: Name of the user or function\n- `tool_calls`: Tool\/function calls in the message\n- `tool_call_id`: ID of the tool call being responded to' - ) - ) - .describe( - 'A list of messages comprising the conversation. Each message must have a valid role. Additional fields like `content`, `tool_calls`, etc. are provider-specific.' - ), - model: zod - .string() - .describe( - "The model identifier used for this request (e.g., 'gpt-4', 'llama-3-70b', 'claude-3-opus')." - ), - }) - .describe( - 'Flexible entry request that accepts any object shape.\n\nThis flexibility enables the Intake service to store requests from various LLM providers\n(OpenAI, Anthropic, NIM, etc.) and future model types (embeddings, multimodal, etc.)\nwithout requiring schema updates.\n\nRequired fields: `messages` and `model`\nCommon optional fields: `temperature`, `max_tokens`, `top_p`, `tools`, `tool_choice`,\n`stream`, `response_format`, etc.' - ) - .describe('Raw request payload recorded from the client.'), - response: zod - .union([zod.unknown(), zod.unknown()]) - .and( - zod.object({ - choices: zod - .array(zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'A list of response choices generated by the model. Each choice typically contains a message object with role, content, and optional tool_calls. The structure varies by provider but commonly includes fields like `index`, `message`, and `finish_reason`.' - ), - error: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - "Error envelope returned by the provider when the call failed (e.g., OpenAI's `{message, type, code, param}` shape). Mutually exclusive with `choices`: a response carries one or the other." - ), - }) - ) - .describe( - 'Flexible entry response that accepts any object shape.\n\nThis flexibility enables the Intake service to store responses from various LLM providers\nand future model types without requiring schema updates.\n\nRequired: either `choices` (successful response) or `error` (failed call).\nCommon optional fields: `id`, `created`, `model`, `usage`, `system_fingerprint`, etc.' - ) - .describe('Raw response payload generated by the model.'), - }) - .describe('Entry data containing the request and response for an LLM interaction.') - .describe('Entry data containing request and response'), - usage: zod - .object({ - model: zod - .string() - .optional() - .describe( - 'The actual model that served the request (after any routing). May differ from the model in the request body.' - ), - started_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the upstream LLM call started.'), - ended_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the upstream LLM call ended.'), - latency_ms: zod - .number() - .min(addEventsResponseUsageOneLatencyMsMin) - .optional() - .describe('Wall-clock latency of the upstream LLM call, in milliseconds.'), - cost_usd: zod - .number() - .min(addEventsResponseUsageOneCostUsdMin) - .optional() - .describe('Total estimated cost of this call, in USD.'), - cost_input_usd: zod - .number() - .min(addEventsResponseUsageOneCostInputUsdMin) - .optional() - .describe('Estimated cost attributed to input tokens, in USD.'), - cost_output_usd: zod - .number() - .min(addEventsResponseUsageOneCostOutputUsdMin) - .optional() - .describe('Estimated cost attributed to output tokens, in USD.'), - input_tokens: zod - .number() - .min(addEventsResponseUsageOneInputTokensMin) - .optional() - .describe('Number of input tokens consumed.'), - output_tokens: zod - .number() - .min(addEventsResponseUsageOneOutputTokensMin) - .optional() - .describe('Number of output tokens produced.'), - cached_tokens: zod - .number() - .min(addEventsResponseUsageOneCachedTokensMin) - .optional() - .describe('Number of input tokens served from a prompt cache (subset of input_tokens).'), - }) - .describe( - 'Structured usage metrics captured at log time.\n\nEvery field is optional so producers can populate whatever they have without\nschema breakage. Stored as the entry-level ``usage`` field so filters can\nreach it via ``data.usage.`` entity-store paths.' - ) - .optional() - .describe('Structured usage metrics (model served, latency, cost, token counts).'), - context: zod - .object({ - app: zod - .string() - .describe( - "Reference to the app that produced this entry, in the form `workspace\/name`. If the app doesn't exist, it will be automatically created when the entry is ingested." - ), - task: zod - .string() - .describe( - "Name of the task within the app (e.g., 'chat', 'completion', 'tool-call'). If the task doesn't exist, it will be automatically created when the entry is ingested." - ), - thread_id: zod - .string() - .optional() - .describe( - 'Logical thread identifier that groups related entries in a multi-turn conversation. If provided, entries with the same thread_id are treated as part of the same conversation. If omitted, the entry is treated as a single-turn interaction (e.g., a standalone tool call or completion).' - ), - user_id: zod - .string() - .optional() - .describe( - "Identifier of the application's end-user who triggered this LLM interaction. This represents the person using your application (e.g., 'customer_123', 'employee@company.com'), NOT the service account that created the entry record (see ownership.created_by for that). Use this to track which of your users a conversation belongs to, filter entries by user, and enable per-user analytics. Format is application-defined." - ), - trace_id: zod - .string() - .optional() - .describe( - 'Distributed trace identifier (e.g., W3C traceparent). Intake stores it verbatim and does not use it at ingestion time; helps with later cross-system joins.' - ), - session_id: zod - .string() - .optional() - .describe( - 'Long-lived session identifier (e.g., user account or browser session). Stored for post-processing analytics; not used by the Intake service at runtime.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the entry was created.'), - }) - .describe( - 'Contextual metadata attached to every entry record.\n\nKeeping these grouped in a dedicated object avoids polluting the top-level\nentity schema and makes it trivial to extend without breaking compatibility.' - ) - .describe('Metadata describing producer, task, trace'), - user_rating: zod - .object({ - thumb: zod - .enum(['up', 'down']) - .describe('Possible thumb feedback choices.') - .optional() - .describe( - 'Binary feedback: \"up\" for šŸ‘ or \"down\" for šŸ‘Ž. Mutually exclusive with `rating`. Use this for simple thumbs up\/down UI elements.' - ), - rating: zod - .number() - .min(addEventsResponseUserRatingOneRatingMin) - .optional() - .describe( - 'Numeric rating (e.g., 1-5 stars) provided by the end user. Mutually exclusive with `thumb`. Use this for star ratings or numeric scales.' - ), - opinion: zod - .string() - .min(1) - .max(addEventsResponseUserRatingOneOpinionMax) - .optional() - .describe( - 'Free-text comment from the end user describing their opinion of the response.' - ), - rewrite: zod - .string() - .min(1) - .max(addEventsResponseUserRatingOneRewriteMax) - .optional() - .describe( - "End-user's suggested text replacement for the generated response. This is the user's idea of what the response should have been." - ), - chosen_index: zod - .number() - .min(addEventsResponseUserRatingOneChosenIndexMin) - .optional() - .describe( - 'Zero-based index of the response option the user selected when multiple responses were returned. Use this when showing users multiple completion choices and tracking which one they picked.' - ), - categories: zod - .record(zod.string(), zod.union([zod.number(), zod.string()])) - .optional() - .describe( - "Application-specific category ratings as key-value pairs. Use this for custom rating dimensions (e.g., {'helpfulness': 4, 'accuracy': 5, 'tone': 'professional'}). Useful for radio buttons, dropdowns, or multi-dimensional rating systems." - ), - }) - .describe( - "User's rating\/evaluation of an AI response.\n\nThis captures various forms of end-user feedback about a model's response, including\nbinary thumbs up\/down ratings, numeric scores, free-text opinions, suggested rewrites,\nand structured category ratings.\n\nEither `thumb` or `rating` should be provided (they are mutually exclusive), but all\nfields are optional to accommodate different feedback collection patterns." - ) - .optional() - .describe("User's rating\/evaluation"), - events: zod - .array( - zod.union([ - zod - .object({ - id: zod - .string() - .optional() - .describe( - 'Unique identifier for the event. Populated when retrieved from database.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the record was created.'), - created_by: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Identifier of the user or system that generated the record. Can be set of key-value pairs.' - ), - event_type: zod - .literal('user_feedback') - .default(addEventsResponseEventsItemOneEventTypeDefault), - thumb: zod - .enum(['up', 'down']) - .describe('Possible thumb feedback choices.') - .optional() - .describe( - 'Binary feedback: \"up\" for šŸ‘ or \"down\" for šŸ‘Ž. Mutually exclusive with `rating`. Use this for simple thumbs up\/down UI elements.' - ), - rating: zod - .number() - .min(addEventsResponseEventsItemOneRatingMin) - .optional() - .describe( - 'Numeric rating (e.g., 1-5 stars) provided by the end user. Mutually exclusive with `thumb`. Use this for star ratings or numeric scales.' - ), - opinion: zod - .string() - .min(1) - .max(addEventsResponseEventsItemOneOpinionMax) - .optional() - .describe( - 'Free-text comment from the end user describing their opinion of the response.' - ), - rewrite: zod - .string() - .min(1) - .max(addEventsResponseEventsItemOneRewriteMax) - .optional() - .describe( - "End-user's suggested text replacement for the generated response. This is the user's idea of what the response should have been." - ), - chosen_index: zod - .number() - .min(addEventsResponseEventsItemOneChosenIndexMin) - .optional() - .describe( - 'Zero-based index of the response option the user selected when multiple responses were returned. Use this when showing users multiple completion choices and tracking which one they picked.' - ), - categories: zod - .record(zod.string(), zod.union([zod.number(), zod.string()])) - .optional() - .describe( - "Application-specific category ratings as key-value pairs. Use this for custom rating dimensions (e.g., {'helpfulness': 4, 'accuracy': 5, 'tone': 'professional'}). Useful for radio buttons, dropdowns, or multi-dimensional rating systems." - ), - }) - .describe( - "Structured feedback supplied by an end-user.\n\nThis event captures various forms of end-user feedback about a model's response,\nincluding binary thumbs up\/down ratings, numeric scores, free-text opinions,\nsuggested rewrites, and structured category ratings.\n\nEither `thumb` or `rating` should be provided (they are mutually exclusive), but all\nfeedback fields are optional to accommodate different feedback collection patterns." - ), - zod - .object({ - id: zod - .string() - .optional() - .describe( - 'Unique identifier for the event. Populated when retrieved from database.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the record was created.'), - created_by: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Identifier of the user or system that generated the record. Can be set of key-value pairs.' - ), - event_type: zod - .literal('user_action') - .default(addEventsResponseEventsItemTwoEventTypeDefault), - action: zod - .string() - .max(addEventsResponseEventsItemTwoActionMax) - .describe( - "Descriptive name for the action taken by the user (e.g., 'share_clicked', 'code_copied', 'link_followed'). Use snake-case or kebab-case. This is a label, not a unique identifier—multiple events can have the same action name." - ), - metadata: zod - .record( - zod.string(), - zod.union([ - zod.string().max(addEventsResponseEventsItemTwoMetadataOneMax), - zod.array(zod.string().max(addEventsResponseEventsItemTwoMetadataTwoItemMax)), - zod.boolean(), - zod.number(), - zod.number(), - ]) - ) - .optional() - .describe( - "Optional key-value pairs with additional context about the action (max 16 entries). Use this for details like user IDs, item IDs, timestamps, A\/B test variants, or any other information useful for downstream training or evaluation pipelines. Example: {'user_id': '12345', 'experiment': 'variant_b', 'item_purchased': 'product_456'}." - ), - }) - .describe( - 'Free-form user action captured by the client application.\n\nUse this to track arbitrary user interactions with AI responses, such as copying code,\nclicking share buttons, making purchases, or any other measurable action.\n\nThe action identifier must be ≤256 characters and should use snake-case or kebab-case\nfor consistency (e.g., ``share_clicked``, ``code_copied``, ``purchase_made``).' - ), - zod - .object({ - id: zod - .string() - .optional() - .describe( - 'Unique identifier for the event. Populated when retrieved from database.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the record was created.'), - created_by: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Identifier of the user or system that generated the record. Can be set of key-value pairs.' - ), - event_type: zod - .literal('reviewer_annotation') - .default(addEventsResponseEventsItemThreeEventTypeDefault), - thumb: zod - .enum(['up', 'down']) - .describe('Possible thumb feedback choices.') - .optional() - .describe( - 'Binary feedback: \"up\" for šŸ‘ or \"down\" for šŸ‘Ž. Mutually exclusive with `rating`. Use this for simple thumbs up\/down UI elements.' - ), - rating: zod - .number() - .min(addEventsResponseEventsItemThreeRatingMin) - .optional() - .describe( - 'Numeric rating (e.g., 1-5 stars) provided by the end user. Mutually exclusive with `thumb`. Use this for star ratings or numeric scales.' - ), - opinion: zod - .string() - .min(1) - .max(addEventsResponseEventsItemThreeOpinionMax) - .optional() - .describe( - 'Free-text comment from the end user describing their opinion of the response.' - ), - rewrite: zod - .string() - .min(1) - .max(addEventsResponseEventsItemThreeRewriteMax) - .optional() - .describe( - "End-user's suggested text replacement for the generated response. This is the user's idea of what the response should have been." - ), - chosen_index: zod - .number() - .min(addEventsResponseEventsItemThreeChosenIndexMin) - .optional() - .describe( - 'Zero-based index of the response option the user selected when multiple responses were returned. Use this when showing users multiple completion choices and tracking which one they picked.' - ), - categories: zod - .record(zod.string(), zod.union([zod.number(), zod.string()])) - .optional() - .describe( - "Application-specific category ratings as key-value pairs. Use this for custom rating dimensions (e.g., {'helpfulness': 4, 'accuracy': 5, 'tone': 'professional'}). Useful for radio buttons, dropdowns, or multi-dimensional rating systems." - ), - response_override: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - "Complete JSON object that replaces the original model response when exporting data. Unlike the `rewrite` field (which is just text), this can include tool calls, function outputs, and all other response metadata. When an entry with response_override is exported, you can choose to use this corrected response instead of the original. Example: {'choices': [{'message': {'role': 'assistant', 'content': 'Corrected text', 'tool_calls': [...]}}]}" - ), - }) - .describe( - 'Structured annotation supplied by a reviewer or expert evaluator.\n\nA reviewer annotation is similar to user feedback but includes an additional capability\nto provide a complete replacement response. This is useful when human experts need to\ncorrect not just the text but also structured elements like tool calls, function outputs,\nor other response metadata.\n\nInherits all feedback fields from UserFeedbackEvent (thumb, rating, opinion, rewrite,\nchosen_index, categories) and adds response_override for full response replacement.' - ), - zod - .object({ - id: zod - .string() - .optional() - .describe( - 'Unique identifier for the event. Populated when retrieved from database.' - ), - created_at: zod - .string() - .datetime({}) - .optional() - .describe('UTC timestamp when the record was created.'), - created_by: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Identifier of the user or system that generated the record. Can be set of key-value pairs.' - ), - event_type: zod - .literal('evaluator_result') - .default(addEventsResponseEventsItemFourEventTypeDefault), - name: zod - .string() - .max(addEventsResponseEventsItemFourNameMax) - .describe( - "Identifier of the evaluator that produced this result (e.g., 'harbor.verifier', 'evaluator.llm_judge', 'auditor.pii_probe')." - ), - score: zod - .union([zod.number(), zod.number(), zod.string()]) - .optional() - .describe( - "The result value: a number (e.g., reward, rating, probability) or a string (e.g., 'pass', 'fail', a category label). Semantics are defined by the evaluator." - ), - metadata: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Free-form additional context about this result (e.g., supporting metrics, trial_name, rubric_version, evaluator config snapshot).' - ), - }) - .describe( - 'Result produced by an automated evaluator.\n\nUse this for any non-human scorer that emits a judgement about an entry:\neval-framework verifier rewards, LLM-judge ratings, auditor probe results, etc.\nDistinct from UserFeedbackEvent (human end-user feedback) and ReviewerAnnotationEvent\n(human expert annotation).' - ), - ]) - ) - .optional() - .describe('Events associated with this entry'), - custom_fields: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Free-form metadata bag for client-defined fields.'), - created_at: zod.string().datetime({}).optional().describe('Creation timestamp'), - updated_at: zod.string().datetime({}).optional().describe('Last update timestamp'), - }) - .describe('Schema for Entry responses.'); diff --git a/web/packages/sdk/generated/platform/zod/evaluator-results.ts b/web/packages/sdk/generated/platform/zod/evaluator-results.ts deleted file mode 100644 index 227b36acac..0000000000 --- a/web/packages/sdk/generated/platform/zod/evaluator-results.ts +++ /dev/null @@ -1,203 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import * as zod from 'zod'; - -/** - * @summary Create Evaluator Result - */ -export const CreateEvaluatorResultParams = zod.object({ - workspace: zod.string(), -}); - -export const CreateEvaluatorResultBody = zod - .object({ - span_id: zod - .string() - .describe('Target span id. Not validated against existing spans (loose target policy).'), - session_id: zod - .string() - .describe( - 'Session id the target span belongs to. Denormalized so session-scoped reads stay fast.' - ), - name: zod.string().describe("Evaluator \/ metric identity (e.g. 'faithfulness\/v1')."), - value: zod - .number() - .optional() - .describe('Numeric value. Required when data_type is NUMERIC or BOOLEAN (0|1).'), - string_value: zod - .string() - .optional() - .describe('String value. Required when data_type is CATEGORICAL or TEXT.'), - data_type: zod - .enum(['NUMERIC', 'CATEGORICAL', 'BOOLEAN', 'TEXT']) - .describe('Discriminator for which of value \/ string_value carries the payload.'), - comment: zod.string().optional().describe('Free-text rationale or explanation.'), - }) - .describe( - 'Request body for POST \/evaluator-results.\n\nServer fills in `evaluator_result_id`, `created_at`, `ingested_at`, and\n`created_by`. Producer supplies the target span (loose target — not\nvalidated against the spans table), the score, and provenance.' - ); - -/** - * @summary List Evaluator Results - */ -export const ListEvaluatorResultsParams = zod.object({ - workspace: zod.string(), -}); - -export const listEvaluatorResultsQueryPageDefault = 1; - -export const listEvaluatorResultsQueryPageSizeDefault = 10; -export const listEvaluatorResultsQueryPageSizeMax = 1000; - -export const listEvaluatorResultsQuerySortDefault = `-created_at`; - -export const ListEvaluatorResultsQueryParams = zod.object({ - page: zod.number().min(1).default(listEvaluatorResultsQueryPageDefault).describe('Page number.'), - page_size: zod - .number() - .min(1) - .max(listEvaluatorResultsQueryPageSizeMax) - .default(listEvaluatorResultsQueryPageSizeDefault) - .describe('Page size.'), - sort: zod - .enum(['created_at', '-created_at', 'value', '-value']) - .default(listEvaluatorResultsQuerySortDefault), - filter: zod - .object({ - span_id: zod.string().optional().describe('Filter by target span id.'), - session_id: zod.string().optional().describe('Filter by target session id.'), - name: zod.string().optional().describe('Filter by evaluator\/metric name.'), - data_type: zod - .enum(['NUMERIC', 'CATEGORICAL', 'BOOLEAN', 'TEXT']) - .optional() - .describe('Filter by data_type.'), - created_by: zod - .string() - .optional() - .describe('Filter by principal\/system that wrote the row.'), - value: zod - .object({ - $gte: zod - .number() - .optional() - .describe('Filter for results greater than or equal to this value.'), - $lte: zod - .number() - .optional() - .describe('Filter for results less than or equal to this value.'), - }) - .optional() - .describe('Filter by numeric value (range supported).'), - created_at: zod - .object({ - $gte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results greater than or equal to this datetime.'), - $lte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results less than or equal to this datetime.'), - }) - .optional() - .describe('Filter by row creation time (range supported).'), - }) - .optional() - .describe( - 'Filter evaluator results by span_id, session_id, name, data_type, created_by, value range, and created_at range.' - ), -}); - -export const ListEvaluatorResultsResponse = zod.object({ - data: zod.array( - zod - .object({ - evaluator_result_id: zod.string(), - span_id: zod.string(), - session_id: zod.string(), - workspace: zod.string(), - name: zod.string(), - value: zod.number().optional(), - string_value: zod.string().optional(), - data_type: zod.enum(['NUMERIC', 'CATEGORICAL', 'BOOLEAN', 'TEXT']), - comment: zod.string().optional(), - created_by: zod.string().optional(), - created_at: zod.string().datetime({}), - ingested_at: zod.string().datetime({}), - }) - .describe('Response model for evaluator_results read endpoints.') - ), - pagination: zod - .object({ - page: zod.number().describe('The current page number.'), - page_size: zod.number().describe('The page size used for the query.'), - current_page_size: zod.number().describe('The size for the current page.'), - total_pages: zod.number().describe('The total number of pages.'), - total_results: zod.number().describe('The total number of results.'), - }) - .optional() - .describe('Pagination information.'), - sort: zod.string().optional().describe('The field on which the results are sorted.'), - filter: zod.record(zod.string(), zod.unknown()).optional().describe('Filtering information.'), -}); - -/** - * @summary Get Evaluator Result - */ -export const GetEvaluatorResultParams = zod.object({ - workspace: zod.string(), - evaluator_result_id: zod.string(), -}); - -export const GetEvaluatorResultResponse = zod - .object({ - evaluator_result_id: zod.string(), - span_id: zod.string(), - session_id: zod.string(), - workspace: zod.string(), - name: zod.string(), - value: zod.number().optional(), - string_value: zod.string().optional(), - data_type: zod.enum(['NUMERIC', 'CATEGORICAL', 'BOOLEAN', 'TEXT']), - comment: zod.string().optional(), - created_by: zod.string().optional(), - created_at: zod.string().datetime({}), - ingested_at: zod.string().datetime({}), - }) - .describe('Response model for evaluator_results read endpoints.'); - -/** - * @summary List Evaluator Results For Span - */ -export const ListEvaluatorResultsForSpanParams = zod.object({ - workspace: zod.string(), - span_id: zod.string(), -}); - -export const ListEvaluatorResultsForSpanResponseItem = zod - .object({ - evaluator_result_id: zod.string(), - span_id: zod.string(), - session_id: zod.string(), - workspace: zod.string(), - name: zod.string(), - value: zod.number().optional(), - string_value: zod.string().optional(), - data_type: zod.enum(['NUMERIC', 'CATEGORICAL', 'BOOLEAN', 'TEXT']), - comment: zod.string().optional(), - created_by: zod.string().optional(), - created_at: zod.string().datetime({}), - ingested_at: zod.string().datetime({}), - }) - .describe('Response model for evaluator_results read endpoints.'); -export const ListEvaluatorResultsForSpanResponse = zod.array( - ListEvaluatorResultsForSpanResponseItem -); diff --git a/web/packages/sdk/generated/platform/zod/evaluator.ts b/web/packages/sdk/generated/platform/zod/evaluator.ts deleted file mode 100644 index f2b414bcee..0000000000 --- a/web/packages/sdk/generated/platform/zod/evaluator.ts +++ /dev/null @@ -1,63042 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import * as zod from 'zod'; - -/** - * List stored evaluation results for benchmark jobs. - * @summary List Benchmark Job Results - */ -export const EvaluationListBenchmarkJobResultsParams = zod.object({ - workspace: zod.string(), -}); - -export const evaluationListBenchmarkJobResultsQueryPageDefault = 1; -export const evaluationListBenchmarkJobResultsQueryPageSizeDefault = 100; -export const evaluationListBenchmarkJobResultsQuerySortDefault = `-created_at`; -export const evaluationListBenchmarkJobResultsQueryAggregateFieldsDefault = []; -export const evaluationListBenchmarkJobResultsQueryFilterBenchmarkOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationListBenchmarkJobResultsQueryFilterModelOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); - -export const EvaluationListBenchmarkJobResultsQueryParams = zod.object({ - page: zod - .number() - .default(evaluationListBenchmarkJobResultsQueryPageDefault) - .describe('Page number.'), - page_size: zod - .number() - .default(evaluationListBenchmarkJobResultsQueryPageSizeDefault) - .describe('Page size.'), - sort: zod - .enum(['-created_at', 'created_at', '-updated_at', 'updated_at', '-name', 'name']) - .default(evaluationListBenchmarkJobResultsQuerySortDefault) - .describe( - 'The field to sort by. To sort in decreasing order, use `-` in front of the field name.' - ), - aggregate_fields: zod - .array( - zod.enum([ - 'nan_count', - 'sum', - 'mean', - 'min', - 'max', - 'std_dev', - 'variance', - 'score_type', - 'percentiles', - 'histogram', - 'rubric_distribution', - 'mode_category', - ]) - ) - .default(evaluationListBenchmarkJobResultsQueryAggregateFieldsDefault) - .describe( - "Aggregate score fields to include in the response (comma-separated or repeated). Default: ('nan_count', 'sum', 'mean', 'min', 'max'). Available: ('nan_count', 'sum', 'mean', 'min', 'max', 'std_dev', 'variance', 'score_type', 'percentiles', 'histogram', 'rubric_distribution', 'mode_category')." - ), - filter: zod - .object({ - name: zod.string().optional().describe('Filter job results by name.'), - benchmark: zod - .string() - .regex(evaluationListBenchmarkJobResultsQueryFilterBenchmarkOneRegExp) - .describe( - "Reference to a benchmark in the Benchmarks API.\n\nA reference is a string with format 'workspace\/benchmark-name' that points to a\npersisted benchmark entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ) - .optional() - .describe('Filter results by benchmark reference.'), - metrics: zod.string().optional().describe('Filter results by metric reference.'), - dataset: zod - .string() - .describe( - "Reference to a Fileset in the Files API.\n\nA reference is a string with format 'workspace\/fileset-name' that points to a\npersisted fileset entity. When used as a dataset source, all files within the\nfileset will be downloaded to the job container.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform." - ) - .optional() - .describe( - 'Filter results by dataset if the benchmark job is configured with the fileset reference.' - ), - model: zod - .string() - .regex(evaluationListBenchmarkJobResultsQueryFilterModelOneRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ) - .optional() - .describe( - 'Filter results by model if the benchmark job is configured with the model reference.' - ), - created_at: zod - .object({ - $gte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results greater than or equal to this datetime.'), - $lte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results less than or equal to this datetime.'), - }) - .optional() - .describe('Filter job results by creation date range.'), - }) - .optional() - .describe( - 'Filter benchmark job results by name, benchmark, metrics, dataset, model, and dates. Supports JSON filter syntax with operators: $eq, $like, $lt, $lte, $gt, $gte, $in, $nin, $and, $or, $not. Also supports text filter syntax.' - ), -}); - -export const evaluationListBenchmarkJobResultsResponseDataItemNameDefault = ``; -export const evaluationListBenchmarkJobResultsResponseDataItemWorkspaceRegExp = new RegExp( - '^[\\w\\-\\+.@:]+$' -); -export const evaluationListBenchmarkJobResultsResponseDataItemModelOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationListBenchmarkJobResultsResponseDataItemBenchmarkOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationListBenchmarkJobResultsResponseDataItemMetricsItemRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationListBenchmarkJobResultsResponseDataItemResultsItemScoresItemOneScoreTypeDefault = `range`; -export const evaluationListBenchmarkJobResultsResponseDataItemResultsItemScoresItemTwoScoreTypeDefault = `rubric`; -export const evaluationListBenchmarkJobResultsResponseDataItemResultsItemScoresItemTwoRubricDistributionItemCountDefault = 0; -export const evaluationListBenchmarkJobResultsResponseDataItemResultsItemMetricOneRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); - -export const EvaluationListBenchmarkJobResultsResponse = zod.object({ - data: zod.array( - zod - .object({ - name: zod - .string() - .default(evaluationListBenchmarkJobResultsResponseDataItemNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(evaluationListBenchmarkJobResultsResponseDataItemWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - dataset: zod - .string() - .describe( - "Reference to a Fileset in the Files API.\n\nA reference is a string with format 'workspace\/fileset-name' that points to a\npersisted fileset entity. When used as a dataset source, all files within the\nfileset will be downloaded to the job container.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform." - ) - .optional() - .describe( - 'The dataset used for the evaluation job to generate the result. This field is only populated when the job specifies a FilesetRef.' - ), - model: zod - .string() - .regex(evaluationListBenchmarkJobResultsResponseDataItemModelOneRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ) - .optional() - .describe( - 'The model evaluated for the job to generate the result. This field is only populated when the job specifies a ModelRef.' - ), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - benchmark: zod - .string() - .regex(evaluationListBenchmarkJobResultsResponseDataItemBenchmarkOneRegExp) - .describe( - "Reference to a benchmark in the Benchmarks API.\n\nA reference is a string with format 'workspace\/benchmark-name' that points to a\npersisted benchmark entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ) - .describe('The benchmark used for the evaluation job to generate the result.'), - metrics: zod - .array( - zod - .string() - .regex(evaluationListBenchmarkJobResultsResponseDataItemMetricsItemRegExp) - .describe( - "Reference to a metric in the Metrics API.\n\nA reference is a string with format 'workspace\/metric-name' that points to a\npersisted metric entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ) - ) - .optional() - .describe('The list of metrics used for the evaluation job to generate the result.'), - results: zod - .array( - zod - .object({ - scores: zod - .array( - zod.union([ - zod - .object({ - name: zod.string().describe('Name of the score.'), - count: zod - .number() - .describe('Number of samples evaluated (excluding NaN).'), - nan_count: zod - .number() - .describe('Number of samples that produced NaN scores.'), - sum: zod.number().optional().describe('Sum of all score values.'), - mean: zod.number().optional().describe('Mean score value.'), - min: zod.number().optional().describe('Minimum score value.'), - max: zod.number().optional().describe('Maximum score value.'), - std_dev: zod - .number() - .optional() - .describe('Standard deviation of the scores.'), - variance: zod.number().optional().describe('Variance of the scores.'), - score_type: zod - .literal('range') - .default( - evaluationListBenchmarkJobResultsResponseDataItemResultsItemScoresItemOneScoreTypeDefault - ) - .describe('Type of score.'), - percentiles: zod - .object({ - p10: zod - .union([zod.number(), zod.number()]) - .describe('10th percentile.'), - p20: zod - .union([zod.number(), zod.number()]) - .describe('20th percentile.'), - p30: zod - .union([zod.number(), zod.number()]) - .describe('30th percentile.'), - p40: zod - .union([zod.number(), zod.number()]) - .describe('40th percentile.'), - p50: zod - .union([zod.number(), zod.number()]) - .describe('50th percentile (median).'), - p60: zod - .union([zod.number(), zod.number()]) - .describe('60th percentile.'), - p70: zod - .union([zod.number(), zod.number()]) - .describe('70th percentile.'), - p80: zod - .union([zod.number(), zod.number()]) - .describe('80th percentile.'), - p90: zod - .union([zod.number(), zod.number()]) - .describe('90th percentile.'), - p100: zod - .union([zod.number(), zod.number()]) - .describe('100th percentile.'), - }) - .describe('Percentile distribution of scores.') - .optional() - .describe('Percentile distribution of scores.'), - histogram: zod - .object({ - bins: zod - .array( - zod - .object({ - lower_bound: zod - .union([zod.number(), zod.number()]) - .describe('Lower bound of the bin (inclusive).'), - upper_bound: zod - .union([zod.number(), zod.number()]) - .describe( - 'Upper bound of the bin (exclusive for all but last bin).' - ), - count: zod.number().describe('Number of values in this bin.'), - }) - .describe('A single bin in a histogram.') - ) - .describe('Histogram bins.'), - }) - .describe('Histogram of score distribution.') - .optional() - .describe('Histogram of score distribution.'), - }) - .describe( - 'Aggregated statistics for a range-type score with percentiles and histogram.' - ), - zod - .object({ - name: zod.string().describe('Name of the score.'), - count: zod - .number() - .describe('Number of samples evaluated (excluding NaN).'), - nan_count: zod - .number() - .describe('Number of samples that produced NaN scores.'), - sum: zod.number().optional().describe('Sum of all score values.'), - mean: zod.number().optional().describe('Mean score value.'), - min: zod.number().optional().describe('Minimum score value.'), - max: zod.number().optional().describe('Maximum score value.'), - std_dev: zod - .number() - .optional() - .describe('Standard deviation of the scores.'), - variance: zod.number().optional().describe('Variance of the scores.'), - score_type: zod - .literal('rubric') - .default( - evaluationListBenchmarkJobResultsResponseDataItemResultsItemScoresItemTwoScoreTypeDefault - ) - .describe('Type of score.'), - rubric_distribution: zod - .array( - zod - .object({ - label: zod - .string() - .describe( - 'The label to use for the level of the rubric grading criteria.' - ), - description: zod - .string() - .optional() - .describe( - 'Describe the semantic meaning of each criteria for the given rubric.' - ), - value: zod - .union([zod.number(), zod.number()]) - .describe('The score value to assign for the criteria.'), - count: zod - .number() - .default( - evaluationListBenchmarkJobResultsResponseDataItemResultsItemScoresItemTwoRubricDistributionItemCountDefault - ) - .describe( - 'The number of samples evaluated with the rubric level.' - ), - }) - .describe('Rubric score with count statistics.') - ) - .describe('Distribution of rubric categories.'), - mode_category: zod - .string() - .optional() - .describe('Most frequent rubric category.'), - }) - .describe( - 'Aggregated statistics for a rubric-type score with category distribution.' - ), - ]) - ) - .describe('The list of aggregated scores.'), - metric: zod - .string() - .regex( - evaluationListBenchmarkJobResultsResponseDataItemResultsItemMetricOneRegExp - ) - .describe( - "Reference to a metric in the Metrics API.\n\nA reference is a string with format 'workspace\/metric-name' that points to a\npersisted metric entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ) - .optional() - .describe('The metric used for the evaluation job to generate the result.'), - }) - .describe('Aggregated results for a single metric within a benchmark.') - ) - .describe('Results for each metric in the benchmark.'), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('Response type for benchmark job result.') - ), - pagination: zod - .object({ - page: zod.number().describe('The current page number.'), - page_size: zod.number().describe('The page size used for the query.'), - current_page_size: zod.number().describe('The size for the current page.'), - total_pages: zod.number().describe('The total number of pages.'), - total_results: zod.number().describe('The total number of results.'), - }) - .optional() - .describe('Pagination information.'), - sort: zod.string().optional().describe('The field on which the results are sorted.'), - filter: zod.record(zod.string(), zod.unknown()).optional().describe('Filtering information.'), -}); - -/** - * Get a specific benchmark job result by workspace and job name. - * @summary Get Benchmark Job Result - */ -export const EvaluationGetBenchmarkJobResultParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const evaluationGetBenchmarkJobResultQueryAggregateFieldsDefault = []; - -export const EvaluationGetBenchmarkJobResultQueryParams = zod.object({ - aggregate_fields: zod - .array( - zod.enum([ - 'nan_count', - 'sum', - 'mean', - 'min', - 'max', - 'std_dev', - 'variance', - 'score_type', - 'percentiles', - 'histogram', - 'rubric_distribution', - 'mode_category', - ]) - ) - .default(evaluationGetBenchmarkJobResultQueryAggregateFieldsDefault) - .describe( - "Aggregate score fields to include in the response (comma-separated or repeated). Default: ('nan_count', 'sum', 'mean', 'min', 'max'). Available: ('nan_count', 'sum', 'mean', 'min', 'max', 'std_dev', 'variance', 'score_type', 'percentiles', 'histogram', 'rubric_distribution', 'mode_category')." - ), -}); - -export const evaluationGetBenchmarkJobResultResponseNameDefault = ``; -export const evaluationGetBenchmarkJobResultResponseWorkspaceRegExp = new RegExp( - '^[\\w\\-\\+.@:]+$' -); -export const evaluationGetBenchmarkJobResultResponseModelOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetBenchmarkJobResultResponseBenchmarkOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetBenchmarkJobResultResponseMetricsItemRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetBenchmarkJobResultResponseResultsItemScoresItemOneScoreTypeDefault = `range`; -export const evaluationGetBenchmarkJobResultResponseResultsItemScoresItemTwoScoreTypeDefault = `rubric`; -export const evaluationGetBenchmarkJobResultResponseResultsItemScoresItemTwoRubricDistributionItemCountDefault = 0; -export const evaluationGetBenchmarkJobResultResponseResultsItemMetricOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); - -export const EvaluationGetBenchmarkJobResultResponse = zod - .object({ - name: zod - .string() - .default(evaluationGetBenchmarkJobResultResponseNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(evaluationGetBenchmarkJobResultResponseWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - dataset: zod - .string() - .describe( - "Reference to a Fileset in the Files API.\n\nA reference is a string with format 'workspace\/fileset-name' that points to a\npersisted fileset entity. When used as a dataset source, all files within the\nfileset will be downloaded to the job container.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform." - ) - .optional() - .describe( - 'The dataset used for the evaluation job to generate the result. This field is only populated when the job specifies a FilesetRef.' - ), - model: zod - .string() - .regex(evaluationGetBenchmarkJobResultResponseModelOneRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ) - .optional() - .describe( - 'The model evaluated for the job to generate the result. This field is only populated when the job specifies a ModelRef.' - ), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - benchmark: zod - .string() - .regex(evaluationGetBenchmarkJobResultResponseBenchmarkOneRegExp) - .describe( - "Reference to a benchmark in the Benchmarks API.\n\nA reference is a string with format 'workspace\/benchmark-name' that points to a\npersisted benchmark entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ) - .describe('The benchmark used for the evaluation job to generate the result.'), - metrics: zod - .array( - zod - .string() - .regex(evaluationGetBenchmarkJobResultResponseMetricsItemRegExp) - .describe( - "Reference to a metric in the Metrics API.\n\nA reference is a string with format 'workspace\/metric-name' that points to a\npersisted metric entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ) - ) - .optional() - .describe('The list of metrics used for the evaluation job to generate the result.'), - results: zod - .array( - zod - .object({ - scores: zod - .array( - zod.union([ - zod - .object({ - name: zod.string().describe('Name of the score.'), - count: zod.number().describe('Number of samples evaluated (excluding NaN).'), - nan_count: zod - .number() - .describe('Number of samples that produced NaN scores.'), - sum: zod.number().optional().describe('Sum of all score values.'), - mean: zod.number().optional().describe('Mean score value.'), - min: zod.number().optional().describe('Minimum score value.'), - max: zod.number().optional().describe('Maximum score value.'), - std_dev: zod - .number() - .optional() - .describe('Standard deviation of the scores.'), - variance: zod.number().optional().describe('Variance of the scores.'), - score_type: zod - .literal('range') - .default( - evaluationGetBenchmarkJobResultResponseResultsItemScoresItemOneScoreTypeDefault - ) - .describe('Type of score.'), - percentiles: zod - .object({ - p10: zod.union([zod.number(), zod.number()]).describe('10th percentile.'), - p20: zod.union([zod.number(), zod.number()]).describe('20th percentile.'), - p30: zod.union([zod.number(), zod.number()]).describe('30th percentile.'), - p40: zod.union([zod.number(), zod.number()]).describe('40th percentile.'), - p50: zod - .union([zod.number(), zod.number()]) - .describe('50th percentile (median).'), - p60: zod.union([zod.number(), zod.number()]).describe('60th percentile.'), - p70: zod.union([zod.number(), zod.number()]).describe('70th percentile.'), - p80: zod.union([zod.number(), zod.number()]).describe('80th percentile.'), - p90: zod.union([zod.number(), zod.number()]).describe('90th percentile.'), - p100: zod - .union([zod.number(), zod.number()]) - .describe('100th percentile.'), - }) - .describe('Percentile distribution of scores.') - .optional() - .describe('Percentile distribution of scores.'), - histogram: zod - .object({ - bins: zod - .array( - zod - .object({ - lower_bound: zod - .union([zod.number(), zod.number()]) - .describe('Lower bound of the bin (inclusive).'), - upper_bound: zod - .union([zod.number(), zod.number()]) - .describe( - 'Upper bound of the bin (exclusive for all but last bin).' - ), - count: zod.number().describe('Number of values in this bin.'), - }) - .describe('A single bin in a histogram.') - ) - .describe('Histogram bins.'), - }) - .describe('Histogram of score distribution.') - .optional() - .describe('Histogram of score distribution.'), - }) - .describe( - 'Aggregated statistics for a range-type score with percentiles and histogram.' - ), - zod - .object({ - name: zod.string().describe('Name of the score.'), - count: zod.number().describe('Number of samples evaluated (excluding NaN).'), - nan_count: zod - .number() - .describe('Number of samples that produced NaN scores.'), - sum: zod.number().optional().describe('Sum of all score values.'), - mean: zod.number().optional().describe('Mean score value.'), - min: zod.number().optional().describe('Minimum score value.'), - max: zod.number().optional().describe('Maximum score value.'), - std_dev: zod - .number() - .optional() - .describe('Standard deviation of the scores.'), - variance: zod.number().optional().describe('Variance of the scores.'), - score_type: zod - .literal('rubric') - .default( - evaluationGetBenchmarkJobResultResponseResultsItemScoresItemTwoScoreTypeDefault - ) - .describe('Type of score.'), - rubric_distribution: zod - .array( - zod - .object({ - label: zod - .string() - .describe( - 'The label to use for the level of the rubric grading criteria.' - ), - description: zod - .string() - .optional() - .describe( - 'Describe the semantic meaning of each criteria for the given rubric.' - ), - value: zod - .union([zod.number(), zod.number()]) - .describe('The score value to assign for the criteria.'), - count: zod - .number() - .default( - evaluationGetBenchmarkJobResultResponseResultsItemScoresItemTwoRubricDistributionItemCountDefault - ) - .describe('The number of samples evaluated with the rubric level.'), - }) - .describe('Rubric score with count statistics.') - ) - .describe('Distribution of rubric categories.'), - mode_category: zod - .string() - .optional() - .describe('Most frequent rubric category.'), - }) - .describe( - 'Aggregated statistics for a rubric-type score with category distribution.' - ), - ]) - ) - .describe('The list of aggregated scores.'), - metric: zod - .string() - .regex(evaluationGetBenchmarkJobResultResponseResultsItemMetricOneRegExp) - .describe( - "Reference to a metric in the Metrics API.\n\nA reference is a string with format 'workspace\/metric-name' that points to a\npersisted metric entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ) - .optional() - .describe('The metric used for the evaluation job to generate the result.'), - }) - .describe('Aggregated results for a single metric within a benchmark.') - ) - .describe('Results for each metric in the benchmark.'), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('Response type for benchmark job result.'); - -/** - * Delete an evaluation benchmark job result. - * @summary Delete Benchmark Job Result - */ -export const EvaluationDeleteBenchmarkJobResultParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const evaluationDeleteBenchmarkJobResultResponseMessageDefault = `Resource deleted successfully.`; - -export const EvaluationDeleteBenchmarkJobResultResponse = zod.object({ - message: zod.string().default(evaluationDeleteBenchmarkJobResultResponseMessageDefault), - id: zod.string().optional().describe('The ID of the deleted resource.'), - deleted_at: zod - .string() - .datetime({}) - .optional() - .describe('The timestamp when the resource was deleted.'), -}); - -/** - * @summary Create Job - */ -export const EvaluationCreateBenchmarkJobParams = zod.object({ - workspace: zod.string(), -}); - -export const evaluationCreateBenchmarkJobBodySpecOneBenchmarkOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateBenchmarkJobBodySpecOneParamsOneParallelismDefault = 8; - -export const evaluationCreateBenchmarkJobBodySpecTwoBenchmarkOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateBenchmarkJobBodySpecTwoModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateBenchmarkJobBodySpecTwoModelOneFormatDefault = `nim`; -export const evaluationCreateBenchmarkJobBodySpecTwoModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateBenchmarkJobBodySpecTwoParamsOneParallelismDefault = 8; - -export const evaluationCreateBenchmarkJobBodySpecTwoParamsOneIgnoreRequestFailureDefault = false; -export const evaluationCreateBenchmarkJobBodySpecTwoParamsOneMaxRetriesDefault = 3; -export const evaluationCreateBenchmarkJobBodySpecTwoParamsOneMaxRetriesMin = 0; - -export const evaluationCreateBenchmarkJobBodySpecTwoParamsOneInferenceOneTemperatureMin = 0; -export const evaluationCreateBenchmarkJobBodySpecTwoParamsOneInferenceOneTemperatureMax = 2; - -export const evaluationCreateBenchmarkJobBodySpecTwoParamsOneInferenceOneTopPMin = 0; -export const evaluationCreateBenchmarkJobBodySpecTwoParamsOneInferenceOneTopPMax = 1; - -export const evaluationCreateBenchmarkJobBodySpecThreeBenchmarkOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateBenchmarkJobBodySpecThreeAgentOneFormatDefault = `generic`; -export const evaluationCreateBenchmarkJobBodySpecThreeAgentOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateBenchmarkJobBodySpecThreeParamsOneParallelismDefault = 8; - -export const evaluationCreateBenchmarkJobBodySpecThreeParamsOneIgnoreRequestFailureDefault = false; -export const evaluationCreateBenchmarkJobBodySpecThreeParamsOneMaxRetriesDefault = 3; -export const evaluationCreateBenchmarkJobBodySpecThreeParamsOneMaxRetriesMin = 0; - -export const evaluationCreateBenchmarkJobBodySpecFourBenchmarkOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateBenchmarkJobBodySpecFourParamsOneParallelismDefault = 8; - -export const evaluationCreateBenchmarkJobBodySpecFiveBenchmarkOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateBenchmarkJobBodySpecFiveModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateBenchmarkJobBodySpecFiveModelOneFormatDefault = `nim`; -export const evaluationCreateBenchmarkJobBodySpecFiveModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateBenchmarkJobBodySpecFiveParamsOneParallelismDefault = 8; - -export const evaluationCreateBenchmarkJobBodySpecFiveParamsOneIgnoreRequestFailureDefault = false; -export const evaluationCreateBenchmarkJobBodySpecFiveParamsOneMaxRetriesDefault = 3; -export const evaluationCreateBenchmarkJobBodySpecFiveParamsOneMaxRetriesMin = 0; - -export const evaluationCreateBenchmarkJobBodySpecFiveParamsOneInferenceOneTemperatureMin = 0; -export const evaluationCreateBenchmarkJobBodySpecFiveParamsOneInferenceOneTemperatureMax = 2; - -export const evaluationCreateBenchmarkJobBodySpecFiveParamsOneInferenceOneTopPMin = 0; -export const evaluationCreateBenchmarkJobBodySpecFiveParamsOneInferenceOneTopPMax = 1; - -export const EvaluationCreateBenchmarkJobBody = zod.object({ - name: zod.string().optional(), - description: zod.string().optional(), - project: zod.string().optional(), - spec: zod.union([ - zod - .object({ - benchmark: zod - .string() - .regex(evaluationCreateBenchmarkJobBodySpecOneBenchmarkOneRegExp) - .describe( - "Reference to a benchmark in the Benchmarks API.\n\nA reference is a string with format 'workspace\/benchmark-name' that points to a\npersisted benchmark entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ) - .describe('Reference to the benchmark for evaluation (format: workspace\/name).'), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default(evaluationCreateBenchmarkJobBodySpecOneParamsOneParallelismDefault) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - }) - .describe('Job parameters.') - .optional() - .describe('Execution parameters for the benchmark job.'), - }) - .describe( - "Input for an offline benchmark evaluation job.\n\nEvaluates the benchmark's dataset against all metrics in the benchmark." - ), - zod - .object({ - benchmark: zod - .string() - .regex(evaluationCreateBenchmarkJobBodySpecTwoBenchmarkOneRegExp) - .describe( - "Reference to a benchmark in the Benchmarks API.\n\nA reference is a string with format 'workspace\/benchmark-name' that points to a\npersisted benchmark entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ) - .describe('Reference to the benchmark for evaluation (format: workspace\/name).'), - model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationCreateBenchmarkJobBodySpecTwoModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationCreateBenchmarkJobBodySpecTwoModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateBenchmarkJobBodySpecTwoModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The model to evaluate.'), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default(evaluationCreateBenchmarkJobBodySpecTwoParamsOneParallelismDefault) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - ignore_request_failure: zod - .boolean() - .default(evaluationCreateBenchmarkJobBodySpecTwoParamsOneIgnoreRequestFailureDefault) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - request_timeout: zod - .number() - .optional() - .describe('The timeout to be used for requests made to the model.'), - max_retries: zod - .number() - .min(evaluationCreateBenchmarkJobBodySpecTwoParamsOneMaxRetriesMin) - .default(evaluationCreateBenchmarkJobBodySpecTwoParamsOneMaxRetriesDefault) - .describe('Maximum number of retries for failed requests.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationCreateBenchmarkJobBodySpecTwoParamsOneInferenceOneTemperatureMin) - .max(evaluationCreateBenchmarkJobBodySpecTwoParamsOneInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateBenchmarkJobBodySpecTwoParamsOneInferenceOneTopPMin) - .max(evaluationCreateBenchmarkJobBodySpecTwoParamsOneInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe("Custom settings that control the model's text generation behavior."), - system_prompt: zod - .string() - .optional() - .describe( - "Initial instructions that define the model's role and behavior for the conversation." - ), - reasoning: zod - .object({ - end_token: zod - .string() - .optional() - .describe( - "Configure the end token to trim reasoning context based on the model's reasoning API. Example for Nemotron models: '<\/think>'" - ), - include_if_not_finished: zod - .boolean() - .optional() - .describe( - 'Configure whether to include reasoning context if the model has not finished reasoning.' - ), - effort: zod - .string() - .optional() - .describe( - 'Option for OpenAI models to specify low, medium, or high reasoning effort.' - ), - }) - .describe("Custom settings that control the model's reasoning behavior.") - .optional() - .describe("Custom settings that control the model's reasoning behavior."), - structured_output: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('JSON schema to apply structured output for the model.'), - }) - .describe('Job parameters for model online evaluation.') - .optional() - .describe('Execution parameters for the benchmark job.'), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .describe( - 'The jinja template to prompt the model for evaluation. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{input}}, {{output}}, {{context}}, {{reference}} to reference input columns.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - 'Prompt template fields that should remain available to the prompt template but not be required by dataset schema validation.' - ), - }) - .describe( - "Input for an online benchmark evaluation job.\n\nEvaluates a model by prompting it with the benchmark's dataset and then evaluating\nthe responses against all metrics in the benchmark." - ), - zod - .object({ - benchmark: zod - .string() - .regex(evaluationCreateBenchmarkJobBodySpecThreeBenchmarkOneRegExp) - .describe( - "Reference to a benchmark in the Benchmarks API.\n\nA reference is a string with format 'workspace\/benchmark-name' that points to a\npersisted benchmark entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ) - .describe('Reference to the benchmark for evaluation (format: workspace\/name).'), - agent: zod - .object({ - url: zod.string().describe('Base URL of the agent endpoint.'), - name: zod.string().describe('Agent name \/ identifier.'), - format: zod - .enum(['generic', 'nemo_agent_toolkit']) - .default(evaluationCreateBenchmarkJobBodySpecThreeAgentOneFormatDefault) - .describe('Agent format that determines the execution path.'), - api_key_secret: zod - .string() - .regex(evaluationCreateBenchmarkJobBodySpecThreeAgentOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the agent. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - body: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Jinja template for the request payload. Required for generic agents.'), - response_path: zod - .string() - .optional() - .describe( - "JSONPath expression to extract the response text from the agent's response body. Required for generic agents." - ), - trajectory_path: zod - .string() - .optional() - .describe( - "JSONPath expression to extract the trajectory from the agent's response body. Optional." - ), - }) - .describe( - 'Agent definition for inference in online evaluation jobs.\n\nAn agent is an endpoint that accepts a request and returns a response,\npotentially with a trajectory. Two formats are supported:\n\n- ``generic``: configurable HTTP POST with Jinja-templated body and\n JSONPath extraction for response and trajectory.\n- ``nemo_agent_toolkit``: NeMo Agent Toolkit SSE streaming protocol\n (``\/generate\/full?filter_steps=none``).' - ) - .describe('The agent to evaluate.'), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default(evaluationCreateBenchmarkJobBodySpecThreeParamsOneParallelismDefault) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateBenchmarkJobBodySpecThreeParamsOneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - request_timeout: zod - .number() - .optional() - .describe('The timeout to be used for requests made to the model.'), - max_retries: zod - .number() - .min(evaluationCreateBenchmarkJobBodySpecThreeParamsOneMaxRetriesMin) - .default(evaluationCreateBenchmarkJobBodySpecThreeParamsOneMaxRetriesDefault) - .describe('Maximum number of retries for failed requests.'), - }) - .describe('Job parameters for online evaluation.') - .optional() - .describe('Execution parameters for the benchmark job.'), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .describe( - 'The jinja template to prompt the agent for evaluation. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{input}}, {{output}}, {{context}}, {{reference}} to reference input columns.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - 'Prompt template fields that should remain available to the prompt template but not be required by dataset schema validation.' - ), - }) - .describe( - "Input for an online benchmark evaluation job targeting an agent.\n\nEvaluates an agent by prompting it with the benchmark's dataset and then evaluating\nthe responses against all metrics in the benchmark." - ), - zod - .object({ - benchmark: zod - .string() - .regex(evaluationCreateBenchmarkJobBodySpecFourBenchmarkOneRegExp) - .describe( - "Reference to a benchmark in the Benchmarks API.\n\nA reference is a string with format 'workspace\/benchmark-name' that points to a\npersisted benchmark entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ) - .describe('Reference to the benchmark for evaluation (format: workspace\/name).'), - dataset: zod - .string() - .describe( - "Reference to a Fileset in the Files API.\n\nA reference is a string with format 'workspace\/fileset-name' that points to a\npersisted fileset entity. When used as a dataset source, all files within the\nfileset will be downloaded to the job container.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform." - ) - .describe( - 'Reference to a Fileset in the Files API (format: workspace\/fileset-name). The fileset contains the pre-generated outputs to evaluate this benchmark on.' - ), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default(evaluationCreateBenchmarkJobBodySpecFourParamsOneParallelismDefault) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - }) - .describe('Job parameters.') - .optional() - .describe('Execution parameters for the benchmark job.'), - benchmark_params: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Additional parameters specific to the benchmark.'), - }) - .describe( - "Input for an offline system benchmark evaluation job.\n\nEvaluates the benchmark's standard dataset against all pre-defined metrics in the benchmark." - ), - zod - .object({ - benchmark: zod - .string() - .regex(evaluationCreateBenchmarkJobBodySpecFiveBenchmarkOneRegExp) - .describe( - "Reference to a benchmark in the Benchmarks API.\n\nA reference is a string with format 'workspace\/benchmark-name' that points to a\npersisted benchmark entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ) - .describe('Reference to the benchmark for evaluation (format: workspace\/name).'), - model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationCreateBenchmarkJobBodySpecFiveModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationCreateBenchmarkJobBodySpecFiveModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateBenchmarkJobBodySpecFiveModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The model to evaluate.'), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default(evaluationCreateBenchmarkJobBodySpecFiveParamsOneParallelismDefault) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - ignore_request_failure: zod - .boolean() - .default(evaluationCreateBenchmarkJobBodySpecFiveParamsOneIgnoreRequestFailureDefault) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - request_timeout: zod - .number() - .optional() - .describe('The timeout to be used for requests made to the model.'), - max_retries: zod - .number() - .min(evaluationCreateBenchmarkJobBodySpecFiveParamsOneMaxRetriesMin) - .default(evaluationCreateBenchmarkJobBodySpecFiveParamsOneMaxRetriesDefault) - .describe('Maximum number of retries for failed requests.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationCreateBenchmarkJobBodySpecFiveParamsOneInferenceOneTemperatureMin) - .max(evaluationCreateBenchmarkJobBodySpecFiveParamsOneInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateBenchmarkJobBodySpecFiveParamsOneInferenceOneTopPMin) - .max(evaluationCreateBenchmarkJobBodySpecFiveParamsOneInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe("Custom settings that control the model's text generation behavior."), - system_prompt: zod - .string() - .optional() - .describe( - "Initial instructions that define the model's role and behavior for the conversation." - ), - reasoning: zod - .object({ - end_token: zod - .string() - .optional() - .describe( - "Configure the end token to trim reasoning context based on the model's reasoning API. Example for Nemotron models: '<\/think>'" - ), - include_if_not_finished: zod - .boolean() - .optional() - .describe( - 'Configure whether to include reasoning context if the model has not finished reasoning.' - ), - effort: zod - .string() - .optional() - .describe( - 'Option for OpenAI models to specify low, medium, or high reasoning effort.' - ), - }) - .describe("Custom settings that control the model's reasoning behavior.") - .optional() - .describe("Custom settings that control the model's reasoning behavior."), - structured_output: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('JSON schema to apply structured output for the model.'), - }) - .describe('Job parameters for model online evaluation.') - .optional() - .describe('Execution parameters for the benchmark job.'), - benchmark_params: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Additional parameters specific to the benchmark.'), - }) - .describe( - "Input for an online system benchmark evaluation job.\n\nEvaluates the benchmark's standard dataset against all pre-defined metrics in the benchmark." - ), - ]), - ownership: zod.record(zod.string(), zod.unknown()).optional(), - custom_fields: zod.record(zod.string(), zod.unknown()).optional(), -}); - -/** - * @summary List Jobs - */ -export const EvaluationListBenchmarkJobsParams = zod.object({ - workspace: zod.string(), -}); - -export const evaluationListBenchmarkJobsQueryPageDefault = 1; -export const evaluationListBenchmarkJobsQueryPageExclusiveMin = 0; - -export const evaluationListBenchmarkJobsQueryPageSizeDefault = 10; -export const evaluationListBenchmarkJobsQueryPageSizeExclusiveMin = 0; - -export const evaluationListBenchmarkJobsQuerySortDefault = `-created_at`; - -export const EvaluationListBenchmarkJobsQueryParams = zod.object({ - page: zod - .number() - .gt(evaluationListBenchmarkJobsQueryPageExclusiveMin) - .default(evaluationListBenchmarkJobsQueryPageDefault) - .describe('Page number.'), - page_size: zod - .number() - .gt(evaluationListBenchmarkJobsQueryPageSizeExclusiveMin) - .default(evaluationListBenchmarkJobsQueryPageSizeDefault) - .describe('Page size.'), - sort: zod - .enum(['created_at', '-created_at', 'updated_at', '-updated_at']) - .default(evaluationListBenchmarkJobsQuerySortDefault) - .describe( - 'The field to sort by. To sort in decreasing order, use `-` in front of the field name.' - ), - filter: zod - .object({ - created_at: zod - .object({ - $gte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results greater than or equal to this datetime.'), - $lte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results less than or equal to this datetime.'), - }) - .optional() - .describe("Jobs created at 'gte' datetime or 'lte' datetime."), - name: zod.string().optional().describe('Name of the job.'), - workspace: zod.string().optional().describe('Workspace of the job.'), - project: zod.string().optional().describe('Project containing the job.'), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ) - .optional() - .describe('The current status.'), - updated_at: zod - .object({ - $gte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results greater than or equal to this datetime.'), - $lte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results less than or equal to this datetime.'), - }) - .optional() - .describe("Jobs updated at 'gte' datetime or 'lte' datetime."), - }) - .optional() - .describe('Filter jobs on various criteria.'), -}); - -export const evaluationListBenchmarkJobsResponseDataItemSpecOneBenchmarkOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationListBenchmarkJobsResponseDataItemSpecOneParamsOneParallelismDefault = 8; - -export const evaluationListBenchmarkJobsResponseDataItemSpecTwoBenchmarkOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationListBenchmarkJobsResponseDataItemSpecTwoModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListBenchmarkJobsResponseDataItemSpecTwoModelOneFormatDefault = `nim`; -export const evaluationListBenchmarkJobsResponseDataItemSpecTwoModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationListBenchmarkJobsResponseDataItemSpecTwoParamsOneParallelismDefault = 8; - -export const evaluationListBenchmarkJobsResponseDataItemSpecTwoParamsOneIgnoreRequestFailureDefault = false; -export const evaluationListBenchmarkJobsResponseDataItemSpecTwoParamsOneMaxRetriesDefault = 3; -export const evaluationListBenchmarkJobsResponseDataItemSpecTwoParamsOneMaxRetriesMin = 0; - -export const evaluationListBenchmarkJobsResponseDataItemSpecTwoParamsOneInferenceOneTemperatureMin = 0; -export const evaluationListBenchmarkJobsResponseDataItemSpecTwoParamsOneInferenceOneTemperatureMax = 2; - -export const evaluationListBenchmarkJobsResponseDataItemSpecTwoParamsOneInferenceOneTopPMin = 0; -export const evaluationListBenchmarkJobsResponseDataItemSpecTwoParamsOneInferenceOneTopPMax = 1; - -export const evaluationListBenchmarkJobsResponseDataItemSpecThreeBenchmarkOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationListBenchmarkJobsResponseDataItemSpecThreeAgentOneFormatDefault = `generic`; -export const evaluationListBenchmarkJobsResponseDataItemSpecThreeAgentOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListBenchmarkJobsResponseDataItemSpecThreeParamsOneParallelismDefault = 8; - -export const evaluationListBenchmarkJobsResponseDataItemSpecThreeParamsOneIgnoreRequestFailureDefault = false; -export const evaluationListBenchmarkJobsResponseDataItemSpecThreeParamsOneMaxRetriesDefault = 3; -export const evaluationListBenchmarkJobsResponseDataItemSpecThreeParamsOneMaxRetriesMin = 0; - -export const evaluationListBenchmarkJobsResponseDataItemSpecFourBenchmarkOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationListBenchmarkJobsResponseDataItemSpecFourParamsOneParallelismDefault = 8; - -export const evaluationListBenchmarkJobsResponseDataItemSpecFiveBenchmarkOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationListBenchmarkJobsResponseDataItemSpecFiveModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListBenchmarkJobsResponseDataItemSpecFiveModelOneFormatDefault = `nim`; -export const evaluationListBenchmarkJobsResponseDataItemSpecFiveModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationListBenchmarkJobsResponseDataItemSpecFiveParamsOneParallelismDefault = 8; - -export const evaluationListBenchmarkJobsResponseDataItemSpecFiveParamsOneIgnoreRequestFailureDefault = false; -export const evaluationListBenchmarkJobsResponseDataItemSpecFiveParamsOneMaxRetriesDefault = 3; -export const evaluationListBenchmarkJobsResponseDataItemSpecFiveParamsOneMaxRetriesMin = 0; - -export const evaluationListBenchmarkJobsResponseDataItemSpecFiveParamsOneInferenceOneTemperatureMin = 0; -export const evaluationListBenchmarkJobsResponseDataItemSpecFiveParamsOneInferenceOneTemperatureMax = 2; - -export const evaluationListBenchmarkJobsResponseDataItemSpecFiveParamsOneInferenceOneTopPMin = 0; -export const evaluationListBenchmarkJobsResponseDataItemSpecFiveParamsOneInferenceOneTopPMax = 1; - -export const EvaluationListBenchmarkJobsResponse = zod.object({ - data: zod.array( - zod.object({ - id: zod.string().optional(), - name: zod.string(), - description: zod.string().optional(), - project: zod.string().optional(), - workspace: zod.string().optional(), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - spec: zod.union([ - zod - .object({ - benchmark: zod - .string() - .regex(evaluationListBenchmarkJobsResponseDataItemSpecOneBenchmarkOneRegExp) - .describe( - "Reference to a benchmark in the Benchmarks API.\n\nA reference is a string with format 'workspace\/benchmark-name' that points to a\npersisted benchmark entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ) - .describe('Reference to the benchmark for evaluation (format: workspace\/name).'), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default( - evaluationListBenchmarkJobsResponseDataItemSpecOneParamsOneParallelismDefault - ) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - }) - .describe('Job parameters.') - .optional() - .describe('Execution parameters for the benchmark job.'), - }) - .describe( - "Input for an offline benchmark evaluation job.\n\nEvaluates the benchmark's dataset against all metrics in the benchmark." - ), - zod - .object({ - benchmark: zod - .string() - .regex(evaluationListBenchmarkJobsResponseDataItemSpecTwoBenchmarkOneRegExp) - .describe( - "Reference to a benchmark in the Benchmarks API.\n\nA reference is a string with format 'workspace\/benchmark-name' that points to a\npersisted benchmark entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ) - .describe('Reference to the benchmark for evaluation (format: workspace\/name).'), - model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListBenchmarkJobsResponseDataItemSpecTwoModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListBenchmarkJobsResponseDataItemSpecTwoModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationListBenchmarkJobsResponseDataItemSpecTwoModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The model to evaluate.'), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default( - evaluationListBenchmarkJobsResponseDataItemSpecTwoParamsOneParallelismDefault - ) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - ignore_request_failure: zod - .boolean() - .default( - evaluationListBenchmarkJobsResponseDataItemSpecTwoParamsOneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - request_timeout: zod - .number() - .optional() - .describe('The timeout to be used for requests made to the model.'), - max_retries: zod - .number() - .min(evaluationListBenchmarkJobsResponseDataItemSpecTwoParamsOneMaxRetriesMin) - .default( - evaluationListBenchmarkJobsResponseDataItemSpecTwoParamsOneMaxRetriesDefault - ) - .describe('Maximum number of retries for failed requests.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListBenchmarkJobsResponseDataItemSpecTwoParamsOneInferenceOneTemperatureMin - ) - .max( - evaluationListBenchmarkJobsResponseDataItemSpecTwoParamsOneInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListBenchmarkJobsResponseDataItemSpecTwoParamsOneInferenceOneTopPMin - ) - .max( - evaluationListBenchmarkJobsResponseDataItemSpecTwoParamsOneInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe("Custom settings that control the model's text generation behavior."), - system_prompt: zod - .string() - .optional() - .describe( - "Initial instructions that define the model's role and behavior for the conversation." - ), - reasoning: zod - .object({ - end_token: zod - .string() - .optional() - .describe( - "Configure the end token to trim reasoning context based on the model's reasoning API. Example for Nemotron models: '<\/think>'" - ), - include_if_not_finished: zod - .boolean() - .optional() - .describe( - 'Configure whether to include reasoning context if the model has not finished reasoning.' - ), - effort: zod - .string() - .optional() - .describe( - 'Option for OpenAI models to specify low, medium, or high reasoning effort.' - ), - }) - .describe("Custom settings that control the model's reasoning behavior.") - .optional() - .describe("Custom settings that control the model's reasoning behavior."), - structured_output: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('JSON schema to apply structured output for the model.'), - }) - .describe('Job parameters for model online evaluation.') - .optional() - .describe('Execution parameters for the benchmark job.'), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .describe( - 'The jinja template to prompt the model for evaluation. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{input}}, {{output}}, {{context}}, {{reference}} to reference input columns.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - 'Prompt template fields that should remain available to the prompt template but not be required by dataset schema validation.' - ), - }) - .describe( - "Input for an online benchmark evaluation job.\n\nEvaluates a model by prompting it with the benchmark's dataset and then evaluating\nthe responses against all metrics in the benchmark." - ), - zod - .object({ - benchmark: zod - .string() - .regex(evaluationListBenchmarkJobsResponseDataItemSpecThreeBenchmarkOneRegExp) - .describe( - "Reference to a benchmark in the Benchmarks API.\n\nA reference is a string with format 'workspace\/benchmark-name' that points to a\npersisted benchmark entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ) - .describe('Reference to the benchmark for evaluation (format: workspace\/name).'), - agent: zod - .object({ - url: zod.string().describe('Base URL of the agent endpoint.'), - name: zod.string().describe('Agent name \/ identifier.'), - format: zod - .enum(['generic', 'nemo_agent_toolkit']) - .default( - evaluationListBenchmarkJobsResponseDataItemSpecThreeAgentOneFormatDefault - ) - .describe('Agent format that determines the execution path.'), - api_key_secret: zod - .string() - .regex( - evaluationListBenchmarkJobsResponseDataItemSpecThreeAgentOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the agent. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - body: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Jinja template for the request payload. Required for generic agents.'), - response_path: zod - .string() - .optional() - .describe( - "JSONPath expression to extract the response text from the agent's response body. Required for generic agents." - ), - trajectory_path: zod - .string() - .optional() - .describe( - "JSONPath expression to extract the trajectory from the agent's response body. Optional." - ), - }) - .describe( - 'Agent definition for inference in online evaluation jobs.\n\nAn agent is an endpoint that accepts a request and returns a response,\npotentially with a trajectory. Two formats are supported:\n\n- ``generic``: configurable HTTP POST with Jinja-templated body and\n JSONPath extraction for response and trajectory.\n- ``nemo_agent_toolkit``: NeMo Agent Toolkit SSE streaming protocol\n (``\/generate\/full?filter_steps=none``).' - ) - .describe('The agent to evaluate.'), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default( - evaluationListBenchmarkJobsResponseDataItemSpecThreeParamsOneParallelismDefault - ) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - ignore_request_failure: zod - .boolean() - .default( - evaluationListBenchmarkJobsResponseDataItemSpecThreeParamsOneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - request_timeout: zod - .number() - .optional() - .describe('The timeout to be used for requests made to the model.'), - max_retries: zod - .number() - .min(evaluationListBenchmarkJobsResponseDataItemSpecThreeParamsOneMaxRetriesMin) - .default( - evaluationListBenchmarkJobsResponseDataItemSpecThreeParamsOneMaxRetriesDefault - ) - .describe('Maximum number of retries for failed requests.'), - }) - .describe('Job parameters for online evaluation.') - .optional() - .describe('Execution parameters for the benchmark job.'), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .describe( - 'The jinja template to prompt the agent for evaluation. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{input}}, {{output}}, {{context}}, {{reference}} to reference input columns.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - 'Prompt template fields that should remain available to the prompt template but not be required by dataset schema validation.' - ), - }) - .describe( - "Input for an online benchmark evaluation job targeting an agent.\n\nEvaluates an agent by prompting it with the benchmark's dataset and then evaluating\nthe responses against all metrics in the benchmark." - ), - zod - .object({ - benchmark: zod - .string() - .regex(evaluationListBenchmarkJobsResponseDataItemSpecFourBenchmarkOneRegExp) - .describe( - "Reference to a benchmark in the Benchmarks API.\n\nA reference is a string with format 'workspace\/benchmark-name' that points to a\npersisted benchmark entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ) - .describe('Reference to the benchmark for evaluation (format: workspace\/name).'), - dataset: zod - .string() - .describe( - "Reference to a Fileset in the Files API.\n\nA reference is a string with format 'workspace\/fileset-name' that points to a\npersisted fileset entity. When used as a dataset source, all files within the\nfileset will be downloaded to the job container.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform." - ) - .describe( - 'Reference to a Fileset in the Files API (format: workspace\/fileset-name). The fileset contains the pre-generated outputs to evaluate this benchmark on.' - ), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default( - evaluationListBenchmarkJobsResponseDataItemSpecFourParamsOneParallelismDefault - ) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - }) - .describe('Job parameters.') - .optional() - .describe('Execution parameters for the benchmark job.'), - benchmark_params: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Additional parameters specific to the benchmark.'), - }) - .describe( - "Input for an offline system benchmark evaluation job.\n\nEvaluates the benchmark's standard dataset against all pre-defined metrics in the benchmark." - ), - zod - .object({ - benchmark: zod - .string() - .regex(evaluationListBenchmarkJobsResponseDataItemSpecFiveBenchmarkOneRegExp) - .describe( - "Reference to a benchmark in the Benchmarks API.\n\nA reference is a string with format 'workspace\/benchmark-name' that points to a\npersisted benchmark entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ) - .describe('Reference to the benchmark for evaluation (format: workspace\/name).'), - model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListBenchmarkJobsResponseDataItemSpecFiveModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListBenchmarkJobsResponseDataItemSpecFiveModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationListBenchmarkJobsResponseDataItemSpecFiveModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The model to evaluate.'), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default( - evaluationListBenchmarkJobsResponseDataItemSpecFiveParamsOneParallelismDefault - ) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - ignore_request_failure: zod - .boolean() - .default( - evaluationListBenchmarkJobsResponseDataItemSpecFiveParamsOneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - request_timeout: zod - .number() - .optional() - .describe('The timeout to be used for requests made to the model.'), - max_retries: zod - .number() - .min(evaluationListBenchmarkJobsResponseDataItemSpecFiveParamsOneMaxRetriesMin) - .default( - evaluationListBenchmarkJobsResponseDataItemSpecFiveParamsOneMaxRetriesDefault - ) - .describe('Maximum number of retries for failed requests.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListBenchmarkJobsResponseDataItemSpecFiveParamsOneInferenceOneTemperatureMin - ) - .max( - evaluationListBenchmarkJobsResponseDataItemSpecFiveParamsOneInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListBenchmarkJobsResponseDataItemSpecFiveParamsOneInferenceOneTopPMin - ) - .max( - evaluationListBenchmarkJobsResponseDataItemSpecFiveParamsOneInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe("Custom settings that control the model's text generation behavior."), - system_prompt: zod - .string() - .optional() - .describe( - "Initial instructions that define the model's role and behavior for the conversation." - ), - reasoning: zod - .object({ - end_token: zod - .string() - .optional() - .describe( - "Configure the end token to trim reasoning context based on the model's reasoning API. Example for Nemotron models: '<\/think>'" - ), - include_if_not_finished: zod - .boolean() - .optional() - .describe( - 'Configure whether to include reasoning context if the model has not finished reasoning.' - ), - effort: zod - .string() - .optional() - .describe( - 'Option for OpenAI models to specify low, medium, or high reasoning effort.' - ), - }) - .describe("Custom settings that control the model's reasoning behavior.") - .optional() - .describe("Custom settings that control the model's reasoning behavior."), - structured_output: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('JSON schema to apply structured output for the model.'), - }) - .describe('Job parameters for model online evaluation.') - .optional() - .describe('Execution parameters for the benchmark job.'), - benchmark_params: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Additional parameters specific to the benchmark.'), - }) - .describe( - "Input for an online system benchmark evaluation job.\n\nEvaluates the benchmark's standard dataset against all pre-defined metrics in the benchmark." - ), - ]), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .optional() - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ), - status_details: zod.record(zod.string(), zod.unknown()).optional(), - error_details: zod.record(zod.string(), zod.unknown()).optional(), - ownership: zod.record(zod.string(), zod.unknown()).optional(), - custom_fields: zod.record(zod.string(), zod.unknown()).optional(), - }) - ), - pagination: zod - .object({ - page: zod.number().describe('The current page number.'), - page_size: zod.number().describe('The page size used for the query.'), - current_page_size: zod.number().describe('The size for the current page.'), - total_pages: zod.number().describe('The total number of pages.'), - total_results: zod.number().describe('The total number of results.'), - }) - .optional() - .describe('Pagination information.'), - sort: zod.string().optional().describe('The field on which the results are sorted.'), - filter: zod.record(zod.string(), zod.unknown()).optional().describe('Filtering information.'), -}); - -/** - * @summary Download Job Result Aggregate-Scores - */ -export const EvaluationDownloadBenchmarkJobResultAggregateScoresParams = zod.object({ - workspace: zod.string(), - job: zod.string(), -}); - -export const evaluationDownloadBenchmarkJobResultAggregateScoresResponseResultsItemScoresItemOneScoreTypeDefault = `range`; -export const evaluationDownloadBenchmarkJobResultAggregateScoresResponseResultsItemScoresItemTwoScoreTypeDefault = `rubric`; -export const evaluationDownloadBenchmarkJobResultAggregateScoresResponseResultsItemScoresItemTwoRubricDistributionItemCountDefault = 0; -export const evaluationDownloadBenchmarkJobResultAggregateScoresResponseResultsItemMetricOneRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); - -export const EvaluationDownloadBenchmarkJobResultAggregateScoresResponse = zod - .object({ - results: zod - .array( - zod - .object({ - scores: zod - .array( - zod.union([ - zod - .object({ - name: zod.string().describe('Name of the score.'), - count: zod.number().describe('Number of samples evaluated (excluding NaN).'), - nan_count: zod - .number() - .describe('Number of samples that produced NaN scores.'), - sum: zod.number().optional().describe('Sum of all score values.'), - mean: zod.number().optional().describe('Mean score value.'), - min: zod.number().optional().describe('Minimum score value.'), - max: zod.number().optional().describe('Maximum score value.'), - std_dev: zod - .number() - .optional() - .describe('Standard deviation of the scores.'), - variance: zod.number().optional().describe('Variance of the scores.'), - score_type: zod - .literal('range') - .default( - evaluationDownloadBenchmarkJobResultAggregateScoresResponseResultsItemScoresItemOneScoreTypeDefault - ) - .describe('Type of score.'), - percentiles: zod - .object({ - p10: zod.union([zod.number(), zod.number()]).describe('10th percentile.'), - p20: zod.union([zod.number(), zod.number()]).describe('20th percentile.'), - p30: zod.union([zod.number(), zod.number()]).describe('30th percentile.'), - p40: zod.union([zod.number(), zod.number()]).describe('40th percentile.'), - p50: zod - .union([zod.number(), zod.number()]) - .describe('50th percentile (median).'), - p60: zod.union([zod.number(), zod.number()]).describe('60th percentile.'), - p70: zod.union([zod.number(), zod.number()]).describe('70th percentile.'), - p80: zod.union([zod.number(), zod.number()]).describe('80th percentile.'), - p90: zod.union([zod.number(), zod.number()]).describe('90th percentile.'), - p100: zod - .union([zod.number(), zod.number()]) - .describe('100th percentile.'), - }) - .describe('Percentile distribution of scores.') - .optional() - .describe('Percentile distribution of scores.'), - histogram: zod - .object({ - bins: zod - .array( - zod - .object({ - lower_bound: zod - .union([zod.number(), zod.number()]) - .describe('Lower bound of the bin (inclusive).'), - upper_bound: zod - .union([zod.number(), zod.number()]) - .describe( - 'Upper bound of the bin (exclusive for all but last bin).' - ), - count: zod.number().describe('Number of values in this bin.'), - }) - .describe('A single bin in a histogram.') - ) - .describe('Histogram bins.'), - }) - .describe('Histogram of score distribution.') - .optional() - .describe('Histogram of score distribution.'), - }) - .describe( - 'Aggregated statistics for a range-type score with percentiles and histogram.' - ), - zod - .object({ - name: zod.string().describe('Name of the score.'), - count: zod.number().describe('Number of samples evaluated (excluding NaN).'), - nan_count: zod - .number() - .describe('Number of samples that produced NaN scores.'), - sum: zod.number().optional().describe('Sum of all score values.'), - mean: zod.number().optional().describe('Mean score value.'), - min: zod.number().optional().describe('Minimum score value.'), - max: zod.number().optional().describe('Maximum score value.'), - std_dev: zod - .number() - .optional() - .describe('Standard deviation of the scores.'), - variance: zod.number().optional().describe('Variance of the scores.'), - score_type: zod - .literal('rubric') - .default( - evaluationDownloadBenchmarkJobResultAggregateScoresResponseResultsItemScoresItemTwoScoreTypeDefault - ) - .describe('Type of score.'), - rubric_distribution: zod - .array( - zod - .object({ - label: zod - .string() - .describe( - 'The label to use for the level of the rubric grading criteria.' - ), - description: zod - .string() - .optional() - .describe( - 'Describe the semantic meaning of each criteria for the given rubric.' - ), - value: zod - .union([zod.number(), zod.number()]) - .describe('The score value to assign for the criteria.'), - count: zod - .number() - .default( - evaluationDownloadBenchmarkJobResultAggregateScoresResponseResultsItemScoresItemTwoRubricDistributionItemCountDefault - ) - .describe('The number of samples evaluated with the rubric level.'), - }) - .describe('Rubric score with count statistics.') - ) - .describe('Distribution of rubric categories.'), - mode_category: zod - .string() - .optional() - .describe('Most frequent rubric category.'), - }) - .describe( - 'Aggregated statistics for a rubric-type score with category distribution.' - ), - ]) - ) - .describe('The list of aggregated scores.'), - metric: zod - .string() - .regex( - evaluationDownloadBenchmarkJobResultAggregateScoresResponseResultsItemMetricOneRegExp - ) - .describe( - "Reference to a metric in the Metrics API.\n\nA reference is a string with format 'workspace\/metric-name' that points to a\npersisted metric entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ) - .optional() - .describe('The metric used for the evaluation job to generate the result.'), - }) - .describe('Aggregated results for a single metric within a benchmark.') - ) - .describe('Results for each metric in the benchmark.'), - }) - .describe('Aggregated results for a benchmark evaluation.'); - -/** - * @summary Download Job Result Artifacts - */ -export const EvaluationDownloadBenchmarkJobResultArtifactsParams = zod.object({ - workspace: zod.string(), - job: zod.string(), -}); - -/** - * @summary Download Job Result Row-Scores - */ -export const EvaluationDownloadBenchmarkJobResultRowScoresParams = zod.object({ - workspace: zod.string(), - job: zod.string(), -}); - -export const EvaluationDownloadBenchmarkJobResultRowScoresQueryParams = zod.object({ - limit: zod.number().optional(), -}); - -/** - * @summary Get Job Result - */ -export const EvaluationGetBenchmarkJobsResultsParams = zod.object({ - workspace: zod.string(), - job: zod.string(), - name: zod.string(), -}); - -export const EvaluationGetBenchmarkJobsResultsResponse = zod.object({ - name: zod.string(), - job: zod.string(), - workspace: zod.string(), - project: zod.string().optional(), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - artifact_url: zod.string(), - artifact_storage_type: zod.enum(['fileset']), - download_url: zod.string().optional(), -}); - -/** - * @summary Download Job Result - */ -export const EvaluationDownloadBenchmarkJobResultParams = zod.object({ - workspace: zod.string(), - job: zod.string(), - name: zod.string(), -}); - -/** - * @summary Get Job - */ -export const EvaluationGetBenchmarkJobParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const evaluationGetBenchmarkJobResponseSpecOneBenchmarkOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetBenchmarkJobResponseSpecOneParamsOneParallelismDefault = 8; - -export const evaluationGetBenchmarkJobResponseSpecTwoBenchmarkOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetBenchmarkJobResponseSpecTwoModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetBenchmarkJobResponseSpecTwoModelOneFormatDefault = `nim`; -export const evaluationGetBenchmarkJobResponseSpecTwoModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetBenchmarkJobResponseSpecTwoParamsOneParallelismDefault = 8; - -export const evaluationGetBenchmarkJobResponseSpecTwoParamsOneIgnoreRequestFailureDefault = false; -export const evaluationGetBenchmarkJobResponseSpecTwoParamsOneMaxRetriesDefault = 3; -export const evaluationGetBenchmarkJobResponseSpecTwoParamsOneMaxRetriesMin = 0; - -export const evaluationGetBenchmarkJobResponseSpecTwoParamsOneInferenceOneTemperatureMin = 0; -export const evaluationGetBenchmarkJobResponseSpecTwoParamsOneInferenceOneTemperatureMax = 2; - -export const evaluationGetBenchmarkJobResponseSpecTwoParamsOneInferenceOneTopPMin = 0; -export const evaluationGetBenchmarkJobResponseSpecTwoParamsOneInferenceOneTopPMax = 1; - -export const evaluationGetBenchmarkJobResponseSpecThreeBenchmarkOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetBenchmarkJobResponseSpecThreeAgentOneFormatDefault = `generic`; -export const evaluationGetBenchmarkJobResponseSpecThreeAgentOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetBenchmarkJobResponseSpecThreeParamsOneParallelismDefault = 8; - -export const evaluationGetBenchmarkJobResponseSpecThreeParamsOneIgnoreRequestFailureDefault = false; -export const evaluationGetBenchmarkJobResponseSpecThreeParamsOneMaxRetriesDefault = 3; -export const evaluationGetBenchmarkJobResponseSpecThreeParamsOneMaxRetriesMin = 0; - -export const evaluationGetBenchmarkJobResponseSpecFourBenchmarkOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetBenchmarkJobResponseSpecFourParamsOneParallelismDefault = 8; - -export const evaluationGetBenchmarkJobResponseSpecFiveBenchmarkOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetBenchmarkJobResponseSpecFiveModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetBenchmarkJobResponseSpecFiveModelOneFormatDefault = `nim`; -export const evaluationGetBenchmarkJobResponseSpecFiveModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetBenchmarkJobResponseSpecFiveParamsOneParallelismDefault = 8; - -export const evaluationGetBenchmarkJobResponseSpecFiveParamsOneIgnoreRequestFailureDefault = false; -export const evaluationGetBenchmarkJobResponseSpecFiveParamsOneMaxRetriesDefault = 3; -export const evaluationGetBenchmarkJobResponseSpecFiveParamsOneMaxRetriesMin = 0; - -export const evaluationGetBenchmarkJobResponseSpecFiveParamsOneInferenceOneTemperatureMin = 0; -export const evaluationGetBenchmarkJobResponseSpecFiveParamsOneInferenceOneTemperatureMax = 2; - -export const evaluationGetBenchmarkJobResponseSpecFiveParamsOneInferenceOneTopPMin = 0; -export const evaluationGetBenchmarkJobResponseSpecFiveParamsOneInferenceOneTopPMax = 1; - -export const EvaluationGetBenchmarkJobResponse = zod.object({ - id: zod.string().optional(), - name: zod.string(), - description: zod.string().optional(), - project: zod.string().optional(), - workspace: zod.string().optional(), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - spec: zod.union([ - zod - .object({ - benchmark: zod - .string() - .regex(evaluationGetBenchmarkJobResponseSpecOneBenchmarkOneRegExp) - .describe( - "Reference to a benchmark in the Benchmarks API.\n\nA reference is a string with format 'workspace\/benchmark-name' that points to a\npersisted benchmark entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ) - .describe('Reference to the benchmark for evaluation (format: workspace\/name).'), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default(evaluationGetBenchmarkJobResponseSpecOneParamsOneParallelismDefault) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - }) - .describe('Job parameters.') - .optional() - .describe('Execution parameters for the benchmark job.'), - }) - .describe( - "Input for an offline benchmark evaluation job.\n\nEvaluates the benchmark's dataset against all metrics in the benchmark." - ), - zod - .object({ - benchmark: zod - .string() - .regex(evaluationGetBenchmarkJobResponseSpecTwoBenchmarkOneRegExp) - .describe( - "Reference to a benchmark in the Benchmarks API.\n\nA reference is a string with format 'workspace\/benchmark-name' that points to a\npersisted benchmark entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ) - .describe('Reference to the benchmark for evaluation (format: workspace\/name).'), - model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationGetBenchmarkJobResponseSpecTwoModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationGetBenchmarkJobResponseSpecTwoModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetBenchmarkJobResponseSpecTwoModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The model to evaluate.'), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default(evaluationGetBenchmarkJobResponseSpecTwoParamsOneParallelismDefault) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - ignore_request_failure: zod - .boolean() - .default(evaluationGetBenchmarkJobResponseSpecTwoParamsOneIgnoreRequestFailureDefault) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - request_timeout: zod - .number() - .optional() - .describe('The timeout to be used for requests made to the model.'), - max_retries: zod - .number() - .min(evaluationGetBenchmarkJobResponseSpecTwoParamsOneMaxRetriesMin) - .default(evaluationGetBenchmarkJobResponseSpecTwoParamsOneMaxRetriesDefault) - .describe('Maximum number of retries for failed requests.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationGetBenchmarkJobResponseSpecTwoParamsOneInferenceOneTemperatureMin) - .max(evaluationGetBenchmarkJobResponseSpecTwoParamsOneInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetBenchmarkJobResponseSpecTwoParamsOneInferenceOneTopPMin) - .max(evaluationGetBenchmarkJobResponseSpecTwoParamsOneInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe("Custom settings that control the model's text generation behavior."), - system_prompt: zod - .string() - .optional() - .describe( - "Initial instructions that define the model's role and behavior for the conversation." - ), - reasoning: zod - .object({ - end_token: zod - .string() - .optional() - .describe( - "Configure the end token to trim reasoning context based on the model's reasoning API. Example for Nemotron models: '<\/think>'" - ), - include_if_not_finished: zod - .boolean() - .optional() - .describe( - 'Configure whether to include reasoning context if the model has not finished reasoning.' - ), - effort: zod - .string() - .optional() - .describe( - 'Option for OpenAI models to specify low, medium, or high reasoning effort.' - ), - }) - .describe("Custom settings that control the model's reasoning behavior.") - .optional() - .describe("Custom settings that control the model's reasoning behavior."), - structured_output: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('JSON schema to apply structured output for the model.'), - }) - .describe('Job parameters for model online evaluation.') - .optional() - .describe('Execution parameters for the benchmark job.'), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .describe( - 'The jinja template to prompt the model for evaluation. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{input}}, {{output}}, {{context}}, {{reference}} to reference input columns.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - 'Prompt template fields that should remain available to the prompt template but not be required by dataset schema validation.' - ), - }) - .describe( - "Input for an online benchmark evaluation job.\n\nEvaluates a model by prompting it with the benchmark's dataset and then evaluating\nthe responses against all metrics in the benchmark." - ), - zod - .object({ - benchmark: zod - .string() - .regex(evaluationGetBenchmarkJobResponseSpecThreeBenchmarkOneRegExp) - .describe( - "Reference to a benchmark in the Benchmarks API.\n\nA reference is a string with format 'workspace\/benchmark-name' that points to a\npersisted benchmark entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ) - .describe('Reference to the benchmark for evaluation (format: workspace\/name).'), - agent: zod - .object({ - url: zod.string().describe('Base URL of the agent endpoint.'), - name: zod.string().describe('Agent name \/ identifier.'), - format: zod - .enum(['generic', 'nemo_agent_toolkit']) - .default(evaluationGetBenchmarkJobResponseSpecThreeAgentOneFormatDefault) - .describe('Agent format that determines the execution path.'), - api_key_secret: zod - .string() - .regex(evaluationGetBenchmarkJobResponseSpecThreeAgentOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the agent. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - body: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Jinja template for the request payload. Required for generic agents.'), - response_path: zod - .string() - .optional() - .describe( - "JSONPath expression to extract the response text from the agent's response body. Required for generic agents." - ), - trajectory_path: zod - .string() - .optional() - .describe( - "JSONPath expression to extract the trajectory from the agent's response body. Optional." - ), - }) - .describe( - 'Agent definition for inference in online evaluation jobs.\n\nAn agent is an endpoint that accepts a request and returns a response,\npotentially with a trajectory. Two formats are supported:\n\n- ``generic``: configurable HTTP POST with Jinja-templated body and\n JSONPath extraction for response and trajectory.\n- ``nemo_agent_toolkit``: NeMo Agent Toolkit SSE streaming protocol\n (``\/generate\/full?filter_steps=none``).' - ) - .describe('The agent to evaluate.'), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default(evaluationGetBenchmarkJobResponseSpecThreeParamsOneParallelismDefault) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetBenchmarkJobResponseSpecThreeParamsOneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - request_timeout: zod - .number() - .optional() - .describe('The timeout to be used for requests made to the model.'), - max_retries: zod - .number() - .min(evaluationGetBenchmarkJobResponseSpecThreeParamsOneMaxRetriesMin) - .default(evaluationGetBenchmarkJobResponseSpecThreeParamsOneMaxRetriesDefault) - .describe('Maximum number of retries for failed requests.'), - }) - .describe('Job parameters for online evaluation.') - .optional() - .describe('Execution parameters for the benchmark job.'), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .describe( - 'The jinja template to prompt the agent for evaluation. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{input}}, {{output}}, {{context}}, {{reference}} to reference input columns.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - 'Prompt template fields that should remain available to the prompt template but not be required by dataset schema validation.' - ), - }) - .describe( - "Input for an online benchmark evaluation job targeting an agent.\n\nEvaluates an agent by prompting it with the benchmark's dataset and then evaluating\nthe responses against all metrics in the benchmark." - ), - zod - .object({ - benchmark: zod - .string() - .regex(evaluationGetBenchmarkJobResponseSpecFourBenchmarkOneRegExp) - .describe( - "Reference to a benchmark in the Benchmarks API.\n\nA reference is a string with format 'workspace\/benchmark-name' that points to a\npersisted benchmark entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ) - .describe('Reference to the benchmark for evaluation (format: workspace\/name).'), - dataset: zod - .string() - .describe( - "Reference to a Fileset in the Files API.\n\nA reference is a string with format 'workspace\/fileset-name' that points to a\npersisted fileset entity. When used as a dataset source, all files within the\nfileset will be downloaded to the job container.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform." - ) - .describe( - 'Reference to a Fileset in the Files API (format: workspace\/fileset-name). The fileset contains the pre-generated outputs to evaluate this benchmark on.' - ), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default(evaluationGetBenchmarkJobResponseSpecFourParamsOneParallelismDefault) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - }) - .describe('Job parameters.') - .optional() - .describe('Execution parameters for the benchmark job.'), - benchmark_params: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Additional parameters specific to the benchmark.'), - }) - .describe( - "Input for an offline system benchmark evaluation job.\n\nEvaluates the benchmark's standard dataset against all pre-defined metrics in the benchmark." - ), - zod - .object({ - benchmark: zod - .string() - .regex(evaluationGetBenchmarkJobResponseSpecFiveBenchmarkOneRegExp) - .describe( - "Reference to a benchmark in the Benchmarks API.\n\nA reference is a string with format 'workspace\/benchmark-name' that points to a\npersisted benchmark entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ) - .describe('Reference to the benchmark for evaluation (format: workspace\/name).'), - model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationGetBenchmarkJobResponseSpecFiveModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationGetBenchmarkJobResponseSpecFiveModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetBenchmarkJobResponseSpecFiveModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The model to evaluate.'), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default(evaluationGetBenchmarkJobResponseSpecFiveParamsOneParallelismDefault) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetBenchmarkJobResponseSpecFiveParamsOneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - request_timeout: zod - .number() - .optional() - .describe('The timeout to be used for requests made to the model.'), - max_retries: zod - .number() - .min(evaluationGetBenchmarkJobResponseSpecFiveParamsOneMaxRetriesMin) - .default(evaluationGetBenchmarkJobResponseSpecFiveParamsOneMaxRetriesDefault) - .describe('Maximum number of retries for failed requests.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationGetBenchmarkJobResponseSpecFiveParamsOneInferenceOneTemperatureMin) - .max(evaluationGetBenchmarkJobResponseSpecFiveParamsOneInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetBenchmarkJobResponseSpecFiveParamsOneInferenceOneTopPMin) - .max(evaluationGetBenchmarkJobResponseSpecFiveParamsOneInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe("Custom settings that control the model's text generation behavior."), - system_prompt: zod - .string() - .optional() - .describe( - "Initial instructions that define the model's role and behavior for the conversation." - ), - reasoning: zod - .object({ - end_token: zod - .string() - .optional() - .describe( - "Configure the end token to trim reasoning context based on the model's reasoning API. Example for Nemotron models: '<\/think>'" - ), - include_if_not_finished: zod - .boolean() - .optional() - .describe( - 'Configure whether to include reasoning context if the model has not finished reasoning.' - ), - effort: zod - .string() - .optional() - .describe( - 'Option for OpenAI models to specify low, medium, or high reasoning effort.' - ), - }) - .describe("Custom settings that control the model's reasoning behavior.") - .optional() - .describe("Custom settings that control the model's reasoning behavior."), - structured_output: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('JSON schema to apply structured output for the model.'), - }) - .describe('Job parameters for model online evaluation.') - .optional() - .describe('Execution parameters for the benchmark job.'), - benchmark_params: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Additional parameters specific to the benchmark.'), - }) - .describe( - "Input for an online system benchmark evaluation job.\n\nEvaluates the benchmark's standard dataset against all pre-defined metrics in the benchmark." - ), - ]), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .optional() - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ), - status_details: zod.record(zod.string(), zod.unknown()).optional(), - error_details: zod.record(zod.string(), zod.unknown()).optional(), - ownership: zod.record(zod.string(), zod.unknown()).optional(), - custom_fields: zod.record(zod.string(), zod.unknown()).optional(), -}); - -/** - * @summary Delete Job - */ -export const EvaluationDeleteBenchmarkJobParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -/** - * @summary Cancel Job - */ -export const EvaluationCancelBenchmarkJobParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const evaluationCancelBenchmarkJobResponseSpecOneBenchmarkOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCancelBenchmarkJobResponseSpecOneParamsOneParallelismDefault = 8; - -export const evaluationCancelBenchmarkJobResponseSpecTwoBenchmarkOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCancelBenchmarkJobResponseSpecTwoModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCancelBenchmarkJobResponseSpecTwoModelOneFormatDefault = `nim`; -export const evaluationCancelBenchmarkJobResponseSpecTwoModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCancelBenchmarkJobResponseSpecTwoParamsOneParallelismDefault = 8; - -export const evaluationCancelBenchmarkJobResponseSpecTwoParamsOneIgnoreRequestFailureDefault = false; -export const evaluationCancelBenchmarkJobResponseSpecTwoParamsOneMaxRetriesDefault = 3; -export const evaluationCancelBenchmarkJobResponseSpecTwoParamsOneMaxRetriesMin = 0; - -export const evaluationCancelBenchmarkJobResponseSpecTwoParamsOneInferenceOneTemperatureMin = 0; -export const evaluationCancelBenchmarkJobResponseSpecTwoParamsOneInferenceOneTemperatureMax = 2; - -export const evaluationCancelBenchmarkJobResponseSpecTwoParamsOneInferenceOneTopPMin = 0; -export const evaluationCancelBenchmarkJobResponseSpecTwoParamsOneInferenceOneTopPMax = 1; - -export const evaluationCancelBenchmarkJobResponseSpecThreeBenchmarkOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCancelBenchmarkJobResponseSpecThreeAgentOneFormatDefault = `generic`; -export const evaluationCancelBenchmarkJobResponseSpecThreeAgentOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelBenchmarkJobResponseSpecThreeParamsOneParallelismDefault = 8; - -export const evaluationCancelBenchmarkJobResponseSpecThreeParamsOneIgnoreRequestFailureDefault = false; -export const evaluationCancelBenchmarkJobResponseSpecThreeParamsOneMaxRetriesDefault = 3; -export const evaluationCancelBenchmarkJobResponseSpecThreeParamsOneMaxRetriesMin = 0; - -export const evaluationCancelBenchmarkJobResponseSpecFourBenchmarkOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCancelBenchmarkJobResponseSpecFourParamsOneParallelismDefault = 8; - -export const evaluationCancelBenchmarkJobResponseSpecFiveBenchmarkOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCancelBenchmarkJobResponseSpecFiveModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCancelBenchmarkJobResponseSpecFiveModelOneFormatDefault = `nim`; -export const evaluationCancelBenchmarkJobResponseSpecFiveModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCancelBenchmarkJobResponseSpecFiveParamsOneParallelismDefault = 8; - -export const evaluationCancelBenchmarkJobResponseSpecFiveParamsOneIgnoreRequestFailureDefault = false; -export const evaluationCancelBenchmarkJobResponseSpecFiveParamsOneMaxRetriesDefault = 3; -export const evaluationCancelBenchmarkJobResponseSpecFiveParamsOneMaxRetriesMin = 0; - -export const evaluationCancelBenchmarkJobResponseSpecFiveParamsOneInferenceOneTemperatureMin = 0; -export const evaluationCancelBenchmarkJobResponseSpecFiveParamsOneInferenceOneTemperatureMax = 2; - -export const evaluationCancelBenchmarkJobResponseSpecFiveParamsOneInferenceOneTopPMin = 0; -export const evaluationCancelBenchmarkJobResponseSpecFiveParamsOneInferenceOneTopPMax = 1; - -export const EvaluationCancelBenchmarkJobResponse = zod.object({ - id: zod.string().optional(), - name: zod.string(), - description: zod.string().optional(), - project: zod.string().optional(), - workspace: zod.string().optional(), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - spec: zod.union([ - zod - .object({ - benchmark: zod - .string() - .regex(evaluationCancelBenchmarkJobResponseSpecOneBenchmarkOneRegExp) - .describe( - "Reference to a benchmark in the Benchmarks API.\n\nA reference is a string with format 'workspace\/benchmark-name' that points to a\npersisted benchmark entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ) - .describe('Reference to the benchmark for evaluation (format: workspace\/name).'), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default(evaluationCancelBenchmarkJobResponseSpecOneParamsOneParallelismDefault) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - }) - .describe('Job parameters.') - .optional() - .describe('Execution parameters for the benchmark job.'), - }) - .describe( - "Input for an offline benchmark evaluation job.\n\nEvaluates the benchmark's dataset against all metrics in the benchmark." - ), - zod - .object({ - benchmark: zod - .string() - .regex(evaluationCancelBenchmarkJobResponseSpecTwoBenchmarkOneRegExp) - .describe( - "Reference to a benchmark in the Benchmarks API.\n\nA reference is a string with format 'workspace\/benchmark-name' that points to a\npersisted benchmark entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ) - .describe('Reference to the benchmark for evaluation (format: workspace\/name).'), - model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationCancelBenchmarkJobResponseSpecTwoModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationCancelBenchmarkJobResponseSpecTwoModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCancelBenchmarkJobResponseSpecTwoModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The model to evaluate.'), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default(evaluationCancelBenchmarkJobResponseSpecTwoParamsOneParallelismDefault) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelBenchmarkJobResponseSpecTwoParamsOneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - request_timeout: zod - .number() - .optional() - .describe('The timeout to be used for requests made to the model.'), - max_retries: zod - .number() - .min(evaluationCancelBenchmarkJobResponseSpecTwoParamsOneMaxRetriesMin) - .default(evaluationCancelBenchmarkJobResponseSpecTwoParamsOneMaxRetriesDefault) - .describe('Maximum number of retries for failed requests.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelBenchmarkJobResponseSpecTwoParamsOneInferenceOneTemperatureMin - ) - .max( - evaluationCancelBenchmarkJobResponseSpecTwoParamsOneInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCancelBenchmarkJobResponseSpecTwoParamsOneInferenceOneTopPMin) - .max(evaluationCancelBenchmarkJobResponseSpecTwoParamsOneInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe("Custom settings that control the model's text generation behavior."), - system_prompt: zod - .string() - .optional() - .describe( - "Initial instructions that define the model's role and behavior for the conversation." - ), - reasoning: zod - .object({ - end_token: zod - .string() - .optional() - .describe( - "Configure the end token to trim reasoning context based on the model's reasoning API. Example for Nemotron models: '<\/think>'" - ), - include_if_not_finished: zod - .boolean() - .optional() - .describe( - 'Configure whether to include reasoning context if the model has not finished reasoning.' - ), - effort: zod - .string() - .optional() - .describe( - 'Option for OpenAI models to specify low, medium, or high reasoning effort.' - ), - }) - .describe("Custom settings that control the model's reasoning behavior.") - .optional() - .describe("Custom settings that control the model's reasoning behavior."), - structured_output: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('JSON schema to apply structured output for the model.'), - }) - .describe('Job parameters for model online evaluation.') - .optional() - .describe('Execution parameters for the benchmark job.'), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .describe( - 'The jinja template to prompt the model for evaluation. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{input}}, {{output}}, {{context}}, {{reference}} to reference input columns.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - 'Prompt template fields that should remain available to the prompt template but not be required by dataset schema validation.' - ), - }) - .describe( - "Input for an online benchmark evaluation job.\n\nEvaluates a model by prompting it with the benchmark's dataset and then evaluating\nthe responses against all metrics in the benchmark." - ), - zod - .object({ - benchmark: zod - .string() - .regex(evaluationCancelBenchmarkJobResponseSpecThreeBenchmarkOneRegExp) - .describe( - "Reference to a benchmark in the Benchmarks API.\n\nA reference is a string with format 'workspace\/benchmark-name' that points to a\npersisted benchmark entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ) - .describe('Reference to the benchmark for evaluation (format: workspace\/name).'), - agent: zod - .object({ - url: zod.string().describe('Base URL of the agent endpoint.'), - name: zod.string().describe('Agent name \/ identifier.'), - format: zod - .enum(['generic', 'nemo_agent_toolkit']) - .default(evaluationCancelBenchmarkJobResponseSpecThreeAgentOneFormatDefault) - .describe('Agent format that determines the execution path.'), - api_key_secret: zod - .string() - .regex(evaluationCancelBenchmarkJobResponseSpecThreeAgentOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the agent. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - body: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Jinja template for the request payload. Required for generic agents.'), - response_path: zod - .string() - .optional() - .describe( - "JSONPath expression to extract the response text from the agent's response body. Required for generic agents." - ), - trajectory_path: zod - .string() - .optional() - .describe( - "JSONPath expression to extract the trajectory from the agent's response body. Optional." - ), - }) - .describe( - 'Agent definition for inference in online evaluation jobs.\n\nAn agent is an endpoint that accepts a request and returns a response,\npotentially with a trajectory. Two formats are supported:\n\n- ``generic``: configurable HTTP POST with Jinja-templated body and\n JSONPath extraction for response and trajectory.\n- ``nemo_agent_toolkit``: NeMo Agent Toolkit SSE streaming protocol\n (``\/generate\/full?filter_steps=none``).' - ) - .describe('The agent to evaluate.'), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default(evaluationCancelBenchmarkJobResponseSpecThreeParamsOneParallelismDefault) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelBenchmarkJobResponseSpecThreeParamsOneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - request_timeout: zod - .number() - .optional() - .describe('The timeout to be used for requests made to the model.'), - max_retries: zod - .number() - .min(evaluationCancelBenchmarkJobResponseSpecThreeParamsOneMaxRetriesMin) - .default(evaluationCancelBenchmarkJobResponseSpecThreeParamsOneMaxRetriesDefault) - .describe('Maximum number of retries for failed requests.'), - }) - .describe('Job parameters for online evaluation.') - .optional() - .describe('Execution parameters for the benchmark job.'), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .describe( - 'The jinja template to prompt the agent for evaluation. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{input}}, {{output}}, {{context}}, {{reference}} to reference input columns.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - 'Prompt template fields that should remain available to the prompt template but not be required by dataset schema validation.' - ), - }) - .describe( - "Input for an online benchmark evaluation job targeting an agent.\n\nEvaluates an agent by prompting it with the benchmark's dataset and then evaluating\nthe responses against all metrics in the benchmark." - ), - zod - .object({ - benchmark: zod - .string() - .regex(evaluationCancelBenchmarkJobResponseSpecFourBenchmarkOneRegExp) - .describe( - "Reference to a benchmark in the Benchmarks API.\n\nA reference is a string with format 'workspace\/benchmark-name' that points to a\npersisted benchmark entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ) - .describe('Reference to the benchmark for evaluation (format: workspace\/name).'), - dataset: zod - .string() - .describe( - "Reference to a Fileset in the Files API.\n\nA reference is a string with format 'workspace\/fileset-name' that points to a\npersisted fileset entity. When used as a dataset source, all files within the\nfileset will be downloaded to the job container.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform." - ) - .describe( - 'Reference to a Fileset in the Files API (format: workspace\/fileset-name). The fileset contains the pre-generated outputs to evaluate this benchmark on.' - ), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default(evaluationCancelBenchmarkJobResponseSpecFourParamsOneParallelismDefault) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - }) - .describe('Job parameters.') - .optional() - .describe('Execution parameters for the benchmark job.'), - benchmark_params: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Additional parameters specific to the benchmark.'), - }) - .describe( - "Input for an offline system benchmark evaluation job.\n\nEvaluates the benchmark's standard dataset against all pre-defined metrics in the benchmark." - ), - zod - .object({ - benchmark: zod - .string() - .regex(evaluationCancelBenchmarkJobResponseSpecFiveBenchmarkOneRegExp) - .describe( - "Reference to a benchmark in the Benchmarks API.\n\nA reference is a string with format 'workspace\/benchmark-name' that points to a\npersisted benchmark entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ) - .describe('Reference to the benchmark for evaluation (format: workspace\/name).'), - model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationCancelBenchmarkJobResponseSpecFiveModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationCancelBenchmarkJobResponseSpecFiveModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCancelBenchmarkJobResponseSpecFiveModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The model to evaluate.'), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default(evaluationCancelBenchmarkJobResponseSpecFiveParamsOneParallelismDefault) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelBenchmarkJobResponseSpecFiveParamsOneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - request_timeout: zod - .number() - .optional() - .describe('The timeout to be used for requests made to the model.'), - max_retries: zod - .number() - .min(evaluationCancelBenchmarkJobResponseSpecFiveParamsOneMaxRetriesMin) - .default(evaluationCancelBenchmarkJobResponseSpecFiveParamsOneMaxRetriesDefault) - .describe('Maximum number of retries for failed requests.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelBenchmarkJobResponseSpecFiveParamsOneInferenceOneTemperatureMin - ) - .max( - evaluationCancelBenchmarkJobResponseSpecFiveParamsOneInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCancelBenchmarkJobResponseSpecFiveParamsOneInferenceOneTopPMin) - .max(evaluationCancelBenchmarkJobResponseSpecFiveParamsOneInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe("Custom settings that control the model's text generation behavior."), - system_prompt: zod - .string() - .optional() - .describe( - "Initial instructions that define the model's role and behavior for the conversation." - ), - reasoning: zod - .object({ - end_token: zod - .string() - .optional() - .describe( - "Configure the end token to trim reasoning context based on the model's reasoning API. Example for Nemotron models: '<\/think>'" - ), - include_if_not_finished: zod - .boolean() - .optional() - .describe( - 'Configure whether to include reasoning context if the model has not finished reasoning.' - ), - effort: zod - .string() - .optional() - .describe( - 'Option for OpenAI models to specify low, medium, or high reasoning effort.' - ), - }) - .describe("Custom settings that control the model's reasoning behavior.") - .optional() - .describe("Custom settings that control the model's reasoning behavior."), - structured_output: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('JSON schema to apply structured output for the model.'), - }) - .describe('Job parameters for model online evaluation.') - .optional() - .describe('Execution parameters for the benchmark job.'), - benchmark_params: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Additional parameters specific to the benchmark.'), - }) - .describe( - "Input for an online system benchmark evaluation job.\n\nEvaluates the benchmark's standard dataset against all pre-defined metrics in the benchmark." - ), - ]), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .optional() - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ), - status_details: zod.record(zod.string(), zod.unknown()).optional(), - error_details: zod.record(zod.string(), zod.unknown()).optional(), - ownership: zod.record(zod.string(), zod.unknown()).optional(), - custom_fields: zod.record(zod.string(), zod.unknown()).optional(), -}); - -/** - * @summary Get Job Logs - */ -export const EvaluationGetBenchmarkJobLogsParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const EvaluationGetBenchmarkJobLogsQueryParams = zod.object({ - limit: zod.number().optional(), - page_cursor: zod.string().optional(), -}); - -export const EvaluationGetBenchmarkJobLogsResponse = zod.object({ - data: zod.array( - zod.object({ - timestamp: zod.string().datetime({}), - job: zod.string(), - job_step: zod.string(), - job_task: zod.string(), - message: zod.string(), - }) - ), - total: zod.number(), - next_page: zod.string(), - prev_page: zod.string(), -}); - -/** - * @summary List Job Results - */ -export const EvaluationListBenchmarkJobsResultsParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const EvaluationListBenchmarkJobsResultsResponse = zod.object({ - data: zod.array( - zod.object({ - name: zod.string(), - job: zod.string(), - workspace: zod.string(), - project: zod.string().optional(), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - artifact_url: zod.string(), - artifact_storage_type: zod.enum(['fileset']), - download_url: zod.string().optional(), - }) - ), -}); - -/** - * @summary Get Job Status - */ -export const EvaluationGetBenchmarkJobStatusParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const EvaluationGetBenchmarkJobStatusResponse = zod.object({ - id: zod.string(), - name: zod.string(), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ), - status_details: zod.record(zod.string(), zod.unknown()), - error_details: zod.record(zod.string(), zod.unknown()), - steps: zod.array( - zod.object({ - id: zod.string(), - name: zod.string(), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ), - status_details: zod.record(zod.string(), zod.unknown()), - error_details: zod.record(zod.string(), zod.unknown()), - tasks: zod.array( - zod.object({ - id: zod.string(), - name: zod.string(), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ), - status_details: zod.record(zod.string(), zod.unknown()), - error_details: zod.record(zod.string(), zod.unknown()), - error_stack: zod.string(), - created_at: zod.string().datetime({}), - updated_at: zod.string().datetime({}), - }) - ), - created_at: zod.string().datetime({}), - updated_at: zod.string().datetime({}), - }) - ), - created_at: zod.string().datetime({}), - updated_at: zod.string().datetime({}), -}); - -/** - * List all available evaluation benchmarks. - * @summary List Benchmarks - */ -export const EvaluationListBenchmarksParams = zod.object({ - workspace: zod.string(), -}); - -export const evaluationListBenchmarksQueryExtendedResponseDefault = false; -export const evaluationListBenchmarksQueryPageDefault = 1; -export const evaluationListBenchmarksQueryPageSizeDefault = 100; -export const evaluationListBenchmarksQuerySortDefault = `-created_at`; - -export const EvaluationListBenchmarksQueryParams = zod.object({ - extended_response: zod - .boolean() - .default(evaluationListBenchmarksQueryExtendedResponseDefault) - .describe('Whether to return the extended benchmark.'), - page: zod.number().default(evaluationListBenchmarksQueryPageDefault).describe('Page number.'), - page_size: zod - .number() - .default(evaluationListBenchmarksQueryPageSizeDefault) - .describe('Page size.'), - sort: zod - .enum(['-created_at', 'created_at', '-updated_at', 'updated_at', '-name', 'name']) - .default(evaluationListBenchmarksQuerySortDefault) - .describe( - 'The field to sort by. To sort in decreasing order, use `-` in front of the field name.' - ), - filter: zod - .object({ - name: zod.string().optional().describe('Filter benchmarks by name.'), - description: zod.string().optional().describe('Filter benchmarks by description.'), - dataset: zod - .string() - .describe( - "Reference to a Fileset in the Files API.\n\nA reference is a string with format 'workspace\/fileset-name' that points to a\npersisted fileset entity. When used as a dataset source, all files within the\nfileset will be downloaded to the job container.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform." - ) - .optional() - .describe( - 'Filter custom benchmarks by dataset used for evaluation (format workspace\/fileset-name).' - ), - project: zod.string().optional().describe('Filter benchmarks by project name.'), - created_at: zod - .object({ - $gte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results greater than or equal to this datetime.'), - $lte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results less than or equal to this datetime.'), - }) - .optional() - .describe('Filter benchmarks by creation date range.'), - updated_at: zod - .object({ - $gte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results greater than or equal to this datetime.'), - $lte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results less than or equal to this datetime.'), - }) - .optional() - .describe('Filter benchmarks by last update date range.'), - }) - .optional() - .describe( - 'Filter benchmarks by name, description, dataset, project, and dates. Supports JSON filter syntax with operators: $eq, $like, $lt, $lte, $gt, $gte, $in, $nin, $and, $or, $not. Also supports text filter syntax.' - ), -}); - -export const evaluationListBenchmarksResponseDataItemOneWorkspaceRegExp = new RegExp( - '^[\\w\\-\\+.@:]+$' -); -export const evaluationListBenchmarksResponseDataItemOneMetricsItemRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); - -export const evaluationListBenchmarksResponseDataItemOneFieldMappingOneInputRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationListBenchmarksResponseDataItemOneFieldMappingOneOutputRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationListBenchmarksResponseDataItemOneFieldMappingOneContextRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationListBenchmarksResponseDataItemOneFieldMappingOneReferenceRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationListBenchmarksResponseDataItemOneFieldMappingOneTrajectoryRegExp = - new RegExp('^[^\\[\\]]\*$'); - -export const evaluationListBenchmarksResponseDataItemOneFieldMappingOneMessagesRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationListBenchmarksResponseDataItemOneFieldMappingOneToolCallsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationListBenchmarksResponseDataItemOneFieldMappingOneToolsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationListBenchmarksResponseDataItemOneFieldMappingOneCustomRegExpOne = new RegExp( - '^[^\\[\\]]\*$' -); -export const evaluationListBenchmarksResponseDataItemTwoWorkspaceRegExp = new RegExp( - '^[\\w\\-\\+.@:]+$' -); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOneNameDefault = ``; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOneWorkspaceRegExp = new RegExp( - '^[\\w\\-\\+.@:]+$' -); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOneTypeDefault = `bleu`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwoNameDefault = ``; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwoWorkspaceRegExp = new RegExp( - '^[\\w\\-\\+.@:]+$' -); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwoTypeDefault = `exact-match`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemThreeNameDefault = ``; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemThreeWorkspaceRegExp = - new RegExp('^[\\w\\-\\+.@:]+$'); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemThreeTypeDefault = `f1`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemFourNameDefault = ``; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemFourWorkspaceRegExp = new RegExp( - '^[\\w\\-\\+.@:]+$' -); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemFourTypeDefault = `llm-judge`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemFourModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemFourModelOneFormatDefault = `nim`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemFourScoresItemOneNameRegExp = - new RegExp('^[a-z0-9_]+$'); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemFourScoresItemOneParserOneTypeDefault = `json`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemFourScoresItemOneParserTwoTypeDefault = `regex`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemFourScoresItemOneParserTwoMethodDefault = `match`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemFourScoresItemOneRubricMin = 2; - -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemFourScoresItemTwoNameRegExp = - new RegExp('^[a-z0-9_]+$'); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemFourScoresItemTwoParserOneTypeDefault = `json`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemFourScoresItemTwoParserTwoTypeDefault = `regex`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemFourScoresItemTwoParserTwoMethodDefault = `match`; - -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemFourInferenceOneTemperatureMin = 0; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemFourInferenceOneTemperatureMax = 2; - -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemFourInferenceOneTopPMin = 0; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemFourInferenceOneTopPMax = 1; - -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemFourIgnoreRequestFailureDefault = false; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemFiveNameDefault = ``; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemFiveWorkspaceRegExp = new RegExp( - '^[\\w\\-\\+.@:]+$' -); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemFiveTypeDefault = `number-check`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemSixNameDefault = ``; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemSixWorkspaceRegExp = new RegExp( - '^[\\w\\-\\+.@:]+$' -); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemSixTypeDefault = `remote`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemSixApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemSixTimeoutSecondsDefault = 30; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemSixMaxRetriesDefault = 3; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemSixScoresItemNameRegExp = - new RegExp('^[a-z0-9_]+$'); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemSixScoresItemParserOneTypeDefault = `json`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemSevenNameDefault = ``; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemSevenWorkspaceRegExp = - new RegExp('^[\\w\\-\\+.@:]+$'); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemSevenTypeDefault = `nemo-agent-toolkit-remote`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemSevenApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemSevenTimeoutSecondsDefault = 30; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemSevenMaxRetriesDefault = 3; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemEightNameDefault = ``; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemEightWorkspaceRegExp = - new RegExp('^[\\w\\-\\+.@:]+$'); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemEightTypeDefault = `rouge`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemNineNameDefault = ``; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemNineWorkspaceRegExp = new RegExp( - '^[\\w\\-\\+.@:]+$' -); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemNineTypeDefault = `string-check`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnezeroNameDefault = ``; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnezeroWorkspaceRegExp = - new RegExp('^[\\w\\-\\+.@:]+$'); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnezeroTypeDefault = `tool-calling`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOneoneNameDefault = ``; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOneoneWorkspaceRegExp = - new RegExp('^[\\w\\-\\+.@:]+$'); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOneoneJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOneoneJudgeModelOneFormatDefault = `nim`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOneoneInferenceOneTemperatureMin = 0; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOneoneInferenceOneTemperatureMax = 2; - -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOneoneInferenceOneTopPMin = 0; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOneoneInferenceOneTopPMax = 1; - -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOneoneIgnoreRequestFailureDefault = false; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOneoneTypeDefault = `topic_adherence`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOneoneMetricModeDefault = `f1`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnetwoNameDefault = ``; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnetwoWorkspaceRegExp = - new RegExp('^[\\w\\-\\+.@:]+$'); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnetwoTypeDefault = `tool_call_accuracy`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnethreeNameDefault = ``; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnethreeWorkspaceRegExp = - new RegExp('^[\\w\\-\\+.@:]+$'); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnethreeJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnethreeJudgeModelOneFormatDefault = `nim`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnethreeInferenceOneTemperatureMin = 0; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnethreeInferenceOneTemperatureMax = 2; - -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnethreeInferenceOneTopPMin = 0; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnethreeInferenceOneTopPMax = 1; - -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnethreeIgnoreRequestFailureDefault = false; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnethreeTypeDefault = `agent_goal_accuracy`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnethreeUseReferenceDefault = true; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefourNameDefault = ``; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefourWorkspaceRegExp = - new RegExp('^[\\w\\-\\+.@:]+$'); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefourJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefourJudgeModelOneFormatDefault = `nim`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefourInferenceOneTemperatureMin = 0; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefourInferenceOneTemperatureMax = 2; - -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefourInferenceOneTopPMin = 0; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefourInferenceOneTopPMax = 1; - -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefourIgnoreRequestFailureDefault = false; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefourTypeDefault = `answer_accuracy`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefiveNameDefault = ``; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefiveWorkspaceRegExp = - new RegExp('^[\\w\\-\\+.@:]+$'); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefiveJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefiveJudgeModelOneFormatDefault = `nim`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefiveInferenceOneTemperatureMin = 0; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefiveInferenceOneTemperatureMax = 2; - -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefiveInferenceOneTopPMin = 0; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefiveInferenceOneTopPMax = 1; - -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefiveIgnoreRequestFailureDefault = false; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefiveTypeDefault = `context_relevance`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesixNameDefault = ``; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesixWorkspaceRegExp = - new RegExp('^[\\w\\-\\+.@:]+$'); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesixJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesixJudgeModelOneFormatDefault = `nim`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesixInferenceOneTemperatureMin = 0; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesixInferenceOneTemperatureMax = 2; - -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesixInferenceOneTopPMin = 0; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesixInferenceOneTopPMax = 1; - -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesixIgnoreRequestFailureDefault = false; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesixTypeDefault = `response_groundedness`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesevenNameDefault = ``; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesevenWorkspaceRegExp = - new RegExp('^[\\w\\-\\+.@:]+$'); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesevenJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesevenJudgeModelOneFormatDefault = `nim`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesevenInferenceOneTemperatureMin = 0; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesevenInferenceOneTemperatureMax = 2; - -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesevenInferenceOneTopPMin = 0; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesevenInferenceOneTopPMax = 1; - -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesevenIgnoreRequestFailureDefault = false; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesevenTypeDefault = `context_recall`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOneeightNameDefault = ``; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOneeightWorkspaceRegExp = - new RegExp('^[\\w\\-\\+.@:]+$'); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOneeightJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOneeightJudgeModelOneFormatDefault = `nim`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOneeightInferenceOneTemperatureMin = 0; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOneeightInferenceOneTemperatureMax = 2; - -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOneeightInferenceOneTopPMin = 0; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOneeightInferenceOneTopPMax = 1; - -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOneeightIgnoreRequestFailureDefault = false; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOneeightTypeDefault = `context_precision`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnenineNameDefault = ``; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnenineWorkspaceRegExp = - new RegExp('^[\\w\\-\\+.@:]+$'); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnenineJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnenineJudgeModelOneFormatDefault = `nim`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnenineInferenceOneTemperatureMin = 0; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnenineInferenceOneTemperatureMax = 2; - -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnenineInferenceOneTopPMin = 0; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnenineInferenceOneTopPMax = 1; - -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnenineIgnoreRequestFailureDefault = false; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemOnenineTypeDefault = `context_entity_recall`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwozeroNameDefault = ``; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwozeroWorkspaceRegExp = - new RegExp('^[\\w\\-\\+.@:]+$'); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwozeroEmbeddingsModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwozeroEmbeddingsModelOneFormatDefault = `nim`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwozeroJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwozeroJudgeModelOneFormatDefault = `nim`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwozeroInferenceOneTemperatureMin = 0; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwozeroInferenceOneTemperatureMax = 2; - -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwozeroInferenceOneTopPMin = 0; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwozeroInferenceOneTopPMax = 1; - -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwozeroIgnoreRequestFailureDefault = false; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwozeroTypeDefault = `response_relevancy`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwozeroStrictnessDefault = 1; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwooneNameDefault = ``; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwooneWorkspaceRegExp = - new RegExp('^[\\w\\-\\+.@:]+$'); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwooneJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwooneJudgeModelOneFormatDefault = `nim`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwooneInferenceOneTemperatureMin = 0; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwooneInferenceOneTemperatureMax = 2; - -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwooneInferenceOneTopPMin = 0; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwooneInferenceOneTopPMax = 1; - -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwooneIgnoreRequestFailureDefault = false; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwooneTypeDefault = `faithfulness`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwotwoNameDefault = ``; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwotwoWorkspaceRegExp = - new RegExp('^[\\w\\-\\+.@:]+$'); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwotwoJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwotwoJudgeModelOneFormatDefault = `nim`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwotwoInferenceOneTemperatureMin = 0; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwotwoInferenceOneTemperatureMax = 2; - -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwotwoInferenceOneTopPMin = 0; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwotwoInferenceOneTopPMax = 1; - -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwotwoIgnoreRequestFailureDefault = false; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwotwoTypeDefault = `noise_sensitivity`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwothreeNameDefault = `Metric name`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwothreeWorkspaceDefault = `system`; -export const evaluationListBenchmarksResponseDataItemTwoMetricsItemTwothreeTypeDefault = `system`; -export const evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageOneReadChunkSizeDefault = 1048576; -export const evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageOneTypeDefault = `local`; -export const evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageOneWriteBufferSizeDefault = 16777216; -export const evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageTwoReadChunkSizeDefault = 1048576; -export const evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageTwoTypeDefault = `ngc`; -export const evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageTwoTargetTypeDefault = `resource`; -export const evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageTwoApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageTwoHostDefault = `https://api.ngc.nvidia.com`; -export const evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageThreeReadChunkSizeDefault = 1048576; -export const evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageThreeTypeDefault = `huggingface`; -export const evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageThreeRepoTypeDefault = `model`; -export const evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageThreeRevisionDefault = `main`; -export const evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageThreeTokenSecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageThreeEndpointDefault = `https://huggingface.co`; -export const evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageFourReadChunkSizeDefault = 1048576; -export const evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageFourTypeDefault = `s3`; -export const evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageFourPrefixDefault = ``; -export const evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageFourUseSdkAuthDefault = false; -export const evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageFourAccessKeyIdSecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageFourSecretAccessKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageFourSignatureVersionDefault = `s3v4`; - -export const evaluationListBenchmarksResponseDataItemTwoFieldMappingOneInputRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationListBenchmarksResponseDataItemTwoFieldMappingOneOutputRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationListBenchmarksResponseDataItemTwoFieldMappingOneContextRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationListBenchmarksResponseDataItemTwoFieldMappingOneReferenceRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationListBenchmarksResponseDataItemTwoFieldMappingOneTrajectoryRegExp = - new RegExp('^[^\\[\\]]\*$'); - -export const evaluationListBenchmarksResponseDataItemTwoFieldMappingOneMessagesRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationListBenchmarksResponseDataItemTwoFieldMappingOneToolCallsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationListBenchmarksResponseDataItemTwoFieldMappingOneToolsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationListBenchmarksResponseDataItemTwoFieldMappingOneCustomRegExpOne = new RegExp( - '^[^\\[\\]]\*$' -); -export const evaluationListBenchmarksResponseDataItemThreeWorkspaceDefault = `system`; - -export const EvaluationListBenchmarksResponse = zod.object({ - data: zod.array( - zod.union([ - zod - .object({ - name: zod.string().describe('Benchmark name'), - workspace: zod - .string() - .regex(evaluationListBenchmarksResponseDataItemOneWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - description: zod - .string() - .optional() - .describe('Human-readable description of the benchmark.'), - metrics: zod - .array( - zod - .string() - .regex(evaluationListBenchmarksResponseDataItemOneMetricsItemRegExp) - .describe( - "Reference to a metric in the Metrics API.\n\nA reference is a string with format 'workspace\/metric-name' that points to a\npersisted metric entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ) - ) - .describe('The metrics that comprise this benchmark (format: workspace\/metric_name).'), - dataset: zod - .string() - .describe( - "Reference to a Fileset in the Files API.\n\nA reference is a string with format 'workspace\/fileset-name' that points to a\npersisted fileset entity. When used as a dataset source, all files within the\nfileset will be downloaded to the job container.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform." - ) - .describe( - 'Reference to a Fileset in the Files API (format: workspace\/fileset-name). The fileset contains the test cases for this benchmark.' - ), - field_mapping: zod - .object({ - input: zod - .string() - .min(1) - .regex(evaluationListBenchmarksResponseDataItemOneFieldMappingOneInputRegExp) - .optional() - .describe("Binding for the canonical 'input' evaluator field."), - output: zod - .string() - .min(1) - .regex(evaluationListBenchmarksResponseDataItemOneFieldMappingOneOutputRegExp) - .optional() - .describe("Binding for the canonical 'output' evaluator field."), - context: zod - .string() - .min(1) - .regex(evaluationListBenchmarksResponseDataItemOneFieldMappingOneContextRegExp) - .optional() - .describe("Binding for the canonical 'context' evaluator field."), - reference: zod - .string() - .min(1) - .regex(evaluationListBenchmarksResponseDataItemOneFieldMappingOneReferenceRegExp) - .optional() - .describe("Binding for the canonical 'reference' evaluator field."), - trajectory: zod - .string() - .min(1) - .regex(evaluationListBenchmarksResponseDataItemOneFieldMappingOneTrajectoryRegExp) - .optional() - .describe("Binding for the canonical 'trajectory' evaluator field."), - messages: zod - .string() - .min(1) - .regex(evaluationListBenchmarksResponseDataItemOneFieldMappingOneMessagesRegExp) - .optional() - .describe("Binding for the canonical 'messages' evaluator field."), - tool_calls: zod - .string() - .min(1) - .regex(evaluationListBenchmarksResponseDataItemOneFieldMappingOneToolCallsRegExp) - .optional() - .describe("Binding for the canonical 'tool_calls' evaluator field."), - tools: zod - .string() - .min(1) - .regex(evaluationListBenchmarksResponseDataItemOneFieldMappingOneToolsRegExp) - .optional() - .describe("Binding for the canonical 'tools' evaluator field."), - custom: zod - .record( - zod.string(), - zod - .string() - .min(1) - .regex( - evaluationListBenchmarksResponseDataItemOneFieldMappingOneCustomRegExpOne - ) - ) - .optional() - .describe('Additional evaluator field bindings keyed by canonical field name.'), - }) - .describe( - "Maps canonical evaluator fields to raw dataset column paths.\nExample: {'input': 'question', 'output': 'answer', 'reference': 'gold', 'trajectory': 'steps'}" - ) - .optional() - .describe( - "Maps canonical evaluator fields such as 'input' and 'output' to dataset column paths for this benchmark." - ), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('Benchmark response schema.'), - zod - .object({ - name: zod.string().describe('Benchmark name'), - workspace: zod - .string() - .regex(evaluationListBenchmarksResponseDataItemTwoWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - description: zod - .string() - .optional() - .describe('Human-readable description of the benchmark.'), - metrics: zod - .array( - zod.union([ - zod - .object({ - name: zod - .string() - .default(evaluationListBenchmarksResponseDataItemTwoMetricsItemOneNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOneWorkspaceRegExp - ) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - type: zod - .literal('bleu') - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOneTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - references: zod - .array(zod.string()) - .describe( - 'The templates for the ground truth references to calculate BLEU metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to calculate BLEU metric on. If not provided, the output text from the model is used.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('Persisted BLEU metric.'), - zod - .object({ - name: zod - .string() - .default(evaluationListBenchmarksResponseDataItemTwoMetricsItemTwoNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwoWorkspaceRegExp - ) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - type: zod - .literal('exact-match') - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwoTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the exact match metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the exact match metric on. If not provided, the output text from the model is used.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('Persisted Exact Match metric.'), - zod - .object({ - name: zod - .string() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemThreeNameDefault - ) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemThreeWorkspaceRegExp - ) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - type: zod - .literal('f1') - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemThreeTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the F1 metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the F1 metric on. If not provided, the output text from the model is used.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('Persisted F1 metric.'), - zod - .object({ - name: zod - .string() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemFourNameDefault - ) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemFourWorkspaceRegExp - ) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - type: zod - .literal('llm-judge') - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemFourTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - model: zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemFourModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemFourModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.') - .describe('The judge model to use for the metric.'), - scores: zod - .array( - zod.union([ - zod - .object({ - name: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemFourScoresItemOneNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemFourScoresItemOneParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemFourScoresItemOneParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemFourScoresItemOneParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - rubric: zod - .array( - zod.object({ - label: zod - .string() - .describe( - 'The label to use for the level of the rubric grading criteria. (e.g., \"helpful\", \"not_helpful\", \"positive\")' - ), - description: zod - .string() - .optional() - .describe( - 'Describe the semantic meaning of each criteria for the given rubric. If no judge template is set, the input description for labels are included in the generated judge prompt.' - ), - value: zod - .union([zod.number(), zod.number()]) - .describe( - 'The score value to assign for the criteria used for aggregation and ranking.' - ), - }) - ) - .min( - evaluationListBenchmarksResponseDataItemTwoMetricsItemFourScoresItemOneRubricMin - ) - .describe('The rubric for the score.'), - }) - .describe( - 'Score definition for a rubric with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - zod - .object({ - name: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemFourScoresItemTwoNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemFourScoresItemTwoParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemFourScoresItemTwoParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemFourScoresItemTwoParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .describe( - 'Minimum value for the score range. Must be less than maximum.' - ), - maximum: zod - .union([zod.number(), zod.number()]) - .describe( - 'Maximum value for the score range. Must be greater than minimum.' - ), - }) - .describe( - 'Score definition for a range of values with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - ]) - ) - .min(1) - .describe( - "Definitions of scores that will be extracted from the judge's output." - ), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .optional() - .describe( - 'The prompt template for the judge. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{sample.output_text}} to use the model output within the template or {{item.xxx}} to reference input columns from the dataset.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - "Prompt template fields that should remain in the inferred input schema but not be required. Use this for fields like 'reference' when the metric can still run without them." - ), - structured_output: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'JSON schema to apply structured output for the judge model evaluation. Structured output is derived from scores when omitted. Use this option if there are custom requirements for the output of the judge.' - ), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListBenchmarksResponseDataItemTwoMetricsItemFourInferenceOneTemperatureMin - ) - .max( - evaluationListBenchmarksResponseDataItemTwoMetricsItemFourInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListBenchmarksResponseDataItemTwoMetricsItemFourInferenceOneTopPMin - ) - .max( - evaluationListBenchmarksResponseDataItemTwoMetricsItemFourInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge model.'), - system_prompt: zod - .string() - .optional() - .describe( - "Initial instructions that define the judge model's role and behavior for the conversation. This is prepended to the messages as a system message." - ), - reasoning: zod - .object({ - end_token: zod - .string() - .optional() - .describe( - "Configure the end token to trim reasoning context based on the model's reasoning API. Example for Nemotron models: '<\/think>'" - ), - include_if_not_finished: zod - .boolean() - .optional() - .describe( - 'Configure whether to include reasoning context if the model has not finished reasoning.' - ), - effort: zod - .string() - .optional() - .describe( - 'Option for OpenAI models to specify low, medium, or high reasoning effort.' - ), - }) - .describe("Custom settings that control the model's reasoning behavior.") - .optional() - .describe( - "Custom settings that control the judge model's reasoning behavior. For reasoning models (e.g., Nemotron), use `end_token` to strip reasoning traces from the output." - ), - ignore_request_failure: zod - .boolean() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemFourIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('Persisted LLM-as-a-Judge metric.'), - zod - .object({ - name: zod - .string() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemFiveNameDefault - ) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemFiveWorkspaceRegExp - ) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - type: zod - .literal('number-check') - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemFiveTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - '>=', - 'gte', - 'greater than or equal', - '>', - 'gt', - 'greater than', - '<=', - 'lte', - 'less than or equal', - '<', - 'lt', - 'less than', - 'absolute difference', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - epsilon: zod - .union([zod.number(), zod.number()]) - .optional() - .describe('Specify the tolerance for the absolute difference of values.'), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('Persisted number check metric.'), - zod - .object({ - name: zod - .string() - .default(evaluationListBenchmarksResponseDataItemTwoMetricsItemSixNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemSixWorkspaceRegExp - ) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - type: zod - .literal('remote') - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemSixTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemSixApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemSixTimeoutSecondsDefault - ) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemSixMaxRetriesDefault - ) - .describe('Maximum number of retry attempts.'), - body: zod - .record(zod.string(), zod.unknown()) - .describe('Jinja template for request payload'), - scores: zod - .array( - zod - .object({ - name: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemSixScoresItemNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .object({ - type: zod - .literal('json') - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemSixScoresItemParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.') - .optional() - .describe( - 'The method to parse the score. Only JSON parsing is supported for remote metrics.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe( - 'Minimum value for the score range. Defaults to None (no lower bound).' - ), - maximum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe( - 'Maximum value for the score range. Defaults to None (no upper bound).' - ), - }) - .describe( - 'Score configuration for remote metrics.\n\nUnlike RangeScore, minimum and maximum are optional (default to None = no bounds).\nThis avoids JSON serialization issues with infinity values.' - ) - ) - .describe('List of scores to extract from the remote response'), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('Persisted Remote metric.'), - zod - .object({ - name: zod - .string() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemSevenNameDefault - ) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemSevenWorkspaceRegExp - ) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - type: zod - .literal('nemo-agent-toolkit-remote') - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemSevenTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemSevenApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemSevenTimeoutSecondsDefault - ) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemSevenMaxRetriesDefault - ) - .describe('Maximum number of retry attempts.'), - evaluator_name: zod - .string() - .describe('The name of the evaluator (also used as the score name).'), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('Persisted NeMo Agent Toolkit Remote metric.'), - zod - .object({ - name: zod - .string() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemEightNameDefault - ) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemEightWorkspaceRegExp - ) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - type: zod - .literal('rouge') - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemEightTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to evaluate the ROUGE metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the ROUGE metric on. If not provided, the output text from the model is used.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('Persisted ROUGE metric.'), - zod - .object({ - name: zod - .string() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemNineNameDefault - ) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemNineWorkspaceRegExp - ) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - type: zod - .literal('string-check') - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemNineTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - 'contains', - 'not contains', - 'startswith', - 'endswith', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('Persisted string check metric.'), - zod - .object({ - name: zod - .string() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnezeroNameDefault - ) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnezeroWorkspaceRegExp - ) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - type: zod - .literal('tool-calling') - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnezeroTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to evaluate tool calling accuracy.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('Persisted Tool Calling metric.'), - zod - .object({ - name: zod - .string() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOneoneNameDefault - ) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOneoneWorkspaceRegExp - ) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - judge_model: zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOneoneJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOneoneJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.') - .describe('The LLM model to use as judge.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOneoneInferenceOneTemperatureMin - ) - .max( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOneoneInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOneoneInferenceOneTopPMin - ) - .max( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOneoneInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOneoneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('topic_adherence') - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOneoneTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - metric_mode: zod - .enum(['f1', 'precision', 'recall']) - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOneoneMetricModeDefault - ) - .describe('The mode for computing topic adherence score.'), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('RAGAS metric for measuring topic adherence.'), - zod - .object({ - name: zod - .string() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnetwoNameDefault - ) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnetwoWorkspaceRegExp - ) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - type: zod - .literal('tool_call_accuracy') - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnetwoTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('RAGAS metric for measuring tool call accuracy.'), - zod - .object({ - name: zod - .string() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnethreeNameDefault - ) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnethreeWorkspaceRegExp - ) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - judge_model: zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnethreeJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnethreeJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.') - .describe('The LLM model to use as judge.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnethreeInferenceOneTemperatureMin - ) - .max( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnethreeInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnethreeInferenceOneTopPMin - ) - .max( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnethreeInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnethreeIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('agent_goal_accuracy') - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnethreeTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - use_reference: zod - .boolean() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnethreeUseReferenceDefault - ) - .describe('Whether to use reference for goal accuracy evaluation.'), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('RAGAS metric for measuring agent goal accuracy.'), - zod - .object({ - name: zod - .string() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefourNameDefault - ) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefourWorkspaceRegExp - ) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - judge_model: zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefourJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefourJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.') - .describe('The LLM model to use as judge.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefourInferenceOneTemperatureMin - ) - .max( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefourInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefourInferenceOneTopPMin - ) - .max( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefourInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefourIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('answer_accuracy') - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefourTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('RAGAS metric for measuring answer accuracy.'), - zod - .object({ - name: zod - .string() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefiveNameDefault - ) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefiveWorkspaceRegExp - ) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - judge_model: zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefiveJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefiveJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.') - .describe('The LLM model to use as judge.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefiveInferenceOneTemperatureMin - ) - .max( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefiveInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefiveInferenceOneTopPMin - ) - .max( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefiveInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefiveIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_relevance') - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnefiveTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('RAGAS metric for measuring context relevance.'), - zod - .object({ - name: zod - .string() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesixNameDefault - ) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesixWorkspaceRegExp - ) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - judge_model: zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesixJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesixJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.') - .describe('The LLM model to use as judge.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesixInferenceOneTemperatureMin - ) - .max( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesixInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesixInferenceOneTopPMin - ) - .max( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesixInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesixIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_groundedness') - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesixTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('RAGAS metric for measuring response groundedness.'), - zod - .object({ - name: zod - .string() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesevenNameDefault - ) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesevenWorkspaceRegExp - ) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - judge_model: zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesevenJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesevenJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.') - .describe('The LLM model to use as judge.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesevenInferenceOneTemperatureMin - ) - .max( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesevenInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesevenInferenceOneTopPMin - ) - .max( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesevenInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesevenIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_recall') - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnesevenTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('RAGAS metric for measuring context recall.'), - zod - .object({ - name: zod - .string() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOneeightNameDefault - ) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOneeightWorkspaceRegExp - ) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - judge_model: zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOneeightJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOneeightJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.') - .describe('The LLM model to use as judge.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOneeightInferenceOneTemperatureMin - ) - .max( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOneeightInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOneeightInferenceOneTopPMin - ) - .max( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOneeightInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOneeightIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_precision') - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOneeightTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('RAGAS metric for measuring context precision.'), - zod - .object({ - name: zod - .string() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnenineNameDefault - ) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnenineWorkspaceRegExp - ) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - judge_model: zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnenineJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnenineJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.') - .describe('The LLM model to use as judge.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnenineInferenceOneTemperatureMin - ) - .max( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnenineInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnenineInferenceOneTopPMin - ) - .max( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnenineInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnenineIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_entity_recall') - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemOnenineTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('RAGAS metric for measuring context entity recall.'), - zod - .object({ - name: zod - .string() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwozeroNameDefault - ) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwozeroWorkspaceRegExp - ) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - embeddings_model: zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwozeroEmbeddingsModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwozeroEmbeddingsModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.') - .describe('The embeddings model to use.'), - judge_model: zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwozeroJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwozeroJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.') - .describe('The LLM model to use as judge.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwozeroInferenceOneTemperatureMin - ) - .max( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwozeroInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwozeroInferenceOneTopPMin - ) - .max( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwozeroInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwozeroIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_relevancy') - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwozeroTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - strictness: zod - .number() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwozeroStrictnessDefault - ) - .describe('Number of parallel questions generated. NIM can only generate 1.'), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('RAGAS metric for measuring response relevancy.'), - zod - .object({ - name: zod - .string() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwooneNameDefault - ) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwooneWorkspaceRegExp - ) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - judge_model: zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwooneJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwooneJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.') - .describe('The LLM model to use as judge.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwooneInferenceOneTemperatureMin - ) - .max( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwooneInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwooneInferenceOneTopPMin - ) - .max( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwooneInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwooneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('faithfulness') - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwooneTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('RAGAS metric for measuring faithfulness.'), - zod - .object({ - name: zod - .string() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwotwoNameDefault - ) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwotwoWorkspaceRegExp - ) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - judge_model: zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwotwoJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwotwoJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.') - .describe('The LLM model to use as judge.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwotwoInferenceOneTemperatureMin - ) - .max( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwotwoInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwotwoInferenceOneTopPMin - ) - .max( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwotwoInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwotwoIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('noise_sensitivity') - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwotwoTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('RAGAS metric for measuring noise sensitivity.'), - zod.object({ - name: zod - .string() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwothreeNameDefault - ), - workspace: zod - .string() - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwothreeWorkspaceDefault - ), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - type: zod - .enum(['system', 'system-retriever']) - .default( - evaluationListBenchmarksResponseDataItemTwoMetricsItemTwothreeTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline', 'retriever'])) - .default([`online`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - required_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod - .string() - .optional() - .describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe( - 'List of required parameters for running an evaluation with the metric.' - ), - optional_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod - .string() - .optional() - .describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe( - 'List of optional parameters for running an evaluation with the metric.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }), - ]) - ) - .describe('The fully defined metrics of the benchmark.'), - dataset: zod - .union([ - zod - .object({ - rows: zod - .array(zod.record(zod.string(), zod.unknown())) - .min(1) - .describe( - 'Array of data rows. Each row can be any valid JSON value (object, string, array, etc.).' - ), - }) - .describe( - 'Inline dataset definition with embedded rows.\n\nUse this for quick evaluations without persisting the dataset first.' - ), - zod - .object({ - id: zod.string(), - name: zod.string(), - workspace: zod.string(), - description: zod.string(), - purpose: zod.enum(['dataset', 'generic', 'model']), - storage: zod.union([ - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageOneReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('local') - .default( - evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageOneTypeDefault - ), - path: zod.string(), - write_buffer_size: zod - .number() - .default( - evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageOneWriteBufferSizeDefault - ) - .describe('How many bytes to buffer before flushing to disk'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageTwoReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('ngc') - .default( - evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageTwoTypeDefault - ), - org: zod.string().describe('NGC organization name'), - team: zod.string().describe('NGC team name'), - target: zod.string().describe('NGC asset name (model or resource)'), - target_type: zod - .enum(['resource', 'model']) - .default( - evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageTwoTargetTypeDefault - ) - .describe("Type of NGC asset: 'resource' or 'model'"), - version: zod - .string() - .optional() - .describe('NGC asset version. If not provided, defaults to latest version'), - original_version: zod - .string() - .optional() - .describe( - "The original version requested by the user before resolution (e.g., 'latest' or None). The 'version' field contains the resolved version ID." - ), - api_key_secret: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageTwoApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .describe('NGC API key secret name'), - host: zod - .string() - .default( - evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageTwoHostDefault - ) - .describe('NGC API host URL'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageThreeReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('huggingface') - .default( - evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageThreeTypeDefault - ), - repo_id: zod - .string() - .describe("Huggingface repository ID (e.g., 'meta-llama\/Llama-2-7b')"), - repo_type: zod - .enum(['model', 'dataset', 'space']) - .default( - evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageThreeRepoTypeDefault - ) - .describe("Type of Huggingface repository: 'model', 'dataset', or 'space'"), - revision: zod - .string() - .default( - evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageThreeRevisionDefault - ) - .describe("Branch, tag, or commit SHA. Defaults to 'main'"), - original_revision: zod - .string() - .optional() - .describe( - "The original revision requested by the user before resolution (e.g., 'main'). The 'revision' field contains the resolved commit SHA." - ), - token_secret: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageThreeTokenSecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe('Huggingface API `token` secret name for private repositories'), - endpoint: zod - .string() - .default( - evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageThreeEndpointDefault - ) - .describe('Huggingface Hub endpoint URL. Use for self-hosted instances.'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageFourReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('s3') - .default( - evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageFourTypeDefault - ), - bucket: zod.string().describe('S3 bucket name'), - prefix: zod - .string() - .default( - evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageFourPrefixDefault - ) - .describe( - 'Optional prefix (folder path) within the bucket. All operations will be relative to this prefix.' - ), - region: zod - .string() - .optional() - .describe( - 'AWS region. If not specified, uses SDK default (env vars, instance metadata, etc.)' - ), - endpoint_url: zod - .string() - .optional() - .describe( - 'Custom endpoint URL for S3-compatible storage (e.g., MinIO, Garage, RustFS). If not specified, uses AWS S3.' - ), - use_sdk_auth: zod - .boolean() - .default( - evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageFourUseSdkAuthDefault - ) - .describe( - "Use AWS SDK credential chain for authentication (env vars like AWS_ACCESS_KEY_ID, IAM roles, instance profiles, etc.). This option is only available for the platform's default storage backend. User-provided S3 storage must use explicit credentials via access_key_id_secret and secret_access_key_secret." - ), - access_key_id_secret: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageFourAccessKeyIdSecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Secret reference for AWS access key ID. Requires use_sdk_auth=False.' - ), - secret_access_key_secret: zod - .string() - .regex( - evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageFourSecretAccessKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Secret reference for AWS secret access key. Requires use_sdk_auth=False.' - ), - signature_version: zod - .enum(['s3v4', 's3']) - .default( - evaluationListBenchmarksResponseDataItemTwoDatasetTwoStorageFourSignatureVersionDefault - ) - .describe( - "AWS signature version for request signing. Use 's3' for legacy systems that only support signature v2." - ), - }), - ]), - metadata: zod - .object({ - dataset: zod - .object({ - schema: zod - .union([zod.record(zod.string(), zod.unknown()), zod.string()]) - .optional() - .describe( - 'Default row schema for files in this fileset, either inline JSON Schema or a schema_defs key.' - ), - schema_defs: zod - .record(zod.string(), zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'Reusable JSON Schema definitions keyed by name for deduplicating per-file dataset schemas.' - ), - schemas_by_path: zod - .record( - zod.string(), - zod.union([zod.record(zod.string(), zod.unknown()), zod.string()]) - ) - .optional() - .describe( - 'Optional per-file row schemas keyed by relative path within the fileset. Each value may be inline JSON Schema or a schema_defs key.' - ), - }) - .optional() - .describe('Content for dataset-type filesets.'), - model: zod - .object({ - tool_calling: zod - .object({ - chat_template: zod - .string() - .optional() - .describe('Jinja2 chat template for the model.'), - tool_call_parser: zod - .string() - .optional() - .describe( - "Name of the tool call parser (e.g., 'openai', 'hermes', 'pythonic', 'llama3_json', 'mistral')." - ), - tool_call_plugin: zod - .string() - .optional() - .describe( - "Reference to a fileset containing a custom tool call plugin Python file. Expected format: '{workspace}\/{fileset_name}'." - ), - auto_tool_choice: zod - .boolean() - .optional() - .describe('Whether to enable automatic tool choice.'), - }) - .optional() - .describe( - 'Content for tool-calling configuration on model filesets.\n\nStores chat template and tool calling settings that are merged into\nthe ModelSpec during checkpoint analysis.' - ), - }) - .optional() - .describe( - 'Content for model-type filesets.\n\nContains tool calling configuration that is merged into the ModelSpec\nduring checkpoint analysis.' - ), - }) - .describe( - 'Tagged metadata container - the key indicates the type.\n\nExample:\n metadata = FilesetMetadata(\n dataset=DatasetMetadataContent(\n schema={\"columns\": [\"id\", \"name\"]},\n )\n )' - ), - custom_fields: zod.record(zod.string(), zod.unknown()), - project: zod.string(), - created_at: zod.string(), - updated_at: zod.string(), - }) - .describe('Response DTO for fileset operations.'), - zod - .string() - .describe( - "Reference to a Fileset in the Files API.\n\nA reference is a string with format 'workspace\/fileset-name' that points to a\npersisted fileset entity. When used as a dataset source, all files within the\nfileset will be downloaded to the job container.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform." - ), - ]) - .describe('Dataset containing the test cases for this benchmark.'), - field_mapping: zod - .object({ - input: zod - .string() - .min(1) - .regex(evaluationListBenchmarksResponseDataItemTwoFieldMappingOneInputRegExp) - .optional() - .describe("Binding for the canonical 'input' evaluator field."), - output: zod - .string() - .min(1) - .regex(evaluationListBenchmarksResponseDataItemTwoFieldMappingOneOutputRegExp) - .optional() - .describe("Binding for the canonical 'output' evaluator field."), - context: zod - .string() - .min(1) - .regex(evaluationListBenchmarksResponseDataItemTwoFieldMappingOneContextRegExp) - .optional() - .describe("Binding for the canonical 'context' evaluator field."), - reference: zod - .string() - .min(1) - .regex(evaluationListBenchmarksResponseDataItemTwoFieldMappingOneReferenceRegExp) - .optional() - .describe("Binding for the canonical 'reference' evaluator field."), - trajectory: zod - .string() - .min(1) - .regex(evaluationListBenchmarksResponseDataItemTwoFieldMappingOneTrajectoryRegExp) - .optional() - .describe("Binding for the canonical 'trajectory' evaluator field."), - messages: zod - .string() - .min(1) - .regex(evaluationListBenchmarksResponseDataItemTwoFieldMappingOneMessagesRegExp) - .optional() - .describe("Binding for the canonical 'messages' evaluator field."), - tool_calls: zod - .string() - .min(1) - .regex(evaluationListBenchmarksResponseDataItemTwoFieldMappingOneToolCallsRegExp) - .optional() - .describe("Binding for the canonical 'tool_calls' evaluator field."), - tools: zod - .string() - .min(1) - .regex(evaluationListBenchmarksResponseDataItemTwoFieldMappingOneToolsRegExp) - .optional() - .describe("Binding for the canonical 'tools' evaluator field."), - custom: zod - .record( - zod.string(), - zod - .string() - .min(1) - .regex( - evaluationListBenchmarksResponseDataItemTwoFieldMappingOneCustomRegExpOne - ) - ) - .optional() - .describe('Additional evaluator field bindings keyed by canonical field name.'), - }) - .describe( - "Maps canonical evaluator fields to raw dataset column paths.\nExample: {'input': 'question', 'output': 'answer', 'reference': 'gold', 'trajectory': 'steps'}" - ) - .optional() - .describe( - "Maps canonical evaluator fields such as 'input' and 'output' to dataset column paths for this benchmark." - ), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('Extended benchmark response. Includes the metrics and dataset as entities.'), - zod - .object({ - name: zod.string().describe('Benchmark name'), - workspace: zod - .string() - .default(evaluationListBenchmarksResponseDataItemThreeWorkspaceDefault), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - description: zod - .string() - .optional() - .describe('Human-readable description of the benchmark.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - required_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod.string().optional().describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe('List of required parameters for running an evaluation with the benchmark.'), - optional_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod.string().optional().describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe('List of required parameters for running an evaluation with the benchmark.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`]) - .describe( - 'A benchmark can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('System Benchmark response schema.'), - ]) - ), - pagination: zod - .object({ - page: zod.number().describe('The current page number.'), - page_size: zod.number().describe('The page size used for the query.'), - current_page_size: zod.number().describe('The size for the current page.'), - total_pages: zod.number().describe('The total number of pages.'), - total_results: zod.number().describe('The total number of results.'), - }) - .optional() - .describe('Pagination information.'), - sort: zod.string().optional().describe('The field on which the results are sorted.'), - filter: zod.record(zod.string(), zod.unknown()).optional().describe('Filtering information.'), -}); - -/** - * Create a new custom evaluation benchmark. - -Benchmarks can be reused across multiple evaluations. The benchmark type determines -the evaluation method (currently only LLM-as-a-Judge is supported). - * @summary Create Benchmark - */ -export const EvaluationCreateBenchmarkParams = zod.object({ - workspace: zod.string(), -}); - -export const evaluationCreateBenchmarkQueryExtendedResponseDefault = false; - -export const EvaluationCreateBenchmarkQueryParams = zod.object({ - extended_response: zod - .boolean() - .default(evaluationCreateBenchmarkQueryExtendedResponseDefault) - .describe('Whether to return the extended benchmark.'), -}); - -export const evaluationCreateBenchmarkBodyMetricsItemRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); - -export const evaluationCreateBenchmarkBodyFieldMappingOneInputRegExp = new RegExp('^[^\\[\\]]\*$'); - -export const evaluationCreateBenchmarkBodyFieldMappingOneOutputRegExp = new RegExp('^[^\\[\\]]\*$'); - -export const evaluationCreateBenchmarkBodyFieldMappingOneContextRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateBenchmarkBodyFieldMappingOneReferenceRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateBenchmarkBodyFieldMappingOneTrajectoryRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateBenchmarkBodyFieldMappingOneMessagesRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateBenchmarkBodyFieldMappingOneToolCallsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateBenchmarkBodyFieldMappingOneToolsRegExp = new RegExp('^[^\\[\\]]\*$'); - -export const evaluationCreateBenchmarkBodyFieldMappingOneCustomRegExpOne = new RegExp( - '^[^\\[\\]]\*$' -); - -export const EvaluationCreateBenchmarkBody = zod - .object({ - name: zod.string().describe('The name of the benchmark.'), - description: zod.string().describe('The description of the benchmark.'), - metrics: zod - .array( - zod - .string() - .regex(evaluationCreateBenchmarkBodyMetricsItemRegExp) - .describe( - "Reference to a metric in the Metrics API.\n\nA reference is a string with format 'workspace\/metric-name' that points to a\npersisted metric entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ) - ) - .describe('The metrics that comprise this benchmark (format: workspace\/metric_name).'), - dataset: zod - .string() - .describe( - "Reference to a Fileset in the Files API.\n\nA reference is a string with format 'workspace\/fileset-name' that points to a\npersisted fileset entity. When used as a dataset source, all files within the\nfileset will be downloaded to the job container.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform." - ) - .describe('The Fileset containing test data (format: workspace\/fileset-name).'), - field_mapping: zod - .object({ - input: zod - .string() - .min(1) - .regex(evaluationCreateBenchmarkBodyFieldMappingOneInputRegExp) - .optional() - .describe("Binding for the canonical 'input' evaluator field."), - output: zod - .string() - .min(1) - .regex(evaluationCreateBenchmarkBodyFieldMappingOneOutputRegExp) - .optional() - .describe("Binding for the canonical 'output' evaluator field."), - context: zod - .string() - .min(1) - .regex(evaluationCreateBenchmarkBodyFieldMappingOneContextRegExp) - .optional() - .describe("Binding for the canonical 'context' evaluator field."), - reference: zod - .string() - .min(1) - .regex(evaluationCreateBenchmarkBodyFieldMappingOneReferenceRegExp) - .optional() - .describe("Binding for the canonical 'reference' evaluator field."), - trajectory: zod - .string() - .min(1) - .regex(evaluationCreateBenchmarkBodyFieldMappingOneTrajectoryRegExp) - .optional() - .describe("Binding for the canonical 'trajectory' evaluator field."), - messages: zod - .string() - .min(1) - .regex(evaluationCreateBenchmarkBodyFieldMappingOneMessagesRegExp) - .optional() - .describe("Binding for the canonical 'messages' evaluator field."), - tool_calls: zod - .string() - .min(1) - .regex(evaluationCreateBenchmarkBodyFieldMappingOneToolCallsRegExp) - .optional() - .describe("Binding for the canonical 'tool_calls' evaluator field."), - tools: zod - .string() - .min(1) - .regex(evaluationCreateBenchmarkBodyFieldMappingOneToolsRegExp) - .optional() - .describe("Binding for the canonical 'tools' evaluator field."), - custom: zod - .record( - zod.string(), - zod.string().min(1).regex(evaluationCreateBenchmarkBodyFieldMappingOneCustomRegExpOne) - ) - .optional() - .describe('Additional evaluator field bindings keyed by canonical field name.'), - }) - .describe( - "Maps canonical evaluator fields to raw dataset column paths.\nExample: {'input': 'question', 'output': 'answer', 'reference': 'gold', 'trajectory': 'steps'}" - ) - .optional() - .describe( - "Maps canonical evaluator fields such as 'input' and 'output' to dataset column paths for this benchmark." - ), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - }) - .describe('Request schema for creating a benchmark. Workspace comes from route parameter.'); - -/** - * Get a specific evaluation benchmark by workspace and benchmark name. - * @summary Get Benchmark - */ -export const EvaluationGetBenchmarkParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const evaluationGetBenchmarkQueryExtendedResponseDefault = false; - -export const EvaluationGetBenchmarkQueryParams = zod.object({ - extended_response: zod - .boolean() - .default(evaluationGetBenchmarkQueryExtendedResponseDefault) - .describe('Whether to return the extended benchmark.'), -}); - -export const evaluationGetBenchmarkResponseOneWorkspaceRegExp = new RegExp('^[\\w\\-\\+.@:]+$'); -export const evaluationGetBenchmarkResponseOneMetricsItemRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); - -export const evaluationGetBenchmarkResponseOneFieldMappingOneInputRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetBenchmarkResponseOneFieldMappingOneOutputRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetBenchmarkResponseOneFieldMappingOneContextRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetBenchmarkResponseOneFieldMappingOneReferenceRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetBenchmarkResponseOneFieldMappingOneTrajectoryRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetBenchmarkResponseOneFieldMappingOneMessagesRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetBenchmarkResponseOneFieldMappingOneToolCallsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetBenchmarkResponseOneFieldMappingOneToolsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetBenchmarkResponseOneFieldMappingOneCustomRegExpOne = new RegExp( - '^[^\\[\\]]\*$' -); -export const evaluationGetBenchmarkResponseTwoWorkspaceRegExp = new RegExp('^[\\w\\-\\+.@:]+$'); -export const evaluationGetBenchmarkResponseTwoMetricsItemOneNameDefault = ``; -export const evaluationGetBenchmarkResponseTwoMetricsItemOneWorkspaceRegExp = new RegExp( - '^[\\w\\-\\+.@:]+$' -); -export const evaluationGetBenchmarkResponseTwoMetricsItemOneTypeDefault = `bleu`; -export const evaluationGetBenchmarkResponseTwoMetricsItemTwoNameDefault = ``; -export const evaluationGetBenchmarkResponseTwoMetricsItemTwoWorkspaceRegExp = new RegExp( - '^[\\w\\-\\+.@:]+$' -); -export const evaluationGetBenchmarkResponseTwoMetricsItemTwoTypeDefault = `exact-match`; -export const evaluationGetBenchmarkResponseTwoMetricsItemThreeNameDefault = ``; -export const evaluationGetBenchmarkResponseTwoMetricsItemThreeWorkspaceRegExp = new RegExp( - '^[\\w\\-\\+.@:]+$' -); -export const evaluationGetBenchmarkResponseTwoMetricsItemThreeTypeDefault = `f1`; -export const evaluationGetBenchmarkResponseTwoMetricsItemFourNameDefault = ``; -export const evaluationGetBenchmarkResponseTwoMetricsItemFourWorkspaceRegExp = new RegExp( - '^[\\w\\-\\+.@:]+$' -); -export const evaluationGetBenchmarkResponseTwoMetricsItemFourTypeDefault = `llm-judge`; -export const evaluationGetBenchmarkResponseTwoMetricsItemFourModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetBenchmarkResponseTwoMetricsItemFourModelOneFormatDefault = `nim`; -export const evaluationGetBenchmarkResponseTwoMetricsItemFourScoresItemOneNameRegExp = new RegExp( - '^[a-z0-9_]+$' -); -export const evaluationGetBenchmarkResponseTwoMetricsItemFourScoresItemOneParserOneTypeDefault = `json`; -export const evaluationGetBenchmarkResponseTwoMetricsItemFourScoresItemOneParserTwoTypeDefault = `regex`; -export const evaluationGetBenchmarkResponseTwoMetricsItemFourScoresItemOneParserTwoMethodDefault = `match`; -export const evaluationGetBenchmarkResponseTwoMetricsItemFourScoresItemOneRubricMin = 2; - -export const evaluationGetBenchmarkResponseTwoMetricsItemFourScoresItemTwoNameRegExp = new RegExp( - '^[a-z0-9_]+$' -); -export const evaluationGetBenchmarkResponseTwoMetricsItemFourScoresItemTwoParserOneTypeDefault = `json`; -export const evaluationGetBenchmarkResponseTwoMetricsItemFourScoresItemTwoParserTwoTypeDefault = `regex`; -export const evaluationGetBenchmarkResponseTwoMetricsItemFourScoresItemTwoParserTwoMethodDefault = `match`; - -export const evaluationGetBenchmarkResponseTwoMetricsItemFourInferenceOneTemperatureMin = 0; -export const evaluationGetBenchmarkResponseTwoMetricsItemFourInferenceOneTemperatureMax = 2; - -export const evaluationGetBenchmarkResponseTwoMetricsItemFourInferenceOneTopPMin = 0; -export const evaluationGetBenchmarkResponseTwoMetricsItemFourInferenceOneTopPMax = 1; - -export const evaluationGetBenchmarkResponseTwoMetricsItemFourIgnoreRequestFailureDefault = false; -export const evaluationGetBenchmarkResponseTwoMetricsItemFiveNameDefault = ``; -export const evaluationGetBenchmarkResponseTwoMetricsItemFiveWorkspaceRegExp = new RegExp( - '^[\\w\\-\\+.@:]+$' -); -export const evaluationGetBenchmarkResponseTwoMetricsItemFiveTypeDefault = `number-check`; -export const evaluationGetBenchmarkResponseTwoMetricsItemSixNameDefault = ``; -export const evaluationGetBenchmarkResponseTwoMetricsItemSixWorkspaceRegExp = new RegExp( - '^[\\w\\-\\+.@:]+$' -); -export const evaluationGetBenchmarkResponseTwoMetricsItemSixTypeDefault = `remote`; -export const evaluationGetBenchmarkResponseTwoMetricsItemSixApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetBenchmarkResponseTwoMetricsItemSixTimeoutSecondsDefault = 30; -export const evaluationGetBenchmarkResponseTwoMetricsItemSixMaxRetriesDefault = 3; -export const evaluationGetBenchmarkResponseTwoMetricsItemSixScoresItemNameRegExp = new RegExp( - '^[a-z0-9_]+$' -); -export const evaluationGetBenchmarkResponseTwoMetricsItemSixScoresItemParserOneTypeDefault = `json`; -export const evaluationGetBenchmarkResponseTwoMetricsItemSevenNameDefault = ``; -export const evaluationGetBenchmarkResponseTwoMetricsItemSevenWorkspaceRegExp = new RegExp( - '^[\\w\\-\\+.@:]+$' -); -export const evaluationGetBenchmarkResponseTwoMetricsItemSevenTypeDefault = `nemo-agent-toolkit-remote`; -export const evaluationGetBenchmarkResponseTwoMetricsItemSevenApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetBenchmarkResponseTwoMetricsItemSevenTimeoutSecondsDefault = 30; -export const evaluationGetBenchmarkResponseTwoMetricsItemSevenMaxRetriesDefault = 3; -export const evaluationGetBenchmarkResponseTwoMetricsItemEightNameDefault = ``; -export const evaluationGetBenchmarkResponseTwoMetricsItemEightWorkspaceRegExp = new RegExp( - '^[\\w\\-\\+.@:]+$' -); -export const evaluationGetBenchmarkResponseTwoMetricsItemEightTypeDefault = `rouge`; -export const evaluationGetBenchmarkResponseTwoMetricsItemNineNameDefault = ``; -export const evaluationGetBenchmarkResponseTwoMetricsItemNineWorkspaceRegExp = new RegExp( - '^[\\w\\-\\+.@:]+$' -); -export const evaluationGetBenchmarkResponseTwoMetricsItemNineTypeDefault = `string-check`; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnezeroNameDefault = ``; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnezeroWorkspaceRegExp = new RegExp( - '^[\\w\\-\\+.@:]+$' -); -export const evaluationGetBenchmarkResponseTwoMetricsItemOnezeroTypeDefault = `tool-calling`; -export const evaluationGetBenchmarkResponseTwoMetricsItemOneoneNameDefault = ``; -export const evaluationGetBenchmarkResponseTwoMetricsItemOneoneWorkspaceRegExp = new RegExp( - '^[\\w\\-\\+.@:]+$' -); -export const evaluationGetBenchmarkResponseTwoMetricsItemOneoneJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetBenchmarkResponseTwoMetricsItemOneoneJudgeModelOneFormatDefault = `nim`; -export const evaluationGetBenchmarkResponseTwoMetricsItemOneoneInferenceOneTemperatureMin = 0; -export const evaluationGetBenchmarkResponseTwoMetricsItemOneoneInferenceOneTemperatureMax = 2; - -export const evaluationGetBenchmarkResponseTwoMetricsItemOneoneInferenceOneTopPMin = 0; -export const evaluationGetBenchmarkResponseTwoMetricsItemOneoneInferenceOneTopPMax = 1; - -export const evaluationGetBenchmarkResponseTwoMetricsItemOneoneIgnoreRequestFailureDefault = false; -export const evaluationGetBenchmarkResponseTwoMetricsItemOneoneTypeDefault = `topic_adherence`; -export const evaluationGetBenchmarkResponseTwoMetricsItemOneoneMetricModeDefault = `f1`; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnetwoNameDefault = ``; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnetwoWorkspaceRegExp = new RegExp( - '^[\\w\\-\\+.@:]+$' -); -export const evaluationGetBenchmarkResponseTwoMetricsItemOnetwoTypeDefault = `tool_call_accuracy`; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnethreeNameDefault = ``; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnethreeWorkspaceRegExp = new RegExp( - '^[\\w\\-\\+.@:]+$' -); -export const evaluationGetBenchmarkResponseTwoMetricsItemOnethreeJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetBenchmarkResponseTwoMetricsItemOnethreeJudgeModelOneFormatDefault = `nim`; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnethreeInferenceOneTemperatureMin = 0; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnethreeInferenceOneTemperatureMax = 2; - -export const evaluationGetBenchmarkResponseTwoMetricsItemOnethreeInferenceOneTopPMin = 0; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnethreeInferenceOneTopPMax = 1; - -export const evaluationGetBenchmarkResponseTwoMetricsItemOnethreeIgnoreRequestFailureDefault = false; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnethreeTypeDefault = `agent_goal_accuracy`; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnethreeUseReferenceDefault = true; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnefourNameDefault = ``; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnefourWorkspaceRegExp = new RegExp( - '^[\\w\\-\\+.@:]+$' -); -export const evaluationGetBenchmarkResponseTwoMetricsItemOnefourJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetBenchmarkResponseTwoMetricsItemOnefourJudgeModelOneFormatDefault = `nim`; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnefourInferenceOneTemperatureMin = 0; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnefourInferenceOneTemperatureMax = 2; - -export const evaluationGetBenchmarkResponseTwoMetricsItemOnefourInferenceOneTopPMin = 0; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnefourInferenceOneTopPMax = 1; - -export const evaluationGetBenchmarkResponseTwoMetricsItemOnefourIgnoreRequestFailureDefault = false; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnefourTypeDefault = `answer_accuracy`; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnefiveNameDefault = ``; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnefiveWorkspaceRegExp = new RegExp( - '^[\\w\\-\\+.@:]+$' -); -export const evaluationGetBenchmarkResponseTwoMetricsItemOnefiveJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetBenchmarkResponseTwoMetricsItemOnefiveJudgeModelOneFormatDefault = `nim`; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnefiveInferenceOneTemperatureMin = 0; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnefiveInferenceOneTemperatureMax = 2; - -export const evaluationGetBenchmarkResponseTwoMetricsItemOnefiveInferenceOneTopPMin = 0; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnefiveInferenceOneTopPMax = 1; - -export const evaluationGetBenchmarkResponseTwoMetricsItemOnefiveIgnoreRequestFailureDefault = false; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnefiveTypeDefault = `context_relevance`; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnesixNameDefault = ``; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnesixWorkspaceRegExp = new RegExp( - '^[\\w\\-\\+.@:]+$' -); -export const evaluationGetBenchmarkResponseTwoMetricsItemOnesixJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetBenchmarkResponseTwoMetricsItemOnesixJudgeModelOneFormatDefault = `nim`; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnesixInferenceOneTemperatureMin = 0; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnesixInferenceOneTemperatureMax = 2; - -export const evaluationGetBenchmarkResponseTwoMetricsItemOnesixInferenceOneTopPMin = 0; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnesixInferenceOneTopPMax = 1; - -export const evaluationGetBenchmarkResponseTwoMetricsItemOnesixIgnoreRequestFailureDefault = false; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnesixTypeDefault = `response_groundedness`; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnesevenNameDefault = ``; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnesevenWorkspaceRegExp = new RegExp( - '^[\\w\\-\\+.@:]+$' -); -export const evaluationGetBenchmarkResponseTwoMetricsItemOnesevenJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetBenchmarkResponseTwoMetricsItemOnesevenJudgeModelOneFormatDefault = `nim`; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnesevenInferenceOneTemperatureMin = 0; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnesevenInferenceOneTemperatureMax = 2; - -export const evaluationGetBenchmarkResponseTwoMetricsItemOnesevenInferenceOneTopPMin = 0; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnesevenInferenceOneTopPMax = 1; - -export const evaluationGetBenchmarkResponseTwoMetricsItemOnesevenIgnoreRequestFailureDefault = false; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnesevenTypeDefault = `context_recall`; -export const evaluationGetBenchmarkResponseTwoMetricsItemOneeightNameDefault = ``; -export const evaluationGetBenchmarkResponseTwoMetricsItemOneeightWorkspaceRegExp = new RegExp( - '^[\\w\\-\\+.@:]+$' -); -export const evaluationGetBenchmarkResponseTwoMetricsItemOneeightJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetBenchmarkResponseTwoMetricsItemOneeightJudgeModelOneFormatDefault = `nim`; -export const evaluationGetBenchmarkResponseTwoMetricsItemOneeightInferenceOneTemperatureMin = 0; -export const evaluationGetBenchmarkResponseTwoMetricsItemOneeightInferenceOneTemperatureMax = 2; - -export const evaluationGetBenchmarkResponseTwoMetricsItemOneeightInferenceOneTopPMin = 0; -export const evaluationGetBenchmarkResponseTwoMetricsItemOneeightInferenceOneTopPMax = 1; - -export const evaluationGetBenchmarkResponseTwoMetricsItemOneeightIgnoreRequestFailureDefault = false; -export const evaluationGetBenchmarkResponseTwoMetricsItemOneeightTypeDefault = `context_precision`; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnenineNameDefault = ``; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnenineWorkspaceRegExp = new RegExp( - '^[\\w\\-\\+.@:]+$' -); -export const evaluationGetBenchmarkResponseTwoMetricsItemOnenineJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetBenchmarkResponseTwoMetricsItemOnenineJudgeModelOneFormatDefault = `nim`; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnenineInferenceOneTemperatureMin = 0; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnenineInferenceOneTemperatureMax = 2; - -export const evaluationGetBenchmarkResponseTwoMetricsItemOnenineInferenceOneTopPMin = 0; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnenineInferenceOneTopPMax = 1; - -export const evaluationGetBenchmarkResponseTwoMetricsItemOnenineIgnoreRequestFailureDefault = false; -export const evaluationGetBenchmarkResponseTwoMetricsItemOnenineTypeDefault = `context_entity_recall`; -export const evaluationGetBenchmarkResponseTwoMetricsItemTwozeroNameDefault = ``; -export const evaluationGetBenchmarkResponseTwoMetricsItemTwozeroWorkspaceRegExp = new RegExp( - '^[\\w\\-\\+.@:]+$' -); -export const evaluationGetBenchmarkResponseTwoMetricsItemTwozeroEmbeddingsModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetBenchmarkResponseTwoMetricsItemTwozeroEmbeddingsModelOneFormatDefault = `nim`; -export const evaluationGetBenchmarkResponseTwoMetricsItemTwozeroJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetBenchmarkResponseTwoMetricsItemTwozeroJudgeModelOneFormatDefault = `nim`; -export const evaluationGetBenchmarkResponseTwoMetricsItemTwozeroInferenceOneTemperatureMin = 0; -export const evaluationGetBenchmarkResponseTwoMetricsItemTwozeroInferenceOneTemperatureMax = 2; - -export const evaluationGetBenchmarkResponseTwoMetricsItemTwozeroInferenceOneTopPMin = 0; -export const evaluationGetBenchmarkResponseTwoMetricsItemTwozeroInferenceOneTopPMax = 1; - -export const evaluationGetBenchmarkResponseTwoMetricsItemTwozeroIgnoreRequestFailureDefault = false; -export const evaluationGetBenchmarkResponseTwoMetricsItemTwozeroTypeDefault = `response_relevancy`; -export const evaluationGetBenchmarkResponseTwoMetricsItemTwozeroStrictnessDefault = 1; -export const evaluationGetBenchmarkResponseTwoMetricsItemTwooneNameDefault = ``; -export const evaluationGetBenchmarkResponseTwoMetricsItemTwooneWorkspaceRegExp = new RegExp( - '^[\\w\\-\\+.@:]+$' -); -export const evaluationGetBenchmarkResponseTwoMetricsItemTwooneJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetBenchmarkResponseTwoMetricsItemTwooneJudgeModelOneFormatDefault = `nim`; -export const evaluationGetBenchmarkResponseTwoMetricsItemTwooneInferenceOneTemperatureMin = 0; -export const evaluationGetBenchmarkResponseTwoMetricsItemTwooneInferenceOneTemperatureMax = 2; - -export const evaluationGetBenchmarkResponseTwoMetricsItemTwooneInferenceOneTopPMin = 0; -export const evaluationGetBenchmarkResponseTwoMetricsItemTwooneInferenceOneTopPMax = 1; - -export const evaluationGetBenchmarkResponseTwoMetricsItemTwooneIgnoreRequestFailureDefault = false; -export const evaluationGetBenchmarkResponseTwoMetricsItemTwooneTypeDefault = `faithfulness`; -export const evaluationGetBenchmarkResponseTwoMetricsItemTwotwoNameDefault = ``; -export const evaluationGetBenchmarkResponseTwoMetricsItemTwotwoWorkspaceRegExp = new RegExp( - '^[\\w\\-\\+.@:]+$' -); -export const evaluationGetBenchmarkResponseTwoMetricsItemTwotwoJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetBenchmarkResponseTwoMetricsItemTwotwoJudgeModelOneFormatDefault = `nim`; -export const evaluationGetBenchmarkResponseTwoMetricsItemTwotwoInferenceOneTemperatureMin = 0; -export const evaluationGetBenchmarkResponseTwoMetricsItemTwotwoInferenceOneTemperatureMax = 2; - -export const evaluationGetBenchmarkResponseTwoMetricsItemTwotwoInferenceOneTopPMin = 0; -export const evaluationGetBenchmarkResponseTwoMetricsItemTwotwoInferenceOneTopPMax = 1; - -export const evaluationGetBenchmarkResponseTwoMetricsItemTwotwoIgnoreRequestFailureDefault = false; -export const evaluationGetBenchmarkResponseTwoMetricsItemTwotwoTypeDefault = `noise_sensitivity`; -export const evaluationGetBenchmarkResponseTwoMetricsItemTwothreeNameDefault = `Metric name`; -export const evaluationGetBenchmarkResponseTwoMetricsItemTwothreeWorkspaceDefault = `system`; -export const evaluationGetBenchmarkResponseTwoMetricsItemTwothreeTypeDefault = `system`; -export const evaluationGetBenchmarkResponseTwoDatasetTwoStorageOneReadChunkSizeDefault = 1048576; -export const evaluationGetBenchmarkResponseTwoDatasetTwoStorageOneTypeDefault = `local`; -export const evaluationGetBenchmarkResponseTwoDatasetTwoStorageOneWriteBufferSizeDefault = 16777216; -export const evaluationGetBenchmarkResponseTwoDatasetTwoStorageTwoReadChunkSizeDefault = 1048576; -export const evaluationGetBenchmarkResponseTwoDatasetTwoStorageTwoTypeDefault = `ngc`; -export const evaluationGetBenchmarkResponseTwoDatasetTwoStorageTwoTargetTypeDefault = `resource`; -export const evaluationGetBenchmarkResponseTwoDatasetTwoStorageTwoApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetBenchmarkResponseTwoDatasetTwoStorageTwoHostDefault = `https://api.ngc.nvidia.com`; -export const evaluationGetBenchmarkResponseTwoDatasetTwoStorageThreeReadChunkSizeDefault = 1048576; -export const evaluationGetBenchmarkResponseTwoDatasetTwoStorageThreeTypeDefault = `huggingface`; -export const evaluationGetBenchmarkResponseTwoDatasetTwoStorageThreeRepoTypeDefault = `model`; -export const evaluationGetBenchmarkResponseTwoDatasetTwoStorageThreeRevisionDefault = `main`; -export const evaluationGetBenchmarkResponseTwoDatasetTwoStorageThreeTokenSecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetBenchmarkResponseTwoDatasetTwoStorageThreeEndpointDefault = `https://huggingface.co`; -export const evaluationGetBenchmarkResponseTwoDatasetTwoStorageFourReadChunkSizeDefault = 1048576; -export const evaluationGetBenchmarkResponseTwoDatasetTwoStorageFourTypeDefault = `s3`; -export const evaluationGetBenchmarkResponseTwoDatasetTwoStorageFourPrefixDefault = ``; -export const evaluationGetBenchmarkResponseTwoDatasetTwoStorageFourUseSdkAuthDefault = false; -export const evaluationGetBenchmarkResponseTwoDatasetTwoStorageFourAccessKeyIdSecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetBenchmarkResponseTwoDatasetTwoStorageFourSecretAccessKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetBenchmarkResponseTwoDatasetTwoStorageFourSignatureVersionDefault = `s3v4`; - -export const evaluationGetBenchmarkResponseTwoFieldMappingOneInputRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetBenchmarkResponseTwoFieldMappingOneOutputRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetBenchmarkResponseTwoFieldMappingOneContextRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetBenchmarkResponseTwoFieldMappingOneReferenceRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetBenchmarkResponseTwoFieldMappingOneTrajectoryRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetBenchmarkResponseTwoFieldMappingOneMessagesRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetBenchmarkResponseTwoFieldMappingOneToolCallsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetBenchmarkResponseTwoFieldMappingOneToolsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetBenchmarkResponseTwoFieldMappingOneCustomRegExpOne = new RegExp( - '^[^\\[\\]]\*$' -); -export const evaluationGetBenchmarkResponseThreeWorkspaceDefault = `system`; - -export const EvaluationGetBenchmarkResponse = zod.union([ - zod - .object({ - name: zod.string().describe('Benchmark name'), - workspace: zod - .string() - .regex(evaluationGetBenchmarkResponseOneWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - description: zod.string().optional().describe('Human-readable description of the benchmark.'), - metrics: zod - .array( - zod - .string() - .regex(evaluationGetBenchmarkResponseOneMetricsItemRegExp) - .describe( - "Reference to a metric in the Metrics API.\n\nA reference is a string with format 'workspace\/metric-name' that points to a\npersisted metric entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ) - ) - .describe('The metrics that comprise this benchmark (format: workspace\/metric_name).'), - dataset: zod - .string() - .describe( - "Reference to a Fileset in the Files API.\n\nA reference is a string with format 'workspace\/fileset-name' that points to a\npersisted fileset entity. When used as a dataset source, all files within the\nfileset will be downloaded to the job container.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform." - ) - .describe( - 'Reference to a Fileset in the Files API (format: workspace\/fileset-name). The fileset contains the test cases for this benchmark.' - ), - field_mapping: zod - .object({ - input: zod - .string() - .min(1) - .regex(evaluationGetBenchmarkResponseOneFieldMappingOneInputRegExp) - .optional() - .describe("Binding for the canonical 'input' evaluator field."), - output: zod - .string() - .min(1) - .regex(evaluationGetBenchmarkResponseOneFieldMappingOneOutputRegExp) - .optional() - .describe("Binding for the canonical 'output' evaluator field."), - context: zod - .string() - .min(1) - .regex(evaluationGetBenchmarkResponseOneFieldMappingOneContextRegExp) - .optional() - .describe("Binding for the canonical 'context' evaluator field."), - reference: zod - .string() - .min(1) - .regex(evaluationGetBenchmarkResponseOneFieldMappingOneReferenceRegExp) - .optional() - .describe("Binding for the canonical 'reference' evaluator field."), - trajectory: zod - .string() - .min(1) - .regex(evaluationGetBenchmarkResponseOneFieldMappingOneTrajectoryRegExp) - .optional() - .describe("Binding for the canonical 'trajectory' evaluator field."), - messages: zod - .string() - .min(1) - .regex(evaluationGetBenchmarkResponseOneFieldMappingOneMessagesRegExp) - .optional() - .describe("Binding for the canonical 'messages' evaluator field."), - tool_calls: zod - .string() - .min(1) - .regex(evaluationGetBenchmarkResponseOneFieldMappingOneToolCallsRegExp) - .optional() - .describe("Binding for the canonical 'tool_calls' evaluator field."), - tools: zod - .string() - .min(1) - .regex(evaluationGetBenchmarkResponseOneFieldMappingOneToolsRegExp) - .optional() - .describe("Binding for the canonical 'tools' evaluator field."), - custom: zod - .record( - zod.string(), - zod - .string() - .min(1) - .regex(evaluationGetBenchmarkResponseOneFieldMappingOneCustomRegExpOne) - ) - .optional() - .describe('Additional evaluator field bindings keyed by canonical field name.'), - }) - .describe( - "Maps canonical evaluator fields to raw dataset column paths.\nExample: {'input': 'question', 'output': 'answer', 'reference': 'gold', 'trajectory': 'steps'}" - ) - .optional() - .describe( - "Maps canonical evaluator fields such as 'input' and 'output' to dataset column paths for this benchmark." - ), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('Benchmark response schema.'), - zod - .object({ - name: zod.string().describe('Benchmark name'), - workspace: zod - .string() - .regex(evaluationGetBenchmarkResponseTwoWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - description: zod.string().optional().describe('Human-readable description of the benchmark.'), - metrics: zod - .array( - zod.union([ - zod - .object({ - name: zod - .string() - .default(evaluationGetBenchmarkResponseTwoMetricsItemOneNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(evaluationGetBenchmarkResponseTwoMetricsItemOneWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - type: zod - .literal('bleu') - .default(evaluationGetBenchmarkResponseTwoMetricsItemOneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - references: zod - .array(zod.string()) - .describe( - 'The templates for the ground truth references to calculate BLEU metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to calculate BLEU metric on. If not provided, the output text from the model is used.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('Persisted BLEU metric.'), - zod - .object({ - name: zod - .string() - .default(evaluationGetBenchmarkResponseTwoMetricsItemTwoNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(evaluationGetBenchmarkResponseTwoMetricsItemTwoWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - type: zod - .literal('exact-match') - .default(evaluationGetBenchmarkResponseTwoMetricsItemTwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the exact match metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the exact match metric on. If not provided, the output text from the model is used.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('Persisted Exact Match metric.'), - zod - .object({ - name: zod - .string() - .default(evaluationGetBenchmarkResponseTwoMetricsItemThreeNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(evaluationGetBenchmarkResponseTwoMetricsItemThreeWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - type: zod - .literal('f1') - .default(evaluationGetBenchmarkResponseTwoMetricsItemThreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the F1 metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the F1 metric on. If not provided, the output text from the model is used.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('Persisted F1 metric.'), - zod - .object({ - name: zod - .string() - .default(evaluationGetBenchmarkResponseTwoMetricsItemFourNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(evaluationGetBenchmarkResponseTwoMetricsItemFourWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - type: zod - .literal('llm-judge') - .default(evaluationGetBenchmarkResponseTwoMetricsItemFourTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - model: zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetBenchmarkResponseTwoMetricsItemFourModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetBenchmarkResponseTwoMetricsItemFourModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.') - .describe('The judge model to use for the metric.'), - scores: zod - .array( - zod.union([ - zod - .object({ - name: zod - .string() - .regex( - evaluationGetBenchmarkResponseTwoMetricsItemFourScoresItemOneNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationGetBenchmarkResponseTwoMetricsItemFourScoresItemOneParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationGetBenchmarkResponseTwoMetricsItemFourScoresItemOneParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationGetBenchmarkResponseTwoMetricsItemFourScoresItemOneParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - rubric: zod - .array( - zod.object({ - label: zod - .string() - .describe( - 'The label to use for the level of the rubric grading criteria. (e.g., \"helpful\", \"not_helpful\", \"positive\")' - ), - description: zod - .string() - .optional() - .describe( - 'Describe the semantic meaning of each criteria for the given rubric. If no judge template is set, the input description for labels are included in the generated judge prompt.' - ), - value: zod - .union([zod.number(), zod.number()]) - .describe( - 'The score value to assign for the criteria used for aggregation and ranking.' - ), - }) - ) - .min( - evaluationGetBenchmarkResponseTwoMetricsItemFourScoresItemOneRubricMin - ) - .describe('The rubric for the score.'), - }) - .describe( - 'Score definition for a rubric with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - zod - .object({ - name: zod - .string() - .regex( - evaluationGetBenchmarkResponseTwoMetricsItemFourScoresItemTwoNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationGetBenchmarkResponseTwoMetricsItemFourScoresItemTwoParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationGetBenchmarkResponseTwoMetricsItemFourScoresItemTwoParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationGetBenchmarkResponseTwoMetricsItemFourScoresItemTwoParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .describe( - 'Minimum value for the score range. Must be less than maximum.' - ), - maximum: zod - .union([zod.number(), zod.number()]) - .describe( - 'Maximum value for the score range. Must be greater than minimum.' - ), - }) - .describe( - 'Score definition for a range of values with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - ]) - ) - .min(1) - .describe( - "Definitions of scores that will be extracted from the judge's output." - ), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .optional() - .describe( - 'The prompt template for the judge. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{sample.output_text}} to use the model output within the template or {{item.xxx}} to reference input columns from the dataset.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - "Prompt template fields that should remain in the inferred input schema but not be required. Use this for fields like 'reference' when the metric can still run without them." - ), - structured_output: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'JSON schema to apply structured output for the judge model evaluation. Structured output is derived from scores when omitted. Use this option if there are custom requirements for the output of the judge.' - ), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetBenchmarkResponseTwoMetricsItemFourInferenceOneTemperatureMin - ) - .max( - evaluationGetBenchmarkResponseTwoMetricsItemFourInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetBenchmarkResponseTwoMetricsItemFourInferenceOneTopPMin) - .max(evaluationGetBenchmarkResponseTwoMetricsItemFourInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge model.'), - system_prompt: zod - .string() - .optional() - .describe( - "Initial instructions that define the judge model's role and behavior for the conversation. This is prepended to the messages as a system message." - ), - reasoning: zod - .object({ - end_token: zod - .string() - .optional() - .describe( - "Configure the end token to trim reasoning context based on the model's reasoning API. Example for Nemotron models: '<\/think>'" - ), - include_if_not_finished: zod - .boolean() - .optional() - .describe( - 'Configure whether to include reasoning context if the model has not finished reasoning.' - ), - effort: zod - .string() - .optional() - .describe( - 'Option for OpenAI models to specify low, medium, or high reasoning effort.' - ), - }) - .describe("Custom settings that control the model's reasoning behavior.") - .optional() - .describe( - "Custom settings that control the judge model's reasoning behavior. For reasoning models (e.g., Nemotron), use `end_token` to strip reasoning traces from the output." - ), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetBenchmarkResponseTwoMetricsItemFourIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('Persisted LLM-as-a-Judge metric.'), - zod - .object({ - name: zod - .string() - .default(evaluationGetBenchmarkResponseTwoMetricsItemFiveNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(evaluationGetBenchmarkResponseTwoMetricsItemFiveWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - type: zod - .literal('number-check') - .default(evaluationGetBenchmarkResponseTwoMetricsItemFiveTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - '>=', - 'gte', - 'greater than or equal', - '>', - 'gt', - 'greater than', - '<=', - 'lte', - 'less than or equal', - '<', - 'lt', - 'less than', - 'absolute difference', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - epsilon: zod - .union([zod.number(), zod.number()]) - .optional() - .describe('Specify the tolerance for the absolute difference of values.'), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('Persisted number check metric.'), - zod - .object({ - name: zod - .string() - .default(evaluationGetBenchmarkResponseTwoMetricsItemSixNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(evaluationGetBenchmarkResponseTwoMetricsItemSixWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - type: zod - .literal('remote') - .default(evaluationGetBenchmarkResponseTwoMetricsItemSixTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex(evaluationGetBenchmarkResponseTwoMetricsItemSixApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default(evaluationGetBenchmarkResponseTwoMetricsItemSixTimeoutSecondsDefault) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default(evaluationGetBenchmarkResponseTwoMetricsItemSixMaxRetriesDefault) - .describe('Maximum number of retry attempts.'), - body: zod - .record(zod.string(), zod.unknown()) - .describe('Jinja template for request payload'), - scores: zod - .array( - zod - .object({ - name: zod - .string() - .regex( - evaluationGetBenchmarkResponseTwoMetricsItemSixScoresItemNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .object({ - type: zod - .literal('json') - .default( - evaluationGetBenchmarkResponseTwoMetricsItemSixScoresItemParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.') - .optional() - .describe( - 'The method to parse the score. Only JSON parsing is supported for remote metrics.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe( - 'Minimum value for the score range. Defaults to None (no lower bound).' - ), - maximum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe( - 'Maximum value for the score range. Defaults to None (no upper bound).' - ), - }) - .describe( - 'Score configuration for remote metrics.\n\nUnlike RangeScore, minimum and maximum are optional (default to None = no bounds).\nThis avoids JSON serialization issues with infinity values.' - ) - ) - .describe('List of scores to extract from the remote response'), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('Persisted Remote metric.'), - zod - .object({ - name: zod - .string() - .default(evaluationGetBenchmarkResponseTwoMetricsItemSevenNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(evaluationGetBenchmarkResponseTwoMetricsItemSevenWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - type: zod - .literal('nemo-agent-toolkit-remote') - .default(evaluationGetBenchmarkResponseTwoMetricsItemSevenTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex(evaluationGetBenchmarkResponseTwoMetricsItemSevenApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default(evaluationGetBenchmarkResponseTwoMetricsItemSevenTimeoutSecondsDefault) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default(evaluationGetBenchmarkResponseTwoMetricsItemSevenMaxRetriesDefault) - .describe('Maximum number of retry attempts.'), - evaluator_name: zod - .string() - .describe('The name of the evaluator (also used as the score name).'), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('Persisted NeMo Agent Toolkit Remote metric.'), - zod - .object({ - name: zod - .string() - .default(evaluationGetBenchmarkResponseTwoMetricsItemEightNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(evaluationGetBenchmarkResponseTwoMetricsItemEightWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - type: zod - .literal('rouge') - .default(evaluationGetBenchmarkResponseTwoMetricsItemEightTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to evaluate the ROUGE metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the ROUGE metric on. If not provided, the output text from the model is used.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('Persisted ROUGE metric.'), - zod - .object({ - name: zod - .string() - .default(evaluationGetBenchmarkResponseTwoMetricsItemNineNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(evaluationGetBenchmarkResponseTwoMetricsItemNineWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - type: zod - .literal('string-check') - .default(evaluationGetBenchmarkResponseTwoMetricsItemNineTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - 'contains', - 'not contains', - 'startswith', - 'endswith', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('Persisted string check metric.'), - zod - .object({ - name: zod - .string() - .default(evaluationGetBenchmarkResponseTwoMetricsItemOnezeroNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(evaluationGetBenchmarkResponseTwoMetricsItemOnezeroWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - type: zod - .literal('tool-calling') - .default(evaluationGetBenchmarkResponseTwoMetricsItemOnezeroTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to evaluate tool calling accuracy.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('Persisted Tool Calling metric.'), - zod - .object({ - name: zod - .string() - .default(evaluationGetBenchmarkResponseTwoMetricsItemOneoneNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(evaluationGetBenchmarkResponseTwoMetricsItemOneoneWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - judge_model: zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetBenchmarkResponseTwoMetricsItemOneoneJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetBenchmarkResponseTwoMetricsItemOneoneJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.') - .describe('The LLM model to use as judge.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetBenchmarkResponseTwoMetricsItemOneoneInferenceOneTemperatureMin - ) - .max( - evaluationGetBenchmarkResponseTwoMetricsItemOneoneInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetBenchmarkResponseTwoMetricsItemOneoneInferenceOneTopPMin) - .max(evaluationGetBenchmarkResponseTwoMetricsItemOneoneInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetBenchmarkResponseTwoMetricsItemOneoneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('topic_adherence') - .default(evaluationGetBenchmarkResponseTwoMetricsItemOneoneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - metric_mode: zod - .enum(['f1', 'precision', 'recall']) - .default(evaluationGetBenchmarkResponseTwoMetricsItemOneoneMetricModeDefault) - .describe('The mode for computing topic adherence score.'), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('RAGAS metric for measuring topic adherence.'), - zod - .object({ - name: zod - .string() - .default(evaluationGetBenchmarkResponseTwoMetricsItemOnetwoNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(evaluationGetBenchmarkResponseTwoMetricsItemOnetwoWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - type: zod - .literal('tool_call_accuracy') - .default(evaluationGetBenchmarkResponseTwoMetricsItemOnetwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('RAGAS metric for measuring tool call accuracy.'), - zod - .object({ - name: zod - .string() - .default(evaluationGetBenchmarkResponseTwoMetricsItemOnethreeNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(evaluationGetBenchmarkResponseTwoMetricsItemOnethreeWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - judge_model: zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetBenchmarkResponseTwoMetricsItemOnethreeJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetBenchmarkResponseTwoMetricsItemOnethreeJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.') - .describe('The LLM model to use as judge.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetBenchmarkResponseTwoMetricsItemOnethreeInferenceOneTemperatureMin - ) - .max( - evaluationGetBenchmarkResponseTwoMetricsItemOnethreeInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetBenchmarkResponseTwoMetricsItemOnethreeInferenceOneTopPMin) - .max(evaluationGetBenchmarkResponseTwoMetricsItemOnethreeInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetBenchmarkResponseTwoMetricsItemOnethreeIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('agent_goal_accuracy') - .default(evaluationGetBenchmarkResponseTwoMetricsItemOnethreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - use_reference: zod - .boolean() - .default(evaluationGetBenchmarkResponseTwoMetricsItemOnethreeUseReferenceDefault) - .describe('Whether to use reference for goal accuracy evaluation.'), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('RAGAS metric for measuring agent goal accuracy.'), - zod - .object({ - name: zod - .string() - .default(evaluationGetBenchmarkResponseTwoMetricsItemOnefourNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(evaluationGetBenchmarkResponseTwoMetricsItemOnefourWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - judge_model: zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetBenchmarkResponseTwoMetricsItemOnefourJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetBenchmarkResponseTwoMetricsItemOnefourJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.') - .describe('The LLM model to use as judge.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetBenchmarkResponseTwoMetricsItemOnefourInferenceOneTemperatureMin - ) - .max( - evaluationGetBenchmarkResponseTwoMetricsItemOnefourInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetBenchmarkResponseTwoMetricsItemOnefourInferenceOneTopPMin) - .max(evaluationGetBenchmarkResponseTwoMetricsItemOnefourInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetBenchmarkResponseTwoMetricsItemOnefourIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('answer_accuracy') - .default(evaluationGetBenchmarkResponseTwoMetricsItemOnefourTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('RAGAS metric for measuring answer accuracy.'), - zod - .object({ - name: zod - .string() - .default(evaluationGetBenchmarkResponseTwoMetricsItemOnefiveNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(evaluationGetBenchmarkResponseTwoMetricsItemOnefiveWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - judge_model: zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetBenchmarkResponseTwoMetricsItemOnefiveJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetBenchmarkResponseTwoMetricsItemOnefiveJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.') - .describe('The LLM model to use as judge.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetBenchmarkResponseTwoMetricsItemOnefiveInferenceOneTemperatureMin - ) - .max( - evaluationGetBenchmarkResponseTwoMetricsItemOnefiveInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetBenchmarkResponseTwoMetricsItemOnefiveInferenceOneTopPMin) - .max(evaluationGetBenchmarkResponseTwoMetricsItemOnefiveInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetBenchmarkResponseTwoMetricsItemOnefiveIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_relevance') - .default(evaluationGetBenchmarkResponseTwoMetricsItemOnefiveTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('RAGAS metric for measuring context relevance.'), - zod - .object({ - name: zod - .string() - .default(evaluationGetBenchmarkResponseTwoMetricsItemOnesixNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(evaluationGetBenchmarkResponseTwoMetricsItemOnesixWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - judge_model: zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetBenchmarkResponseTwoMetricsItemOnesixJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetBenchmarkResponseTwoMetricsItemOnesixJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.') - .describe('The LLM model to use as judge.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetBenchmarkResponseTwoMetricsItemOnesixInferenceOneTemperatureMin - ) - .max( - evaluationGetBenchmarkResponseTwoMetricsItemOnesixInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetBenchmarkResponseTwoMetricsItemOnesixInferenceOneTopPMin) - .max(evaluationGetBenchmarkResponseTwoMetricsItemOnesixInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetBenchmarkResponseTwoMetricsItemOnesixIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_groundedness') - .default(evaluationGetBenchmarkResponseTwoMetricsItemOnesixTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('RAGAS metric for measuring response groundedness.'), - zod - .object({ - name: zod - .string() - .default(evaluationGetBenchmarkResponseTwoMetricsItemOnesevenNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(evaluationGetBenchmarkResponseTwoMetricsItemOnesevenWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - judge_model: zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetBenchmarkResponseTwoMetricsItemOnesevenJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetBenchmarkResponseTwoMetricsItemOnesevenJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.') - .describe('The LLM model to use as judge.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetBenchmarkResponseTwoMetricsItemOnesevenInferenceOneTemperatureMin - ) - .max( - evaluationGetBenchmarkResponseTwoMetricsItemOnesevenInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetBenchmarkResponseTwoMetricsItemOnesevenInferenceOneTopPMin) - .max(evaluationGetBenchmarkResponseTwoMetricsItemOnesevenInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetBenchmarkResponseTwoMetricsItemOnesevenIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_recall') - .default(evaluationGetBenchmarkResponseTwoMetricsItemOnesevenTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('RAGAS metric for measuring context recall.'), - zod - .object({ - name: zod - .string() - .default(evaluationGetBenchmarkResponseTwoMetricsItemOneeightNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(evaluationGetBenchmarkResponseTwoMetricsItemOneeightWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - judge_model: zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetBenchmarkResponseTwoMetricsItemOneeightJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetBenchmarkResponseTwoMetricsItemOneeightJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.') - .describe('The LLM model to use as judge.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetBenchmarkResponseTwoMetricsItemOneeightInferenceOneTemperatureMin - ) - .max( - evaluationGetBenchmarkResponseTwoMetricsItemOneeightInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetBenchmarkResponseTwoMetricsItemOneeightInferenceOneTopPMin) - .max(evaluationGetBenchmarkResponseTwoMetricsItemOneeightInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetBenchmarkResponseTwoMetricsItemOneeightIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_precision') - .default(evaluationGetBenchmarkResponseTwoMetricsItemOneeightTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('RAGAS metric for measuring context precision.'), - zod - .object({ - name: zod - .string() - .default(evaluationGetBenchmarkResponseTwoMetricsItemOnenineNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(evaluationGetBenchmarkResponseTwoMetricsItemOnenineWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - judge_model: zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetBenchmarkResponseTwoMetricsItemOnenineJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetBenchmarkResponseTwoMetricsItemOnenineJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.') - .describe('The LLM model to use as judge.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetBenchmarkResponseTwoMetricsItemOnenineInferenceOneTemperatureMin - ) - .max( - evaluationGetBenchmarkResponseTwoMetricsItemOnenineInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetBenchmarkResponseTwoMetricsItemOnenineInferenceOneTopPMin) - .max(evaluationGetBenchmarkResponseTwoMetricsItemOnenineInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetBenchmarkResponseTwoMetricsItemOnenineIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_entity_recall') - .default(evaluationGetBenchmarkResponseTwoMetricsItemOnenineTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('RAGAS metric for measuring context entity recall.'), - zod - .object({ - name: zod - .string() - .default(evaluationGetBenchmarkResponseTwoMetricsItemTwozeroNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(evaluationGetBenchmarkResponseTwoMetricsItemTwozeroWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - embeddings_model: zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetBenchmarkResponseTwoMetricsItemTwozeroEmbeddingsModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetBenchmarkResponseTwoMetricsItemTwozeroEmbeddingsModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.') - .describe('The embeddings model to use.'), - judge_model: zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetBenchmarkResponseTwoMetricsItemTwozeroJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetBenchmarkResponseTwoMetricsItemTwozeroJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.') - .describe('The LLM model to use as judge.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetBenchmarkResponseTwoMetricsItemTwozeroInferenceOneTemperatureMin - ) - .max( - evaluationGetBenchmarkResponseTwoMetricsItemTwozeroInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetBenchmarkResponseTwoMetricsItemTwozeroInferenceOneTopPMin) - .max(evaluationGetBenchmarkResponseTwoMetricsItemTwozeroInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetBenchmarkResponseTwoMetricsItemTwozeroIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_relevancy') - .default(evaluationGetBenchmarkResponseTwoMetricsItemTwozeroTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - strictness: zod - .number() - .default(evaluationGetBenchmarkResponseTwoMetricsItemTwozeroStrictnessDefault) - .describe('Number of parallel questions generated. NIM can only generate 1.'), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('RAGAS metric for measuring response relevancy.'), - zod - .object({ - name: zod - .string() - .default(evaluationGetBenchmarkResponseTwoMetricsItemTwooneNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(evaluationGetBenchmarkResponseTwoMetricsItemTwooneWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - judge_model: zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetBenchmarkResponseTwoMetricsItemTwooneJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetBenchmarkResponseTwoMetricsItemTwooneJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.') - .describe('The LLM model to use as judge.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetBenchmarkResponseTwoMetricsItemTwooneInferenceOneTemperatureMin - ) - .max( - evaluationGetBenchmarkResponseTwoMetricsItemTwooneInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetBenchmarkResponseTwoMetricsItemTwooneInferenceOneTopPMin) - .max(evaluationGetBenchmarkResponseTwoMetricsItemTwooneInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetBenchmarkResponseTwoMetricsItemTwooneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('faithfulness') - .default(evaluationGetBenchmarkResponseTwoMetricsItemTwooneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('RAGAS metric for measuring faithfulness.'), - zod - .object({ - name: zod - .string() - .default(evaluationGetBenchmarkResponseTwoMetricsItemTwotwoNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(evaluationGetBenchmarkResponseTwoMetricsItemTwotwoWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - judge_model: zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetBenchmarkResponseTwoMetricsItemTwotwoJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetBenchmarkResponseTwoMetricsItemTwotwoJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.') - .describe('The LLM model to use as judge.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetBenchmarkResponseTwoMetricsItemTwotwoInferenceOneTemperatureMin - ) - .max( - evaluationGetBenchmarkResponseTwoMetricsItemTwotwoInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetBenchmarkResponseTwoMetricsItemTwotwoInferenceOneTopPMin) - .max(evaluationGetBenchmarkResponseTwoMetricsItemTwotwoInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetBenchmarkResponseTwoMetricsItemTwotwoIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('noise_sensitivity') - .default(evaluationGetBenchmarkResponseTwoMetricsItemTwotwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('RAGAS metric for measuring noise sensitivity.'), - zod.object({ - name: zod - .string() - .default(evaluationGetBenchmarkResponseTwoMetricsItemTwothreeNameDefault), - workspace: zod - .string() - .default(evaluationGetBenchmarkResponseTwoMetricsItemTwothreeWorkspaceDefault), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - type: zod - .enum(['system', 'system-retriever']) - .default(evaluationGetBenchmarkResponseTwoMetricsItemTwothreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline', 'retriever'])) - .default([`online`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - required_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod.string().optional().describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe('List of required parameters for running an evaluation with the metric.'), - optional_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod.string().optional().describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe('List of optional parameters for running an evaluation with the metric.'), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }), - ]) - ) - .describe('The fully defined metrics of the benchmark.'), - dataset: zod - .union([ - zod - .object({ - rows: zod - .array(zod.record(zod.string(), zod.unknown())) - .min(1) - .describe( - 'Array of data rows. Each row can be any valid JSON value (object, string, array, etc.).' - ), - }) - .describe( - 'Inline dataset definition with embedded rows.\n\nUse this for quick evaluations without persisting the dataset first.' - ), - zod - .object({ - id: zod.string(), - name: zod.string(), - workspace: zod.string(), - description: zod.string(), - purpose: zod.enum(['dataset', 'generic', 'model']), - storage: zod.union([ - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationGetBenchmarkResponseTwoDatasetTwoStorageOneReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('local') - .default(evaluationGetBenchmarkResponseTwoDatasetTwoStorageOneTypeDefault), - path: zod.string(), - write_buffer_size: zod - .number() - .default( - evaluationGetBenchmarkResponseTwoDatasetTwoStorageOneWriteBufferSizeDefault - ) - .describe('How many bytes to buffer before flushing to disk'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationGetBenchmarkResponseTwoDatasetTwoStorageTwoReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('ngc') - .default(evaluationGetBenchmarkResponseTwoDatasetTwoStorageTwoTypeDefault), - org: zod.string().describe('NGC organization name'), - team: zod.string().describe('NGC team name'), - target: zod.string().describe('NGC asset name (model or resource)'), - target_type: zod - .enum(['resource', 'model']) - .default(evaluationGetBenchmarkResponseTwoDatasetTwoStorageTwoTargetTypeDefault) - .describe("Type of NGC asset: 'resource' or 'model'"), - version: zod - .string() - .optional() - .describe('NGC asset version. If not provided, defaults to latest version'), - original_version: zod - .string() - .optional() - .describe( - "The original version requested by the user before resolution (e.g., 'latest' or None). The 'version' field contains the resolved version ID." - ), - api_key_secret: zod - .string() - .regex( - evaluationGetBenchmarkResponseTwoDatasetTwoStorageTwoApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .describe('NGC API key secret name'), - host: zod - .string() - .default(evaluationGetBenchmarkResponseTwoDatasetTwoStorageTwoHostDefault) - .describe('NGC API host URL'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationGetBenchmarkResponseTwoDatasetTwoStorageThreeReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('huggingface') - .default(evaluationGetBenchmarkResponseTwoDatasetTwoStorageThreeTypeDefault), - repo_id: zod - .string() - .describe("Huggingface repository ID (e.g., 'meta-llama\/Llama-2-7b')"), - repo_type: zod - .enum(['model', 'dataset', 'space']) - .default(evaluationGetBenchmarkResponseTwoDatasetTwoStorageThreeRepoTypeDefault) - .describe("Type of Huggingface repository: 'model', 'dataset', or 'space'"), - revision: zod - .string() - .default(evaluationGetBenchmarkResponseTwoDatasetTwoStorageThreeRevisionDefault) - .describe("Branch, tag, or commit SHA. Defaults to 'main'"), - original_revision: zod - .string() - .optional() - .describe( - "The original revision requested by the user before resolution (e.g., 'main'). The 'revision' field contains the resolved commit SHA." - ), - token_secret: zod - .string() - .regex( - evaluationGetBenchmarkResponseTwoDatasetTwoStorageThreeTokenSecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe('Huggingface API `token` secret name for private repositories'), - endpoint: zod - .string() - .default(evaluationGetBenchmarkResponseTwoDatasetTwoStorageThreeEndpointDefault) - .describe('Huggingface Hub endpoint URL. Use for self-hosted instances.'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationGetBenchmarkResponseTwoDatasetTwoStorageFourReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('s3') - .default(evaluationGetBenchmarkResponseTwoDatasetTwoStorageFourTypeDefault), - bucket: zod.string().describe('S3 bucket name'), - prefix: zod - .string() - .default(evaluationGetBenchmarkResponseTwoDatasetTwoStorageFourPrefixDefault) - .describe( - 'Optional prefix (folder path) within the bucket. All operations will be relative to this prefix.' - ), - region: zod - .string() - .optional() - .describe( - 'AWS region. If not specified, uses SDK default (env vars, instance metadata, etc.)' - ), - endpoint_url: zod - .string() - .optional() - .describe( - 'Custom endpoint URL for S3-compatible storage (e.g., MinIO, Garage, RustFS). If not specified, uses AWS S3.' - ), - use_sdk_auth: zod - .boolean() - .default( - evaluationGetBenchmarkResponseTwoDatasetTwoStorageFourUseSdkAuthDefault - ) - .describe( - "Use AWS SDK credential chain for authentication (env vars like AWS_ACCESS_KEY_ID, IAM roles, instance profiles, etc.). This option is only available for the platform's default storage backend. User-provided S3 storage must use explicit credentials via access_key_id_secret and secret_access_key_secret." - ), - access_key_id_secret: zod - .string() - .regex( - evaluationGetBenchmarkResponseTwoDatasetTwoStorageFourAccessKeyIdSecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Secret reference for AWS access key ID. Requires use_sdk_auth=False.' - ), - secret_access_key_secret: zod - .string() - .regex( - evaluationGetBenchmarkResponseTwoDatasetTwoStorageFourSecretAccessKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Secret reference for AWS secret access key. Requires use_sdk_auth=False.' - ), - signature_version: zod - .enum(['s3v4', 's3']) - .default( - evaluationGetBenchmarkResponseTwoDatasetTwoStorageFourSignatureVersionDefault - ) - .describe( - "AWS signature version for request signing. Use 's3' for legacy systems that only support signature v2." - ), - }), - ]), - metadata: zod - .object({ - dataset: zod - .object({ - schema: zod - .union([zod.record(zod.string(), zod.unknown()), zod.string()]) - .optional() - .describe( - 'Default row schema for files in this fileset, either inline JSON Schema or a schema_defs key.' - ), - schema_defs: zod - .record(zod.string(), zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'Reusable JSON Schema definitions keyed by name for deduplicating per-file dataset schemas.' - ), - schemas_by_path: zod - .record( - zod.string(), - zod.union([zod.record(zod.string(), zod.unknown()), zod.string()]) - ) - .optional() - .describe( - 'Optional per-file row schemas keyed by relative path within the fileset. Each value may be inline JSON Schema or a schema_defs key.' - ), - }) - .optional() - .describe('Content for dataset-type filesets.'), - model: zod - .object({ - tool_calling: zod - .object({ - chat_template: zod - .string() - .optional() - .describe('Jinja2 chat template for the model.'), - tool_call_parser: zod - .string() - .optional() - .describe( - "Name of the tool call parser (e.g., 'openai', 'hermes', 'pythonic', 'llama3_json', 'mistral')." - ), - tool_call_plugin: zod - .string() - .optional() - .describe( - "Reference to a fileset containing a custom tool call plugin Python file. Expected format: '{workspace}\/{fileset_name}'." - ), - auto_tool_choice: zod - .boolean() - .optional() - .describe('Whether to enable automatic tool choice.'), - }) - .optional() - .describe( - 'Content for tool-calling configuration on model filesets.\n\nStores chat template and tool calling settings that are merged into\nthe ModelSpec during checkpoint analysis.' - ), - }) - .optional() - .describe( - 'Content for model-type filesets.\n\nContains tool calling configuration that is merged into the ModelSpec\nduring checkpoint analysis.' - ), - }) - .describe( - 'Tagged metadata container - the key indicates the type.\n\nExample:\n metadata = FilesetMetadata(\n dataset=DatasetMetadataContent(\n schema={\"columns\": [\"id\", \"name\"]},\n )\n )' - ), - custom_fields: zod.record(zod.string(), zod.unknown()), - project: zod.string(), - created_at: zod.string(), - updated_at: zod.string(), - }) - .describe('Response DTO for fileset operations.'), - zod - .string() - .describe( - "Reference to a Fileset in the Files API.\n\nA reference is a string with format 'workspace\/fileset-name' that points to a\npersisted fileset entity. When used as a dataset source, all files within the\nfileset will be downloaded to the job container.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform." - ), - ]) - .describe('Dataset containing the test cases for this benchmark.'), - field_mapping: zod - .object({ - input: zod - .string() - .min(1) - .regex(evaluationGetBenchmarkResponseTwoFieldMappingOneInputRegExp) - .optional() - .describe("Binding for the canonical 'input' evaluator field."), - output: zod - .string() - .min(1) - .regex(evaluationGetBenchmarkResponseTwoFieldMappingOneOutputRegExp) - .optional() - .describe("Binding for the canonical 'output' evaluator field."), - context: zod - .string() - .min(1) - .regex(evaluationGetBenchmarkResponseTwoFieldMappingOneContextRegExp) - .optional() - .describe("Binding for the canonical 'context' evaluator field."), - reference: zod - .string() - .min(1) - .regex(evaluationGetBenchmarkResponseTwoFieldMappingOneReferenceRegExp) - .optional() - .describe("Binding for the canonical 'reference' evaluator field."), - trajectory: zod - .string() - .min(1) - .regex(evaluationGetBenchmarkResponseTwoFieldMappingOneTrajectoryRegExp) - .optional() - .describe("Binding for the canonical 'trajectory' evaluator field."), - messages: zod - .string() - .min(1) - .regex(evaluationGetBenchmarkResponseTwoFieldMappingOneMessagesRegExp) - .optional() - .describe("Binding for the canonical 'messages' evaluator field."), - tool_calls: zod - .string() - .min(1) - .regex(evaluationGetBenchmarkResponseTwoFieldMappingOneToolCallsRegExp) - .optional() - .describe("Binding for the canonical 'tool_calls' evaluator field."), - tools: zod - .string() - .min(1) - .regex(evaluationGetBenchmarkResponseTwoFieldMappingOneToolsRegExp) - .optional() - .describe("Binding for the canonical 'tools' evaluator field."), - custom: zod - .record( - zod.string(), - zod - .string() - .min(1) - .regex(evaluationGetBenchmarkResponseTwoFieldMappingOneCustomRegExpOne) - ) - .optional() - .describe('Additional evaluator field bindings keyed by canonical field name.'), - }) - .describe( - "Maps canonical evaluator fields to raw dataset column paths.\nExample: {'input': 'question', 'output': 'answer', 'reference': 'gold', 'trajectory': 'steps'}" - ) - .optional() - .describe( - "Maps canonical evaluator fields such as 'input' and 'output' to dataset column paths for this benchmark." - ), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('Extended benchmark response. Includes the metrics and dataset as entities.'), - zod - .object({ - name: zod.string().describe('Benchmark name'), - workspace: zod.string().default(evaluationGetBenchmarkResponseThreeWorkspaceDefault), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - description: zod.string().optional().describe('Human-readable description of the benchmark.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - required_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod.string().optional().describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe('List of required parameters for running an evaluation with the benchmark.'), - optional_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod.string().optional().describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe('List of required parameters for running an evaluation with the benchmark.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`]) - .describe( - 'A benchmark can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('System Benchmark response schema.'), -]); - -/** - * Delete a custom evaluation benchmark. Predefined benchmarks cannot be deleted. - * @summary Delete Benchmark - */ -export const EvaluationDeleteBenchmarkParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const evaluationDeleteBenchmarkResponseMessageDefault = `Resource deleted successfully.`; - -export const EvaluationDeleteBenchmarkResponse = zod.object({ - message: zod.string().default(evaluationDeleteBenchmarkResponseMessageDefault), - id: zod.string().optional().describe('The ID of the deleted resource.'), - deleted_at: zod - .string() - .datetime({}) - .optional() - .describe('The timestamp when the resource was deleted.'), -}); - -/** - * Run a synchronous metric evaluation on a dataset. - -This endpoint evaluates the given dataset using the specified metric and returns -results immediately. Use this for quick, interactive evaluations with small datasets -(up to 10 rows). For larger evaluations, use the async job-based evaluation endpoints. - -The metric can be specified either as a URN reference to a stored metric -(e.g., "workspace/metric_name") or as an inline metric definition. - -The dataset must be provided inline with rows. - -**Aggregate Score Fields:** -The `name` and `count` fields are always included in aggregate scores. -By default, additional fields returned are: nan_count, sum, mean, min, max. -Use the `aggregate_fields` query parameter to customize which optional fields -are included (e.g., std_dev, variance, percentiles, histogram, rubric_distribution, mode_category). - * @summary Evaluate Metric - */ -export const EvaluationEvaluateMetricParams = zod.object({ - workspace: zod.string(), -}); - -export const evaluationEvaluateMetricQueryAggregateFieldsDefault = []; - -export const EvaluationEvaluateMetricQueryParams = zod.object({ - aggregate_fields: zod - .array( - zod.enum([ - 'nan_count', - 'sum', - 'mean', - 'min', - 'max', - 'std_dev', - 'variance', - 'score_type', - 'percentiles', - 'histogram', - 'rubric_distribution', - 'mode_category', - ]) - ) - .default(evaluationEvaluateMetricQueryAggregateFieldsDefault) - .describe( - "Aggregate score fields to include in the response (comma-separated or repeated). Default: ('nan_count', 'sum', 'mean', 'min', 'max'). Available: ('nan_count', 'sum', 'mean', 'min', 'max', 'std_dev', 'variance', 'score_type', 'percentiles', 'histogram', 'rubric_distribution', 'mode_category')." - ), -}); - -export const evaluationEvaluateMetricBodyMetricOneRegExp = new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationEvaluateMetricBodyMetricTwoOneTypeDefault = `llm-judge`; -export const evaluationEvaluateMetricBodyMetricTwoOneModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationEvaluateMetricBodyMetricTwoOneModelOneFormatDefault = `nim`; -export const evaluationEvaluateMetricBodyMetricTwoOneModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationEvaluateMetricBodyMetricTwoOneScoresItemOneNameRegExp = new RegExp( - '^[a-z0-9_]+$' -); -export const evaluationEvaluateMetricBodyMetricTwoOneScoresItemOneParserOneTypeDefault = `json`; -export const evaluationEvaluateMetricBodyMetricTwoOneScoresItemOneParserTwoTypeDefault = `regex`; -export const evaluationEvaluateMetricBodyMetricTwoOneScoresItemOneParserTwoMethodDefault = `match`; -export const evaluationEvaluateMetricBodyMetricTwoOneScoresItemOneRubricMin = 2; - -export const evaluationEvaluateMetricBodyMetricTwoOneScoresItemTwoNameRegExp = new RegExp( - '^[a-z0-9_]+$' -); -export const evaluationEvaluateMetricBodyMetricTwoOneScoresItemTwoParserOneTypeDefault = `json`; -export const evaluationEvaluateMetricBodyMetricTwoOneScoresItemTwoParserTwoTypeDefault = `regex`; -export const evaluationEvaluateMetricBodyMetricTwoOneScoresItemTwoParserTwoMethodDefault = `match`; - -export const evaluationEvaluateMetricBodyMetricTwoOneInferenceOneTemperatureMin = 0; -export const evaluationEvaluateMetricBodyMetricTwoOneInferenceOneTemperatureMax = 2; - -export const evaluationEvaluateMetricBodyMetricTwoOneInferenceOneTopPMin = 0; -export const evaluationEvaluateMetricBodyMetricTwoOneInferenceOneTopPMax = 1; - -export const evaluationEvaluateMetricBodyMetricTwoOneIgnoreRequestFailureDefault = false; -export const evaluationEvaluateMetricBodyMetricTwoTwoJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationEvaluateMetricBodyMetricTwoTwoJudgeModelOneFormatDefault = `nim`; -export const evaluationEvaluateMetricBodyMetricTwoTwoJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationEvaluateMetricBodyMetricTwoTwoInferenceOneTemperatureMin = 0; -export const evaluationEvaluateMetricBodyMetricTwoTwoInferenceOneTemperatureMax = 2; - -export const evaluationEvaluateMetricBodyMetricTwoTwoInferenceOneTopPMin = 0; -export const evaluationEvaluateMetricBodyMetricTwoTwoInferenceOneTopPMax = 1; - -export const evaluationEvaluateMetricBodyMetricTwoTwoIgnoreRequestFailureDefault = false; -export const evaluationEvaluateMetricBodyMetricTwoTwoTypeDefault = `topic_adherence`; -export const evaluationEvaluateMetricBodyMetricTwoTwoMetricModeDefault = `f1`; -export const evaluationEvaluateMetricBodyMetricTwoThreeJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationEvaluateMetricBodyMetricTwoThreeJudgeModelOneFormatDefault = `nim`; -export const evaluationEvaluateMetricBodyMetricTwoThreeJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationEvaluateMetricBodyMetricTwoThreeInferenceOneTemperatureMin = 0; -export const evaluationEvaluateMetricBodyMetricTwoThreeInferenceOneTemperatureMax = 2; - -export const evaluationEvaluateMetricBodyMetricTwoThreeInferenceOneTopPMin = 0; -export const evaluationEvaluateMetricBodyMetricTwoThreeInferenceOneTopPMax = 1; - -export const evaluationEvaluateMetricBodyMetricTwoThreeIgnoreRequestFailureDefault = false; -export const evaluationEvaluateMetricBodyMetricTwoThreeTypeDefault = `agent_goal_accuracy`; -export const evaluationEvaluateMetricBodyMetricTwoThreeUseReferenceDefault = true; -export const evaluationEvaluateMetricBodyMetricTwoFourJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationEvaluateMetricBodyMetricTwoFourJudgeModelOneFormatDefault = `nim`; -export const evaluationEvaluateMetricBodyMetricTwoFourJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationEvaluateMetricBodyMetricTwoFourInferenceOneTemperatureMin = 0; -export const evaluationEvaluateMetricBodyMetricTwoFourInferenceOneTemperatureMax = 2; - -export const evaluationEvaluateMetricBodyMetricTwoFourInferenceOneTopPMin = 0; -export const evaluationEvaluateMetricBodyMetricTwoFourInferenceOneTopPMax = 1; - -export const evaluationEvaluateMetricBodyMetricTwoFourIgnoreRequestFailureDefault = false; -export const evaluationEvaluateMetricBodyMetricTwoFourTypeDefault = `answer_accuracy`; -export const evaluationEvaluateMetricBodyMetricTwoFiveJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationEvaluateMetricBodyMetricTwoFiveJudgeModelOneFormatDefault = `nim`; -export const evaluationEvaluateMetricBodyMetricTwoFiveJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationEvaluateMetricBodyMetricTwoFiveInferenceOneTemperatureMin = 0; -export const evaluationEvaluateMetricBodyMetricTwoFiveInferenceOneTemperatureMax = 2; - -export const evaluationEvaluateMetricBodyMetricTwoFiveInferenceOneTopPMin = 0; -export const evaluationEvaluateMetricBodyMetricTwoFiveInferenceOneTopPMax = 1; - -export const evaluationEvaluateMetricBodyMetricTwoFiveIgnoreRequestFailureDefault = false; -export const evaluationEvaluateMetricBodyMetricTwoFiveTypeDefault = `context_relevance`; -export const evaluationEvaluateMetricBodyMetricTwoSixJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationEvaluateMetricBodyMetricTwoSixJudgeModelOneFormatDefault = `nim`; -export const evaluationEvaluateMetricBodyMetricTwoSixJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationEvaluateMetricBodyMetricTwoSixInferenceOneTemperatureMin = 0; -export const evaluationEvaluateMetricBodyMetricTwoSixInferenceOneTemperatureMax = 2; - -export const evaluationEvaluateMetricBodyMetricTwoSixInferenceOneTopPMin = 0; -export const evaluationEvaluateMetricBodyMetricTwoSixInferenceOneTopPMax = 1; - -export const evaluationEvaluateMetricBodyMetricTwoSixIgnoreRequestFailureDefault = false; -export const evaluationEvaluateMetricBodyMetricTwoSixTypeDefault = `response_groundedness`; -export const evaluationEvaluateMetricBodyMetricTwoSevenJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationEvaluateMetricBodyMetricTwoSevenJudgeModelOneFormatDefault = `nim`; -export const evaluationEvaluateMetricBodyMetricTwoSevenJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationEvaluateMetricBodyMetricTwoSevenInferenceOneTemperatureMin = 0; -export const evaluationEvaluateMetricBodyMetricTwoSevenInferenceOneTemperatureMax = 2; - -export const evaluationEvaluateMetricBodyMetricTwoSevenInferenceOneTopPMin = 0; -export const evaluationEvaluateMetricBodyMetricTwoSevenInferenceOneTopPMax = 1; - -export const evaluationEvaluateMetricBodyMetricTwoSevenIgnoreRequestFailureDefault = false; -export const evaluationEvaluateMetricBodyMetricTwoSevenTypeDefault = `context_recall`; -export const evaluationEvaluateMetricBodyMetricTwoEightJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationEvaluateMetricBodyMetricTwoEightJudgeModelOneFormatDefault = `nim`; -export const evaluationEvaluateMetricBodyMetricTwoEightJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationEvaluateMetricBodyMetricTwoEightInferenceOneTemperatureMin = 0; -export const evaluationEvaluateMetricBodyMetricTwoEightInferenceOneTemperatureMax = 2; - -export const evaluationEvaluateMetricBodyMetricTwoEightInferenceOneTopPMin = 0; -export const evaluationEvaluateMetricBodyMetricTwoEightInferenceOneTopPMax = 1; - -export const evaluationEvaluateMetricBodyMetricTwoEightIgnoreRequestFailureDefault = false; -export const evaluationEvaluateMetricBodyMetricTwoEightTypeDefault = `context_precision`; -export const evaluationEvaluateMetricBodyMetricTwoNineJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationEvaluateMetricBodyMetricTwoNineJudgeModelOneFormatDefault = `nim`; -export const evaluationEvaluateMetricBodyMetricTwoNineJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationEvaluateMetricBodyMetricTwoNineInferenceOneTemperatureMin = 0; -export const evaluationEvaluateMetricBodyMetricTwoNineInferenceOneTemperatureMax = 2; - -export const evaluationEvaluateMetricBodyMetricTwoNineInferenceOneTopPMin = 0; -export const evaluationEvaluateMetricBodyMetricTwoNineInferenceOneTopPMax = 1; - -export const evaluationEvaluateMetricBodyMetricTwoNineIgnoreRequestFailureDefault = false; -export const evaluationEvaluateMetricBodyMetricTwoNineTypeDefault = `context_entity_recall`; -export const evaluationEvaluateMetricBodyMetricTwoOnezeroEmbeddingsModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationEvaluateMetricBodyMetricTwoOnezeroEmbeddingsModelOneFormatDefault = `nim`; -export const evaluationEvaluateMetricBodyMetricTwoOnezeroEmbeddingsModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationEvaluateMetricBodyMetricTwoOnezeroJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationEvaluateMetricBodyMetricTwoOnezeroJudgeModelOneFormatDefault = `nim`; -export const evaluationEvaluateMetricBodyMetricTwoOnezeroJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationEvaluateMetricBodyMetricTwoOnezeroInferenceOneTemperatureMin = 0; -export const evaluationEvaluateMetricBodyMetricTwoOnezeroInferenceOneTemperatureMax = 2; - -export const evaluationEvaluateMetricBodyMetricTwoOnezeroInferenceOneTopPMin = 0; -export const evaluationEvaluateMetricBodyMetricTwoOnezeroInferenceOneTopPMax = 1; - -export const evaluationEvaluateMetricBodyMetricTwoOnezeroIgnoreRequestFailureDefault = false; -export const evaluationEvaluateMetricBodyMetricTwoOnezeroTypeDefault = `response_relevancy`; -export const evaluationEvaluateMetricBodyMetricTwoOnezeroStrictnessDefault = 1; -export const evaluationEvaluateMetricBodyMetricTwoOneoneJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationEvaluateMetricBodyMetricTwoOneoneJudgeModelOneFormatDefault = `nim`; -export const evaluationEvaluateMetricBodyMetricTwoOneoneJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationEvaluateMetricBodyMetricTwoOneoneInferenceOneTemperatureMin = 0; -export const evaluationEvaluateMetricBodyMetricTwoOneoneInferenceOneTemperatureMax = 2; - -export const evaluationEvaluateMetricBodyMetricTwoOneoneInferenceOneTopPMin = 0; -export const evaluationEvaluateMetricBodyMetricTwoOneoneInferenceOneTopPMax = 1; - -export const evaluationEvaluateMetricBodyMetricTwoOneoneIgnoreRequestFailureDefault = false; -export const evaluationEvaluateMetricBodyMetricTwoOneoneTypeDefault = `faithfulness`; -export const evaluationEvaluateMetricBodyMetricTwoOnetwoJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationEvaluateMetricBodyMetricTwoOnetwoJudgeModelOneFormatDefault = `nim`; -export const evaluationEvaluateMetricBodyMetricTwoOnetwoJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationEvaluateMetricBodyMetricTwoOnetwoInferenceOneTemperatureMin = 0; -export const evaluationEvaluateMetricBodyMetricTwoOnetwoInferenceOneTemperatureMax = 2; - -export const evaluationEvaluateMetricBodyMetricTwoOnetwoInferenceOneTopPMin = 0; -export const evaluationEvaluateMetricBodyMetricTwoOnetwoInferenceOneTopPMax = 1; - -export const evaluationEvaluateMetricBodyMetricTwoOnetwoIgnoreRequestFailureDefault = false; -export const evaluationEvaluateMetricBodyMetricTwoOnetwoTypeDefault = `noise_sensitivity`; -export const evaluationEvaluateMetricBodyMetricTwoOnethreeTypeDefault = `tool_call_accuracy`; -export const evaluationEvaluateMetricBodyMetricTwoOnefourTypeDefault = `bleu`; -export const evaluationEvaluateMetricBodyMetricTwoOnefiveTypeDefault = `exact-match`; -export const evaluationEvaluateMetricBodyMetricTwoOnesixTypeDefault = `f1`; -export const evaluationEvaluateMetricBodyMetricTwoOnesevenTypeDefault = `number-check`; -export const evaluationEvaluateMetricBodyMetricTwoOneeightTypeDefault = `remote`; -export const evaluationEvaluateMetricBodyMetricTwoOneeightApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationEvaluateMetricBodyMetricTwoOneeightTimeoutSecondsDefault = 30; -export const evaluationEvaluateMetricBodyMetricTwoOneeightMaxRetriesDefault = 3; -export const evaluationEvaluateMetricBodyMetricTwoOneeightScoresItemNameRegExp = new RegExp( - '^[a-z0-9_]+$' -); -export const evaluationEvaluateMetricBodyMetricTwoOneeightScoresItemParserOneTypeDefault = `json`; -export const evaluationEvaluateMetricBodyMetricTwoOnenineTypeDefault = `nemo-agent-toolkit-remote`; -export const evaluationEvaluateMetricBodyMetricTwoOnenineApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationEvaluateMetricBodyMetricTwoOnenineTimeoutSecondsDefault = 30; -export const evaluationEvaluateMetricBodyMetricTwoOnenineMaxRetriesDefault = 3; -export const evaluationEvaluateMetricBodyMetricTwoTwozeroTypeDefault = `rouge`; -export const evaluationEvaluateMetricBodyMetricTwoTwooneTypeDefault = `string-check`; -export const evaluationEvaluateMetricBodyMetricTwoTwotwoTypeDefault = `tool-calling`; -export const evaluationEvaluateMetricBodyDatasetOneRowsMax = 10; - -export const EvaluationEvaluateMetricBody = zod - .object({ - metric: zod - .union([ - zod - .string() - .regex(evaluationEvaluateMetricBodyMetricOneRegExp) - .describe( - "Reference to a metric in the Metrics API.\n\nA reference is a string with format 'workspace\/metric-name' that points to a\npersisted metric entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ), - zod.union([ - zod - .object({ - type: zod - .literal('llm-judge') - .default(evaluationEvaluateMetricBodyMetricTwoOneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationEvaluateMetricBodyMetricTwoOneModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationEvaluateMetricBodyMetricTwoOneModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationEvaluateMetricBodyMetricTwoOneModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The model configuration.'), - scores: zod - .array( - zod.union([ - zod - .object({ - name: zod - .string() - .regex(evaluationEvaluateMetricBodyMetricTwoOneScoresItemOneNameRegExp) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationEvaluateMetricBodyMetricTwoOneScoresItemOneParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationEvaluateMetricBodyMetricTwoOneScoresItemOneParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationEvaluateMetricBodyMetricTwoOneScoresItemOneParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - rubric: zod - .array( - zod.object({ - label: zod - .string() - .describe( - 'The label to use for the level of the rubric grading criteria. (e.g., \"helpful\", \"not_helpful\", \"positive\")' - ), - description: zod - .string() - .optional() - .describe( - 'Describe the semantic meaning of each criteria for the given rubric. If no judge template is set, the input description for labels are included in the generated judge prompt.' - ), - value: zod - .union([zod.number(), zod.number()]) - .describe( - 'The score value to assign for the criteria used for aggregation and ranking.' - ), - }) - ) - .min(evaluationEvaluateMetricBodyMetricTwoOneScoresItemOneRubricMin) - .describe('The rubric for the score.'), - }) - .describe( - 'Score definition for a rubric with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - zod - .object({ - name: zod - .string() - .regex(evaluationEvaluateMetricBodyMetricTwoOneScoresItemTwoNameRegExp) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationEvaluateMetricBodyMetricTwoOneScoresItemTwoParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationEvaluateMetricBodyMetricTwoOneScoresItemTwoParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationEvaluateMetricBodyMetricTwoOneScoresItemTwoParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .describe( - 'Minimum value for the score range. Must be less than maximum.' - ), - maximum: zod - .union([zod.number(), zod.number()]) - .describe( - 'Maximum value for the score range. Must be greater than minimum.' - ), - }) - .describe( - 'Score definition for a range of values with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - ]) - ) - .min(1) - .describe("Definitions of scores that will be extracted from the judge's output."), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .optional() - .describe( - 'The prompt template for the judge. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{sample.output_text}} to use the model output within the template or {{item.xxx}} to reference input columns from the dataset.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - "Prompt template fields that should remain in the inferred input schema but not be required. Use this for fields like 'reference' when the metric can still run without them." - ), - structured_output: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'JSON schema to apply structured output for the judge model evaluation. Structured output is derived from scores when omitted. Use this option if there are custom requirements for the output of the judge.' - ), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationEvaluateMetricBodyMetricTwoOneInferenceOneTemperatureMin) - .max(evaluationEvaluateMetricBodyMetricTwoOneInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationEvaluateMetricBodyMetricTwoOneInferenceOneTopPMin) - .max(evaluationEvaluateMetricBodyMetricTwoOneInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge model.'), - system_prompt: zod - .string() - .optional() - .describe( - "Initial instructions that define the judge model's role and behavior for the conversation. This is prepended to the messages as a system message." - ), - reasoning: zod - .object({ - end_token: zod - .string() - .optional() - .describe( - "Configure the end token to trim reasoning context based on the model's reasoning API. Example for Nemotron models: '<\/think>'" - ), - include_if_not_finished: zod - .boolean() - .optional() - .describe( - 'Configure whether to include reasoning context if the model has not finished reasoning.' - ), - effort: zod - .string() - .optional() - .describe( - 'Option for OpenAI models to specify low, medium, or high reasoning effort.' - ), - }) - .describe("Custom settings that control the model's reasoning behavior.") - .optional() - .describe( - "Custom settings that control the judge model's reasoning behavior. For reasoning models (e.g., Nemotron), use `end_token` to strip reasoning traces from the output." - ), - ignore_request_failure: zod - .boolean() - .default(evaluationEvaluateMetricBodyMetricTwoOneIgnoreRequestFailureDefault) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - }) - .describe('Request type for creating LLM Judge metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationEvaluateMetricBodyMetricTwoTwoJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationEvaluateMetricBodyMetricTwoTwoJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationEvaluateMetricBodyMetricTwoTwoJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationEvaluateMetricBodyMetricTwoTwoInferenceOneTemperatureMin) - .max(evaluationEvaluateMetricBodyMetricTwoTwoInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationEvaluateMetricBodyMetricTwoTwoInferenceOneTopPMin) - .max(evaluationEvaluateMetricBodyMetricTwoTwoInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationEvaluateMetricBodyMetricTwoTwoIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('topic_adherence') - .default(evaluationEvaluateMetricBodyMetricTwoTwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - metric_mode: zod - .enum(['f1', 'precision', 'recall']) - .default(evaluationEvaluateMetricBodyMetricTwoTwoMetricModeDefault) - .describe('The mode for computing topic adherence score.'), - }) - .describe('Request type for TopicAdherence metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationEvaluateMetricBodyMetricTwoThreeJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationEvaluateMetricBodyMetricTwoThreeJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationEvaluateMetricBodyMetricTwoThreeJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationEvaluateMetricBodyMetricTwoThreeInferenceOneTemperatureMin) - .max(evaluationEvaluateMetricBodyMetricTwoThreeInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationEvaluateMetricBodyMetricTwoThreeInferenceOneTopPMin) - .max(evaluationEvaluateMetricBodyMetricTwoThreeInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationEvaluateMetricBodyMetricTwoThreeIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('agent_goal_accuracy') - .default(evaluationEvaluateMetricBodyMetricTwoThreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - use_reference: zod - .boolean() - .default(evaluationEvaluateMetricBodyMetricTwoThreeUseReferenceDefault) - .describe('Whether to use reference for goal accuracy evaluation.'), - }) - .describe('Request type for AgentGoalAccuracy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationEvaluateMetricBodyMetricTwoFourJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationEvaluateMetricBodyMetricTwoFourJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationEvaluateMetricBodyMetricTwoFourJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationEvaluateMetricBodyMetricTwoFourInferenceOneTemperatureMin) - .max(evaluationEvaluateMetricBodyMetricTwoFourInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationEvaluateMetricBodyMetricTwoFourInferenceOneTopPMin) - .max(evaluationEvaluateMetricBodyMetricTwoFourInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationEvaluateMetricBodyMetricTwoFourIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('answer_accuracy') - .default(evaluationEvaluateMetricBodyMetricTwoFourTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for AnswerAccuracy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationEvaluateMetricBodyMetricTwoFiveJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationEvaluateMetricBodyMetricTwoFiveJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationEvaluateMetricBodyMetricTwoFiveJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationEvaluateMetricBodyMetricTwoFiveInferenceOneTemperatureMin) - .max(evaluationEvaluateMetricBodyMetricTwoFiveInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationEvaluateMetricBodyMetricTwoFiveInferenceOneTopPMin) - .max(evaluationEvaluateMetricBodyMetricTwoFiveInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationEvaluateMetricBodyMetricTwoFiveIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_relevance') - .default(evaluationEvaluateMetricBodyMetricTwoFiveTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextRelevance metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationEvaluateMetricBodyMetricTwoSixJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationEvaluateMetricBodyMetricTwoSixJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationEvaluateMetricBodyMetricTwoSixJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationEvaluateMetricBodyMetricTwoSixInferenceOneTemperatureMin) - .max(evaluationEvaluateMetricBodyMetricTwoSixInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationEvaluateMetricBodyMetricTwoSixInferenceOneTopPMin) - .max(evaluationEvaluateMetricBodyMetricTwoSixInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationEvaluateMetricBodyMetricTwoSixIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_groundedness') - .default(evaluationEvaluateMetricBodyMetricTwoSixTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ResponseGroundedness metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationEvaluateMetricBodyMetricTwoSevenJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationEvaluateMetricBodyMetricTwoSevenJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationEvaluateMetricBodyMetricTwoSevenJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationEvaluateMetricBodyMetricTwoSevenInferenceOneTemperatureMin) - .max(evaluationEvaluateMetricBodyMetricTwoSevenInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationEvaluateMetricBodyMetricTwoSevenInferenceOneTopPMin) - .max(evaluationEvaluateMetricBodyMetricTwoSevenInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationEvaluateMetricBodyMetricTwoSevenIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_recall') - .default(evaluationEvaluateMetricBodyMetricTwoSevenTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextRecall metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationEvaluateMetricBodyMetricTwoEightJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationEvaluateMetricBodyMetricTwoEightJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationEvaluateMetricBodyMetricTwoEightJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationEvaluateMetricBodyMetricTwoEightInferenceOneTemperatureMin) - .max(evaluationEvaluateMetricBodyMetricTwoEightInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationEvaluateMetricBodyMetricTwoEightInferenceOneTopPMin) - .max(evaluationEvaluateMetricBodyMetricTwoEightInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationEvaluateMetricBodyMetricTwoEightIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_precision') - .default(evaluationEvaluateMetricBodyMetricTwoEightTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextPrecision metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationEvaluateMetricBodyMetricTwoNineJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationEvaluateMetricBodyMetricTwoNineJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationEvaluateMetricBodyMetricTwoNineJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationEvaluateMetricBodyMetricTwoNineInferenceOneTemperatureMin) - .max(evaluationEvaluateMetricBodyMetricTwoNineInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationEvaluateMetricBodyMetricTwoNineInferenceOneTopPMin) - .max(evaluationEvaluateMetricBodyMetricTwoNineInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationEvaluateMetricBodyMetricTwoNineIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_entity_recall') - .default(evaluationEvaluateMetricBodyMetricTwoNineTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextEntityRecall metrics.'), - zod - .object({ - embeddings_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationEvaluateMetricBodyMetricTwoOnezeroEmbeddingsModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationEvaluateMetricBodyMetricTwoOnezeroEmbeddingsModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationEvaluateMetricBodyMetricTwoOnezeroEmbeddingsModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The embeddings model configuration.'), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationEvaluateMetricBodyMetricTwoOnezeroJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationEvaluateMetricBodyMetricTwoOnezeroJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationEvaluateMetricBodyMetricTwoOnezeroJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationEvaluateMetricBodyMetricTwoOnezeroInferenceOneTemperatureMin) - .max(evaluationEvaluateMetricBodyMetricTwoOnezeroInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationEvaluateMetricBodyMetricTwoOnezeroInferenceOneTopPMin) - .max(evaluationEvaluateMetricBodyMetricTwoOnezeroInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationEvaluateMetricBodyMetricTwoOnezeroIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_relevancy') - .default(evaluationEvaluateMetricBodyMetricTwoOnezeroTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - strictness: zod - .number() - .default(evaluationEvaluateMetricBodyMetricTwoOnezeroStrictnessDefault) - .describe('Number of parallel questions generated. NIM can only generate 1.'), - }) - .describe('Request type for ResponseRelevancy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationEvaluateMetricBodyMetricTwoOneoneJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationEvaluateMetricBodyMetricTwoOneoneJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationEvaluateMetricBodyMetricTwoOneoneJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationEvaluateMetricBodyMetricTwoOneoneInferenceOneTemperatureMin) - .max(evaluationEvaluateMetricBodyMetricTwoOneoneInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationEvaluateMetricBodyMetricTwoOneoneInferenceOneTopPMin) - .max(evaluationEvaluateMetricBodyMetricTwoOneoneInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationEvaluateMetricBodyMetricTwoOneoneIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('faithfulness') - .default(evaluationEvaluateMetricBodyMetricTwoOneoneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for Faithfulness metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationEvaluateMetricBodyMetricTwoOnetwoJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationEvaluateMetricBodyMetricTwoOnetwoJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationEvaluateMetricBodyMetricTwoOnetwoJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationEvaluateMetricBodyMetricTwoOnetwoInferenceOneTemperatureMin) - .max(evaluationEvaluateMetricBodyMetricTwoOnetwoInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationEvaluateMetricBodyMetricTwoOnetwoInferenceOneTopPMin) - .max(evaluationEvaluateMetricBodyMetricTwoOnetwoInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationEvaluateMetricBodyMetricTwoOnetwoIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('noise_sensitivity') - .default(evaluationEvaluateMetricBodyMetricTwoOnetwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for NoiseSensitivity metrics.'), - zod - .object({ - type: zod - .literal('tool_call_accuracy') - .default(evaluationEvaluateMetricBodyMetricTwoOnethreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ToolCallAccuracy metrics (no judge required).'), - zod - .object({ - type: zod - .literal('bleu') - .default(evaluationEvaluateMetricBodyMetricTwoOnefourTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - references: zod - .array(zod.string()) - .describe( - 'The templates for the ground truth references to calculate BLEU metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to calculate BLEU metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for BLEUMetric.'), - zod - .object({ - type: zod - .literal('exact-match') - .default(evaluationEvaluateMetricBodyMetricTwoOnefiveTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the exact match metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the exact match metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for ExactMatchMetric.'), - zod - .object({ - type: zod - .literal('f1') - .default(evaluationEvaluateMetricBodyMetricTwoOnesixTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the F1 metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the F1 metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for F1Metric.'), - zod - .object({ - type: zod - .literal('number-check') - .default(evaluationEvaluateMetricBodyMetricTwoOnesevenTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - '>=', - 'gte', - 'greater than or equal', - '>', - 'gt', - 'greater than', - '<=', - 'lte', - 'less than or equal', - '<', - 'lt', - 'less than', - 'absolute difference', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - epsilon: zod - .union([zod.number(), zod.number()]) - .optional() - .describe('Specify the tolerance for the absolute difference of values.'), - }) - .describe( - 'Request type for NumberCheckMetric. Numeric-comparison metric with template-driven operands.' - ), - zod - .object({ - type: zod - .literal('remote') - .default(evaluationEvaluateMetricBodyMetricTwoOneeightTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex(evaluationEvaluateMetricBodyMetricTwoOneeightApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default(evaluationEvaluateMetricBodyMetricTwoOneeightTimeoutSecondsDefault) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default(evaluationEvaluateMetricBodyMetricTwoOneeightMaxRetriesDefault) - .describe('Maximum number of retry attempts.'), - body: zod - .record(zod.string(), zod.unknown()) - .describe('Jinja template for request payload'), - scores: zod - .array( - zod - .object({ - name: zod - .string() - .regex(evaluationEvaluateMetricBodyMetricTwoOneeightScoresItemNameRegExp) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .object({ - type: zod - .literal('json') - .default( - evaluationEvaluateMetricBodyMetricTwoOneeightScoresItemParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.') - .optional() - .describe( - 'The method to parse the score. Only JSON parsing is supported for remote metrics.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe( - 'Minimum value for the score range. Defaults to None (no lower bound).' - ), - maximum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe( - 'Maximum value for the score range. Defaults to None (no upper bound).' - ), - }) - .describe( - 'Score configuration for remote metrics.\n\nUnlike RangeScore, minimum and maximum are optional (default to None = no bounds).\nThis avoids JSON serialization issues with infinity values.' - ) - ) - .describe('List of scores to extract from the remote response'), - }) - .describe( - 'Request type for RemoteMetric. A metric that computes scores via a remote endpoint.' - ), - zod - .object({ - type: zod - .literal('nemo-agent-toolkit-remote') - .default(evaluationEvaluateMetricBodyMetricTwoOnenineTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex(evaluationEvaluateMetricBodyMetricTwoOnenineApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default(evaluationEvaluateMetricBodyMetricTwoOnenineTimeoutSecondsDefault) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default(evaluationEvaluateMetricBodyMetricTwoOnenineMaxRetriesDefault) - .describe('Maximum number of retry attempts.'), - evaluator_name: zod - .string() - .describe('The name of the evaluator (also used as the score name).'), - }) - .describe( - 'Request type for NemoAgentToolkitRemoteMetric. A remote metric that interfaces with NeMo Agent Toolkit evaluators.' - ), - zod - .object({ - type: zod - .literal('rouge') - .default(evaluationEvaluateMetricBodyMetricTwoTwozeroTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to evaluate the ROUGE metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the ROUGE metric on. If not provided, the output text from the model is used.' - ), - }) - .describe( - 'Request type for ROUGEMetric. ROUGE metric for overlap-based summarization quality scoring.' - ), - zod - .object({ - type: zod - .literal('string-check') - .default(evaluationEvaluateMetricBodyMetricTwoTwooneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - 'contains', - 'not contains', - 'startswith', - 'endswith', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - }) - .describe( - 'Request type for StringCheckMetric. String-comparison metric with operator-based checks.' - ), - zod - .object({ - type: zod - .literal('tool-calling') - .default(evaluationEvaluateMetricBodyMetricTwoTwotwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to evaluate tool calling accuracy.' - ), - }) - .describe( - 'Request type for ToolCallingMetric. Tool-calling accuracy metric for structured function calls.' - ), - ]), - ]) - .describe( - 'The metric to use for evaluation. Can be a reference (workspace\/metric_name) or an inline metric definition.' - ), - dataset: zod - .object({ - rows: zod - .array(zod.record(zod.string(), zod.unknown())) - .min(1) - .max(evaluationEvaluateMetricBodyDatasetOneRowsMax) - .describe( - 'Array of data rows. Each row can be any valid JSON value (object, string, array, etc.).' - ), - }) - .describe('Inline dataset for evaluation with a maximum of 10 rows.') - .describe('The dataset to evaluate with inline rows.'), - }) - .describe('Request body for metric evaluation.'); - -export const evaluationEvaluateMetricResponseMetricOneTypeDefault = `llm-judge`; -export const evaluationEvaluateMetricResponseMetricOneModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationEvaluateMetricResponseMetricOneModelOneFormatDefault = `nim`; -export const evaluationEvaluateMetricResponseMetricOneModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationEvaluateMetricResponseMetricOneScoresItemOneNameRegExp = new RegExp( - '^[a-z0-9_]+$' -); -export const evaluationEvaluateMetricResponseMetricOneScoresItemOneParserOneTypeDefault = `json`; -export const evaluationEvaluateMetricResponseMetricOneScoresItemOneParserTwoTypeDefault = `regex`; -export const evaluationEvaluateMetricResponseMetricOneScoresItemOneParserTwoMethodDefault = `match`; -export const evaluationEvaluateMetricResponseMetricOneScoresItemOneRubricMin = 2; - -export const evaluationEvaluateMetricResponseMetricOneScoresItemTwoNameRegExp = new RegExp( - '^[a-z0-9_]+$' -); -export const evaluationEvaluateMetricResponseMetricOneScoresItemTwoParserOneTypeDefault = `json`; -export const evaluationEvaluateMetricResponseMetricOneScoresItemTwoParserTwoTypeDefault = `regex`; -export const evaluationEvaluateMetricResponseMetricOneScoresItemTwoParserTwoMethodDefault = `match`; - -export const evaluationEvaluateMetricResponseMetricOneInferenceOneTemperatureMin = 0; -export const evaluationEvaluateMetricResponseMetricOneInferenceOneTemperatureMax = 2; - -export const evaluationEvaluateMetricResponseMetricOneInferenceOneTopPMin = 0; -export const evaluationEvaluateMetricResponseMetricOneInferenceOneTopPMax = 1; - -export const evaluationEvaluateMetricResponseMetricOneIgnoreRequestFailureDefault = false; -export const evaluationEvaluateMetricResponseMetricTwoJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationEvaluateMetricResponseMetricTwoJudgeModelOneFormatDefault = `nim`; -export const evaluationEvaluateMetricResponseMetricTwoJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationEvaluateMetricResponseMetricTwoInferenceOneTemperatureMin = 0; -export const evaluationEvaluateMetricResponseMetricTwoInferenceOneTemperatureMax = 2; - -export const evaluationEvaluateMetricResponseMetricTwoInferenceOneTopPMin = 0; -export const evaluationEvaluateMetricResponseMetricTwoInferenceOneTopPMax = 1; - -export const evaluationEvaluateMetricResponseMetricTwoIgnoreRequestFailureDefault = false; -export const evaluationEvaluateMetricResponseMetricTwoTypeDefault = `topic_adherence`; -export const evaluationEvaluateMetricResponseMetricTwoMetricModeDefault = `f1`; -export const evaluationEvaluateMetricResponseMetricThreeJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationEvaluateMetricResponseMetricThreeJudgeModelOneFormatDefault = `nim`; -export const evaluationEvaluateMetricResponseMetricThreeJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationEvaluateMetricResponseMetricThreeInferenceOneTemperatureMin = 0; -export const evaluationEvaluateMetricResponseMetricThreeInferenceOneTemperatureMax = 2; - -export const evaluationEvaluateMetricResponseMetricThreeInferenceOneTopPMin = 0; -export const evaluationEvaluateMetricResponseMetricThreeInferenceOneTopPMax = 1; - -export const evaluationEvaluateMetricResponseMetricThreeIgnoreRequestFailureDefault = false; -export const evaluationEvaluateMetricResponseMetricThreeTypeDefault = `agent_goal_accuracy`; -export const evaluationEvaluateMetricResponseMetricThreeUseReferenceDefault = true; -export const evaluationEvaluateMetricResponseMetricFourJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationEvaluateMetricResponseMetricFourJudgeModelOneFormatDefault = `nim`; -export const evaluationEvaluateMetricResponseMetricFourJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationEvaluateMetricResponseMetricFourInferenceOneTemperatureMin = 0; -export const evaluationEvaluateMetricResponseMetricFourInferenceOneTemperatureMax = 2; - -export const evaluationEvaluateMetricResponseMetricFourInferenceOneTopPMin = 0; -export const evaluationEvaluateMetricResponseMetricFourInferenceOneTopPMax = 1; - -export const evaluationEvaluateMetricResponseMetricFourIgnoreRequestFailureDefault = false; -export const evaluationEvaluateMetricResponseMetricFourTypeDefault = `answer_accuracy`; -export const evaluationEvaluateMetricResponseMetricFiveJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationEvaluateMetricResponseMetricFiveJudgeModelOneFormatDefault = `nim`; -export const evaluationEvaluateMetricResponseMetricFiveJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationEvaluateMetricResponseMetricFiveInferenceOneTemperatureMin = 0; -export const evaluationEvaluateMetricResponseMetricFiveInferenceOneTemperatureMax = 2; - -export const evaluationEvaluateMetricResponseMetricFiveInferenceOneTopPMin = 0; -export const evaluationEvaluateMetricResponseMetricFiveInferenceOneTopPMax = 1; - -export const evaluationEvaluateMetricResponseMetricFiveIgnoreRequestFailureDefault = false; -export const evaluationEvaluateMetricResponseMetricFiveTypeDefault = `context_relevance`; -export const evaluationEvaluateMetricResponseMetricSixJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationEvaluateMetricResponseMetricSixJudgeModelOneFormatDefault = `nim`; -export const evaluationEvaluateMetricResponseMetricSixJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationEvaluateMetricResponseMetricSixInferenceOneTemperatureMin = 0; -export const evaluationEvaluateMetricResponseMetricSixInferenceOneTemperatureMax = 2; - -export const evaluationEvaluateMetricResponseMetricSixInferenceOneTopPMin = 0; -export const evaluationEvaluateMetricResponseMetricSixInferenceOneTopPMax = 1; - -export const evaluationEvaluateMetricResponseMetricSixIgnoreRequestFailureDefault = false; -export const evaluationEvaluateMetricResponseMetricSixTypeDefault = `response_groundedness`; -export const evaluationEvaluateMetricResponseMetricSevenJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationEvaluateMetricResponseMetricSevenJudgeModelOneFormatDefault = `nim`; -export const evaluationEvaluateMetricResponseMetricSevenJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationEvaluateMetricResponseMetricSevenInferenceOneTemperatureMin = 0; -export const evaluationEvaluateMetricResponseMetricSevenInferenceOneTemperatureMax = 2; - -export const evaluationEvaluateMetricResponseMetricSevenInferenceOneTopPMin = 0; -export const evaluationEvaluateMetricResponseMetricSevenInferenceOneTopPMax = 1; - -export const evaluationEvaluateMetricResponseMetricSevenIgnoreRequestFailureDefault = false; -export const evaluationEvaluateMetricResponseMetricSevenTypeDefault = `context_recall`; -export const evaluationEvaluateMetricResponseMetricEightJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationEvaluateMetricResponseMetricEightJudgeModelOneFormatDefault = `nim`; -export const evaluationEvaluateMetricResponseMetricEightJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationEvaluateMetricResponseMetricEightInferenceOneTemperatureMin = 0; -export const evaluationEvaluateMetricResponseMetricEightInferenceOneTemperatureMax = 2; - -export const evaluationEvaluateMetricResponseMetricEightInferenceOneTopPMin = 0; -export const evaluationEvaluateMetricResponseMetricEightInferenceOneTopPMax = 1; - -export const evaluationEvaluateMetricResponseMetricEightIgnoreRequestFailureDefault = false; -export const evaluationEvaluateMetricResponseMetricEightTypeDefault = `context_precision`; -export const evaluationEvaluateMetricResponseMetricNineJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationEvaluateMetricResponseMetricNineJudgeModelOneFormatDefault = `nim`; -export const evaluationEvaluateMetricResponseMetricNineJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationEvaluateMetricResponseMetricNineInferenceOneTemperatureMin = 0; -export const evaluationEvaluateMetricResponseMetricNineInferenceOneTemperatureMax = 2; - -export const evaluationEvaluateMetricResponseMetricNineInferenceOneTopPMin = 0; -export const evaluationEvaluateMetricResponseMetricNineInferenceOneTopPMax = 1; - -export const evaluationEvaluateMetricResponseMetricNineIgnoreRequestFailureDefault = false; -export const evaluationEvaluateMetricResponseMetricNineTypeDefault = `context_entity_recall`; -export const evaluationEvaluateMetricResponseMetricOnezeroEmbeddingsModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationEvaluateMetricResponseMetricOnezeroEmbeddingsModelOneFormatDefault = `nim`; -export const evaluationEvaluateMetricResponseMetricOnezeroEmbeddingsModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationEvaluateMetricResponseMetricOnezeroJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationEvaluateMetricResponseMetricOnezeroJudgeModelOneFormatDefault = `nim`; -export const evaluationEvaluateMetricResponseMetricOnezeroJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationEvaluateMetricResponseMetricOnezeroInferenceOneTemperatureMin = 0; -export const evaluationEvaluateMetricResponseMetricOnezeroInferenceOneTemperatureMax = 2; - -export const evaluationEvaluateMetricResponseMetricOnezeroInferenceOneTopPMin = 0; -export const evaluationEvaluateMetricResponseMetricOnezeroInferenceOneTopPMax = 1; - -export const evaluationEvaluateMetricResponseMetricOnezeroIgnoreRequestFailureDefault = false; -export const evaluationEvaluateMetricResponseMetricOnezeroTypeDefault = `response_relevancy`; -export const evaluationEvaluateMetricResponseMetricOnezeroStrictnessDefault = 1; -export const evaluationEvaluateMetricResponseMetricOneoneJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationEvaluateMetricResponseMetricOneoneJudgeModelOneFormatDefault = `nim`; -export const evaluationEvaluateMetricResponseMetricOneoneJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationEvaluateMetricResponseMetricOneoneInferenceOneTemperatureMin = 0; -export const evaluationEvaluateMetricResponseMetricOneoneInferenceOneTemperatureMax = 2; - -export const evaluationEvaluateMetricResponseMetricOneoneInferenceOneTopPMin = 0; -export const evaluationEvaluateMetricResponseMetricOneoneInferenceOneTopPMax = 1; - -export const evaluationEvaluateMetricResponseMetricOneoneIgnoreRequestFailureDefault = false; -export const evaluationEvaluateMetricResponseMetricOneoneTypeDefault = `faithfulness`; -export const evaluationEvaluateMetricResponseMetricOnetwoJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationEvaluateMetricResponseMetricOnetwoJudgeModelOneFormatDefault = `nim`; -export const evaluationEvaluateMetricResponseMetricOnetwoJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationEvaluateMetricResponseMetricOnetwoInferenceOneTemperatureMin = 0; -export const evaluationEvaluateMetricResponseMetricOnetwoInferenceOneTemperatureMax = 2; - -export const evaluationEvaluateMetricResponseMetricOnetwoInferenceOneTopPMin = 0; -export const evaluationEvaluateMetricResponseMetricOnetwoInferenceOneTopPMax = 1; - -export const evaluationEvaluateMetricResponseMetricOnetwoIgnoreRequestFailureDefault = false; -export const evaluationEvaluateMetricResponseMetricOnetwoTypeDefault = `noise_sensitivity`; -export const evaluationEvaluateMetricResponseMetricOnethreeTypeDefault = `tool_call_accuracy`; -export const evaluationEvaluateMetricResponseMetricOnefourTypeDefault = `bleu`; -export const evaluationEvaluateMetricResponseMetricOnefiveTypeDefault = `exact-match`; -export const evaluationEvaluateMetricResponseMetricOnesixTypeDefault = `f1`; -export const evaluationEvaluateMetricResponseMetricOnesevenTypeDefault = `number-check`; -export const evaluationEvaluateMetricResponseMetricOneeightTypeDefault = `remote`; -export const evaluationEvaluateMetricResponseMetricOneeightApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationEvaluateMetricResponseMetricOneeightTimeoutSecondsDefault = 30; -export const evaluationEvaluateMetricResponseMetricOneeightMaxRetriesDefault = 3; -export const evaluationEvaluateMetricResponseMetricOneeightScoresItemNameRegExp = new RegExp( - '^[a-z0-9_]+$' -); -export const evaluationEvaluateMetricResponseMetricOneeightScoresItemParserOneTypeDefault = `json`; -export const evaluationEvaluateMetricResponseMetricOnenineTypeDefault = `nemo-agent-toolkit-remote`; -export const evaluationEvaluateMetricResponseMetricOnenineApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationEvaluateMetricResponseMetricOnenineTimeoutSecondsDefault = 30; -export const evaluationEvaluateMetricResponseMetricOnenineMaxRetriesDefault = 3; -export const evaluationEvaluateMetricResponseMetricTwozeroTypeDefault = `rouge`; -export const evaluationEvaluateMetricResponseMetricTwooneTypeDefault = `string-check`; -export const evaluationEvaluateMetricResponseMetricTwotwoTypeDefault = `tool-calling`; -export const evaluationEvaluateMetricResponseMetricTwothreeNameDefault = `Metric name`; -export const evaluationEvaluateMetricResponseMetricTwothreeTypeDefault = `system`; -export const evaluationEvaluateMetricResponseAggregateScoresItemOneScoreTypeDefault = `range`; -export const evaluationEvaluateMetricResponseAggregateScoresItemTwoScoreTypeDefault = `rubric`; -export const evaluationEvaluateMetricResponseAggregateScoresItemTwoRubricDistributionItemCountDefault = 0; - -export const EvaluationEvaluateMetricResponse = zod - .object({ - metric: zod - .union([ - zod.object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod - .literal('llm-judge') - .default(evaluationEvaluateMetricResponseMetricOneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationEvaluateMetricResponseMetricOneModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationEvaluateMetricResponseMetricOneModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationEvaluateMetricResponseMetricOneModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The model configuration.'), - scores: zod - .array( - zod.union([ - zod - .object({ - name: zod - .string() - .regex(evaluationEvaluateMetricResponseMetricOneScoresItemOneNameRegExp) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationEvaluateMetricResponseMetricOneScoresItemOneParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationEvaluateMetricResponseMetricOneScoresItemOneParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationEvaluateMetricResponseMetricOneScoresItemOneParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - rubric: zod - .array( - zod.object({ - label: zod - .string() - .describe( - 'The label to use for the level of the rubric grading criteria. (e.g., \"helpful\", \"not_helpful\", \"positive\")' - ), - description: zod - .string() - .optional() - .describe( - 'Describe the semantic meaning of each criteria for the given rubric. If no judge template is set, the input description for labels are included in the generated judge prompt.' - ), - value: zod - .union([zod.number(), zod.number()]) - .describe( - 'The score value to assign for the criteria used for aggregation and ranking.' - ), - }) - ) - .min(evaluationEvaluateMetricResponseMetricOneScoresItemOneRubricMin) - .describe('The rubric for the score.'), - }) - .describe( - 'Score definition for a rubric with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - zod - .object({ - name: zod - .string() - .regex(evaluationEvaluateMetricResponseMetricOneScoresItemTwoNameRegExp) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationEvaluateMetricResponseMetricOneScoresItemTwoParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationEvaluateMetricResponseMetricOneScoresItemTwoParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationEvaluateMetricResponseMetricOneScoresItemTwoParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .describe('Minimum value for the score range. Must be less than maximum.'), - maximum: zod - .union([zod.number(), zod.number()]) - .describe('Maximum value for the score range. Must be greater than minimum.'), - }) - .describe( - 'Score definition for a range of values with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - ]) - ) - .min(1) - .describe("Definitions of scores that will be extracted from the judge's output."), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .optional() - .describe( - 'The prompt template for the judge. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{sample.output_text}} to use the model output within the template or {{item.xxx}} to reference input columns from the dataset.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - "Prompt template fields that should remain in the inferred input schema but not be required. Use this for fields like 'reference' when the metric can still run without them." - ), - structured_output: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'JSON schema to apply structured output for the judge model evaluation. Structured output is derived from scores when omitted. Use this option if there are custom requirements for the output of the judge.' - ), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationEvaluateMetricResponseMetricOneInferenceOneTemperatureMin) - .max(evaluationEvaluateMetricResponseMetricOneInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationEvaluateMetricResponseMetricOneInferenceOneTopPMin) - .max(evaluationEvaluateMetricResponseMetricOneInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge model.'), - system_prompt: zod - .string() - .optional() - .describe( - "Initial instructions that define the judge model's role and behavior for the conversation. This is prepended to the messages as a system message." - ), - reasoning: zod - .object({ - end_token: zod - .string() - .optional() - .describe( - "Configure the end token to trim reasoning context based on the model's reasoning API. Example for Nemotron models: '<\/think>'" - ), - include_if_not_finished: zod - .boolean() - .optional() - .describe( - 'Configure whether to include reasoning context if the model has not finished reasoning.' - ), - effort: zod - .string() - .optional() - .describe( - 'Option for OpenAI models to specify low, medium, or high reasoning effort.' - ), - }) - .describe("Custom settings that control the model's reasoning behavior.") - .optional() - .describe( - "Custom settings that control the judge model's reasoning behavior. For reasoning models (e.g., Nemotron), use `end_token` to strip reasoning traces from the output." - ), - ignore_request_failure: zod - .boolean() - .default(evaluationEvaluateMetricResponseMetricOneIgnoreRequestFailureDefault) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - }), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationEvaluateMetricResponseMetricTwoJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationEvaluateMetricResponseMetricTwoJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationEvaluateMetricResponseMetricTwoJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationEvaluateMetricResponseMetricTwoInferenceOneTemperatureMin) - .max(evaluationEvaluateMetricResponseMetricTwoInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationEvaluateMetricResponseMetricTwoInferenceOneTopPMin) - .max(evaluationEvaluateMetricResponseMetricTwoInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationEvaluateMetricResponseMetricTwoIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('topic_adherence') - .default(evaluationEvaluateMetricResponseMetricTwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - metric_mode: zod - .enum(['f1', 'precision', 'recall']) - .default(evaluationEvaluateMetricResponseMetricTwoMetricModeDefault) - .describe('The mode for computing topic adherence score.'), - }) - .describe('Response type for TopicAdherence metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationEvaluateMetricResponseMetricThreeJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationEvaluateMetricResponseMetricThreeJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationEvaluateMetricResponseMetricThreeJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationEvaluateMetricResponseMetricThreeInferenceOneTemperatureMin) - .max(evaluationEvaluateMetricResponseMetricThreeInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationEvaluateMetricResponseMetricThreeInferenceOneTopPMin) - .max(evaluationEvaluateMetricResponseMetricThreeInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationEvaluateMetricResponseMetricThreeIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('agent_goal_accuracy') - .default(evaluationEvaluateMetricResponseMetricThreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - use_reference: zod - .boolean() - .default(evaluationEvaluateMetricResponseMetricThreeUseReferenceDefault) - .describe('Whether to use reference for goal accuracy evaluation.'), - }) - .describe('Response type for AgentGoalAccuracy metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationEvaluateMetricResponseMetricFourJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationEvaluateMetricResponseMetricFourJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationEvaluateMetricResponseMetricFourJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationEvaluateMetricResponseMetricFourInferenceOneTemperatureMin) - .max(evaluationEvaluateMetricResponseMetricFourInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationEvaluateMetricResponseMetricFourInferenceOneTopPMin) - .max(evaluationEvaluateMetricResponseMetricFourInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationEvaluateMetricResponseMetricFourIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('answer_accuracy') - .default(evaluationEvaluateMetricResponseMetricFourTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Response type for AnswerAccuracy metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationEvaluateMetricResponseMetricFiveJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationEvaluateMetricResponseMetricFiveJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationEvaluateMetricResponseMetricFiveJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationEvaluateMetricResponseMetricFiveInferenceOneTemperatureMin) - .max(evaluationEvaluateMetricResponseMetricFiveInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationEvaluateMetricResponseMetricFiveInferenceOneTopPMin) - .max(evaluationEvaluateMetricResponseMetricFiveInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationEvaluateMetricResponseMetricFiveIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_relevance') - .default(evaluationEvaluateMetricResponseMetricFiveTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Response type for ContextRelevance metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationEvaluateMetricResponseMetricSixJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationEvaluateMetricResponseMetricSixJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationEvaluateMetricResponseMetricSixJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationEvaluateMetricResponseMetricSixInferenceOneTemperatureMin) - .max(evaluationEvaluateMetricResponseMetricSixInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationEvaluateMetricResponseMetricSixInferenceOneTopPMin) - .max(evaluationEvaluateMetricResponseMetricSixInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationEvaluateMetricResponseMetricSixIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_groundedness') - .default(evaluationEvaluateMetricResponseMetricSixTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Response type for ResponseGroundedness metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationEvaluateMetricResponseMetricSevenJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationEvaluateMetricResponseMetricSevenJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationEvaluateMetricResponseMetricSevenJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationEvaluateMetricResponseMetricSevenInferenceOneTemperatureMin) - .max(evaluationEvaluateMetricResponseMetricSevenInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationEvaluateMetricResponseMetricSevenInferenceOneTopPMin) - .max(evaluationEvaluateMetricResponseMetricSevenInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationEvaluateMetricResponseMetricSevenIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_recall') - .default(evaluationEvaluateMetricResponseMetricSevenTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Response type for ContextRecall metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationEvaluateMetricResponseMetricEightJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationEvaluateMetricResponseMetricEightJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationEvaluateMetricResponseMetricEightJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationEvaluateMetricResponseMetricEightInferenceOneTemperatureMin) - .max(evaluationEvaluateMetricResponseMetricEightInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationEvaluateMetricResponseMetricEightInferenceOneTopPMin) - .max(evaluationEvaluateMetricResponseMetricEightInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationEvaluateMetricResponseMetricEightIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_precision') - .default(evaluationEvaluateMetricResponseMetricEightTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Response type for ContextPrecision metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationEvaluateMetricResponseMetricNineJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationEvaluateMetricResponseMetricNineJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationEvaluateMetricResponseMetricNineJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationEvaluateMetricResponseMetricNineInferenceOneTemperatureMin) - .max(evaluationEvaluateMetricResponseMetricNineInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationEvaluateMetricResponseMetricNineInferenceOneTopPMin) - .max(evaluationEvaluateMetricResponseMetricNineInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationEvaluateMetricResponseMetricNineIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_entity_recall') - .default(evaluationEvaluateMetricResponseMetricNineTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Response type for ContextEntityRecall metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - embeddings_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationEvaluateMetricResponseMetricOnezeroEmbeddingsModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationEvaluateMetricResponseMetricOnezeroEmbeddingsModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationEvaluateMetricResponseMetricOnezeroEmbeddingsModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The embeddings model configuration.'), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationEvaluateMetricResponseMetricOnezeroJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationEvaluateMetricResponseMetricOnezeroJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationEvaluateMetricResponseMetricOnezeroJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationEvaluateMetricResponseMetricOnezeroInferenceOneTemperatureMin) - .max(evaluationEvaluateMetricResponseMetricOnezeroInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationEvaluateMetricResponseMetricOnezeroInferenceOneTopPMin) - .max(evaluationEvaluateMetricResponseMetricOnezeroInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationEvaluateMetricResponseMetricOnezeroIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_relevancy') - .default(evaluationEvaluateMetricResponseMetricOnezeroTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - strictness: zod - .number() - .default(evaluationEvaluateMetricResponseMetricOnezeroStrictnessDefault) - .describe('Number of parallel questions generated. NIM can only generate 1.'), - }) - .describe('Response type for ResponseRelevancy metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationEvaluateMetricResponseMetricOneoneJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationEvaluateMetricResponseMetricOneoneJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationEvaluateMetricResponseMetricOneoneJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationEvaluateMetricResponseMetricOneoneInferenceOneTemperatureMin) - .max(evaluationEvaluateMetricResponseMetricOneoneInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationEvaluateMetricResponseMetricOneoneInferenceOneTopPMin) - .max(evaluationEvaluateMetricResponseMetricOneoneInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationEvaluateMetricResponseMetricOneoneIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('faithfulness') - .default(evaluationEvaluateMetricResponseMetricOneoneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Response type for Faithfulness metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationEvaluateMetricResponseMetricOnetwoJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationEvaluateMetricResponseMetricOnetwoJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationEvaluateMetricResponseMetricOnetwoJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationEvaluateMetricResponseMetricOnetwoInferenceOneTemperatureMin) - .max(evaluationEvaluateMetricResponseMetricOnetwoInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationEvaluateMetricResponseMetricOnetwoInferenceOneTopPMin) - .max(evaluationEvaluateMetricResponseMetricOnetwoInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationEvaluateMetricResponseMetricOnetwoIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('noise_sensitivity') - .default(evaluationEvaluateMetricResponseMetricOnetwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Response type for NoiseSensitivity metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod - .literal('tool_call_accuracy') - .default(evaluationEvaluateMetricResponseMetricOnethreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Response type for ToolCallAccuracy metrics (no judge required).'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod - .literal('bleu') - .default(evaluationEvaluateMetricResponseMetricOnefourTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - references: zod - .array(zod.string()) - .describe( - 'The templates for the ground truth references to calculate BLEU metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to calculate BLEU metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Response type for BLEUMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod - .literal('exact-match') - .default(evaluationEvaluateMetricResponseMetricOnefiveTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the exact match metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the exact match metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Response type for ExactMatchMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod - .literal('f1') - .default(evaluationEvaluateMetricResponseMetricOnesixTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the F1 metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the F1 metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Response type for F1Metric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod - .literal('number-check') - .default(evaluationEvaluateMetricResponseMetricOnesevenTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - '>=', - 'gte', - 'greater than or equal', - '>', - 'gt', - 'greater than', - '<=', - 'lte', - 'less than or equal', - '<', - 'lt', - 'less than', - 'absolute difference', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - epsilon: zod - .union([zod.number(), zod.number()]) - .optional() - .describe('Specify the tolerance for the absolute difference of values.'), - }) - .describe('Response type for NumberCheckMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod - .literal('remote') - .default(evaluationEvaluateMetricResponseMetricOneeightTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex(evaluationEvaluateMetricResponseMetricOneeightApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default(evaluationEvaluateMetricResponseMetricOneeightTimeoutSecondsDefault) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default(evaluationEvaluateMetricResponseMetricOneeightMaxRetriesDefault) - .describe('Maximum number of retry attempts.'), - body: zod - .record(zod.string(), zod.unknown()) - .describe('Jinja template for request payload'), - scores: zod - .array( - zod - .object({ - name: zod - .string() - .regex(evaluationEvaluateMetricResponseMetricOneeightScoresItemNameRegExp) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .object({ - type: zod - .literal('json') - .default( - evaluationEvaluateMetricResponseMetricOneeightScoresItemParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.') - .optional() - .describe( - 'The method to parse the score. Only JSON parsing is supported for remote metrics.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe( - 'Minimum value for the score range. Defaults to None (no lower bound).' - ), - maximum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe( - 'Maximum value for the score range. Defaults to None (no upper bound).' - ), - }) - .describe( - 'Score configuration for remote metrics.\n\nUnlike RangeScore, minimum and maximum are optional (default to None = no bounds).\nThis avoids JSON serialization issues with infinity values.' - ) - ) - .describe('List of scores to extract from the remote response'), - }) - .describe('Response type for RemoteMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod - .literal('nemo-agent-toolkit-remote') - .default(evaluationEvaluateMetricResponseMetricOnenineTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex(evaluationEvaluateMetricResponseMetricOnenineApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default(evaluationEvaluateMetricResponseMetricOnenineTimeoutSecondsDefault) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default(evaluationEvaluateMetricResponseMetricOnenineMaxRetriesDefault) - .describe('Maximum number of retry attempts.'), - evaluator_name: zod - .string() - .describe('The name of the evaluator (also used as the score name).'), - }) - .describe('Response type for NemoAgentToolkitRemoteMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod - .literal('rouge') - .default(evaluationEvaluateMetricResponseMetricTwozeroTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to evaluate the ROUGE metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the ROUGE metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Response type for ROUGEMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod - .literal('string-check') - .default(evaluationEvaluateMetricResponseMetricTwooneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - 'contains', - 'not contains', - 'startswith', - 'endswith', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - }) - .describe('Response type for StringCheckMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod - .literal('tool-calling') - .default(evaluationEvaluateMetricResponseMetricTwotwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to evaluate tool calling accuracy.' - ), - }) - .describe('Response type for ToolCallingMetric.'), - zod - .object({ - name: zod.string().default(evaluationEvaluateMetricResponseMetricTwothreeNameDefault), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod - .enum(['system', 'system-retriever']) - .default(evaluationEvaluateMetricResponseMetricTwothreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline', 'retriever'])) - .default([`online`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - required_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod.string().optional().describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe('List of required parameters for running an evaluation with the metric.'), - optional_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod.string().optional().describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe('List of optional parameters for running an evaluation with the metric.'), - }) - .describe('Response type for SystemMetric.'), - ]) - .describe('The metric definition that was used for evaluation.'), - aggregate_scores: zod - .array( - zod.union([ - zod - .object({ - name: zod.string().describe('Name of the score.'), - count: zod.number().describe('Number of samples evaluated (excluding NaN).'), - nan_count: zod.number().describe('Number of samples that produced NaN scores.'), - sum: zod.number().optional().describe('Sum of all score values.'), - mean: zod.number().optional().describe('Mean score value.'), - min: zod.number().optional().describe('Minimum score value.'), - max: zod.number().optional().describe('Maximum score value.'), - std_dev: zod.number().optional().describe('Standard deviation of the scores.'), - variance: zod.number().optional().describe('Variance of the scores.'), - score_type: zod - .literal('range') - .default(evaluationEvaluateMetricResponseAggregateScoresItemOneScoreTypeDefault) - .describe('Type of score.'), - percentiles: zod - .object({ - p10: zod.union([zod.number(), zod.number()]).describe('10th percentile.'), - p20: zod.union([zod.number(), zod.number()]).describe('20th percentile.'), - p30: zod.union([zod.number(), zod.number()]).describe('30th percentile.'), - p40: zod.union([zod.number(), zod.number()]).describe('40th percentile.'), - p50: zod - .union([zod.number(), zod.number()]) - .describe('50th percentile (median).'), - p60: zod.union([zod.number(), zod.number()]).describe('60th percentile.'), - p70: zod.union([zod.number(), zod.number()]).describe('70th percentile.'), - p80: zod.union([zod.number(), zod.number()]).describe('80th percentile.'), - p90: zod.union([zod.number(), zod.number()]).describe('90th percentile.'), - p100: zod.union([zod.number(), zod.number()]).describe('100th percentile.'), - }) - .describe('Percentile distribution of scores.') - .optional() - .describe('Percentile distribution of scores.'), - histogram: zod - .object({ - bins: zod - .array( - zod - .object({ - lower_bound: zod - .union([zod.number(), zod.number()]) - .describe('Lower bound of the bin (inclusive).'), - upper_bound: zod - .union([zod.number(), zod.number()]) - .describe('Upper bound of the bin (exclusive for all but last bin).'), - count: zod.number().describe('Number of values in this bin.'), - }) - .describe('A single bin in a histogram.') - ) - .describe('Histogram bins.'), - }) - .describe('Histogram of score distribution.') - .optional() - .describe('Histogram of score distribution.'), - }) - .describe( - 'Aggregated statistics for a range-type score with percentiles and histogram.' - ), - zod - .object({ - name: zod.string().describe('Name of the score.'), - count: zod.number().describe('Number of samples evaluated (excluding NaN).'), - nan_count: zod.number().describe('Number of samples that produced NaN scores.'), - sum: zod.number().optional().describe('Sum of all score values.'), - mean: zod.number().optional().describe('Mean score value.'), - min: zod.number().optional().describe('Minimum score value.'), - max: zod.number().optional().describe('Maximum score value.'), - std_dev: zod.number().optional().describe('Standard deviation of the scores.'), - variance: zod.number().optional().describe('Variance of the scores.'), - score_type: zod - .literal('rubric') - .default(evaluationEvaluateMetricResponseAggregateScoresItemTwoScoreTypeDefault) - .describe('Type of score.'), - rubric_distribution: zod - .array( - zod - .object({ - label: zod - .string() - .describe('The label to use for the level of the rubric grading criteria.'), - description: zod - .string() - .optional() - .describe( - 'Describe the semantic meaning of each criteria for the given rubric.' - ), - value: zod - .union([zod.number(), zod.number()]) - .describe('The score value to assign for the criteria.'), - count: zod - .number() - .default( - evaluationEvaluateMetricResponseAggregateScoresItemTwoRubricDistributionItemCountDefault - ) - .describe('The number of samples evaluated with the rubric level.'), - }) - .describe('Rubric score with count statistics.') - ) - .describe('Distribution of rubric categories.'), - mode_category: zod.string().optional().describe('Most frequent rubric category.'), - }) - .describe('Aggregated statistics for a rubric-type score with category distribution.'), - ]) - ) - .describe('Aggregated statistics per score.'), - row_scores: zod - .array( - zod - .object({ - index: zod - .number() - .describe('Position of this row in the original input dataset (0-based).'), - row: zod.record(zod.string(), zod.unknown()).describe('The original dataset row.'), - scores: zod - .record(zod.string(), zod.number()) - .optional() - .describe( - 'Score name to value mapping for this row. Non-finite values are serialized as null. Null if evaluation failed.' - ), - error: zod - .string() - .optional() - .describe('Error message if evaluation failed. Null if evaluation succeeded.'), - }) - .describe( - 'Result for a single evaluated row.\n\nContains either scores (on success) or error (on failure), facilitating\neasy manipulation where each row represents one evaluation.' - ) - ) - .describe('Per-row evaluation results with scores or errors.'), - }) - .describe( - 'Response body for metric evaluation.\n\nDesigned for easy loading into pandas DataFrames. See docs\/evaluation-response-pandas.md\nfor examples of how to load `aggregate_scores` and `row_scores` into DataFrames.' - ); - -/** - * List stored evaluation results for metric jobs. - * @summary List Metric Job Results - */ -export const EvaluationListMetricJobResultsParams = zod.object({ - workspace: zod.string(), -}); - -export const evaluationListMetricJobResultsQueryPageDefault = 1; -export const evaluationListMetricJobResultsQueryPageSizeDefault = 100; -export const evaluationListMetricJobResultsQuerySortDefault = `-created_at`; -export const evaluationListMetricJobResultsQueryAggregateFieldsDefault = []; -export const evaluationListMetricJobResultsQueryFilterMetricOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationListMetricJobResultsQueryFilterModelOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); - -export const EvaluationListMetricJobResultsQueryParams = zod.object({ - page: zod - .number() - .default(evaluationListMetricJobResultsQueryPageDefault) - .describe('Page number.'), - page_size: zod - .number() - .default(evaluationListMetricJobResultsQueryPageSizeDefault) - .describe('Page size.'), - sort: zod - .enum(['-created_at', 'created_at', '-updated_at', 'updated_at', '-name', 'name']) - .default(evaluationListMetricJobResultsQuerySortDefault) - .describe( - 'The field to sort by. To sort in decreasing order, use `-` in front of the field name.' - ), - aggregate_fields: zod - .array( - zod.enum([ - 'nan_count', - 'sum', - 'mean', - 'min', - 'max', - 'std_dev', - 'variance', - 'score_type', - 'percentiles', - 'histogram', - 'rubric_distribution', - 'mode_category', - ]) - ) - .default(evaluationListMetricJobResultsQueryAggregateFieldsDefault) - .describe( - "Aggregate score fields to include in the response (comma-separated or repeated). Default: ('nan_count', 'sum', 'mean', 'min', 'max'). Available: ('nan_count', 'sum', 'mean', 'min', 'max', 'std_dev', 'variance', 'score_type', 'percentiles', 'histogram', 'rubric_distribution', 'mode_category')." - ), - filter: zod - .object({ - name: zod.string().optional().describe('Filter job results by name.'), - metric: zod - .string() - .regex(evaluationListMetricJobResultsQueryFilterMetricOneRegExp) - .describe( - "Reference to a metric in the Metrics API.\n\nA reference is a string with format 'workspace\/metric-name' that points to a\npersisted metric entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ) - .optional() - .describe( - 'Filter results by metric reference. Jobs with inline metric configuration will not be included when filtering by metric.' - ), - dataset: zod - .string() - .describe( - "Reference to a Fileset in the Files API.\n\nA reference is a string with format 'workspace\/fileset-name' that points to a\npersisted fileset entity. When used as a dataset source, all files within the\nfileset will be downloaded to the job container.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform." - ) - .optional() - .describe( - 'Filter results by dataset if the metric job is configured with the fileset reference.' - ), - model: zod - .string() - .regex(evaluationListMetricJobResultsQueryFilterModelOneRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ) - .optional() - .describe( - 'Filter results by model if the metric job is configured with the model reference.' - ), - created_at: zod - .object({ - $gte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results greater than or equal to this datetime.'), - $lte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results less than or equal to this datetime.'), - }) - .optional() - .describe('Filter job results by creation date range.'), - }) - .optional() - .describe( - 'Filter metric job results by name, metric, dataset, model, and dates. Supports JSON filter syntax with operators: $eq, $like, $lt, $lte, $gt, $gte, $in, $nin, $and, $or, $not. Also supports text filter syntax.' - ), -}); - -export const evaluationListMetricJobResultsResponseDataItemNameDefault = ``; -export const evaluationListMetricJobResultsResponseDataItemWorkspaceRegExp = new RegExp( - '^[\\w\\-\\+.@:]+$' -); -export const evaluationListMetricJobResultsResponseDataItemModelOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationListMetricJobResultsResponseDataItemMetricOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationListMetricJobResultsResponseDataItemScoresItemOneScoreTypeDefault = `range`; -export const evaluationListMetricJobResultsResponseDataItemScoresItemTwoScoreTypeDefault = `rubric`; -export const evaluationListMetricJobResultsResponseDataItemScoresItemTwoRubricDistributionItemCountDefault = 0; - -export const EvaluationListMetricJobResultsResponse = zod.object({ - data: zod.array( - zod - .object({ - name: zod - .string() - .default(evaluationListMetricJobResultsResponseDataItemNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(evaluationListMetricJobResultsResponseDataItemWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - dataset: zod - .string() - .describe( - "Reference to a Fileset in the Files API.\n\nA reference is a string with format 'workspace\/fileset-name' that points to a\npersisted fileset entity. When used as a dataset source, all files within the\nfileset will be downloaded to the job container.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform." - ) - .optional() - .describe( - 'The dataset used for the evaluation job to generate the result. This field is only populated when the job specifies a FilesetRef.' - ), - model: zod - .string() - .regex(evaluationListMetricJobResultsResponseDataItemModelOneRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ) - .optional() - .describe( - 'The model evaluated for the job to generate the result. This field is only populated when the job specifies a ModelRef.' - ), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - metric: zod - .string() - .regex(evaluationListMetricJobResultsResponseDataItemMetricOneRegExp) - .describe( - "Reference to a metric in the Metrics API.\n\nA reference is a string with format 'workspace\/metric-name' that points to a\npersisted metric entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ) - .optional() - .describe('The metric used for the evaluation job to generate the result.'), - scores: zod - .array( - zod.union([ - zod - .object({ - name: zod.string().describe('Name of the score.'), - count: zod.number().describe('Number of samples evaluated (excluding NaN).'), - nan_count: zod.number().describe('Number of samples that produced NaN scores.'), - sum: zod.number().optional().describe('Sum of all score values.'), - mean: zod.number().optional().describe('Mean score value.'), - min: zod.number().optional().describe('Minimum score value.'), - max: zod.number().optional().describe('Maximum score value.'), - std_dev: zod.number().optional().describe('Standard deviation of the scores.'), - variance: zod.number().optional().describe('Variance of the scores.'), - score_type: zod - .literal('range') - .default( - evaluationListMetricJobResultsResponseDataItemScoresItemOneScoreTypeDefault - ) - .describe('Type of score.'), - percentiles: zod - .object({ - p10: zod.union([zod.number(), zod.number()]).describe('10th percentile.'), - p20: zod.union([zod.number(), zod.number()]).describe('20th percentile.'), - p30: zod.union([zod.number(), zod.number()]).describe('30th percentile.'), - p40: zod.union([zod.number(), zod.number()]).describe('40th percentile.'), - p50: zod - .union([zod.number(), zod.number()]) - .describe('50th percentile (median).'), - p60: zod.union([zod.number(), zod.number()]).describe('60th percentile.'), - p70: zod.union([zod.number(), zod.number()]).describe('70th percentile.'), - p80: zod.union([zod.number(), zod.number()]).describe('80th percentile.'), - p90: zod.union([zod.number(), zod.number()]).describe('90th percentile.'), - p100: zod.union([zod.number(), zod.number()]).describe('100th percentile.'), - }) - .describe('Percentile distribution of scores.') - .optional() - .describe('Percentile distribution of scores.'), - histogram: zod - .object({ - bins: zod - .array( - zod - .object({ - lower_bound: zod - .union([zod.number(), zod.number()]) - .describe('Lower bound of the bin (inclusive).'), - upper_bound: zod - .union([zod.number(), zod.number()]) - .describe( - 'Upper bound of the bin (exclusive for all but last bin).' - ), - count: zod.number().describe('Number of values in this bin.'), - }) - .describe('A single bin in a histogram.') - ) - .describe('Histogram bins.'), - }) - .describe('Histogram of score distribution.') - .optional() - .describe('Histogram of score distribution.'), - }) - .describe( - 'Aggregated statistics for a range-type score with percentiles and histogram.' - ), - zod - .object({ - name: zod.string().describe('Name of the score.'), - count: zod.number().describe('Number of samples evaluated (excluding NaN).'), - nan_count: zod.number().describe('Number of samples that produced NaN scores.'), - sum: zod.number().optional().describe('Sum of all score values.'), - mean: zod.number().optional().describe('Mean score value.'), - min: zod.number().optional().describe('Minimum score value.'), - max: zod.number().optional().describe('Maximum score value.'), - std_dev: zod.number().optional().describe('Standard deviation of the scores.'), - variance: zod.number().optional().describe('Variance of the scores.'), - score_type: zod - .literal('rubric') - .default( - evaluationListMetricJobResultsResponseDataItemScoresItemTwoScoreTypeDefault - ) - .describe('Type of score.'), - rubric_distribution: zod - .array( - zod - .object({ - label: zod - .string() - .describe( - 'The label to use for the level of the rubric grading criteria.' - ), - description: zod - .string() - .optional() - .describe( - 'Describe the semantic meaning of each criteria for the given rubric.' - ), - value: zod - .union([zod.number(), zod.number()]) - .describe('The score value to assign for the criteria.'), - count: zod - .number() - .default( - evaluationListMetricJobResultsResponseDataItemScoresItemTwoRubricDistributionItemCountDefault - ) - .describe('The number of samples evaluated with the rubric level.'), - }) - .describe('Rubric score with count statistics.') - ) - .describe('Distribution of rubric categories.'), - mode_category: zod.string().optional().describe('Most frequent rubric category.'), - }) - .describe( - 'Aggregated statistics for a rubric-type score with category distribution.' - ), - ]) - ) - .describe('The list of aggregated scores.'), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('Response type for metric job result.') - ), - pagination: zod - .object({ - page: zod.number().describe('The current page number.'), - page_size: zod.number().describe('The page size used for the query.'), - current_page_size: zod.number().describe('The size for the current page.'), - total_pages: zod.number().describe('The total number of pages.'), - total_results: zod.number().describe('The total number of results.'), - }) - .optional() - .describe('Pagination information.'), - sort: zod.string().optional().describe('The field on which the results are sorted.'), - filter: zod.record(zod.string(), zod.unknown()).optional().describe('Filtering information.'), -}); - -/** - * Get a specific metric job result by workspace and job name. - * @summary Get Metric Job Result - */ -export const EvaluationGetMetricJobResultParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const evaluationGetMetricJobResultQueryAggregateFieldsDefault = []; - -export const EvaluationGetMetricJobResultQueryParams = zod.object({ - aggregate_fields: zod - .array( - zod.enum([ - 'nan_count', - 'sum', - 'mean', - 'min', - 'max', - 'std_dev', - 'variance', - 'score_type', - 'percentiles', - 'histogram', - 'rubric_distribution', - 'mode_category', - ]) - ) - .default(evaluationGetMetricJobResultQueryAggregateFieldsDefault) - .describe( - "Aggregate score fields to include in the response (comma-separated or repeated). Default: ('nan_count', 'sum', 'mean', 'min', 'max'). Available: ('nan_count', 'sum', 'mean', 'min', 'max', 'std_dev', 'variance', 'score_type', 'percentiles', 'histogram', 'rubric_distribution', 'mode_category')." - ), -}); - -export const evaluationGetMetricJobResultResponseNameDefault = ``; -export const evaluationGetMetricJobResultResponseWorkspaceRegExp = new RegExp('^[\\w\\-\\+.@:]+$'); -export const evaluationGetMetricJobResultResponseModelOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResultResponseMetricOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResultResponseScoresItemOneScoreTypeDefault = `range`; -export const evaluationGetMetricJobResultResponseScoresItemTwoScoreTypeDefault = `rubric`; -export const evaluationGetMetricJobResultResponseScoresItemTwoRubricDistributionItemCountDefault = 0; - -export const EvaluationGetMetricJobResultResponse = zod - .object({ - name: zod - .string() - .default(evaluationGetMetricJobResultResponseNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(evaluationGetMetricJobResultResponseWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - dataset: zod - .string() - .describe( - "Reference to a Fileset in the Files API.\n\nA reference is a string with format 'workspace\/fileset-name' that points to a\npersisted fileset entity. When used as a dataset source, all files within the\nfileset will be downloaded to the job container.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform." - ) - .optional() - .describe( - 'The dataset used for the evaluation job to generate the result. This field is only populated when the job specifies a FilesetRef.' - ), - model: zod - .string() - .regex(evaluationGetMetricJobResultResponseModelOneRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ) - .optional() - .describe( - 'The model evaluated for the job to generate the result. This field is only populated when the job specifies a ModelRef.' - ), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - metric: zod - .string() - .regex(evaluationGetMetricJobResultResponseMetricOneRegExp) - .describe( - "Reference to a metric in the Metrics API.\n\nA reference is a string with format 'workspace\/metric-name' that points to a\npersisted metric entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ) - .optional() - .describe('The metric used for the evaluation job to generate the result.'), - scores: zod - .array( - zod.union([ - zod - .object({ - name: zod.string().describe('Name of the score.'), - count: zod.number().describe('Number of samples evaluated (excluding NaN).'), - nan_count: zod.number().describe('Number of samples that produced NaN scores.'), - sum: zod.number().optional().describe('Sum of all score values.'), - mean: zod.number().optional().describe('Mean score value.'), - min: zod.number().optional().describe('Minimum score value.'), - max: zod.number().optional().describe('Maximum score value.'), - std_dev: zod.number().optional().describe('Standard deviation of the scores.'), - variance: zod.number().optional().describe('Variance of the scores.'), - score_type: zod - .literal('range') - .default(evaluationGetMetricJobResultResponseScoresItemOneScoreTypeDefault) - .describe('Type of score.'), - percentiles: zod - .object({ - p10: zod.union([zod.number(), zod.number()]).describe('10th percentile.'), - p20: zod.union([zod.number(), zod.number()]).describe('20th percentile.'), - p30: zod.union([zod.number(), zod.number()]).describe('30th percentile.'), - p40: zod.union([zod.number(), zod.number()]).describe('40th percentile.'), - p50: zod - .union([zod.number(), zod.number()]) - .describe('50th percentile (median).'), - p60: zod.union([zod.number(), zod.number()]).describe('60th percentile.'), - p70: zod.union([zod.number(), zod.number()]).describe('70th percentile.'), - p80: zod.union([zod.number(), zod.number()]).describe('80th percentile.'), - p90: zod.union([zod.number(), zod.number()]).describe('90th percentile.'), - p100: zod.union([zod.number(), zod.number()]).describe('100th percentile.'), - }) - .describe('Percentile distribution of scores.') - .optional() - .describe('Percentile distribution of scores.'), - histogram: zod - .object({ - bins: zod - .array( - zod - .object({ - lower_bound: zod - .union([zod.number(), zod.number()]) - .describe('Lower bound of the bin (inclusive).'), - upper_bound: zod - .union([zod.number(), zod.number()]) - .describe('Upper bound of the bin (exclusive for all but last bin).'), - count: zod.number().describe('Number of values in this bin.'), - }) - .describe('A single bin in a histogram.') - ) - .describe('Histogram bins.'), - }) - .describe('Histogram of score distribution.') - .optional() - .describe('Histogram of score distribution.'), - }) - .describe( - 'Aggregated statistics for a range-type score with percentiles and histogram.' - ), - zod - .object({ - name: zod.string().describe('Name of the score.'), - count: zod.number().describe('Number of samples evaluated (excluding NaN).'), - nan_count: zod.number().describe('Number of samples that produced NaN scores.'), - sum: zod.number().optional().describe('Sum of all score values.'), - mean: zod.number().optional().describe('Mean score value.'), - min: zod.number().optional().describe('Minimum score value.'), - max: zod.number().optional().describe('Maximum score value.'), - std_dev: zod.number().optional().describe('Standard deviation of the scores.'), - variance: zod.number().optional().describe('Variance of the scores.'), - score_type: zod - .literal('rubric') - .default(evaluationGetMetricJobResultResponseScoresItemTwoScoreTypeDefault) - .describe('Type of score.'), - rubric_distribution: zod - .array( - zod - .object({ - label: zod - .string() - .describe('The label to use for the level of the rubric grading criteria.'), - description: zod - .string() - .optional() - .describe( - 'Describe the semantic meaning of each criteria for the given rubric.' - ), - value: zod - .union([zod.number(), zod.number()]) - .describe('The score value to assign for the criteria.'), - count: zod - .number() - .default( - evaluationGetMetricJobResultResponseScoresItemTwoRubricDistributionItemCountDefault - ) - .describe('The number of samples evaluated with the rubric level.'), - }) - .describe('Rubric score with count statistics.') - ) - .describe('Distribution of rubric categories.'), - mode_category: zod.string().optional().describe('Most frequent rubric category.'), - }) - .describe('Aggregated statistics for a rubric-type score with category distribution.'), - ]) - ) - .describe('The list of aggregated scores.'), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('Response type for metric job result.'); - -/** - * Delete an evaluation metric job result. - * @summary Delete Metric Job Result - */ -export const EvaluationDeleteMetricJobResultParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const evaluationDeleteMetricJobResultResponseMessageDefault = `Resource deleted successfully.`; - -export const EvaluationDeleteMetricJobResultResponse = zod.object({ - message: zod.string().default(evaluationDeleteMetricJobResultResponseMessageDefault), - id: zod.string().optional().describe('The ID of the deleted resource.'), - deleted_at: zod - .string() - .datetime({}) - .optional() - .describe('The timestamp when the resource was deleted.'), -}); - -/** - * @summary Create Job - */ -export const EvaluationCreateMetricJobParams = zod.object({ - workspace: zod.string(), -}); - -export const evaluationCreateMetricJobBodySpecOneMetricOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecOneMetricTwoOneTypeDefault = `llm-judge`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOneModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecOneMetricTwoOneModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOneModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecOneMetricTwoOneScoresItemOneNameRegExp = new RegExp( - '^[a-z0-9_]+$' -); -export const evaluationCreateMetricJobBodySpecOneMetricTwoOneScoresItemOneParserOneTypeDefault = `json`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOneScoresItemOneParserTwoTypeDefault = `regex`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOneScoresItemOneParserTwoMethodDefault = `match`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOneScoresItemOneRubricMin = 2; - -export const evaluationCreateMetricJobBodySpecOneMetricTwoOneScoresItemTwoNameRegExp = new RegExp( - '^[a-z0-9_]+$' -); -export const evaluationCreateMetricJobBodySpecOneMetricTwoOneScoresItemTwoParserOneTypeDefault = `json`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOneScoresItemTwoParserTwoTypeDefault = `regex`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOneScoresItemTwoParserTwoMethodDefault = `match`; - -export const evaluationCreateMetricJobBodySpecOneMetricTwoOneInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOneInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecOneMetricTwoOneInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOneInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecOneMetricTwoOneIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecOneMetricTwoTwoJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecOneMetricTwoTwoJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoTwoJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecOneMetricTwoTwoInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecOneMetricTwoTwoInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecOneMetricTwoTwoInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecOneMetricTwoTwoInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecOneMetricTwoTwoIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecOneMetricTwoTwoTypeDefault = `topic_adherence`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoTwoMetricModeDefault = `f1`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoThreeJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecOneMetricTwoThreeJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoThreeJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecOneMetricTwoThreeInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecOneMetricTwoThreeInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecOneMetricTwoThreeInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecOneMetricTwoThreeInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecOneMetricTwoThreeIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecOneMetricTwoThreeTypeDefault = `agent_goal_accuracy`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoThreeUseReferenceDefault = true; -export const evaluationCreateMetricJobBodySpecOneMetricTwoFourJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecOneMetricTwoFourJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoFourJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecOneMetricTwoFourInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecOneMetricTwoFourInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecOneMetricTwoFourInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecOneMetricTwoFourInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecOneMetricTwoFourIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecOneMetricTwoFourTypeDefault = `answer_accuracy`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoFiveJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecOneMetricTwoFiveJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoFiveJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecOneMetricTwoFiveInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecOneMetricTwoFiveInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecOneMetricTwoFiveInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecOneMetricTwoFiveInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecOneMetricTwoFiveIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecOneMetricTwoFiveTypeDefault = `context_relevance`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoSixJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecOneMetricTwoSixJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoSixJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecOneMetricTwoSixInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecOneMetricTwoSixInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecOneMetricTwoSixInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecOneMetricTwoSixInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecOneMetricTwoSixIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecOneMetricTwoSixTypeDefault = `response_groundedness`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoSevenJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecOneMetricTwoSevenJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoSevenJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecOneMetricTwoSevenInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecOneMetricTwoSevenInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecOneMetricTwoSevenInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecOneMetricTwoSevenInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecOneMetricTwoSevenIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecOneMetricTwoSevenTypeDefault = `context_recall`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoEightJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecOneMetricTwoEightJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoEightJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecOneMetricTwoEightInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecOneMetricTwoEightInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecOneMetricTwoEightInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecOneMetricTwoEightInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecOneMetricTwoEightIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecOneMetricTwoEightTypeDefault = `context_precision`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoNineJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecOneMetricTwoNineJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoNineJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecOneMetricTwoNineInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecOneMetricTwoNineInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecOneMetricTwoNineInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecOneMetricTwoNineInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecOneMetricTwoNineIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecOneMetricTwoNineTypeDefault = `context_entity_recall`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOnezeroEmbeddingsModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecOneMetricTwoOnezeroEmbeddingsModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOnezeroEmbeddingsModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationCreateMetricJobBodySpecOneMetricTwoOnezeroJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecOneMetricTwoOnezeroJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOnezeroJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecOneMetricTwoOnezeroInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOnezeroInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecOneMetricTwoOnezeroInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOnezeroInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecOneMetricTwoOnezeroIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOnezeroTypeDefault = `response_relevancy`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOnezeroStrictnessDefault = 1; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOneoneJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecOneMetricTwoOneoneJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOneoneJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecOneMetricTwoOneoneInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOneoneInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecOneMetricTwoOneoneInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOneoneInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecOneMetricTwoOneoneIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOneoneTypeDefault = `faithfulness`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOnetwoJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecOneMetricTwoOnetwoJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOnetwoJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecOneMetricTwoOnetwoInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOnetwoInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecOneMetricTwoOnetwoInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOnetwoInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecOneMetricTwoOnetwoIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOnetwoTypeDefault = `noise_sensitivity`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOnethreeTypeDefault = `tool_call_accuracy`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOnefourTypeDefault = `bleu`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOnefiveTypeDefault = `exact-match`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOnesixTypeDefault = `f1`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOnesevenTypeDefault = `number-check`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOneeightTypeDefault = `remote`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOneeightApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecOneMetricTwoOneeightTimeoutSecondsDefault = 30; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOneeightMaxRetriesDefault = 3; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOneeightScoresItemNameRegExp = new RegExp( - '^[a-z0-9_]+$' -); -export const evaluationCreateMetricJobBodySpecOneMetricTwoOneeightScoresItemParserOneTypeDefault = `json`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOnenineTypeDefault = `nemo-agent-toolkit-remote`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOnenineApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateMetricJobBodySpecOneMetricTwoOnenineTimeoutSecondsDefault = 30; -export const evaluationCreateMetricJobBodySpecOneMetricTwoOnenineMaxRetriesDefault = 3; -export const evaluationCreateMetricJobBodySpecOneMetricTwoTwozeroTypeDefault = `rouge`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoTwooneTypeDefault = `string-check`; -export const evaluationCreateMetricJobBodySpecOneMetricTwoTwotwoTypeDefault = `tool-calling`; -export const evaluationCreateMetricJobBodySpecOneMetricThreeTypeDefault = `system`; -export const evaluationCreateMetricJobBodySpecOneMetricThreeNameDefault = `Metric name`; - -export const evaluationCreateMetricJobBodySpecOneFieldMappingOneInputRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateMetricJobBodySpecOneFieldMappingOneOutputRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateMetricJobBodySpecOneFieldMappingOneContextRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateMetricJobBodySpecOneFieldMappingOneReferenceRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateMetricJobBodySpecOneFieldMappingOneTrajectoryRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateMetricJobBodySpecOneFieldMappingOneMessagesRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateMetricJobBodySpecOneFieldMappingOneToolCallsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateMetricJobBodySpecOneFieldMappingOneToolsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateMetricJobBodySpecOneFieldMappingOneCustomRegExpOne = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateMetricJobBodySpecOneDatasetThreeStorageOneReadChunkSizeDefault = 1048576; -export const evaluationCreateMetricJobBodySpecOneDatasetThreeStorageOneTypeDefault = `ngc`; -export const evaluationCreateMetricJobBodySpecOneDatasetThreeStorageOneTargetTypeDefault = `resource`; -export const evaluationCreateMetricJobBodySpecOneDatasetThreeStorageOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecOneDatasetThreeStorageOneHostDefault = `https://api.ngc.nvidia.com`; -export const evaluationCreateMetricJobBodySpecOneDatasetThreeStorageTwoReadChunkSizeDefault = 1048576; -export const evaluationCreateMetricJobBodySpecOneDatasetThreeStorageTwoTypeDefault = `huggingface`; -export const evaluationCreateMetricJobBodySpecOneDatasetThreeStorageTwoRepoTypeDefault = `model`; -export const evaluationCreateMetricJobBodySpecOneDatasetThreeStorageTwoRevisionDefault = `main`; -export const evaluationCreateMetricJobBodySpecOneDatasetThreeStorageTwoTokenSecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecOneDatasetThreeStorageTwoEndpointDefault = `https://huggingface.co`; -export const evaluationCreateMetricJobBodySpecOneParamsOneParallelismDefault = 8; - -export const evaluationCreateMetricJobBodySpecTwoMetricOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOneTypeDefault = `llm-judge`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOneModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOneModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOneModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOneScoresItemOneNameRegExp = new RegExp( - '^[a-z0-9_]+$' -); -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOneScoresItemOneParserOneTypeDefault = `json`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOneScoresItemOneParserTwoTypeDefault = `regex`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOneScoresItemOneParserTwoMethodDefault = `match`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOneScoresItemOneRubricMin = 2; - -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOneScoresItemTwoNameRegExp = new RegExp( - '^[a-z0-9_]+$' -); -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOneScoresItemTwoParserOneTypeDefault = `json`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOneScoresItemTwoParserTwoTypeDefault = `regex`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOneScoresItemTwoParserTwoMethodDefault = `match`; - -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOneInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOneInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOneInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOneInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOneIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoTwoJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecTwoMetricTwoTwoJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoTwoJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecTwoMetricTwoTwoInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoTwoInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecTwoMetricTwoTwoInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoTwoInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecTwoMetricTwoTwoIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoTwoTypeDefault = `topic_adherence`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoTwoMetricModeDefault = `f1`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoThreeJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecTwoMetricTwoThreeJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoThreeJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecTwoMetricTwoThreeInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoThreeInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecTwoMetricTwoThreeInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoThreeInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecTwoMetricTwoThreeIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoThreeTypeDefault = `agent_goal_accuracy`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoThreeUseReferenceDefault = true; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoFourJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecTwoMetricTwoFourJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoFourJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecTwoMetricTwoFourInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoFourInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecTwoMetricTwoFourInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoFourInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecTwoMetricTwoFourIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoFourTypeDefault = `answer_accuracy`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoFiveJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecTwoMetricTwoFiveJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoFiveJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecTwoMetricTwoFiveInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoFiveInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecTwoMetricTwoFiveInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoFiveInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecTwoMetricTwoFiveIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoFiveTypeDefault = `context_relevance`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoSixJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecTwoMetricTwoSixJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoSixJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecTwoMetricTwoSixInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoSixInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecTwoMetricTwoSixInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoSixInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecTwoMetricTwoSixIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoSixTypeDefault = `response_groundedness`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoSevenJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecTwoMetricTwoSevenJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoSevenJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecTwoMetricTwoSevenInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoSevenInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecTwoMetricTwoSevenInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoSevenInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecTwoMetricTwoSevenIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoSevenTypeDefault = `context_recall`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoEightJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecTwoMetricTwoEightJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoEightJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecTwoMetricTwoEightInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoEightInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecTwoMetricTwoEightInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoEightInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecTwoMetricTwoEightIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoEightTypeDefault = `context_precision`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoNineJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecTwoMetricTwoNineJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoNineJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecTwoMetricTwoNineInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoNineInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecTwoMetricTwoNineInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoNineInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecTwoMetricTwoNineIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoNineTypeDefault = `context_entity_recall`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOnezeroEmbeddingsModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOnezeroEmbeddingsModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOnezeroEmbeddingsModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOnezeroJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOnezeroJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOnezeroJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOnezeroInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOnezeroInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOnezeroInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOnezeroInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOnezeroIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOnezeroTypeDefault = `response_relevancy`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOnezeroStrictnessDefault = 1; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOneoneJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOneoneJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOneoneJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOneoneInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOneoneInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOneoneInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOneoneInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOneoneIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOneoneTypeDefault = `faithfulness`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOnetwoJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOnetwoJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOnetwoJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOnetwoInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOnetwoInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOnetwoInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOnetwoInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOnetwoIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOnetwoTypeDefault = `noise_sensitivity`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOnethreeTypeDefault = `tool_call_accuracy`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOnefourTypeDefault = `bleu`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOnefiveTypeDefault = `exact-match`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOnesixTypeDefault = `f1`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOnesevenTypeDefault = `number-check`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOneeightTypeDefault = `remote`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOneeightApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOneeightTimeoutSecondsDefault = 30; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOneeightMaxRetriesDefault = 3; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOneeightScoresItemNameRegExp = new RegExp( - '^[a-z0-9_]+$' -); -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOneeightScoresItemParserOneTypeDefault = `json`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOnenineTypeDefault = `nemo-agent-toolkit-remote`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOnenineApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOnenineTimeoutSecondsDefault = 30; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoOnenineMaxRetriesDefault = 3; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoTwozeroTypeDefault = `rouge`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoTwooneTypeDefault = `string-check`; -export const evaluationCreateMetricJobBodySpecTwoMetricTwoTwotwoTypeDefault = `tool-calling`; -export const evaluationCreateMetricJobBodySpecTwoMetricThreeTypeDefault = `system`; -export const evaluationCreateMetricJobBodySpecTwoMetricThreeNameDefault = `Metric name`; - -export const evaluationCreateMetricJobBodySpecTwoFieldMappingOneInputRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateMetricJobBodySpecTwoFieldMappingOneOutputRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateMetricJobBodySpecTwoFieldMappingOneContextRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateMetricJobBodySpecTwoFieldMappingOneReferenceRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateMetricJobBodySpecTwoFieldMappingOneTrajectoryRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateMetricJobBodySpecTwoFieldMappingOneMessagesRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateMetricJobBodySpecTwoFieldMappingOneToolCallsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateMetricJobBodySpecTwoFieldMappingOneToolsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateMetricJobBodySpecTwoFieldMappingOneCustomRegExpOne = new RegExp( - '^[^\\[\\]]\*$' -); -export const evaluationCreateMetricJobBodySpecTwoModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateMetricJobBodySpecTwoModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecTwoModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); - -export const evaluationCreateMetricJobBodySpecTwoDatasetThreeStorageOneReadChunkSizeDefault = 1048576; -export const evaluationCreateMetricJobBodySpecTwoDatasetThreeStorageOneTypeDefault = `ngc`; -export const evaluationCreateMetricJobBodySpecTwoDatasetThreeStorageOneTargetTypeDefault = `resource`; -export const evaluationCreateMetricJobBodySpecTwoDatasetThreeStorageOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecTwoDatasetThreeStorageOneHostDefault = `https://api.ngc.nvidia.com`; -export const evaluationCreateMetricJobBodySpecTwoDatasetThreeStorageTwoReadChunkSizeDefault = 1048576; -export const evaluationCreateMetricJobBodySpecTwoDatasetThreeStorageTwoTypeDefault = `huggingface`; -export const evaluationCreateMetricJobBodySpecTwoDatasetThreeStorageTwoRepoTypeDefault = `model`; -export const evaluationCreateMetricJobBodySpecTwoDatasetThreeStorageTwoRevisionDefault = `main`; -export const evaluationCreateMetricJobBodySpecTwoDatasetThreeStorageTwoTokenSecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecTwoDatasetThreeStorageTwoEndpointDefault = `https://huggingface.co`; -export const evaluationCreateMetricJobBodySpecTwoParamsOneParallelismDefault = 8; - -export const evaluationCreateMetricJobBodySpecTwoParamsOneIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecTwoParamsOneMaxRetriesDefault = 3; -export const evaluationCreateMetricJobBodySpecTwoParamsOneMaxRetriesMin = 0; - -export const evaluationCreateMetricJobBodySpecTwoParamsOneInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecTwoParamsOneInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecTwoParamsOneInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecTwoParamsOneInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecThreeMetricOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOneTypeDefault = `llm-judge`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOneModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOneModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOneModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOneScoresItemOneNameRegExp = new RegExp( - '^[a-z0-9_]+$' -); -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOneScoresItemOneParserOneTypeDefault = `json`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOneScoresItemOneParserTwoTypeDefault = `regex`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOneScoresItemOneParserTwoMethodDefault = `match`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOneScoresItemOneRubricMin = 2; - -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOneScoresItemTwoNameRegExp = new RegExp( - '^[a-z0-9_]+$' -); -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOneScoresItemTwoParserOneTypeDefault = `json`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOneScoresItemTwoParserTwoTypeDefault = `regex`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOneScoresItemTwoParserTwoMethodDefault = `match`; - -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOneInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOneInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOneInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOneInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOneIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoTwoJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecThreeMetricTwoTwoJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoTwoJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecThreeMetricTwoTwoInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoTwoInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecThreeMetricTwoTwoInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoTwoInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecThreeMetricTwoTwoIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoTwoTypeDefault = `topic_adherence`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoTwoMetricModeDefault = `f1`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoThreeJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecThreeMetricTwoThreeJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoThreeJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecThreeMetricTwoThreeInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoThreeInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecThreeMetricTwoThreeInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoThreeInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecThreeMetricTwoThreeIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoThreeTypeDefault = `agent_goal_accuracy`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoThreeUseReferenceDefault = true; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoFourJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecThreeMetricTwoFourJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoFourJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecThreeMetricTwoFourInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoFourInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecThreeMetricTwoFourInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoFourInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecThreeMetricTwoFourIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoFourTypeDefault = `answer_accuracy`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoFiveJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecThreeMetricTwoFiveJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoFiveJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecThreeMetricTwoFiveInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoFiveInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecThreeMetricTwoFiveInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoFiveInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecThreeMetricTwoFiveIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoFiveTypeDefault = `context_relevance`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoSixJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecThreeMetricTwoSixJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoSixJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecThreeMetricTwoSixInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoSixInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecThreeMetricTwoSixInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoSixInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecThreeMetricTwoSixIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoSixTypeDefault = `response_groundedness`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoSevenJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecThreeMetricTwoSevenJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoSevenJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecThreeMetricTwoSevenInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoSevenInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecThreeMetricTwoSevenInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoSevenInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecThreeMetricTwoSevenIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoSevenTypeDefault = `context_recall`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoEightJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecThreeMetricTwoEightJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoEightJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecThreeMetricTwoEightInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoEightInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecThreeMetricTwoEightInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoEightInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecThreeMetricTwoEightIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoEightTypeDefault = `context_precision`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoNineJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecThreeMetricTwoNineJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoNineJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecThreeMetricTwoNineInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoNineInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecThreeMetricTwoNineInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoNineInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecThreeMetricTwoNineIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoNineTypeDefault = `context_entity_recall`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOnezeroEmbeddingsModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOnezeroEmbeddingsModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOnezeroEmbeddingsModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOnezeroJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOnezeroJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOnezeroJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOnezeroInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOnezeroInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOnezeroInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOnezeroInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOnezeroIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOnezeroTypeDefault = `response_relevancy`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOnezeroStrictnessDefault = 1; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOneoneJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOneoneJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOneoneJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOneoneInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOneoneInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOneoneInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOneoneInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOneoneIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOneoneTypeDefault = `faithfulness`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOnetwoJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOnetwoJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOnetwoJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOnetwoInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOnetwoInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOnetwoInferenceOneTopPMin = 0; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOnetwoInferenceOneTopPMax = 1; - -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOnetwoIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOnetwoTypeDefault = `noise_sensitivity`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOnethreeTypeDefault = `tool_call_accuracy`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOnefourTypeDefault = `bleu`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOnefiveTypeDefault = `exact-match`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOnesixTypeDefault = `f1`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOnesevenTypeDefault = `number-check`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOneeightTypeDefault = `remote`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOneeightApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOneeightTimeoutSecondsDefault = 30; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOneeightMaxRetriesDefault = 3; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOneeightScoresItemNameRegExp = - new RegExp('^[a-z0-9_]+$'); -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOneeightScoresItemParserOneTypeDefault = `json`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOnenineTypeDefault = `nemo-agent-toolkit-remote`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOnenineApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOnenineTimeoutSecondsDefault = 30; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoOnenineMaxRetriesDefault = 3; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoTwozeroTypeDefault = `rouge`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoTwooneTypeDefault = `string-check`; -export const evaluationCreateMetricJobBodySpecThreeMetricTwoTwotwoTypeDefault = `tool-calling`; -export const evaluationCreateMetricJobBodySpecThreeMetricThreeTypeDefault = `system`; -export const evaluationCreateMetricJobBodySpecThreeMetricThreeNameDefault = `Metric name`; - -export const evaluationCreateMetricJobBodySpecThreeFieldMappingOneInputRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateMetricJobBodySpecThreeFieldMappingOneOutputRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateMetricJobBodySpecThreeFieldMappingOneContextRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateMetricJobBodySpecThreeFieldMappingOneReferenceRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateMetricJobBodySpecThreeFieldMappingOneTrajectoryRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateMetricJobBodySpecThreeFieldMappingOneMessagesRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateMetricJobBodySpecThreeFieldMappingOneToolCallsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateMetricJobBodySpecThreeFieldMappingOneToolsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateMetricJobBodySpecThreeFieldMappingOneCustomRegExpOne = new RegExp( - '^[^\\[\\]]\*$' -); -export const evaluationCreateMetricJobBodySpecThreeAgentOneFormatDefault = `generic`; -export const evaluationCreateMetricJobBodySpecThreeAgentOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); - -export const evaluationCreateMetricJobBodySpecThreeDatasetThreeStorageOneReadChunkSizeDefault = 1048576; -export const evaluationCreateMetricJobBodySpecThreeDatasetThreeStorageOneTypeDefault = `ngc`; -export const evaluationCreateMetricJobBodySpecThreeDatasetThreeStorageOneTargetTypeDefault = `resource`; -export const evaluationCreateMetricJobBodySpecThreeDatasetThreeStorageOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecThreeDatasetThreeStorageOneHostDefault = `https://api.ngc.nvidia.com`; -export const evaluationCreateMetricJobBodySpecThreeDatasetThreeStorageTwoReadChunkSizeDefault = 1048576; -export const evaluationCreateMetricJobBodySpecThreeDatasetThreeStorageTwoTypeDefault = `huggingface`; -export const evaluationCreateMetricJobBodySpecThreeDatasetThreeStorageTwoRepoTypeDefault = `model`; -export const evaluationCreateMetricJobBodySpecThreeDatasetThreeStorageTwoRevisionDefault = `main`; -export const evaluationCreateMetricJobBodySpecThreeDatasetThreeStorageTwoTokenSecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecThreeDatasetThreeStorageTwoEndpointDefault = `https://huggingface.co`; -export const evaluationCreateMetricJobBodySpecThreeParamsOneParallelismDefault = 8; - -export const evaluationCreateMetricJobBodySpecThreeParamsOneIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecThreeParamsOneMaxRetriesDefault = 3; -export const evaluationCreateMetricJobBodySpecThreeParamsOneMaxRetriesMin = 0; - -export const evaluationCreateMetricJobBodySpecFourMetricOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricJobBodySpecFourMetricTwoTypeDefault = `system`; -export const evaluationCreateMetricJobBodySpecFourMetricTwoNameDefault = `Metric name`; - -export const evaluationCreateMetricJobBodySpecFourFieldMappingOneInputRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateMetricJobBodySpecFourFieldMappingOneOutputRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateMetricJobBodySpecFourFieldMappingOneContextRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateMetricJobBodySpecFourFieldMappingOneReferenceRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateMetricJobBodySpecFourFieldMappingOneTrajectoryRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateMetricJobBodySpecFourFieldMappingOneMessagesRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateMetricJobBodySpecFourFieldMappingOneToolCallsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateMetricJobBodySpecFourFieldMappingOneToolsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCreateMetricJobBodySpecFourFieldMappingOneCustomRegExpOne = new RegExp( - '^[^\\[\\]]\*$' -); -export const evaluationCreateMetricJobBodySpecFourRetrieverPipelineOneEmbeddingsModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecFourRetrieverPipelineOneEmbeddingsModelOneFormatDefault = `nim`; -export const evaluationCreateMetricJobBodySpecFourRetrieverPipelineOneEmbeddingsModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); - -export const evaluationCreateMetricJobBodySpecFourDatasetFourStorageOneReadChunkSizeDefault = 1048576; -export const evaluationCreateMetricJobBodySpecFourDatasetFourStorageOneTypeDefault = `ngc`; -export const evaluationCreateMetricJobBodySpecFourDatasetFourStorageOneTargetTypeDefault = `resource`; -export const evaluationCreateMetricJobBodySpecFourDatasetFourStorageOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecFourDatasetFourStorageOneHostDefault = `https://api.ngc.nvidia.com`; -export const evaluationCreateMetricJobBodySpecFourDatasetFourStorageTwoReadChunkSizeDefault = 1048576; -export const evaluationCreateMetricJobBodySpecFourDatasetFourStorageTwoTypeDefault = `huggingface`; -export const evaluationCreateMetricJobBodySpecFourDatasetFourStorageTwoRepoTypeDefault = `model`; -export const evaluationCreateMetricJobBodySpecFourDatasetFourStorageTwoRevisionDefault = `main`; -export const evaluationCreateMetricJobBodySpecFourDatasetFourStorageTwoTokenSecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricJobBodySpecFourDatasetFourStorageTwoEndpointDefault = `https://huggingface.co`; -export const evaluationCreateMetricJobBodySpecFourParamsOneParallelismDefault = 8; - -export const evaluationCreateMetricJobBodySpecFourParamsOneIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricJobBodySpecFourParamsOneMaxRetriesDefault = 3; -export const evaluationCreateMetricJobBodySpecFourParamsOneMaxRetriesMin = 0; - -export const EvaluationCreateMetricJobBody = zod.object({ - name: zod.string().optional(), - description: zod.string().optional(), - project: zod.string().optional(), - spec: zod.union([ - zod - .object({ - metric: zod - .union([ - zod - .string() - .regex(evaluationCreateMetricJobBodySpecOneMetricOneRegExp) - .describe( - "Reference to a metric in the Metrics API.\n\nA reference is a string with format 'workspace\/metric-name' that points to a\npersisted metric entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ), - zod.union([ - zod - .object({ - type: zod - .literal('llm-judge') - .default(evaluationCreateMetricJobBodySpecOneMetricTwoOneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecOneMetricTwoOneModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecOneMetricTwoOneModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricJobBodySpecOneMetricTwoOneModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The model configuration.'), - scores: zod - .array( - zod.union([ - zod - .object({ - name: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecOneMetricTwoOneScoresItemOneNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationCreateMetricJobBodySpecOneMetricTwoOneScoresItemOneParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationCreateMetricJobBodySpecOneMetricTwoOneScoresItemOneParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationCreateMetricJobBodySpecOneMetricTwoOneScoresItemOneParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - rubric: zod - .array( - zod.object({ - label: zod - .string() - .describe( - 'The label to use for the level of the rubric grading criteria. (e.g., \"helpful\", \"not_helpful\", \"positive\")' - ), - description: zod - .string() - .optional() - .describe( - 'Describe the semantic meaning of each criteria for the given rubric. If no judge template is set, the input description for labels are included in the generated judge prompt.' - ), - value: zod - .union([zod.number(), zod.number()]) - .describe( - 'The score value to assign for the criteria used for aggregation and ranking.' - ), - }) - ) - .min( - evaluationCreateMetricJobBodySpecOneMetricTwoOneScoresItemOneRubricMin - ) - .describe('The rubric for the score.'), - }) - .describe( - 'Score definition for a rubric with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - zod - .object({ - name: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecOneMetricTwoOneScoresItemTwoNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationCreateMetricJobBodySpecOneMetricTwoOneScoresItemTwoParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationCreateMetricJobBodySpecOneMetricTwoOneScoresItemTwoParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationCreateMetricJobBodySpecOneMetricTwoOneScoresItemTwoParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .describe( - 'Minimum value for the score range. Must be less than maximum.' - ), - maximum: zod - .union([zod.number(), zod.number()]) - .describe( - 'Maximum value for the score range. Must be greater than minimum.' - ), - }) - .describe( - 'Score definition for a range of values with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - ]) - ) - .min(1) - .describe( - "Definitions of scores that will be extracted from the judge's output." - ), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .optional() - .describe( - 'The prompt template for the judge. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{sample.output_text}} to use the model output within the template or {{item.xxx}} to reference input columns from the dataset.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - "Prompt template fields that should remain in the inferred input schema but not be required. Use this for fields like 'reference' when the metric can still run without them." - ), - structured_output: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'JSON schema to apply structured output for the judge model evaluation. Structured output is derived from scores when omitted. Use this option if there are custom requirements for the output of the judge.' - ), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecOneMetricTwoOneInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecOneMetricTwoOneInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricJobBodySpecOneMetricTwoOneInferenceOneTopPMin) - .max(evaluationCreateMetricJobBodySpecOneMetricTwoOneInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge model.'), - system_prompt: zod - .string() - .optional() - .describe( - "Initial instructions that define the judge model's role and behavior for the conversation. This is prepended to the messages as a system message." - ), - reasoning: zod - .object({ - end_token: zod - .string() - .optional() - .describe( - "Configure the end token to trim reasoning context based on the model's reasoning API. Example for Nemotron models: '<\/think>'" - ), - include_if_not_finished: zod - .boolean() - .optional() - .describe( - 'Configure whether to include reasoning context if the model has not finished reasoning.' - ), - effort: zod - .string() - .optional() - .describe( - 'Option for OpenAI models to specify low, medium, or high reasoning effort.' - ), - }) - .describe("Custom settings that control the model's reasoning behavior.") - .optional() - .describe( - "Custom settings that control the judge model's reasoning behavior. For reasoning models (e.g., Nemotron), use `end_token` to strip reasoning traces from the output." - ), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecOneMetricTwoOneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - }) - .describe('Request type for creating LLM Judge metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecOneMetricTwoTwoJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecOneMetricTwoTwoJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricJobBodySpecOneMetricTwoTwoJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecOneMetricTwoTwoInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecOneMetricTwoTwoInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricJobBodySpecOneMetricTwoTwoInferenceOneTopPMin) - .max(evaluationCreateMetricJobBodySpecOneMetricTwoTwoInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecOneMetricTwoTwoIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('topic_adherence') - .default(evaluationCreateMetricJobBodySpecOneMetricTwoTwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - metric_mode: zod - .enum(['f1', 'precision', 'recall']) - .default(evaluationCreateMetricJobBodySpecOneMetricTwoTwoMetricModeDefault) - .describe('The mode for computing topic adherence score.'), - }) - .describe('Request type for TopicAdherence metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecOneMetricTwoThreeJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecOneMetricTwoThreeJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCreateMetricJobBodySpecOneMetricTwoThreeJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecOneMetricTwoThreeInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecOneMetricTwoThreeInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricJobBodySpecOneMetricTwoThreeInferenceOneTopPMin) - .max(evaluationCreateMetricJobBodySpecOneMetricTwoThreeInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecOneMetricTwoThreeIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('agent_goal_accuracy') - .default(evaluationCreateMetricJobBodySpecOneMetricTwoThreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - use_reference: zod - .boolean() - .default(evaluationCreateMetricJobBodySpecOneMetricTwoThreeUseReferenceDefault) - .describe('Whether to use reference for goal accuracy evaluation.'), - }) - .describe('Request type for AgentGoalAccuracy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecOneMetricTwoFourJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecOneMetricTwoFourJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricJobBodySpecOneMetricTwoFourJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecOneMetricTwoFourInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecOneMetricTwoFourInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricJobBodySpecOneMetricTwoFourInferenceOneTopPMin) - .max(evaluationCreateMetricJobBodySpecOneMetricTwoFourInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecOneMetricTwoFourIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('answer_accuracy') - .default(evaluationCreateMetricJobBodySpecOneMetricTwoFourTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for AnswerAccuracy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecOneMetricTwoFiveJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecOneMetricTwoFiveJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricJobBodySpecOneMetricTwoFiveJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecOneMetricTwoFiveInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecOneMetricTwoFiveInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricJobBodySpecOneMetricTwoFiveInferenceOneTopPMin) - .max(evaluationCreateMetricJobBodySpecOneMetricTwoFiveInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecOneMetricTwoFiveIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_relevance') - .default(evaluationCreateMetricJobBodySpecOneMetricTwoFiveTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextRelevance metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecOneMetricTwoSixJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecOneMetricTwoSixJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricJobBodySpecOneMetricTwoSixJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecOneMetricTwoSixInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecOneMetricTwoSixInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricJobBodySpecOneMetricTwoSixInferenceOneTopPMin) - .max(evaluationCreateMetricJobBodySpecOneMetricTwoSixInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecOneMetricTwoSixIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_groundedness') - .default(evaluationCreateMetricJobBodySpecOneMetricTwoSixTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ResponseGroundedness metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecOneMetricTwoSevenJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecOneMetricTwoSevenJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCreateMetricJobBodySpecOneMetricTwoSevenJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecOneMetricTwoSevenInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecOneMetricTwoSevenInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricJobBodySpecOneMetricTwoSevenInferenceOneTopPMin) - .max(evaluationCreateMetricJobBodySpecOneMetricTwoSevenInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecOneMetricTwoSevenIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_recall') - .default(evaluationCreateMetricJobBodySpecOneMetricTwoSevenTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextRecall metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecOneMetricTwoEightJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecOneMetricTwoEightJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCreateMetricJobBodySpecOneMetricTwoEightJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecOneMetricTwoEightInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecOneMetricTwoEightInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricJobBodySpecOneMetricTwoEightInferenceOneTopPMin) - .max(evaluationCreateMetricJobBodySpecOneMetricTwoEightInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecOneMetricTwoEightIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_precision') - .default(evaluationCreateMetricJobBodySpecOneMetricTwoEightTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextPrecision metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecOneMetricTwoNineJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecOneMetricTwoNineJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricJobBodySpecOneMetricTwoNineJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecOneMetricTwoNineInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecOneMetricTwoNineInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricJobBodySpecOneMetricTwoNineInferenceOneTopPMin) - .max(evaluationCreateMetricJobBodySpecOneMetricTwoNineInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecOneMetricTwoNineIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_entity_recall') - .default(evaluationCreateMetricJobBodySpecOneMetricTwoNineTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextEntityRecall metrics.'), - zod - .object({ - embeddings_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecOneMetricTwoOnezeroEmbeddingsModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecOneMetricTwoOnezeroEmbeddingsModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCreateMetricJobBodySpecOneMetricTwoOnezeroEmbeddingsModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The embeddings model configuration.'), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecOneMetricTwoOnezeroJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecOneMetricTwoOnezeroJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCreateMetricJobBodySpecOneMetricTwoOnezeroJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecOneMetricTwoOnezeroInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecOneMetricTwoOnezeroInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCreateMetricJobBodySpecOneMetricTwoOnezeroInferenceOneTopPMin - ) - .max( - evaluationCreateMetricJobBodySpecOneMetricTwoOnezeroInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecOneMetricTwoOnezeroIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_relevancy') - .default(evaluationCreateMetricJobBodySpecOneMetricTwoOnezeroTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - strictness: zod - .number() - .default(evaluationCreateMetricJobBodySpecOneMetricTwoOnezeroStrictnessDefault) - .describe('Number of parallel questions generated. NIM can only generate 1.'), - }) - .describe('Request type for ResponseRelevancy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecOneMetricTwoOneoneJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecOneMetricTwoOneoneJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCreateMetricJobBodySpecOneMetricTwoOneoneJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecOneMetricTwoOneoneInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecOneMetricTwoOneoneInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricJobBodySpecOneMetricTwoOneoneInferenceOneTopPMin) - .max(evaluationCreateMetricJobBodySpecOneMetricTwoOneoneInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecOneMetricTwoOneoneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('faithfulness') - .default(evaluationCreateMetricJobBodySpecOneMetricTwoOneoneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for Faithfulness metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecOneMetricTwoOnetwoJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecOneMetricTwoOnetwoJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCreateMetricJobBodySpecOneMetricTwoOnetwoJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecOneMetricTwoOnetwoInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecOneMetricTwoOnetwoInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricJobBodySpecOneMetricTwoOnetwoInferenceOneTopPMin) - .max(evaluationCreateMetricJobBodySpecOneMetricTwoOnetwoInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecOneMetricTwoOnetwoIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('noise_sensitivity') - .default(evaluationCreateMetricJobBodySpecOneMetricTwoOnetwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for NoiseSensitivity metrics.'), - zod - .object({ - type: zod - .literal('tool_call_accuracy') - .default(evaluationCreateMetricJobBodySpecOneMetricTwoOnethreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ToolCallAccuracy metrics (no judge required).'), - zod - .object({ - type: zod - .literal('bleu') - .default(evaluationCreateMetricJobBodySpecOneMetricTwoOnefourTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - references: zod - .array(zod.string()) - .describe( - 'The templates for the ground truth references to calculate BLEU metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to calculate BLEU metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for BLEUMetric.'), - zod - .object({ - type: zod - .literal('exact-match') - .default(evaluationCreateMetricJobBodySpecOneMetricTwoOnefiveTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the exact match metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the exact match metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for ExactMatchMetric.'), - zod - .object({ - type: zod - .literal('f1') - .default(evaluationCreateMetricJobBodySpecOneMetricTwoOnesixTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the F1 metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the F1 metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for F1Metric.'), - zod - .object({ - type: zod - .literal('number-check') - .default(evaluationCreateMetricJobBodySpecOneMetricTwoOnesevenTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - '>=', - 'gte', - 'greater than or equal', - '>', - 'gt', - 'greater than', - '<=', - 'lte', - 'less than or equal', - '<', - 'lt', - 'less than', - 'absolute difference', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - epsilon: zod - .union([zod.number(), zod.number()]) - .optional() - .describe('Specify the tolerance for the absolute difference of values.'), - }) - .describe( - 'Request type for NumberCheckMetric. Numeric-comparison metric with template-driven operands.' - ), - zod - .object({ - type: zod - .literal('remote') - .default(evaluationCreateMetricJobBodySpecOneMetricTwoOneeightTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecOneMetricTwoOneeightApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default( - evaluationCreateMetricJobBodySpecOneMetricTwoOneeightTimeoutSecondsDefault - ) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default(evaluationCreateMetricJobBodySpecOneMetricTwoOneeightMaxRetriesDefault) - .describe('Maximum number of retry attempts.'), - body: zod - .record(zod.string(), zod.unknown()) - .describe('Jinja template for request payload'), - scores: zod - .array( - zod - .object({ - name: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecOneMetricTwoOneeightScoresItemNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .object({ - type: zod - .literal('json') - .default( - evaluationCreateMetricJobBodySpecOneMetricTwoOneeightScoresItemParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.') - .optional() - .describe( - 'The method to parse the score. Only JSON parsing is supported for remote metrics.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe( - 'Minimum value for the score range. Defaults to None (no lower bound).' - ), - maximum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe( - 'Maximum value for the score range. Defaults to None (no upper bound).' - ), - }) - .describe( - 'Score configuration for remote metrics.\n\nUnlike RangeScore, minimum and maximum are optional (default to None = no bounds).\nThis avoids JSON serialization issues with infinity values.' - ) - ) - .describe('List of scores to extract from the remote response'), - }) - .describe( - 'Request type for RemoteMetric. A metric that computes scores via a remote endpoint.' - ), - zod - .object({ - type: zod - .literal('nemo-agent-toolkit-remote') - .default(evaluationCreateMetricJobBodySpecOneMetricTwoOnenineTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecOneMetricTwoOnenineApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default( - evaluationCreateMetricJobBodySpecOneMetricTwoOnenineTimeoutSecondsDefault - ) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default(evaluationCreateMetricJobBodySpecOneMetricTwoOnenineMaxRetriesDefault) - .describe('Maximum number of retry attempts.'), - evaluator_name: zod - .string() - .describe('The name of the evaluator (also used as the score name).'), - }) - .describe( - 'Request type for NemoAgentToolkitRemoteMetric. A remote metric that interfaces with NeMo Agent Toolkit evaluators.' - ), - zod - .object({ - type: zod - .literal('rouge') - .default(evaluationCreateMetricJobBodySpecOneMetricTwoTwozeroTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to evaluate the ROUGE metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the ROUGE metric on. If not provided, the output text from the model is used.' - ), - }) - .describe( - 'Request type for ROUGEMetric. ROUGE metric for overlap-based summarization quality scoring.' - ), - zod - .object({ - type: zod - .literal('string-check') - .default(evaluationCreateMetricJobBodySpecOneMetricTwoTwooneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - 'contains', - 'not contains', - 'startswith', - 'endswith', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - }) - .describe( - 'Request type for StringCheckMetric. String-comparison metric with operator-based checks.' - ), - zod - .object({ - type: zod - .literal('tool-calling') - .default(evaluationCreateMetricJobBodySpecOneMetricTwoTwotwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to evaluate tool calling accuracy.' - ), - }) - .describe( - 'Request type for ToolCallingMetric. Tool-calling accuracy metric for structured function calls.' - ), - ]), - zod - .object({ - type: zod - .enum(['system', 'system-retriever']) - .default(evaluationCreateMetricJobBodySpecOneMetricThreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline', 'retriever'])) - .default([`online`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - name: zod - .string() - .default(evaluationCreateMetricJobBodySpecOneMetricThreeNameDefault), - required_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod - .string() - .optional() - .describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe( - 'List of required parameters for running an evaluation with the metric.' - ), - optional_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod - .string() - .optional() - .describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe( - 'List of optional parameters for running an evaluation with the metric.' - ), - }) - .describe('Metric entity for system metric that have pre-defined dataset.'), - ]) - .describe('The metric for evaluation.'), - metric_params: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Additional parameters for the metric. Required for system metrics, optional overrides for custom metrics.' - ), - field_mapping: zod - .object({ - input: zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecOneFieldMappingOneInputRegExp) - .optional() - .describe("Binding for the canonical 'input' evaluator field."), - output: zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecOneFieldMappingOneOutputRegExp) - .optional() - .describe("Binding for the canonical 'output' evaluator field."), - context: zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecOneFieldMappingOneContextRegExp) - .optional() - .describe("Binding for the canonical 'context' evaluator field."), - reference: zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecOneFieldMappingOneReferenceRegExp) - .optional() - .describe("Binding for the canonical 'reference' evaluator field."), - trajectory: zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecOneFieldMappingOneTrajectoryRegExp) - .optional() - .describe("Binding for the canonical 'trajectory' evaluator field."), - messages: zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecOneFieldMappingOneMessagesRegExp) - .optional() - .describe("Binding for the canonical 'messages' evaluator field."), - tool_calls: zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecOneFieldMappingOneToolCallsRegExp) - .optional() - .describe("Binding for the canonical 'tool_calls' evaluator field."), - tools: zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecOneFieldMappingOneToolsRegExp) - .optional() - .describe("Binding for the canonical 'tools' evaluator field."), - custom: zod - .record( - zod.string(), - zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecOneFieldMappingOneCustomRegExpOne) - ) - .optional() - .describe('Additional evaluator field bindings keyed by canonical field name.'), - }) - .describe( - "Maps canonical evaluator fields to raw dataset column paths.\nExample: {'input': 'question', 'output': 'answer', 'reference': 'gold', 'trajectory': 'steps'}" - ) - .optional() - .describe( - "Maps canonical evaluator fields such as 'input' and 'output' to dataset column paths for this job." - ), - dataset: zod - .union([ - zod - .object({ - rows: zod - .array(zod.record(zod.string(), zod.unknown())) - .min(1) - .describe( - 'Array of data rows. Each row can be any valid JSON value (object, string, array, etc.).' - ), - }) - .describe( - 'Inline dataset definition with embedded rows.\n\nUse this for quick evaluations without persisting the dataset first.' - ), - zod - .string() - .describe( - "Reference to a Fileset in the Files API.\n\nA reference is a string with format 'workspace\/fileset-name' that points to a\npersisted fileset entity. When used as a dataset source, all files within the\nfileset will be downloaded to the job container.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform." - ), - zod - .object({ - path: zod - .string() - .min(1) - .optional() - .describe('The relative path to file\/directory in the storage.'), - storage: zod - .union([ - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationCreateMetricJobBodySpecOneDatasetThreeStorageOneReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('ngc') - .default( - evaluationCreateMetricJobBodySpecOneDatasetThreeStorageOneTypeDefault - ), - org: zod.string().describe('NGC organization name'), - team: zod.string().describe('NGC team name'), - target: zod.string().describe('NGC asset name (model or resource)'), - target_type: zod - .enum(['resource', 'model']) - .default( - evaluationCreateMetricJobBodySpecOneDatasetThreeStorageOneTargetTypeDefault - ) - .describe("Type of NGC asset: 'resource' or 'model'"), - version: zod - .string() - .optional() - .describe('NGC asset version. If not provided, defaults to latest version'), - original_version: zod - .string() - .optional() - .describe( - "The original version requested by the user before resolution (e.g., 'latest' or None). The 'version' field contains the resolved version ID." - ), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecOneDatasetThreeStorageOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .describe('NGC API key secret name'), - host: zod - .string() - .default( - evaluationCreateMetricJobBodySpecOneDatasetThreeStorageOneHostDefault - ) - .describe('NGC API host URL'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationCreateMetricJobBodySpecOneDatasetThreeStorageTwoReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('huggingface') - .default( - evaluationCreateMetricJobBodySpecOneDatasetThreeStorageTwoTypeDefault - ), - repo_id: zod - .string() - .describe("Huggingface repository ID (e.g., 'meta-llama\/Llama-2-7b')"), - repo_type: zod - .enum(['model', 'dataset', 'space']) - .default( - evaluationCreateMetricJobBodySpecOneDatasetThreeStorageTwoRepoTypeDefault - ) - .describe("Type of Huggingface repository: 'model', 'dataset', or 'space'"), - revision: zod - .string() - .default( - evaluationCreateMetricJobBodySpecOneDatasetThreeStorageTwoRevisionDefault - ) - .describe("Branch, tag, or commit SHA. Defaults to 'main'"), - original_revision: zod - .string() - .optional() - .describe( - "The original revision requested by the user before resolution (e.g., 'main'). The 'revision' field contains the resolved commit SHA." - ), - token_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecOneDatasetThreeStorageTwoTokenSecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe('Huggingface API `token` secret name for private repositories'), - endpoint: zod - .string() - .default( - evaluationCreateMetricJobBodySpecOneDatasetThreeStorageTwoEndpointDefault - ) - .describe('Huggingface Hub endpoint URL. Use for self-hosted instances.'), - }), - ]) - .describe('The storage configuration for the fileset.'), - metadata: zod - .object({ - dataset: zod - .object({ - schema: zod - .union([zod.record(zod.string(), zod.unknown()), zod.string()]) - .optional() - .describe( - 'Default row schema for files in this fileset, either inline JSON Schema or a schema_defs key.' - ), - schema_defs: zod - .record(zod.string(), zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'Reusable JSON Schema definitions keyed by name for deduplicating per-file dataset schemas.' - ), - schemas_by_path: zod - .record( - zod.string(), - zod.union([zod.record(zod.string(), zod.unknown()), zod.string()]) - ) - .optional() - .describe( - 'Optional per-file row schemas keyed by relative path within the fileset. Each value may be inline JSON Schema or a schema_defs key.' - ), - }) - .optional() - .describe('Content for dataset-type filesets.'), - model: zod - .object({ - tool_calling: zod - .object({ - chat_template: zod - .string() - .optional() - .describe('Jinja2 chat template for the model.'), - tool_call_parser: zod - .string() - .optional() - .describe( - "Name of the tool call parser (e.g., 'openai', 'hermes', 'pythonic', 'llama3_json', 'mistral')." - ), - tool_call_plugin: zod - .string() - .optional() - .describe( - "Reference to a fileset containing a custom tool call plugin Python file. Expected format: '{workspace}\/{fileset_name}'." - ), - auto_tool_choice: zod - .boolean() - .optional() - .describe('Whether to enable automatic tool choice.'), - }) - .optional() - .describe( - 'Content for tool-calling configuration on model filesets.\n\nStores chat template and tool calling settings that are merged into\nthe ModelSpec during checkpoint analysis.' - ), - }) - .optional() - .describe( - 'Content for model-type filesets.\n\nContains tool calling configuration that is merged into the ModelSpec\nduring checkpoint analysis.' - ), - }) - .describe( - 'Tagged metadata container - the key indicates the type.\n\nExample:\n metadata = FilesetMetadata(\n dataset=DatasetMetadataContent(\n schema={\"columns\": [\"id\", \"name\"]},\n )\n )' - ) - .optional() - .describe('Purpose-specific metadata for the fileset.'), - custom_fields: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Custom fields for the fileset.'), - }) - .describe('Fileset definition for use without persisting to the Files API.'), - ]) - .describe('The dataset to evaluate which may represent generated outputs from a model.'), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default(evaluationCreateMetricJobBodySpecOneParamsOneParallelismDefault) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - }) - .describe('Job parameters.') - .optional() - .describe('Execution parameters for the metric job.'), - }) - .describe('An offline metric job.'), - zod - .object({ - metric: zod - .union([ - zod - .string() - .regex(evaluationCreateMetricJobBodySpecTwoMetricOneRegExp) - .describe( - "Reference to a metric in the Metrics API.\n\nA reference is a string with format 'workspace\/metric-name' that points to a\npersisted metric entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ), - zod.union([ - zod - .object({ - type: zod - .literal('llm-judge') - .default(evaluationCreateMetricJobBodySpecTwoMetricTwoOneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecTwoMetricTwoOneModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecTwoMetricTwoOneModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricJobBodySpecTwoMetricTwoOneModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The model configuration.'), - scores: zod - .array( - zod.union([ - zod - .object({ - name: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecTwoMetricTwoOneScoresItemOneNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationCreateMetricJobBodySpecTwoMetricTwoOneScoresItemOneParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationCreateMetricJobBodySpecTwoMetricTwoOneScoresItemOneParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationCreateMetricJobBodySpecTwoMetricTwoOneScoresItemOneParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - rubric: zod - .array( - zod.object({ - label: zod - .string() - .describe( - 'The label to use for the level of the rubric grading criteria. (e.g., \"helpful\", \"not_helpful\", \"positive\")' - ), - description: zod - .string() - .optional() - .describe( - 'Describe the semantic meaning of each criteria for the given rubric. If no judge template is set, the input description for labels are included in the generated judge prompt.' - ), - value: zod - .union([zod.number(), zod.number()]) - .describe( - 'The score value to assign for the criteria used for aggregation and ranking.' - ), - }) - ) - .min( - evaluationCreateMetricJobBodySpecTwoMetricTwoOneScoresItemOneRubricMin - ) - .describe('The rubric for the score.'), - }) - .describe( - 'Score definition for a rubric with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - zod - .object({ - name: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecTwoMetricTwoOneScoresItemTwoNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationCreateMetricJobBodySpecTwoMetricTwoOneScoresItemTwoParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationCreateMetricJobBodySpecTwoMetricTwoOneScoresItemTwoParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationCreateMetricJobBodySpecTwoMetricTwoOneScoresItemTwoParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .describe( - 'Minimum value for the score range. Must be less than maximum.' - ), - maximum: zod - .union([zod.number(), zod.number()]) - .describe( - 'Maximum value for the score range. Must be greater than minimum.' - ), - }) - .describe( - 'Score definition for a range of values with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - ]) - ) - .min(1) - .describe( - "Definitions of scores that will be extracted from the judge's output." - ), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .optional() - .describe( - 'The prompt template for the judge. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{sample.output_text}} to use the model output within the template or {{item.xxx}} to reference input columns from the dataset.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - "Prompt template fields that should remain in the inferred input schema but not be required. Use this for fields like 'reference' when the metric can still run without them." - ), - structured_output: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'JSON schema to apply structured output for the judge model evaluation. Structured output is derived from scores when omitted. Use this option if there are custom requirements for the output of the judge.' - ), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecTwoMetricTwoOneInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecTwoMetricTwoOneInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricJobBodySpecTwoMetricTwoOneInferenceOneTopPMin) - .max(evaluationCreateMetricJobBodySpecTwoMetricTwoOneInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge model.'), - system_prompt: zod - .string() - .optional() - .describe( - "Initial instructions that define the judge model's role and behavior for the conversation. This is prepended to the messages as a system message." - ), - reasoning: zod - .object({ - end_token: zod - .string() - .optional() - .describe( - "Configure the end token to trim reasoning context based on the model's reasoning API. Example for Nemotron models: '<\/think>'" - ), - include_if_not_finished: zod - .boolean() - .optional() - .describe( - 'Configure whether to include reasoning context if the model has not finished reasoning.' - ), - effort: zod - .string() - .optional() - .describe( - 'Option for OpenAI models to specify low, medium, or high reasoning effort.' - ), - }) - .describe("Custom settings that control the model's reasoning behavior.") - .optional() - .describe( - "Custom settings that control the judge model's reasoning behavior. For reasoning models (e.g., Nemotron), use `end_token` to strip reasoning traces from the output." - ), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecTwoMetricTwoOneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - }) - .describe('Request type for creating LLM Judge metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecTwoMetricTwoTwoJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecTwoMetricTwoTwoJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricJobBodySpecTwoMetricTwoTwoJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecTwoMetricTwoTwoInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecTwoMetricTwoTwoInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricJobBodySpecTwoMetricTwoTwoInferenceOneTopPMin) - .max(evaluationCreateMetricJobBodySpecTwoMetricTwoTwoInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecTwoMetricTwoTwoIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('topic_adherence') - .default(evaluationCreateMetricJobBodySpecTwoMetricTwoTwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - metric_mode: zod - .enum(['f1', 'precision', 'recall']) - .default(evaluationCreateMetricJobBodySpecTwoMetricTwoTwoMetricModeDefault) - .describe('The mode for computing topic adherence score.'), - }) - .describe('Request type for TopicAdherence metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecTwoMetricTwoThreeJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecTwoMetricTwoThreeJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCreateMetricJobBodySpecTwoMetricTwoThreeJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecTwoMetricTwoThreeInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecTwoMetricTwoThreeInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricJobBodySpecTwoMetricTwoThreeInferenceOneTopPMin) - .max(evaluationCreateMetricJobBodySpecTwoMetricTwoThreeInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecTwoMetricTwoThreeIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('agent_goal_accuracy') - .default(evaluationCreateMetricJobBodySpecTwoMetricTwoThreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - use_reference: zod - .boolean() - .default(evaluationCreateMetricJobBodySpecTwoMetricTwoThreeUseReferenceDefault) - .describe('Whether to use reference for goal accuracy evaluation.'), - }) - .describe('Request type for AgentGoalAccuracy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecTwoMetricTwoFourJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecTwoMetricTwoFourJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricJobBodySpecTwoMetricTwoFourJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecTwoMetricTwoFourInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecTwoMetricTwoFourInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricJobBodySpecTwoMetricTwoFourInferenceOneTopPMin) - .max(evaluationCreateMetricJobBodySpecTwoMetricTwoFourInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecTwoMetricTwoFourIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('answer_accuracy') - .default(evaluationCreateMetricJobBodySpecTwoMetricTwoFourTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for AnswerAccuracy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecTwoMetricTwoFiveJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecTwoMetricTwoFiveJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricJobBodySpecTwoMetricTwoFiveJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecTwoMetricTwoFiveInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecTwoMetricTwoFiveInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricJobBodySpecTwoMetricTwoFiveInferenceOneTopPMin) - .max(evaluationCreateMetricJobBodySpecTwoMetricTwoFiveInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecTwoMetricTwoFiveIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_relevance') - .default(evaluationCreateMetricJobBodySpecTwoMetricTwoFiveTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextRelevance metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecTwoMetricTwoSixJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecTwoMetricTwoSixJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricJobBodySpecTwoMetricTwoSixJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecTwoMetricTwoSixInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecTwoMetricTwoSixInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricJobBodySpecTwoMetricTwoSixInferenceOneTopPMin) - .max(evaluationCreateMetricJobBodySpecTwoMetricTwoSixInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecTwoMetricTwoSixIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_groundedness') - .default(evaluationCreateMetricJobBodySpecTwoMetricTwoSixTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ResponseGroundedness metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecTwoMetricTwoSevenJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecTwoMetricTwoSevenJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCreateMetricJobBodySpecTwoMetricTwoSevenJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecTwoMetricTwoSevenInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecTwoMetricTwoSevenInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricJobBodySpecTwoMetricTwoSevenInferenceOneTopPMin) - .max(evaluationCreateMetricJobBodySpecTwoMetricTwoSevenInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecTwoMetricTwoSevenIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_recall') - .default(evaluationCreateMetricJobBodySpecTwoMetricTwoSevenTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextRecall metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecTwoMetricTwoEightJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecTwoMetricTwoEightJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCreateMetricJobBodySpecTwoMetricTwoEightJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecTwoMetricTwoEightInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecTwoMetricTwoEightInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricJobBodySpecTwoMetricTwoEightInferenceOneTopPMin) - .max(evaluationCreateMetricJobBodySpecTwoMetricTwoEightInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecTwoMetricTwoEightIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_precision') - .default(evaluationCreateMetricJobBodySpecTwoMetricTwoEightTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextPrecision metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecTwoMetricTwoNineJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecTwoMetricTwoNineJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricJobBodySpecTwoMetricTwoNineJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecTwoMetricTwoNineInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecTwoMetricTwoNineInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricJobBodySpecTwoMetricTwoNineInferenceOneTopPMin) - .max(evaluationCreateMetricJobBodySpecTwoMetricTwoNineInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecTwoMetricTwoNineIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_entity_recall') - .default(evaluationCreateMetricJobBodySpecTwoMetricTwoNineTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextEntityRecall metrics.'), - zod - .object({ - embeddings_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecTwoMetricTwoOnezeroEmbeddingsModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecTwoMetricTwoOnezeroEmbeddingsModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCreateMetricJobBodySpecTwoMetricTwoOnezeroEmbeddingsModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The embeddings model configuration.'), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecTwoMetricTwoOnezeroJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecTwoMetricTwoOnezeroJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCreateMetricJobBodySpecTwoMetricTwoOnezeroJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecTwoMetricTwoOnezeroInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecTwoMetricTwoOnezeroInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCreateMetricJobBodySpecTwoMetricTwoOnezeroInferenceOneTopPMin - ) - .max( - evaluationCreateMetricJobBodySpecTwoMetricTwoOnezeroInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecTwoMetricTwoOnezeroIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_relevancy') - .default(evaluationCreateMetricJobBodySpecTwoMetricTwoOnezeroTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - strictness: zod - .number() - .default(evaluationCreateMetricJobBodySpecTwoMetricTwoOnezeroStrictnessDefault) - .describe('Number of parallel questions generated. NIM can only generate 1.'), - }) - .describe('Request type for ResponseRelevancy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecTwoMetricTwoOneoneJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecTwoMetricTwoOneoneJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCreateMetricJobBodySpecTwoMetricTwoOneoneJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecTwoMetricTwoOneoneInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecTwoMetricTwoOneoneInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricJobBodySpecTwoMetricTwoOneoneInferenceOneTopPMin) - .max(evaluationCreateMetricJobBodySpecTwoMetricTwoOneoneInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecTwoMetricTwoOneoneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('faithfulness') - .default(evaluationCreateMetricJobBodySpecTwoMetricTwoOneoneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for Faithfulness metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecTwoMetricTwoOnetwoJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecTwoMetricTwoOnetwoJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCreateMetricJobBodySpecTwoMetricTwoOnetwoJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecTwoMetricTwoOnetwoInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecTwoMetricTwoOnetwoInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricJobBodySpecTwoMetricTwoOnetwoInferenceOneTopPMin) - .max(evaluationCreateMetricJobBodySpecTwoMetricTwoOnetwoInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecTwoMetricTwoOnetwoIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('noise_sensitivity') - .default(evaluationCreateMetricJobBodySpecTwoMetricTwoOnetwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for NoiseSensitivity metrics.'), - zod - .object({ - type: zod - .literal('tool_call_accuracy') - .default(evaluationCreateMetricJobBodySpecTwoMetricTwoOnethreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ToolCallAccuracy metrics (no judge required).'), - zod - .object({ - type: zod - .literal('bleu') - .default(evaluationCreateMetricJobBodySpecTwoMetricTwoOnefourTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - references: zod - .array(zod.string()) - .describe( - 'The templates for the ground truth references to calculate BLEU metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to calculate BLEU metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for BLEUMetric.'), - zod - .object({ - type: zod - .literal('exact-match') - .default(evaluationCreateMetricJobBodySpecTwoMetricTwoOnefiveTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the exact match metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the exact match metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for ExactMatchMetric.'), - zod - .object({ - type: zod - .literal('f1') - .default(evaluationCreateMetricJobBodySpecTwoMetricTwoOnesixTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the F1 metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the F1 metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for F1Metric.'), - zod - .object({ - type: zod - .literal('number-check') - .default(evaluationCreateMetricJobBodySpecTwoMetricTwoOnesevenTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - '>=', - 'gte', - 'greater than or equal', - '>', - 'gt', - 'greater than', - '<=', - 'lte', - 'less than or equal', - '<', - 'lt', - 'less than', - 'absolute difference', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - epsilon: zod - .union([zod.number(), zod.number()]) - .optional() - .describe('Specify the tolerance for the absolute difference of values.'), - }) - .describe( - 'Request type for NumberCheckMetric. Numeric-comparison metric with template-driven operands.' - ), - zod - .object({ - type: zod - .literal('remote') - .default(evaluationCreateMetricJobBodySpecTwoMetricTwoOneeightTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecTwoMetricTwoOneeightApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default( - evaluationCreateMetricJobBodySpecTwoMetricTwoOneeightTimeoutSecondsDefault - ) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default(evaluationCreateMetricJobBodySpecTwoMetricTwoOneeightMaxRetriesDefault) - .describe('Maximum number of retry attempts.'), - body: zod - .record(zod.string(), zod.unknown()) - .describe('Jinja template for request payload'), - scores: zod - .array( - zod - .object({ - name: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecTwoMetricTwoOneeightScoresItemNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .object({ - type: zod - .literal('json') - .default( - evaluationCreateMetricJobBodySpecTwoMetricTwoOneeightScoresItemParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.') - .optional() - .describe( - 'The method to parse the score. Only JSON parsing is supported for remote metrics.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe( - 'Minimum value for the score range. Defaults to None (no lower bound).' - ), - maximum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe( - 'Maximum value for the score range. Defaults to None (no upper bound).' - ), - }) - .describe( - 'Score configuration for remote metrics.\n\nUnlike RangeScore, minimum and maximum are optional (default to None = no bounds).\nThis avoids JSON serialization issues with infinity values.' - ) - ) - .describe('List of scores to extract from the remote response'), - }) - .describe( - 'Request type for RemoteMetric. A metric that computes scores via a remote endpoint.' - ), - zod - .object({ - type: zod - .literal('nemo-agent-toolkit-remote') - .default(evaluationCreateMetricJobBodySpecTwoMetricTwoOnenineTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecTwoMetricTwoOnenineApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default( - evaluationCreateMetricJobBodySpecTwoMetricTwoOnenineTimeoutSecondsDefault - ) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default(evaluationCreateMetricJobBodySpecTwoMetricTwoOnenineMaxRetriesDefault) - .describe('Maximum number of retry attempts.'), - evaluator_name: zod - .string() - .describe('The name of the evaluator (also used as the score name).'), - }) - .describe( - 'Request type for NemoAgentToolkitRemoteMetric. A remote metric that interfaces with NeMo Agent Toolkit evaluators.' - ), - zod - .object({ - type: zod - .literal('rouge') - .default(evaluationCreateMetricJobBodySpecTwoMetricTwoTwozeroTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to evaluate the ROUGE metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the ROUGE metric on. If not provided, the output text from the model is used.' - ), - }) - .describe( - 'Request type for ROUGEMetric. ROUGE metric for overlap-based summarization quality scoring.' - ), - zod - .object({ - type: zod - .literal('string-check') - .default(evaluationCreateMetricJobBodySpecTwoMetricTwoTwooneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - 'contains', - 'not contains', - 'startswith', - 'endswith', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - }) - .describe( - 'Request type for StringCheckMetric. String-comparison metric with operator-based checks.' - ), - zod - .object({ - type: zod - .literal('tool-calling') - .default(evaluationCreateMetricJobBodySpecTwoMetricTwoTwotwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to evaluate tool calling accuracy.' - ), - }) - .describe( - 'Request type for ToolCallingMetric. Tool-calling accuracy metric for structured function calls.' - ), - ]), - zod - .object({ - type: zod - .enum(['system', 'system-retriever']) - .default(evaluationCreateMetricJobBodySpecTwoMetricThreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline', 'retriever'])) - .default([`online`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - name: zod - .string() - .default(evaluationCreateMetricJobBodySpecTwoMetricThreeNameDefault), - required_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod - .string() - .optional() - .describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe( - 'List of required parameters for running an evaluation with the metric.' - ), - optional_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod - .string() - .optional() - .describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe( - 'List of optional parameters for running an evaluation with the metric.' - ), - }) - .describe('Metric entity for system metric that have pre-defined dataset.'), - ]) - .describe('The metric for evaluation.'), - metric_params: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Additional parameters for the metric. Required for system metrics, optional overrides for custom metrics.' - ), - field_mapping: zod - .object({ - input: zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecTwoFieldMappingOneInputRegExp) - .optional() - .describe("Binding for the canonical 'input' evaluator field."), - output: zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecTwoFieldMappingOneOutputRegExp) - .optional() - .describe("Binding for the canonical 'output' evaluator field."), - context: zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecTwoFieldMappingOneContextRegExp) - .optional() - .describe("Binding for the canonical 'context' evaluator field."), - reference: zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecTwoFieldMappingOneReferenceRegExp) - .optional() - .describe("Binding for the canonical 'reference' evaluator field."), - trajectory: zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecTwoFieldMappingOneTrajectoryRegExp) - .optional() - .describe("Binding for the canonical 'trajectory' evaluator field."), - messages: zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecTwoFieldMappingOneMessagesRegExp) - .optional() - .describe("Binding for the canonical 'messages' evaluator field."), - tool_calls: zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecTwoFieldMappingOneToolCallsRegExp) - .optional() - .describe("Binding for the canonical 'tool_calls' evaluator field."), - tools: zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecTwoFieldMappingOneToolsRegExp) - .optional() - .describe("Binding for the canonical 'tools' evaluator field."), - custom: zod - .record( - zod.string(), - zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecTwoFieldMappingOneCustomRegExpOne) - ) - .optional() - .describe('Additional evaluator field bindings keyed by canonical field name.'), - }) - .describe( - "Maps canonical evaluator fields to raw dataset column paths.\nExample: {'input': 'question', 'output': 'answer', 'reference': 'gold', 'trajectory': 'steps'}" - ) - .optional() - .describe( - "Maps canonical evaluator fields such as 'input' and 'output' to dataset column paths for this job." - ), - model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationCreateMetricJobBodySpecTwoModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationCreateMetricJobBodySpecTwoModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricJobBodySpecTwoModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The model configuration.'), - dataset: zod - .union([ - zod - .object({ - rows: zod - .array(zod.record(zod.string(), zod.unknown())) - .min(1) - .describe( - 'Array of data rows. Each row can be any valid JSON value (object, string, array, etc.).' - ), - }) - .describe( - 'Inline dataset definition with embedded rows.\n\nUse this for quick evaluations without persisting the dataset first.' - ), - zod - .string() - .describe( - "Reference to a Fileset in the Files API.\n\nA reference is a string with format 'workspace\/fileset-name' that points to a\npersisted fileset entity. When used as a dataset source, all files within the\nfileset will be downloaded to the job container.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform." - ), - zod - .object({ - path: zod - .string() - .min(1) - .optional() - .describe('The relative path to file\/directory in the storage.'), - storage: zod - .union([ - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationCreateMetricJobBodySpecTwoDatasetThreeStorageOneReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('ngc') - .default( - evaluationCreateMetricJobBodySpecTwoDatasetThreeStorageOneTypeDefault - ), - org: zod.string().describe('NGC organization name'), - team: zod.string().describe('NGC team name'), - target: zod.string().describe('NGC asset name (model or resource)'), - target_type: zod - .enum(['resource', 'model']) - .default( - evaluationCreateMetricJobBodySpecTwoDatasetThreeStorageOneTargetTypeDefault - ) - .describe("Type of NGC asset: 'resource' or 'model'"), - version: zod - .string() - .optional() - .describe('NGC asset version. If not provided, defaults to latest version'), - original_version: zod - .string() - .optional() - .describe( - "The original version requested by the user before resolution (e.g., 'latest' or None). The 'version' field contains the resolved version ID." - ), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecTwoDatasetThreeStorageOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .describe('NGC API key secret name'), - host: zod - .string() - .default( - evaluationCreateMetricJobBodySpecTwoDatasetThreeStorageOneHostDefault - ) - .describe('NGC API host URL'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationCreateMetricJobBodySpecTwoDatasetThreeStorageTwoReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('huggingface') - .default( - evaluationCreateMetricJobBodySpecTwoDatasetThreeStorageTwoTypeDefault - ), - repo_id: zod - .string() - .describe("Huggingface repository ID (e.g., 'meta-llama\/Llama-2-7b')"), - repo_type: zod - .enum(['model', 'dataset', 'space']) - .default( - evaluationCreateMetricJobBodySpecTwoDatasetThreeStorageTwoRepoTypeDefault - ) - .describe("Type of Huggingface repository: 'model', 'dataset', or 'space'"), - revision: zod - .string() - .default( - evaluationCreateMetricJobBodySpecTwoDatasetThreeStorageTwoRevisionDefault - ) - .describe("Branch, tag, or commit SHA. Defaults to 'main'"), - original_revision: zod - .string() - .optional() - .describe( - "The original revision requested by the user before resolution (e.g., 'main'). The 'revision' field contains the resolved commit SHA." - ), - token_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecTwoDatasetThreeStorageTwoTokenSecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe('Huggingface API `token` secret name for private repositories'), - endpoint: zod - .string() - .default( - evaluationCreateMetricJobBodySpecTwoDatasetThreeStorageTwoEndpointDefault - ) - .describe('Huggingface Hub endpoint URL. Use for self-hosted instances.'), - }), - ]) - .describe('The storage configuration for the fileset.'), - metadata: zod - .object({ - dataset: zod - .object({ - schema: zod - .union([zod.record(zod.string(), zod.unknown()), zod.string()]) - .optional() - .describe( - 'Default row schema for files in this fileset, either inline JSON Schema or a schema_defs key.' - ), - schema_defs: zod - .record(zod.string(), zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'Reusable JSON Schema definitions keyed by name for deduplicating per-file dataset schemas.' - ), - schemas_by_path: zod - .record( - zod.string(), - zod.union([zod.record(zod.string(), zod.unknown()), zod.string()]) - ) - .optional() - .describe( - 'Optional per-file row schemas keyed by relative path within the fileset. Each value may be inline JSON Schema or a schema_defs key.' - ), - }) - .optional() - .describe('Content for dataset-type filesets.'), - model: zod - .object({ - tool_calling: zod - .object({ - chat_template: zod - .string() - .optional() - .describe('Jinja2 chat template for the model.'), - tool_call_parser: zod - .string() - .optional() - .describe( - "Name of the tool call parser (e.g., 'openai', 'hermes', 'pythonic', 'llama3_json', 'mistral')." - ), - tool_call_plugin: zod - .string() - .optional() - .describe( - "Reference to a fileset containing a custom tool call plugin Python file. Expected format: '{workspace}\/{fileset_name}'." - ), - auto_tool_choice: zod - .boolean() - .optional() - .describe('Whether to enable automatic tool choice.'), - }) - .optional() - .describe( - 'Content for tool-calling configuration on model filesets.\n\nStores chat template and tool calling settings that are merged into\nthe ModelSpec during checkpoint analysis.' - ), - }) - .optional() - .describe( - 'Content for model-type filesets.\n\nContains tool calling configuration that is merged into the ModelSpec\nduring checkpoint analysis.' - ), - }) - .describe( - 'Tagged metadata container - the key indicates the type.\n\nExample:\n metadata = FilesetMetadata(\n dataset=DatasetMetadataContent(\n schema={\"columns\": [\"id\", \"name\"]},\n )\n )' - ) - .optional() - .describe('Purpose-specific metadata for the fileset.'), - custom_fields: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Custom fields for the fileset.'), - }) - .describe('Fileset definition for use without persisting to the Files API.'), - ]) - .describe('The dataset to use for model prompts and evaluation.'), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default(evaluationCreateMetricJobBodySpecTwoParamsOneParallelismDefault) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - ignore_request_failure: zod - .boolean() - .default(evaluationCreateMetricJobBodySpecTwoParamsOneIgnoreRequestFailureDefault) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - request_timeout: zod - .number() - .optional() - .describe('The timeout to be used for requests made to the model.'), - max_retries: zod - .number() - .min(evaluationCreateMetricJobBodySpecTwoParamsOneMaxRetriesMin) - .default(evaluationCreateMetricJobBodySpecTwoParamsOneMaxRetriesDefault) - .describe('Maximum number of retries for failed requests.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationCreateMetricJobBodySpecTwoParamsOneInferenceOneTemperatureMin) - .max(evaluationCreateMetricJobBodySpecTwoParamsOneInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricJobBodySpecTwoParamsOneInferenceOneTopPMin) - .max(evaluationCreateMetricJobBodySpecTwoParamsOneInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe("Custom settings that control the model's text generation behavior."), - system_prompt: zod - .string() - .optional() - .describe( - "Initial instructions that define the model's role and behavior for the conversation." - ), - reasoning: zod - .object({ - end_token: zod - .string() - .optional() - .describe( - "Configure the end token to trim reasoning context based on the model's reasoning API. Example for Nemotron models: '<\/think>'" - ), - include_if_not_finished: zod - .boolean() - .optional() - .describe( - 'Configure whether to include reasoning context if the model has not finished reasoning.' - ), - effort: zod - .string() - .optional() - .describe( - 'Option for OpenAI models to specify low, medium, or high reasoning effort.' - ), - }) - .describe("Custom settings that control the model's reasoning behavior.") - .optional() - .describe("Custom settings that control the model's reasoning behavior."), - structured_output: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('JSON schema to apply structured output for the model.'), - }) - .describe('Job parameters for model online evaluation.') - .optional() - .describe('Execution parameters for the metric job.'), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .describe( - 'The jinja template to prompt the model for evaluation. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{input}}, {{output}}, {{context}}, {{reference}} to reference input columns.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - 'Prompt template fields that should remain available to the prompt template but not be required by dataset schema validation.' - ), - }) - .describe('A online metric job.'), - zod - .object({ - metric: zod - .union([ - zod - .string() - .regex(evaluationCreateMetricJobBodySpecThreeMetricOneRegExp) - .describe( - "Reference to a metric in the Metrics API.\n\nA reference is a string with format 'workspace\/metric-name' that points to a\npersisted metric entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ), - zod.union([ - zod - .object({ - type: zod - .literal('llm-judge') - .default(evaluationCreateMetricJobBodySpecThreeMetricTwoOneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecThreeMetricTwoOneModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoOneModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricJobBodySpecThreeMetricTwoOneModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The model configuration.'), - scores: zod - .array( - zod.union([ - zod - .object({ - name: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecThreeMetricTwoOneScoresItemOneNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoOneScoresItemOneParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoOneScoresItemOneParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoOneScoresItemOneParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - rubric: zod - .array( - zod.object({ - label: zod - .string() - .describe( - 'The label to use for the level of the rubric grading criteria. (e.g., \"helpful\", \"not_helpful\", \"positive\")' - ), - description: zod - .string() - .optional() - .describe( - 'Describe the semantic meaning of each criteria for the given rubric. If no judge template is set, the input description for labels are included in the generated judge prompt.' - ), - value: zod - .union([zod.number(), zod.number()]) - .describe( - 'The score value to assign for the criteria used for aggregation and ranking.' - ), - }) - ) - .min( - evaluationCreateMetricJobBodySpecThreeMetricTwoOneScoresItemOneRubricMin - ) - .describe('The rubric for the score.'), - }) - .describe( - 'Score definition for a rubric with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - zod - .object({ - name: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecThreeMetricTwoOneScoresItemTwoNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoOneScoresItemTwoParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoOneScoresItemTwoParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoOneScoresItemTwoParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .describe( - 'Minimum value for the score range. Must be less than maximum.' - ), - maximum: zod - .union([zod.number(), zod.number()]) - .describe( - 'Maximum value for the score range. Must be greater than minimum.' - ), - }) - .describe( - 'Score definition for a range of values with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - ]) - ) - .min(1) - .describe( - "Definitions of scores that will be extracted from the judge's output." - ), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .optional() - .describe( - 'The prompt template for the judge. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{sample.output_text}} to use the model output within the template or {{item.xxx}} to reference input columns from the dataset.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - "Prompt template fields that should remain in the inferred input schema but not be required. Use this for fields like 'reference' when the metric can still run without them." - ), - structured_output: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'JSON schema to apply structured output for the judge model evaluation. Structured output is derived from scores when omitted. Use this option if there are custom requirements for the output of the judge.' - ), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecThreeMetricTwoOneInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecThreeMetricTwoOneInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricJobBodySpecThreeMetricTwoOneInferenceOneTopPMin) - .max(evaluationCreateMetricJobBodySpecThreeMetricTwoOneInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge model.'), - system_prompt: zod - .string() - .optional() - .describe( - "Initial instructions that define the judge model's role and behavior for the conversation. This is prepended to the messages as a system message." - ), - reasoning: zod - .object({ - end_token: zod - .string() - .optional() - .describe( - "Configure the end token to trim reasoning context based on the model's reasoning API. Example for Nemotron models: '<\/think>'" - ), - include_if_not_finished: zod - .boolean() - .optional() - .describe( - 'Configure whether to include reasoning context if the model has not finished reasoning.' - ), - effort: zod - .string() - .optional() - .describe( - 'Option for OpenAI models to specify low, medium, or high reasoning effort.' - ), - }) - .describe("Custom settings that control the model's reasoning behavior.") - .optional() - .describe( - "Custom settings that control the judge model's reasoning behavior. For reasoning models (e.g., Nemotron), use `end_token` to strip reasoning traces from the output." - ), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoOneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - }) - .describe('Request type for creating LLM Judge metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecThreeMetricTwoTwoJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoTwoJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCreateMetricJobBodySpecThreeMetricTwoTwoJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecThreeMetricTwoTwoInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecThreeMetricTwoTwoInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricJobBodySpecThreeMetricTwoTwoInferenceOneTopPMin) - .max(evaluationCreateMetricJobBodySpecThreeMetricTwoTwoInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoTwoIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('topic_adherence') - .default(evaluationCreateMetricJobBodySpecThreeMetricTwoTwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - metric_mode: zod - .enum(['f1', 'precision', 'recall']) - .default(evaluationCreateMetricJobBodySpecThreeMetricTwoTwoMetricModeDefault) - .describe('The mode for computing topic adherence score.'), - }) - .describe('Request type for TopicAdherence metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecThreeMetricTwoThreeJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoThreeJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCreateMetricJobBodySpecThreeMetricTwoThreeJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecThreeMetricTwoThreeInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecThreeMetricTwoThreeInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCreateMetricJobBodySpecThreeMetricTwoThreeInferenceOneTopPMin - ) - .max( - evaluationCreateMetricJobBodySpecThreeMetricTwoThreeInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoThreeIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('agent_goal_accuracy') - .default(evaluationCreateMetricJobBodySpecThreeMetricTwoThreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - use_reference: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoThreeUseReferenceDefault - ) - .describe('Whether to use reference for goal accuracy evaluation.'), - }) - .describe('Request type for AgentGoalAccuracy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecThreeMetricTwoFourJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoFourJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCreateMetricJobBodySpecThreeMetricTwoFourJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecThreeMetricTwoFourInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecThreeMetricTwoFourInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricJobBodySpecThreeMetricTwoFourInferenceOneTopPMin) - .max(evaluationCreateMetricJobBodySpecThreeMetricTwoFourInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoFourIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('answer_accuracy') - .default(evaluationCreateMetricJobBodySpecThreeMetricTwoFourTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for AnswerAccuracy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecThreeMetricTwoFiveJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoFiveJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCreateMetricJobBodySpecThreeMetricTwoFiveJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecThreeMetricTwoFiveInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecThreeMetricTwoFiveInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricJobBodySpecThreeMetricTwoFiveInferenceOneTopPMin) - .max(evaluationCreateMetricJobBodySpecThreeMetricTwoFiveInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoFiveIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_relevance') - .default(evaluationCreateMetricJobBodySpecThreeMetricTwoFiveTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextRelevance metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecThreeMetricTwoSixJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoSixJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCreateMetricJobBodySpecThreeMetricTwoSixJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecThreeMetricTwoSixInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecThreeMetricTwoSixInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricJobBodySpecThreeMetricTwoSixInferenceOneTopPMin) - .max(evaluationCreateMetricJobBodySpecThreeMetricTwoSixInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoSixIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_groundedness') - .default(evaluationCreateMetricJobBodySpecThreeMetricTwoSixTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ResponseGroundedness metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecThreeMetricTwoSevenJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoSevenJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCreateMetricJobBodySpecThreeMetricTwoSevenJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecThreeMetricTwoSevenInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecThreeMetricTwoSevenInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCreateMetricJobBodySpecThreeMetricTwoSevenInferenceOneTopPMin - ) - .max( - evaluationCreateMetricJobBodySpecThreeMetricTwoSevenInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoSevenIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_recall') - .default(evaluationCreateMetricJobBodySpecThreeMetricTwoSevenTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextRecall metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecThreeMetricTwoEightJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoEightJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCreateMetricJobBodySpecThreeMetricTwoEightJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecThreeMetricTwoEightInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecThreeMetricTwoEightInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCreateMetricJobBodySpecThreeMetricTwoEightInferenceOneTopPMin - ) - .max( - evaluationCreateMetricJobBodySpecThreeMetricTwoEightInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoEightIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_precision') - .default(evaluationCreateMetricJobBodySpecThreeMetricTwoEightTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextPrecision metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecThreeMetricTwoNineJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoNineJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCreateMetricJobBodySpecThreeMetricTwoNineJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecThreeMetricTwoNineInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecThreeMetricTwoNineInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricJobBodySpecThreeMetricTwoNineInferenceOneTopPMin) - .max(evaluationCreateMetricJobBodySpecThreeMetricTwoNineInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoNineIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_entity_recall') - .default(evaluationCreateMetricJobBodySpecThreeMetricTwoNineTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextEntityRecall metrics.'), - zod - .object({ - embeddings_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecThreeMetricTwoOnezeroEmbeddingsModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoOnezeroEmbeddingsModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCreateMetricJobBodySpecThreeMetricTwoOnezeroEmbeddingsModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The embeddings model configuration.'), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecThreeMetricTwoOnezeroJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoOnezeroJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCreateMetricJobBodySpecThreeMetricTwoOnezeroJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecThreeMetricTwoOnezeroInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecThreeMetricTwoOnezeroInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCreateMetricJobBodySpecThreeMetricTwoOnezeroInferenceOneTopPMin - ) - .max( - evaluationCreateMetricJobBodySpecThreeMetricTwoOnezeroInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoOnezeroIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_relevancy') - .default(evaluationCreateMetricJobBodySpecThreeMetricTwoOnezeroTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - strictness: zod - .number() - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoOnezeroStrictnessDefault - ) - .describe('Number of parallel questions generated. NIM can only generate 1.'), - }) - .describe('Request type for ResponseRelevancy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecThreeMetricTwoOneoneJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoOneoneJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCreateMetricJobBodySpecThreeMetricTwoOneoneJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecThreeMetricTwoOneoneInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecThreeMetricTwoOneoneInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCreateMetricJobBodySpecThreeMetricTwoOneoneInferenceOneTopPMin - ) - .max( - evaluationCreateMetricJobBodySpecThreeMetricTwoOneoneInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoOneoneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('faithfulness') - .default(evaluationCreateMetricJobBodySpecThreeMetricTwoOneoneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for Faithfulness metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecThreeMetricTwoOnetwoJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoOnetwoJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCreateMetricJobBodySpecThreeMetricTwoOnetwoJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCreateMetricJobBodySpecThreeMetricTwoOnetwoInferenceOneTemperatureMin - ) - .max( - evaluationCreateMetricJobBodySpecThreeMetricTwoOnetwoInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCreateMetricJobBodySpecThreeMetricTwoOnetwoInferenceOneTopPMin - ) - .max( - evaluationCreateMetricJobBodySpecThreeMetricTwoOnetwoInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoOnetwoIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('noise_sensitivity') - .default(evaluationCreateMetricJobBodySpecThreeMetricTwoOnetwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for NoiseSensitivity metrics.'), - zod - .object({ - type: zod - .literal('tool_call_accuracy') - .default(evaluationCreateMetricJobBodySpecThreeMetricTwoOnethreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ToolCallAccuracy metrics (no judge required).'), - zod - .object({ - type: zod - .literal('bleu') - .default(evaluationCreateMetricJobBodySpecThreeMetricTwoOnefourTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - references: zod - .array(zod.string()) - .describe( - 'The templates for the ground truth references to calculate BLEU metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to calculate BLEU metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for BLEUMetric.'), - zod - .object({ - type: zod - .literal('exact-match') - .default(evaluationCreateMetricJobBodySpecThreeMetricTwoOnefiveTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the exact match metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the exact match metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for ExactMatchMetric.'), - zod - .object({ - type: zod - .literal('f1') - .default(evaluationCreateMetricJobBodySpecThreeMetricTwoOnesixTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the F1 metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the F1 metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for F1Metric.'), - zod - .object({ - type: zod - .literal('number-check') - .default(evaluationCreateMetricJobBodySpecThreeMetricTwoOnesevenTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - '>=', - 'gte', - 'greater than or equal', - '>', - 'gt', - 'greater than', - '<=', - 'lte', - 'less than or equal', - '<', - 'lt', - 'less than', - 'absolute difference', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - epsilon: zod - .union([zod.number(), zod.number()]) - .optional() - .describe('Specify the tolerance for the absolute difference of values.'), - }) - .describe( - 'Request type for NumberCheckMetric. Numeric-comparison metric with template-driven operands.' - ), - zod - .object({ - type: zod - .literal('remote') - .default(evaluationCreateMetricJobBodySpecThreeMetricTwoOneeightTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecThreeMetricTwoOneeightApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoOneeightTimeoutSecondsDefault - ) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoOneeightMaxRetriesDefault - ) - .describe('Maximum number of retry attempts.'), - body: zod - .record(zod.string(), zod.unknown()) - .describe('Jinja template for request payload'), - scores: zod - .array( - zod - .object({ - name: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecThreeMetricTwoOneeightScoresItemNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .object({ - type: zod - .literal('json') - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoOneeightScoresItemParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.') - .optional() - .describe( - 'The method to parse the score. Only JSON parsing is supported for remote metrics.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe( - 'Minimum value for the score range. Defaults to None (no lower bound).' - ), - maximum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe( - 'Maximum value for the score range. Defaults to None (no upper bound).' - ), - }) - .describe( - 'Score configuration for remote metrics.\n\nUnlike RangeScore, minimum and maximum are optional (default to None = no bounds).\nThis avoids JSON serialization issues with infinity values.' - ) - ) - .describe('List of scores to extract from the remote response'), - }) - .describe( - 'Request type for RemoteMetric. A metric that computes scores via a remote endpoint.' - ), - zod - .object({ - type: zod - .literal('nemo-agent-toolkit-remote') - .default(evaluationCreateMetricJobBodySpecThreeMetricTwoOnenineTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecThreeMetricTwoOnenineApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoOnenineTimeoutSecondsDefault - ) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default( - evaluationCreateMetricJobBodySpecThreeMetricTwoOnenineMaxRetriesDefault - ) - .describe('Maximum number of retry attempts.'), - evaluator_name: zod - .string() - .describe('The name of the evaluator (also used as the score name).'), - }) - .describe( - 'Request type for NemoAgentToolkitRemoteMetric. A remote metric that interfaces with NeMo Agent Toolkit evaluators.' - ), - zod - .object({ - type: zod - .literal('rouge') - .default(evaluationCreateMetricJobBodySpecThreeMetricTwoTwozeroTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to evaluate the ROUGE metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the ROUGE metric on. If not provided, the output text from the model is used.' - ), - }) - .describe( - 'Request type for ROUGEMetric. ROUGE metric for overlap-based summarization quality scoring.' - ), - zod - .object({ - type: zod - .literal('string-check') - .default(evaluationCreateMetricJobBodySpecThreeMetricTwoTwooneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - 'contains', - 'not contains', - 'startswith', - 'endswith', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - }) - .describe( - 'Request type for StringCheckMetric. String-comparison metric with operator-based checks.' - ), - zod - .object({ - type: zod - .literal('tool-calling') - .default(evaluationCreateMetricJobBodySpecThreeMetricTwoTwotwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to evaluate tool calling accuracy.' - ), - }) - .describe( - 'Request type for ToolCallingMetric. Tool-calling accuracy metric for structured function calls.' - ), - ]), - zod - .object({ - type: zod - .enum(['system', 'system-retriever']) - .default(evaluationCreateMetricJobBodySpecThreeMetricThreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline', 'retriever'])) - .default([`online`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - name: zod - .string() - .default(evaluationCreateMetricJobBodySpecThreeMetricThreeNameDefault), - required_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod - .string() - .optional() - .describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe( - 'List of required parameters for running an evaluation with the metric.' - ), - optional_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod - .string() - .optional() - .describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe( - 'List of optional parameters for running an evaluation with the metric.' - ), - }) - .describe('Metric entity for system metric that have pre-defined dataset.'), - ]) - .describe('The metric for evaluation.'), - metric_params: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Additional parameters for the metric. Required for system metrics, optional overrides for custom metrics.' - ), - field_mapping: zod - .object({ - input: zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecThreeFieldMappingOneInputRegExp) - .optional() - .describe("Binding for the canonical 'input' evaluator field."), - output: zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecThreeFieldMappingOneOutputRegExp) - .optional() - .describe("Binding for the canonical 'output' evaluator field."), - context: zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecThreeFieldMappingOneContextRegExp) - .optional() - .describe("Binding for the canonical 'context' evaluator field."), - reference: zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecThreeFieldMappingOneReferenceRegExp) - .optional() - .describe("Binding for the canonical 'reference' evaluator field."), - trajectory: zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecThreeFieldMappingOneTrajectoryRegExp) - .optional() - .describe("Binding for the canonical 'trajectory' evaluator field."), - messages: zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecThreeFieldMappingOneMessagesRegExp) - .optional() - .describe("Binding for the canonical 'messages' evaluator field."), - tool_calls: zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecThreeFieldMappingOneToolCallsRegExp) - .optional() - .describe("Binding for the canonical 'tool_calls' evaluator field."), - tools: zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecThreeFieldMappingOneToolsRegExp) - .optional() - .describe("Binding for the canonical 'tools' evaluator field."), - custom: zod - .record( - zod.string(), - zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecThreeFieldMappingOneCustomRegExpOne) - ) - .optional() - .describe('Additional evaluator field bindings keyed by canonical field name.'), - }) - .describe( - "Maps canonical evaluator fields to raw dataset column paths.\nExample: {'input': 'question', 'output': 'answer', 'reference': 'gold', 'trajectory': 'steps'}" - ) - .optional() - .describe( - "Maps canonical evaluator fields such as 'input' and 'output' to dataset column paths for this job." - ), - agent: zod - .object({ - url: zod.string().describe('Base URL of the agent endpoint.'), - name: zod.string().describe('Agent name \/ identifier.'), - format: zod - .enum(['generic', 'nemo_agent_toolkit']) - .default(evaluationCreateMetricJobBodySpecThreeAgentOneFormatDefault) - .describe('Agent format that determines the execution path.'), - api_key_secret: zod - .string() - .regex(evaluationCreateMetricJobBodySpecThreeAgentOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the agent. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - body: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Jinja template for the request payload. Required for generic agents.'), - response_path: zod - .string() - .optional() - .describe( - "JSONPath expression to extract the response text from the agent's response body. Required for generic agents." - ), - trajectory_path: zod - .string() - .optional() - .describe( - "JSONPath expression to extract the trajectory from the agent's response body. Optional." - ), - }) - .describe( - 'Agent definition for inference in online evaluation jobs.\n\nAn agent is an endpoint that accepts a request and returns a response,\npotentially with a trajectory. Two formats are supported:\n\n- ``generic``: configurable HTTP POST with Jinja-templated body and\n JSONPath extraction for response and trajectory.\n- ``nemo_agent_toolkit``: NeMo Agent Toolkit SSE streaming protocol\n (``\/generate\/full?filter_steps=none``).' - ) - .describe('The agent to evaluate.'), - dataset: zod - .union([ - zod - .object({ - rows: zod - .array(zod.record(zod.string(), zod.unknown())) - .min(1) - .describe( - 'Array of data rows. Each row can be any valid JSON value (object, string, array, etc.).' - ), - }) - .describe( - 'Inline dataset definition with embedded rows.\n\nUse this for quick evaluations without persisting the dataset first.' - ), - zod - .string() - .describe( - "Reference to a Fileset in the Files API.\n\nA reference is a string with format 'workspace\/fileset-name' that points to a\npersisted fileset entity. When used as a dataset source, all files within the\nfileset will be downloaded to the job container.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform." - ), - zod - .object({ - path: zod - .string() - .min(1) - .optional() - .describe('The relative path to file\/directory in the storage.'), - storage: zod - .union([ - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationCreateMetricJobBodySpecThreeDatasetThreeStorageOneReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('ngc') - .default( - evaluationCreateMetricJobBodySpecThreeDatasetThreeStorageOneTypeDefault - ), - org: zod.string().describe('NGC organization name'), - team: zod.string().describe('NGC team name'), - target: zod.string().describe('NGC asset name (model or resource)'), - target_type: zod - .enum(['resource', 'model']) - .default( - evaluationCreateMetricJobBodySpecThreeDatasetThreeStorageOneTargetTypeDefault - ) - .describe("Type of NGC asset: 'resource' or 'model'"), - version: zod - .string() - .optional() - .describe('NGC asset version. If not provided, defaults to latest version'), - original_version: zod - .string() - .optional() - .describe( - "The original version requested by the user before resolution (e.g., 'latest' or None). The 'version' field contains the resolved version ID." - ), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecThreeDatasetThreeStorageOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .describe('NGC API key secret name'), - host: zod - .string() - .default( - evaluationCreateMetricJobBodySpecThreeDatasetThreeStorageOneHostDefault - ) - .describe('NGC API host URL'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationCreateMetricJobBodySpecThreeDatasetThreeStorageTwoReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('huggingface') - .default( - evaluationCreateMetricJobBodySpecThreeDatasetThreeStorageTwoTypeDefault - ), - repo_id: zod - .string() - .describe("Huggingface repository ID (e.g., 'meta-llama\/Llama-2-7b')"), - repo_type: zod - .enum(['model', 'dataset', 'space']) - .default( - evaluationCreateMetricJobBodySpecThreeDatasetThreeStorageTwoRepoTypeDefault - ) - .describe("Type of Huggingface repository: 'model', 'dataset', or 'space'"), - revision: zod - .string() - .default( - evaluationCreateMetricJobBodySpecThreeDatasetThreeStorageTwoRevisionDefault - ) - .describe("Branch, tag, or commit SHA. Defaults to 'main'"), - original_revision: zod - .string() - .optional() - .describe( - "The original revision requested by the user before resolution (e.g., 'main'). The 'revision' field contains the resolved commit SHA." - ), - token_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecThreeDatasetThreeStorageTwoTokenSecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe('Huggingface API `token` secret name for private repositories'), - endpoint: zod - .string() - .default( - evaluationCreateMetricJobBodySpecThreeDatasetThreeStorageTwoEndpointDefault - ) - .describe('Huggingface Hub endpoint URL. Use for self-hosted instances.'), - }), - ]) - .describe('The storage configuration for the fileset.'), - metadata: zod - .object({ - dataset: zod - .object({ - schema: zod - .union([zod.record(zod.string(), zod.unknown()), zod.string()]) - .optional() - .describe( - 'Default row schema for files in this fileset, either inline JSON Schema or a schema_defs key.' - ), - schema_defs: zod - .record(zod.string(), zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'Reusable JSON Schema definitions keyed by name for deduplicating per-file dataset schemas.' - ), - schemas_by_path: zod - .record( - zod.string(), - zod.union([zod.record(zod.string(), zod.unknown()), zod.string()]) - ) - .optional() - .describe( - 'Optional per-file row schemas keyed by relative path within the fileset. Each value may be inline JSON Schema or a schema_defs key.' - ), - }) - .optional() - .describe('Content for dataset-type filesets.'), - model: zod - .object({ - tool_calling: zod - .object({ - chat_template: zod - .string() - .optional() - .describe('Jinja2 chat template for the model.'), - tool_call_parser: zod - .string() - .optional() - .describe( - "Name of the tool call parser (e.g., 'openai', 'hermes', 'pythonic', 'llama3_json', 'mistral')." - ), - tool_call_plugin: zod - .string() - .optional() - .describe( - "Reference to a fileset containing a custom tool call plugin Python file. Expected format: '{workspace}\/{fileset_name}'." - ), - auto_tool_choice: zod - .boolean() - .optional() - .describe('Whether to enable automatic tool choice.'), - }) - .optional() - .describe( - 'Content for tool-calling configuration on model filesets.\n\nStores chat template and tool calling settings that are merged into\nthe ModelSpec during checkpoint analysis.' - ), - }) - .optional() - .describe( - 'Content for model-type filesets.\n\nContains tool calling configuration that is merged into the ModelSpec\nduring checkpoint analysis.' - ), - }) - .describe( - 'Tagged metadata container - the key indicates the type.\n\nExample:\n metadata = FilesetMetadata(\n dataset=DatasetMetadataContent(\n schema={\"columns\": [\"id\", \"name\"]},\n )\n )' - ) - .optional() - .describe('Purpose-specific metadata for the fileset.'), - custom_fields: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Custom fields for the fileset.'), - }) - .describe('Fileset definition for use without persisting to the Files API.'), - ]) - .describe('The dataset to use for agent prompts and evaluation.'), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default(evaluationCreateMetricJobBodySpecThreeParamsOneParallelismDefault) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - ignore_request_failure: zod - .boolean() - .default(evaluationCreateMetricJobBodySpecThreeParamsOneIgnoreRequestFailureDefault) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - request_timeout: zod - .number() - .optional() - .describe('The timeout to be used for requests made to the model.'), - max_retries: zod - .number() - .min(evaluationCreateMetricJobBodySpecThreeParamsOneMaxRetriesMin) - .default(evaluationCreateMetricJobBodySpecThreeParamsOneMaxRetriesDefault) - .describe('Maximum number of retries for failed requests.'), - }) - .describe('Job parameters for online evaluation.') - .optional() - .describe('Execution parameters for the metric job.'), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .describe( - 'The jinja template to prompt the agent for evaluation. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{input}}, {{output}}, {{context}}, {{reference}} to reference input columns.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - 'Prompt template fields that should remain available to the prompt template but not be required by dataset schema validation.' - ), - }) - .describe('An online metric job that evaluates an agent.'), - zod - .object({ - metric: zod - .union([ - zod - .string() - .regex(evaluationCreateMetricJobBodySpecFourMetricOneRegExp) - .describe( - "Reference to a metric in the Metrics API.\n\nA reference is a string with format 'workspace\/metric-name' that points to a\npersisted metric entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ), - zod - .object({ - type: zod - .enum(['system', 'system-retriever']) - .default(evaluationCreateMetricJobBodySpecFourMetricTwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline', 'retriever'])) - .default([`online`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - name: zod - .string() - .default(evaluationCreateMetricJobBodySpecFourMetricTwoNameDefault), - required_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod - .string() - .optional() - .describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe( - 'List of required parameters for running an evaluation with the metric.' - ), - optional_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod - .string() - .optional() - .describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe( - 'List of optional parameters for running an evaluation with the metric.' - ), - }) - .describe('Metric entity for system metric that have pre-defined dataset.'), - ]) - .describe('The metric for evaluation.'), - metric_params: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Additional parameters for the metric. Required for system metrics, optional overrides for custom metrics.' - ), - field_mapping: zod - .object({ - input: zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecFourFieldMappingOneInputRegExp) - .optional() - .describe("Binding for the canonical 'input' evaluator field."), - output: zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecFourFieldMappingOneOutputRegExp) - .optional() - .describe("Binding for the canonical 'output' evaluator field."), - context: zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecFourFieldMappingOneContextRegExp) - .optional() - .describe("Binding for the canonical 'context' evaluator field."), - reference: zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecFourFieldMappingOneReferenceRegExp) - .optional() - .describe("Binding for the canonical 'reference' evaluator field."), - trajectory: zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecFourFieldMappingOneTrajectoryRegExp) - .optional() - .describe("Binding for the canonical 'trajectory' evaluator field."), - messages: zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecFourFieldMappingOneMessagesRegExp) - .optional() - .describe("Binding for the canonical 'messages' evaluator field."), - tool_calls: zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecFourFieldMappingOneToolCallsRegExp) - .optional() - .describe("Binding for the canonical 'tool_calls' evaluator field."), - tools: zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecFourFieldMappingOneToolsRegExp) - .optional() - .describe("Binding for the canonical 'tools' evaluator field."), - custom: zod - .record( - zod.string(), - zod - .string() - .min(1) - .regex(evaluationCreateMetricJobBodySpecFourFieldMappingOneCustomRegExpOne) - ) - .optional() - .describe('Additional evaluator field bindings keyed by canonical field name.'), - }) - .describe( - "Maps canonical evaluator fields to raw dataset column paths.\nExample: {'input': 'question', 'output': 'answer', 'reference': 'gold', 'trajectory': 'steps'}" - ) - .optional() - .describe( - "Maps canonical evaluator fields such as 'input' and 'output' to dataset column paths for this job." - ), - retriever_pipeline: zod - .object({ - embeddings_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecFourRetrieverPipelineOneEmbeddingsModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCreateMetricJobBodySpecFourRetrieverPipelineOneEmbeddingsModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCreateMetricJobBodySpecFourRetrieverPipelineOneEmbeddingsModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The embeddings model configuration.'), - }) - .describe('Pipeline configuration for retriever-based evaluations.') - .describe('The pipeline configuration for retriever-based evaluation.'), - dataset: zod - .union([ - zod - .enum([ - 'beir/climate-fever', - 'beir/cqadupstack', - 'beir/dbpedia-entity', - 'beir/fever', - 'beir/fiqa', - 'beir/germanquad', - 'beir/hotpotqa', - 'beir/mmarco', - 'beir/mrtydi', - 'beir/msmarco-v2', - 'beir/msmarco', - 'beir/nfcorpus', - 'beir/nq-train', - 'beir/nq', - 'beir/quora', - 'beir/scidocs', - 'beir/scifact', - 'beir/trec-covid-beir', - 'beir/trec-covid-v2', - 'beir/trec-covid', - 'beir/vihealthqa', - 'beir/webis-touche2020', - 'ragas/amnesty_qa', - ]) - .describe('Well-known dataset (BEIR or RAGAS) referenced by its identifier.'), - zod - .object({ - rows: zod - .array(zod.record(zod.string(), zod.unknown())) - .min(1) - .describe( - 'Array of data rows. Each row can be any valid JSON value (object, string, array, etc.).' - ), - }) - .describe( - 'Inline dataset definition with embedded rows.\n\nUse this for quick evaluations without persisting the dataset first.' - ), - zod - .string() - .describe( - "Reference to a Fileset in the Files API.\n\nA reference is a string with format 'workspace\/fileset-name' that points to a\npersisted fileset entity. When used as a dataset source, all files within the\nfileset will be downloaded to the job container.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform." - ), - zod - .object({ - path: zod - .string() - .min(1) - .optional() - .describe('The relative path to file\/directory in the storage.'), - storage: zod - .union([ - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationCreateMetricJobBodySpecFourDatasetFourStorageOneReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('ngc') - .default( - evaluationCreateMetricJobBodySpecFourDatasetFourStorageOneTypeDefault - ), - org: zod.string().describe('NGC organization name'), - team: zod.string().describe('NGC team name'), - target: zod.string().describe('NGC asset name (model or resource)'), - target_type: zod - .enum(['resource', 'model']) - .default( - evaluationCreateMetricJobBodySpecFourDatasetFourStorageOneTargetTypeDefault - ) - .describe("Type of NGC asset: 'resource' or 'model'"), - version: zod - .string() - .optional() - .describe('NGC asset version. If not provided, defaults to latest version'), - original_version: zod - .string() - .optional() - .describe( - "The original version requested by the user before resolution (e.g., 'latest' or None). The 'version' field contains the resolved version ID." - ), - api_key_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecFourDatasetFourStorageOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .describe('NGC API key secret name'), - host: zod - .string() - .default( - evaluationCreateMetricJobBodySpecFourDatasetFourStorageOneHostDefault - ) - .describe('NGC API host URL'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationCreateMetricJobBodySpecFourDatasetFourStorageTwoReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('huggingface') - .default( - evaluationCreateMetricJobBodySpecFourDatasetFourStorageTwoTypeDefault - ), - repo_id: zod - .string() - .describe("Huggingface repository ID (e.g., 'meta-llama\/Llama-2-7b')"), - repo_type: zod - .enum(['model', 'dataset', 'space']) - .default( - evaluationCreateMetricJobBodySpecFourDatasetFourStorageTwoRepoTypeDefault - ) - .describe("Type of Huggingface repository: 'model', 'dataset', or 'space'"), - revision: zod - .string() - .default( - evaluationCreateMetricJobBodySpecFourDatasetFourStorageTwoRevisionDefault - ) - .describe("Branch, tag, or commit SHA. Defaults to 'main'"), - original_revision: zod - .string() - .optional() - .describe( - "The original revision requested by the user before resolution (e.g., 'main'). The 'revision' field contains the resolved commit SHA." - ), - token_secret: zod - .string() - .regex( - evaluationCreateMetricJobBodySpecFourDatasetFourStorageTwoTokenSecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe('Huggingface API `token` secret name for private repositories'), - endpoint: zod - .string() - .default( - evaluationCreateMetricJobBodySpecFourDatasetFourStorageTwoEndpointDefault - ) - .describe('Huggingface Hub endpoint URL. Use for self-hosted instances.'), - }), - ]) - .describe('The storage configuration for the fileset.'), - metadata: zod - .object({ - dataset: zod - .object({ - schema: zod - .union([zod.record(zod.string(), zod.unknown()), zod.string()]) - .optional() - .describe( - 'Default row schema for files in this fileset, either inline JSON Schema or a schema_defs key.' - ), - schema_defs: zod - .record(zod.string(), zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'Reusable JSON Schema definitions keyed by name for deduplicating per-file dataset schemas.' - ), - schemas_by_path: zod - .record( - zod.string(), - zod.union([zod.record(zod.string(), zod.unknown()), zod.string()]) - ) - .optional() - .describe( - 'Optional per-file row schemas keyed by relative path within the fileset. Each value may be inline JSON Schema or a schema_defs key.' - ), - }) - .optional() - .describe('Content for dataset-type filesets.'), - model: zod - .object({ - tool_calling: zod - .object({ - chat_template: zod - .string() - .optional() - .describe('Jinja2 chat template for the model.'), - tool_call_parser: zod - .string() - .optional() - .describe( - "Name of the tool call parser (e.g., 'openai', 'hermes', 'pythonic', 'llama3_json', 'mistral')." - ), - tool_call_plugin: zod - .string() - .optional() - .describe( - "Reference to a fileset containing a custom tool call plugin Python file. Expected format: '{workspace}\/{fileset_name}'." - ), - auto_tool_choice: zod - .boolean() - .optional() - .describe('Whether to enable automatic tool choice.'), - }) - .optional() - .describe( - 'Content for tool-calling configuration on model filesets.\n\nStores chat template and tool calling settings that are merged into\nthe ModelSpec during checkpoint analysis.' - ), - }) - .optional() - .describe( - 'Content for model-type filesets.\n\nContains tool calling configuration that is merged into the ModelSpec\nduring checkpoint analysis.' - ), - }) - .describe( - 'Tagged metadata container - the key indicates the type.\n\nExample:\n metadata = FilesetMetadata(\n dataset=DatasetMetadataContent(\n schema={\"columns\": [\"id\", \"name\"]},\n )\n )' - ) - .optional() - .describe('Purpose-specific metadata for the fileset.'), - custom_fields: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Custom fields for the fileset.'), - }) - .describe('Fileset definition for use without persisting to the Files API.'), - ]) - .describe('The dataset to use for evaluation.'), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default(evaluationCreateMetricJobBodySpecFourParamsOneParallelismDefault) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - ignore_request_failure: zod - .boolean() - .default(evaluationCreateMetricJobBodySpecFourParamsOneIgnoreRequestFailureDefault) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - request_timeout: zod - .number() - .optional() - .describe('The timeout to be used for requests made to the model.'), - max_retries: zod - .number() - .min(evaluationCreateMetricJobBodySpecFourParamsOneMaxRetriesMin) - .default(evaluationCreateMetricJobBodySpecFourParamsOneMaxRetriesDefault) - .describe('Maximum number of retries for failed requests.'), - }) - .describe('Job parameters for online evaluation.') - .optional() - .describe('Execution parameters for the metric job.'), - }) - .describe('Evaluation with a retriever-based metric.'), - ]), - ownership: zod.record(zod.string(), zod.unknown()).optional(), - custom_fields: zod.record(zod.string(), zod.unknown()).optional(), -}); - -/** - * @summary List Jobs - */ -export const EvaluationListMetricJobsParams = zod.object({ - workspace: zod.string(), -}); - -export const evaluationListMetricJobsQueryPageDefault = 1; -export const evaluationListMetricJobsQueryPageExclusiveMin = 0; - -export const evaluationListMetricJobsQueryPageSizeDefault = 10; -export const evaluationListMetricJobsQueryPageSizeExclusiveMin = 0; - -export const evaluationListMetricJobsQuerySortDefault = `-created_at`; - -export const EvaluationListMetricJobsQueryParams = zod.object({ - page: zod - .number() - .gt(evaluationListMetricJobsQueryPageExclusiveMin) - .default(evaluationListMetricJobsQueryPageDefault) - .describe('Page number.'), - page_size: zod - .number() - .gt(evaluationListMetricJobsQueryPageSizeExclusiveMin) - .default(evaluationListMetricJobsQueryPageSizeDefault) - .describe('Page size.'), - sort: zod - .enum(['created_at', '-created_at', 'updated_at', '-updated_at']) - .default(evaluationListMetricJobsQuerySortDefault) - .describe( - 'The field to sort by. To sort in decreasing order, use `-` in front of the field name.' - ), - filter: zod - .object({ - created_at: zod - .object({ - $gte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results greater than or equal to this datetime.'), - $lte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results less than or equal to this datetime.'), - }) - .optional() - .describe("Jobs created at 'gte' datetime or 'lte' datetime."), - name: zod.string().optional().describe('Name of the job.'), - workspace: zod.string().optional().describe('Workspace of the job.'), - project: zod.string().optional().describe('Project containing the job.'), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ) - .optional() - .describe('The current status.'), - updated_at: zod - .object({ - $gte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results greater than or equal to this datetime.'), - $lte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results less than or equal to this datetime.'), - }) - .optional() - .describe("Jobs updated at 'gte' datetime or 'lte' datetime."), - }) - .optional() - .describe('Filter jobs on various criteria.'), -}); - -export const evaluationListMetricJobsResponseDataItemSpecOneMetricOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneTypeDefault = `llm-judge`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneScoresItemOneNameRegExp = - new RegExp('^[a-z0-9_]+$'); -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneScoresItemOneParserOneTypeDefault = `json`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneScoresItemOneParserTwoTypeDefault = `regex`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneScoresItemOneParserTwoMethodDefault = `match`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneScoresItemOneRubricMin = 2; - -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneScoresItemTwoNameRegExp = - new RegExp('^[a-z0-9_]+$'); -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneScoresItemTwoParserOneTypeDefault = `json`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneScoresItemTwoParserTwoTypeDefault = `regex`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneScoresItemTwoParserTwoMethodDefault = `match`; - -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoTwoJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoTwoJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoTwoJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoTwoInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoTwoInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoTwoInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoTwoInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoTwoIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoTwoTypeDefault = `topic_adherence`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoTwoMetricModeDefault = `f1`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoThreeJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoThreeJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoThreeJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoThreeInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoThreeInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoThreeInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoThreeInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoThreeIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoThreeTypeDefault = `agent_goal_accuracy`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoThreeUseReferenceDefault = true; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFourJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFourJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFourJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFourInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFourInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFourInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFourInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFourIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFourTypeDefault = `answer_accuracy`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFiveJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFiveJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFiveJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFiveInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFiveInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFiveInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFiveInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFiveIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFiveTypeDefault = `context_relevance`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSixJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSixJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSixJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSixInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSixInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSixInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSixInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSixIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSixTypeDefault = `response_groundedness`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSevenJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSevenJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSevenJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSevenInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSevenInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSevenInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSevenInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSevenIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSevenTypeDefault = `context_recall`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoEightJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoEightJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoEightJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoEightInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoEightInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoEightInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoEightInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoEightIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoEightTypeDefault = `context_precision`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoNineJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoNineJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoNineJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoNineInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoNineInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoNineInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoNineInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoNineIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoNineTypeDefault = `context_entity_recall`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnezeroEmbeddingsModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnezeroEmbeddingsModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnezeroEmbeddingsModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnezeroJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnezeroJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnezeroJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnezeroInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnezeroInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnezeroInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnezeroInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnezeroIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnezeroTypeDefault = `response_relevancy`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnezeroStrictnessDefault = 1; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneoneJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneoneJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneoneJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneoneInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneoneInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneoneInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneoneInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneoneIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneoneTypeDefault = `faithfulness`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnetwoJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnetwoJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnetwoJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnetwoInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnetwoInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnetwoInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnetwoInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnetwoIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnetwoTypeDefault = `noise_sensitivity`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnethreeTypeDefault = `tool_call_accuracy`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnefourTypeDefault = `bleu`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnefiveTypeDefault = `exact-match`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnesixTypeDefault = `f1`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnesevenTypeDefault = `number-check`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneeightTypeDefault = `remote`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneeightApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneeightTimeoutSecondsDefault = 30; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneeightMaxRetriesDefault = 3; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneeightScoresItemNameRegExp = - new RegExp('^[a-z0-9_]+$'); -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneeightScoresItemParserOneTypeDefault = `json`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnenineTypeDefault = `nemo-agent-toolkit-remote`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnenineApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnenineTimeoutSecondsDefault = 30; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnenineMaxRetriesDefault = 3; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoTwozeroTypeDefault = `rouge`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoTwooneTypeDefault = `string-check`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricTwoTwotwoTypeDefault = `tool-calling`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricThreeTypeDefault = `system`; -export const evaluationListMetricJobsResponseDataItemSpecOneMetricThreeNameDefault = `Metric name`; - -export const evaluationListMetricJobsResponseDataItemSpecOneFieldMappingOneInputRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationListMetricJobsResponseDataItemSpecOneFieldMappingOneOutputRegExp = - new RegExp('^[^\\[\\]]\*$'); - -export const evaluationListMetricJobsResponseDataItemSpecOneFieldMappingOneContextRegExp = - new RegExp('^[^\\[\\]]\*$'); - -export const evaluationListMetricJobsResponseDataItemSpecOneFieldMappingOneReferenceRegExp = - new RegExp('^[^\\[\\]]\*$'); - -export const evaluationListMetricJobsResponseDataItemSpecOneFieldMappingOneTrajectoryRegExp = - new RegExp('^[^\\[\\]]\*$'); - -export const evaluationListMetricJobsResponseDataItemSpecOneFieldMappingOneMessagesRegExp = - new RegExp('^[^\\[\\]]\*$'); - -export const evaluationListMetricJobsResponseDataItemSpecOneFieldMappingOneToolCallsRegExp = - new RegExp('^[^\\[\\]]\*$'); - -export const evaluationListMetricJobsResponseDataItemSpecOneFieldMappingOneToolsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationListMetricJobsResponseDataItemSpecOneFieldMappingOneCustomRegExpOne = - new RegExp('^[^\\[\\]]\*$'); - -export const evaluationListMetricJobsResponseDataItemSpecOneDatasetThreeStorageOneReadChunkSizeDefault = 1048576; -export const evaluationListMetricJobsResponseDataItemSpecOneDatasetThreeStorageOneTypeDefault = `ngc`; -export const evaluationListMetricJobsResponseDataItemSpecOneDatasetThreeStorageOneTargetTypeDefault = `resource`; -export const evaluationListMetricJobsResponseDataItemSpecOneDatasetThreeStorageOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecOneDatasetThreeStorageOneHostDefault = `https://api.ngc.nvidia.com`; -export const evaluationListMetricJobsResponseDataItemSpecOneDatasetThreeStorageTwoReadChunkSizeDefault = 1048576; -export const evaluationListMetricJobsResponseDataItemSpecOneDatasetThreeStorageTwoTypeDefault = `huggingface`; -export const evaluationListMetricJobsResponseDataItemSpecOneDatasetThreeStorageTwoRepoTypeDefault = `model`; -export const evaluationListMetricJobsResponseDataItemSpecOneDatasetThreeStorageTwoRevisionDefault = `main`; -export const evaluationListMetricJobsResponseDataItemSpecOneDatasetThreeStorageTwoTokenSecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecOneDatasetThreeStorageTwoEndpointDefault = `https://huggingface.co`; -export const evaluationListMetricJobsResponseDataItemSpecOneParamsOneParallelismDefault = 8; - -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneTypeDefault = `llm-judge`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneScoresItemOneNameRegExp = - new RegExp('^[a-z0-9_]+$'); -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneScoresItemOneParserOneTypeDefault = `json`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneScoresItemOneParserTwoTypeDefault = `regex`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneScoresItemOneParserTwoMethodDefault = `match`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneScoresItemOneRubricMin = 2; - -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneScoresItemTwoNameRegExp = - new RegExp('^[a-z0-9_]+$'); -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneScoresItemTwoParserOneTypeDefault = `json`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneScoresItemTwoParserTwoTypeDefault = `regex`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneScoresItemTwoParserTwoMethodDefault = `match`; - -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoTwoJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoTwoJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoTwoJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoTwoInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoTwoInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoTwoInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoTwoInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoTwoIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoTwoTypeDefault = `topic_adherence`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoTwoMetricModeDefault = `f1`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoThreeJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoThreeJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoThreeJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoThreeInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoThreeInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoThreeInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoThreeInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoThreeIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoThreeTypeDefault = `agent_goal_accuracy`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoThreeUseReferenceDefault = true; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFourJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFourJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFourJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFourInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFourInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFourInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFourInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFourIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFourTypeDefault = `answer_accuracy`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFiveJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFiveJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFiveJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFiveInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFiveInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFiveInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFiveInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFiveIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFiveTypeDefault = `context_relevance`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSixJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSixJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSixJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSixInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSixInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSixInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSixInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSixIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSixTypeDefault = `response_groundedness`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSevenJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSevenJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSevenJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSevenInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSevenInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSevenInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSevenInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSevenIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSevenTypeDefault = `context_recall`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoEightJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoEightJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoEightJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoEightInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoEightInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoEightInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoEightInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoEightIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoEightTypeDefault = `context_precision`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoNineJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoNineJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoNineJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoNineInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoNineInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoNineInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoNineInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoNineIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoNineTypeDefault = `context_entity_recall`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnezeroEmbeddingsModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnezeroEmbeddingsModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnezeroEmbeddingsModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnezeroJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnezeroJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnezeroJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnezeroInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnezeroInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnezeroInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnezeroInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnezeroIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnezeroTypeDefault = `response_relevancy`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnezeroStrictnessDefault = 1; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneoneJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneoneJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneoneJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneoneInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneoneInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneoneInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneoneInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneoneIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneoneTypeDefault = `faithfulness`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnetwoJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnetwoJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnetwoJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnetwoInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnetwoInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnetwoInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnetwoInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnetwoIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnetwoTypeDefault = `noise_sensitivity`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnethreeTypeDefault = `tool_call_accuracy`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnefourTypeDefault = `bleu`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnefiveTypeDefault = `exact-match`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnesixTypeDefault = `f1`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnesevenTypeDefault = `number-check`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneeightTypeDefault = `remote`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneeightApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneeightTimeoutSecondsDefault = 30; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneeightMaxRetriesDefault = 3; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneeightScoresItemNameRegExp = - new RegExp('^[a-z0-9_]+$'); -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneeightScoresItemParserOneTypeDefault = `json`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnenineTypeDefault = `nemo-agent-toolkit-remote`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnenineApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnenineTimeoutSecondsDefault = 30; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnenineMaxRetriesDefault = 3; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoTwozeroTypeDefault = `rouge`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoTwooneTypeDefault = `string-check`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoTwotwoTypeDefault = `tool-calling`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricThreeTypeDefault = `system`; -export const evaluationListMetricJobsResponseDataItemSpecTwoMetricThreeNameDefault = `Metric name`; - -export const evaluationListMetricJobsResponseDataItemSpecTwoFieldMappingOneInputRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationListMetricJobsResponseDataItemSpecTwoFieldMappingOneOutputRegExp = - new RegExp('^[^\\[\\]]\*$'); - -export const evaluationListMetricJobsResponseDataItemSpecTwoFieldMappingOneContextRegExp = - new RegExp('^[^\\[\\]]\*$'); - -export const evaluationListMetricJobsResponseDataItemSpecTwoFieldMappingOneReferenceRegExp = - new RegExp('^[^\\[\\]]\*$'); - -export const evaluationListMetricJobsResponseDataItemSpecTwoFieldMappingOneTrajectoryRegExp = - new RegExp('^[^\\[\\]]\*$'); - -export const evaluationListMetricJobsResponseDataItemSpecTwoFieldMappingOneMessagesRegExp = - new RegExp('^[^\\[\\]]\*$'); - -export const evaluationListMetricJobsResponseDataItemSpecTwoFieldMappingOneToolCallsRegExp = - new RegExp('^[^\\[\\]]\*$'); - -export const evaluationListMetricJobsResponseDataItemSpecTwoFieldMappingOneToolsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationListMetricJobsResponseDataItemSpecTwoFieldMappingOneCustomRegExpOne = - new RegExp('^[^\\[\\]]\*$'); -export const evaluationListMetricJobsResponseDataItemSpecTwoModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecTwoModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecTwoModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); - -export const evaluationListMetricJobsResponseDataItemSpecTwoDatasetThreeStorageOneReadChunkSizeDefault = 1048576; -export const evaluationListMetricJobsResponseDataItemSpecTwoDatasetThreeStorageOneTypeDefault = `ngc`; -export const evaluationListMetricJobsResponseDataItemSpecTwoDatasetThreeStorageOneTargetTypeDefault = `resource`; -export const evaluationListMetricJobsResponseDataItemSpecTwoDatasetThreeStorageOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecTwoDatasetThreeStorageOneHostDefault = `https://api.ngc.nvidia.com`; -export const evaluationListMetricJobsResponseDataItemSpecTwoDatasetThreeStorageTwoReadChunkSizeDefault = 1048576; -export const evaluationListMetricJobsResponseDataItemSpecTwoDatasetThreeStorageTwoTypeDefault = `huggingface`; -export const evaluationListMetricJobsResponseDataItemSpecTwoDatasetThreeStorageTwoRepoTypeDefault = `model`; -export const evaluationListMetricJobsResponseDataItemSpecTwoDatasetThreeStorageTwoRevisionDefault = `main`; -export const evaluationListMetricJobsResponseDataItemSpecTwoDatasetThreeStorageTwoTokenSecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecTwoDatasetThreeStorageTwoEndpointDefault = `https://huggingface.co`; -export const evaluationListMetricJobsResponseDataItemSpecTwoParamsOneParallelismDefault = 8; - -export const evaluationListMetricJobsResponseDataItemSpecTwoParamsOneIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecTwoParamsOneMaxRetriesDefault = 3; -export const evaluationListMetricJobsResponseDataItemSpecTwoParamsOneMaxRetriesMin = 0; - -export const evaluationListMetricJobsResponseDataItemSpecTwoParamsOneInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecTwoParamsOneInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecTwoParamsOneInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecTwoParamsOneInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneTypeDefault = `llm-judge`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneScoresItemOneNameRegExp = - new RegExp('^[a-z0-9_]+$'); -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneScoresItemOneParserOneTypeDefault = `json`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneScoresItemOneParserTwoTypeDefault = `regex`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneScoresItemOneParserTwoMethodDefault = `match`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneScoresItemOneRubricMin = 2; - -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneScoresItemTwoNameRegExp = - new RegExp('^[a-z0-9_]+$'); -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneScoresItemTwoParserOneTypeDefault = `json`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneScoresItemTwoParserTwoTypeDefault = `regex`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneScoresItemTwoParserTwoMethodDefault = `match`; - -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoTwoJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoTwoJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoTwoJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoTwoInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoTwoInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoTwoInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoTwoInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoTwoIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoTwoTypeDefault = `topic_adherence`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoTwoMetricModeDefault = `f1`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoThreeJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoThreeJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoThreeJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoThreeInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoThreeInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoThreeInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoThreeInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoThreeIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoThreeTypeDefault = `agent_goal_accuracy`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoThreeUseReferenceDefault = true; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFourJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFourJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFourJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFourInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFourInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFourInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFourInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFourIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFourTypeDefault = `answer_accuracy`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFiveJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFiveJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFiveJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFiveInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFiveInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFiveInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFiveInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFiveIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFiveTypeDefault = `context_relevance`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSixJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSixJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSixJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSixInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSixInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSixInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSixInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSixIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSixTypeDefault = `response_groundedness`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSevenJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSevenJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSevenJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSevenInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSevenInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSevenInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSevenInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSevenIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSevenTypeDefault = `context_recall`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoEightJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoEightJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoEightJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoEightInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoEightInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoEightInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoEightInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoEightIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoEightTypeDefault = `context_precision`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoNineJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoNineJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoNineJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoNineInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoNineInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoNineInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoNineInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoNineIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoNineTypeDefault = `context_entity_recall`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnezeroEmbeddingsModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnezeroEmbeddingsModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnezeroEmbeddingsModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnezeroJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnezeroJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnezeroJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnezeroInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnezeroInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnezeroInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnezeroInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnezeroIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnezeroTypeDefault = `response_relevancy`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnezeroStrictnessDefault = 1; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneoneJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneoneJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneoneJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneoneInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneoneInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneoneInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneoneInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneoneIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneoneTypeDefault = `faithfulness`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnetwoJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnetwoJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnetwoJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnetwoInferenceOneTemperatureMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnetwoInferenceOneTemperatureMax = 2; - -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnetwoInferenceOneTopPMin = 0; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnetwoInferenceOneTopPMax = 1; - -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnetwoIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnetwoTypeDefault = `noise_sensitivity`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnethreeTypeDefault = `tool_call_accuracy`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnefourTypeDefault = `bleu`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnefiveTypeDefault = `exact-match`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnesixTypeDefault = `f1`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnesevenTypeDefault = `number-check`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneeightTypeDefault = `remote`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneeightApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneeightTimeoutSecondsDefault = 30; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneeightMaxRetriesDefault = 3; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneeightScoresItemNameRegExp = - new RegExp('^[a-z0-9_]+$'); -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneeightScoresItemParserOneTypeDefault = `json`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnenineTypeDefault = `nemo-agent-toolkit-remote`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnenineApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnenineTimeoutSecondsDefault = 30; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnenineMaxRetriesDefault = 3; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoTwozeroTypeDefault = `rouge`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoTwooneTypeDefault = `string-check`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoTwotwoTypeDefault = `tool-calling`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricThreeTypeDefault = `system`; -export const evaluationListMetricJobsResponseDataItemSpecThreeMetricThreeNameDefault = `Metric name`; - -export const evaluationListMetricJobsResponseDataItemSpecThreeFieldMappingOneInputRegExp = - new RegExp('^[^\\[\\]]\*$'); - -export const evaluationListMetricJobsResponseDataItemSpecThreeFieldMappingOneOutputRegExp = - new RegExp('^[^\\[\\]]\*$'); - -export const evaluationListMetricJobsResponseDataItemSpecThreeFieldMappingOneContextRegExp = - new RegExp('^[^\\[\\]]\*$'); - -export const evaluationListMetricJobsResponseDataItemSpecThreeFieldMappingOneReferenceRegExp = - new RegExp('^[^\\[\\]]\*$'); - -export const evaluationListMetricJobsResponseDataItemSpecThreeFieldMappingOneTrajectoryRegExp = - new RegExp('^[^\\[\\]]\*$'); - -export const evaluationListMetricJobsResponseDataItemSpecThreeFieldMappingOneMessagesRegExp = - new RegExp('^[^\\[\\]]\*$'); - -export const evaluationListMetricJobsResponseDataItemSpecThreeFieldMappingOneToolCallsRegExp = - new RegExp('^[^\\[\\]]\*$'); - -export const evaluationListMetricJobsResponseDataItemSpecThreeFieldMappingOneToolsRegExp = - new RegExp('^[^\\[\\]]\*$'); - -export const evaluationListMetricJobsResponseDataItemSpecThreeFieldMappingOneCustomRegExpOne = - new RegExp('^[^\\[\\]]\*$'); -export const evaluationListMetricJobsResponseDataItemSpecThreeAgentOneFormatDefault = `generic`; -export const evaluationListMetricJobsResponseDataItemSpecThreeAgentOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); - -export const evaluationListMetricJobsResponseDataItemSpecThreeDatasetThreeStorageOneReadChunkSizeDefault = 1048576; -export const evaluationListMetricJobsResponseDataItemSpecThreeDatasetThreeStorageOneTypeDefault = `ngc`; -export const evaluationListMetricJobsResponseDataItemSpecThreeDatasetThreeStorageOneTargetTypeDefault = `resource`; -export const evaluationListMetricJobsResponseDataItemSpecThreeDatasetThreeStorageOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecThreeDatasetThreeStorageOneHostDefault = `https://api.ngc.nvidia.com`; -export const evaluationListMetricJobsResponseDataItemSpecThreeDatasetThreeStorageTwoReadChunkSizeDefault = 1048576; -export const evaluationListMetricJobsResponseDataItemSpecThreeDatasetThreeStorageTwoTypeDefault = `huggingface`; -export const evaluationListMetricJobsResponseDataItemSpecThreeDatasetThreeStorageTwoRepoTypeDefault = `model`; -export const evaluationListMetricJobsResponseDataItemSpecThreeDatasetThreeStorageTwoRevisionDefault = `main`; -export const evaluationListMetricJobsResponseDataItemSpecThreeDatasetThreeStorageTwoTokenSecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecThreeDatasetThreeStorageTwoEndpointDefault = `https://huggingface.co`; -export const evaluationListMetricJobsResponseDataItemSpecThreeParamsOneParallelismDefault = 8; - -export const evaluationListMetricJobsResponseDataItemSpecThreeParamsOneIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecThreeParamsOneMaxRetriesDefault = 3; -export const evaluationListMetricJobsResponseDataItemSpecThreeParamsOneMaxRetriesMin = 0; - -export const evaluationListMetricJobsResponseDataItemSpecFourMetricOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationListMetricJobsResponseDataItemSpecFourMetricTwoTypeDefault = `system`; -export const evaluationListMetricJobsResponseDataItemSpecFourMetricTwoNameDefault = `Metric name`; - -export const evaluationListMetricJobsResponseDataItemSpecFourFieldMappingOneInputRegExp = - new RegExp('^[^\\[\\]]\*$'); - -export const evaluationListMetricJobsResponseDataItemSpecFourFieldMappingOneOutputRegExp = - new RegExp('^[^\\[\\]]\*$'); - -export const evaluationListMetricJobsResponseDataItemSpecFourFieldMappingOneContextRegExp = - new RegExp('^[^\\[\\]]\*$'); - -export const evaluationListMetricJobsResponseDataItemSpecFourFieldMappingOneReferenceRegExp = - new RegExp('^[^\\[\\]]\*$'); - -export const evaluationListMetricJobsResponseDataItemSpecFourFieldMappingOneTrajectoryRegExp = - new RegExp('^[^\\[\\]]\*$'); - -export const evaluationListMetricJobsResponseDataItemSpecFourFieldMappingOneMessagesRegExp = - new RegExp('^[^\\[\\]]\*$'); - -export const evaluationListMetricJobsResponseDataItemSpecFourFieldMappingOneToolCallsRegExp = - new RegExp('^[^\\[\\]]\*$'); - -export const evaluationListMetricJobsResponseDataItemSpecFourFieldMappingOneToolsRegExp = - new RegExp('^[^\\[\\]]\*$'); - -export const evaluationListMetricJobsResponseDataItemSpecFourFieldMappingOneCustomRegExpOne = - new RegExp('^[^\\[\\]]\*$'); -export const evaluationListMetricJobsResponseDataItemSpecFourRetrieverPipelineOneEmbeddingsModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecFourRetrieverPipelineOneEmbeddingsModelOneFormatDefault = `nim`; -export const evaluationListMetricJobsResponseDataItemSpecFourRetrieverPipelineOneEmbeddingsModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); - -export const evaluationListMetricJobsResponseDataItemSpecFourDatasetFourStorageOneReadChunkSizeDefault = 1048576; -export const evaluationListMetricJobsResponseDataItemSpecFourDatasetFourStorageOneTypeDefault = `ngc`; -export const evaluationListMetricJobsResponseDataItemSpecFourDatasetFourStorageOneTargetTypeDefault = `resource`; -export const evaluationListMetricJobsResponseDataItemSpecFourDatasetFourStorageOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecFourDatasetFourStorageOneHostDefault = `https://api.ngc.nvidia.com`; -export const evaluationListMetricJobsResponseDataItemSpecFourDatasetFourStorageTwoReadChunkSizeDefault = 1048576; -export const evaluationListMetricJobsResponseDataItemSpecFourDatasetFourStorageTwoTypeDefault = `huggingface`; -export const evaluationListMetricJobsResponseDataItemSpecFourDatasetFourStorageTwoRepoTypeDefault = `model`; -export const evaluationListMetricJobsResponseDataItemSpecFourDatasetFourStorageTwoRevisionDefault = `main`; -export const evaluationListMetricJobsResponseDataItemSpecFourDatasetFourStorageTwoTokenSecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricJobsResponseDataItemSpecFourDatasetFourStorageTwoEndpointDefault = `https://huggingface.co`; -export const evaluationListMetricJobsResponseDataItemSpecFourParamsOneParallelismDefault = 8; - -export const evaluationListMetricJobsResponseDataItemSpecFourParamsOneIgnoreRequestFailureDefault = false; -export const evaluationListMetricJobsResponseDataItemSpecFourParamsOneMaxRetriesDefault = 3; -export const evaluationListMetricJobsResponseDataItemSpecFourParamsOneMaxRetriesMin = 0; - -export const EvaluationListMetricJobsResponse = zod.object({ - data: zod.array( - zod.object({ - id: zod.string().optional(), - name: zod.string(), - description: zod.string().optional(), - project: zod.string().optional(), - workspace: zod.string().optional(), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - spec: zod.union([ - zod - .object({ - metric: zod - .union([ - zod - .string() - .regex(evaluationListMetricJobsResponseDataItemSpecOneMetricOneRegExp) - .describe( - "Reference to a metric in the Metrics API.\n\nA reference is a string with format 'workspace\/metric-name' that points to a\npersisted metric entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ), - zod.union([ - zod - .object({ - type: zod - .literal('llm-judge') - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The model configuration.'), - scores: zod - .array( - zod.union([ - zod - .object({ - name: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneScoresItemOneNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneScoresItemOneParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneScoresItemOneParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneScoresItemOneParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - rubric: zod - .array( - zod.object({ - label: zod - .string() - .describe( - 'The label to use for the level of the rubric grading criteria. (e.g., \"helpful\", \"not_helpful\", \"positive\")' - ), - description: zod - .string() - .optional() - .describe( - 'Describe the semantic meaning of each criteria for the given rubric. If no judge template is set, the input description for labels are included in the generated judge prompt.' - ), - value: zod - .union([zod.number(), zod.number()]) - .describe( - 'The score value to assign for the criteria used for aggregation and ranking.' - ), - }) - ) - .min( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneScoresItemOneRubricMin - ) - .describe('The rubric for the score.'), - }) - .describe( - 'Score definition for a rubric with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - zod - .object({ - name: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneScoresItemTwoNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneScoresItemTwoParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneScoresItemTwoParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneScoresItemTwoParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .describe( - 'Minimum value for the score range. Must be less than maximum.' - ), - maximum: zod - .union([zod.number(), zod.number()]) - .describe( - 'Maximum value for the score range. Must be greater than minimum.' - ), - }) - .describe( - 'Score definition for a range of values with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - ]) - ) - .min(1) - .describe( - "Definitions of scores that will be extracted from the judge's output." - ), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .optional() - .describe( - 'The prompt template for the judge. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{sample.output_text}} to use the model output within the template or {{item.xxx}} to reference input columns from the dataset.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - "Prompt template fields that should remain in the inferred input schema but not be required. Use this for fields like 'reference' when the metric can still run without them." - ), - structured_output: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'JSON schema to apply structured output for the judge model evaluation. Structured output is derived from scores when omitted. Use this option if there are custom requirements for the output of the judge.' - ), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge model.'), - system_prompt: zod - .string() - .optional() - .describe( - "Initial instructions that define the judge model's role and behavior for the conversation. This is prepended to the messages as a system message." - ), - reasoning: zod - .object({ - end_token: zod - .string() - .optional() - .describe( - "Configure the end token to trim reasoning context based on the model's reasoning API. Example for Nemotron models: '<\/think>'" - ), - include_if_not_finished: zod - .boolean() - .optional() - .describe( - 'Configure whether to include reasoning context if the model has not finished reasoning.' - ), - effort: zod - .string() - .optional() - .describe( - 'Option for OpenAI models to specify low, medium, or high reasoning effort.' - ), - }) - .describe("Custom settings that control the model's reasoning behavior.") - .optional() - .describe( - "Custom settings that control the judge model's reasoning behavior. For reasoning models (e.g., Nemotron), use `end_token` to strip reasoning traces from the output." - ), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - }) - .describe('Request type for creating LLM Judge metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoTwoJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoTwoJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoTwoJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoTwoInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoTwoInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoTwoInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoTwoInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoTwoIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('topic_adherence') - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoTwoTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - metric_mode: zod - .enum(['f1', 'precision', 'recall']) - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoTwoMetricModeDefault - ) - .describe('The mode for computing topic adherence score.'), - }) - .describe('Request type for TopicAdherence metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoThreeJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoThreeJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoThreeJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoThreeInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoThreeInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoThreeInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoThreeInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoThreeIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('agent_goal_accuracy') - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoThreeTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - use_reference: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoThreeUseReferenceDefault - ) - .describe('Whether to use reference for goal accuracy evaluation.'), - }) - .describe('Request type for AgentGoalAccuracy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFourJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFourJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFourJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFourInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFourInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFourInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFourInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFourIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('answer_accuracy') - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFourTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for AnswerAccuracy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFiveJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFiveJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFiveJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFiveInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFiveInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFiveInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFiveInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFiveIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_relevance') - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoFiveTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextRelevance metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSixJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSixJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSixJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSixInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSixInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSixInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSixInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSixIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_groundedness') - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSixTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ResponseGroundedness metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSevenJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSevenJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSevenJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSevenInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSevenInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSevenInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSevenInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSevenIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_recall') - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoSevenTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextRecall metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoEightJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoEightJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoEightJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoEightInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoEightInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoEightInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoEightInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoEightIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_precision') - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoEightTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextPrecision metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoNineJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoNineJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoNineJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoNineInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoNineInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoNineInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoNineInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoNineIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_entity_recall') - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoNineTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextEntityRecall metrics.'), - zod - .object({ - embeddings_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnezeroEmbeddingsModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnezeroEmbeddingsModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnezeroEmbeddingsModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The embeddings model configuration.'), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnezeroJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnezeroJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnezeroJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnezeroInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnezeroInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnezeroInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnezeroInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnezeroIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_relevancy') - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnezeroTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - strictness: zod - .number() - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnezeroStrictnessDefault - ) - .describe( - 'Number of parallel questions generated. NIM can only generate 1.' - ), - }) - .describe('Request type for ResponseRelevancy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneoneJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneoneJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneoneJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneoneInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneoneInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneoneInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneoneInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneoneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('faithfulness') - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneoneTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for Faithfulness metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnetwoJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnetwoJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnetwoJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnetwoInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnetwoInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnetwoInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnetwoInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnetwoIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('noise_sensitivity') - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnetwoTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for NoiseSensitivity metrics.'), - zod - .object({ - type: zod - .literal('tool_call_accuracy') - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnethreeTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ToolCallAccuracy metrics (no judge required).'), - zod - .object({ - type: zod - .literal('bleu') - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnefourTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - references: zod - .array(zod.string()) - .describe( - 'The templates for the ground truth references to calculate BLEU metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to calculate BLEU metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for BLEUMetric.'), - zod - .object({ - type: zod - .literal('exact-match') - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnefiveTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the exact match metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the exact match metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for ExactMatchMetric.'), - zod - .object({ - type: zod - .literal('f1') - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnesixTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the F1 metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the F1 metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for F1Metric.'), - zod - .object({ - type: zod - .literal('number-check') - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnesevenTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - '>=', - 'gte', - 'greater than or equal', - '>', - 'gt', - 'greater than', - '<=', - 'lte', - 'less than or equal', - '<', - 'lt', - 'less than', - 'absolute difference', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - epsilon: zod - .union([zod.number(), zod.number()]) - .optional() - .describe('Specify the tolerance for the absolute difference of values.'), - }) - .describe( - 'Request type for NumberCheckMetric. Numeric-comparison metric with template-driven operands.' - ), - zod - .object({ - type: zod - .literal('remote') - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneeightTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneeightApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneeightTimeoutSecondsDefault - ) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneeightMaxRetriesDefault - ) - .describe('Maximum number of retry attempts.'), - body: zod - .record(zod.string(), zod.unknown()) - .describe('Jinja template for request payload'), - scores: zod - .array( - zod - .object({ - name: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneeightScoresItemNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .object({ - type: zod - .literal('json') - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOneeightScoresItemParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.') - .optional() - .describe( - 'The method to parse the score. Only JSON parsing is supported for remote metrics.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe( - 'Minimum value for the score range. Defaults to None (no lower bound).' - ), - maximum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe( - 'Maximum value for the score range. Defaults to None (no upper bound).' - ), - }) - .describe( - 'Score configuration for remote metrics.\n\nUnlike RangeScore, minimum and maximum are optional (default to None = no bounds).\nThis avoids JSON serialization issues with infinity values.' - ) - ) - .describe('List of scores to extract from the remote response'), - }) - .describe( - 'Request type for RemoteMetric. A metric that computes scores via a remote endpoint.' - ), - zod - .object({ - type: zod - .literal('nemo-agent-toolkit-remote') - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnenineTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnenineApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnenineTimeoutSecondsDefault - ) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoOnenineMaxRetriesDefault - ) - .describe('Maximum number of retry attempts.'), - evaluator_name: zod - .string() - .describe('The name of the evaluator (also used as the score name).'), - }) - .describe( - 'Request type for NemoAgentToolkitRemoteMetric. A remote metric that interfaces with NeMo Agent Toolkit evaluators.' - ), - zod - .object({ - type: zod - .literal('rouge') - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoTwozeroTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to evaluate the ROUGE metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the ROUGE metric on. If not provided, the output text from the model is used.' - ), - }) - .describe( - 'Request type for ROUGEMetric. ROUGE metric for overlap-based summarization quality scoring.' - ), - zod - .object({ - type: zod - .literal('string-check') - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoTwooneTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - 'contains', - 'not contains', - 'startswith', - 'endswith', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - }) - .describe( - 'Request type for StringCheckMetric. String-comparison metric with operator-based checks.' - ), - zod - .object({ - type: zod - .literal('tool-calling') - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricTwoTwotwoTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to evaluate tool calling accuracy.' - ), - }) - .describe( - 'Request type for ToolCallingMetric. Tool-calling accuracy metric for structured function calls.' - ), - ]), - zod - .object({ - type: zod - .enum(['system', 'system-retriever']) - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricThreeTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline', 'retriever'])) - .default([`online`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - name: zod - .string() - .default( - evaluationListMetricJobsResponseDataItemSpecOneMetricThreeNameDefault - ), - required_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod - .string() - .optional() - .describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe( - 'List of required parameters for running an evaluation with the metric.' - ), - optional_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod - .string() - .optional() - .describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe( - 'List of optional parameters for running an evaluation with the metric.' - ), - }) - .describe('Metric entity for system metric that have pre-defined dataset.'), - ]) - .describe('The metric for evaluation.'), - metric_params: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Additional parameters for the metric. Required for system metrics, optional overrides for custom metrics.' - ), - field_mapping: zod - .object({ - input: zod - .string() - .min(1) - .regex(evaluationListMetricJobsResponseDataItemSpecOneFieldMappingOneInputRegExp) - .optional() - .describe("Binding for the canonical 'input' evaluator field."), - output: zod - .string() - .min(1) - .regex(evaluationListMetricJobsResponseDataItemSpecOneFieldMappingOneOutputRegExp) - .optional() - .describe("Binding for the canonical 'output' evaluator field."), - context: zod - .string() - .min(1) - .regex( - evaluationListMetricJobsResponseDataItemSpecOneFieldMappingOneContextRegExp - ) - .optional() - .describe("Binding for the canonical 'context' evaluator field."), - reference: zod - .string() - .min(1) - .regex( - evaluationListMetricJobsResponseDataItemSpecOneFieldMappingOneReferenceRegExp - ) - .optional() - .describe("Binding for the canonical 'reference' evaluator field."), - trajectory: zod - .string() - .min(1) - .regex( - evaluationListMetricJobsResponseDataItemSpecOneFieldMappingOneTrajectoryRegExp - ) - .optional() - .describe("Binding for the canonical 'trajectory' evaluator field."), - messages: zod - .string() - .min(1) - .regex( - evaluationListMetricJobsResponseDataItemSpecOneFieldMappingOneMessagesRegExp - ) - .optional() - .describe("Binding for the canonical 'messages' evaluator field."), - tool_calls: zod - .string() - .min(1) - .regex( - evaluationListMetricJobsResponseDataItemSpecOneFieldMappingOneToolCallsRegExp - ) - .optional() - .describe("Binding for the canonical 'tool_calls' evaluator field."), - tools: zod - .string() - .min(1) - .regex(evaluationListMetricJobsResponseDataItemSpecOneFieldMappingOneToolsRegExp) - .optional() - .describe("Binding for the canonical 'tools' evaluator field."), - custom: zod - .record( - zod.string(), - zod - .string() - .min(1) - .regex( - evaluationListMetricJobsResponseDataItemSpecOneFieldMappingOneCustomRegExpOne - ) - ) - .optional() - .describe('Additional evaluator field bindings keyed by canonical field name.'), - }) - .describe( - "Maps canonical evaluator fields to raw dataset column paths.\nExample: {'input': 'question', 'output': 'answer', 'reference': 'gold', 'trajectory': 'steps'}" - ) - .optional() - .describe( - "Maps canonical evaluator fields such as 'input' and 'output' to dataset column paths for this job." - ), - dataset: zod - .union([ - zod - .object({ - rows: zod - .array(zod.record(zod.string(), zod.unknown())) - .min(1) - .describe( - 'Array of data rows. Each row can be any valid JSON value (object, string, array, etc.).' - ), - }) - .describe( - 'Inline dataset definition with embedded rows.\n\nUse this for quick evaluations without persisting the dataset first.' - ), - zod - .string() - .describe( - "Reference to a Fileset in the Files API.\n\nA reference is a string with format 'workspace\/fileset-name' that points to a\npersisted fileset entity. When used as a dataset source, all files within the\nfileset will be downloaded to the job container.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform." - ), - zod - .object({ - path: zod - .string() - .min(1) - .optional() - .describe('The relative path to file\/directory in the storage.'), - storage: zod - .union([ - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationListMetricJobsResponseDataItemSpecOneDatasetThreeStorageOneReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('ngc') - .default( - evaluationListMetricJobsResponseDataItemSpecOneDatasetThreeStorageOneTypeDefault - ), - org: zod.string().describe('NGC organization name'), - team: zod.string().describe('NGC team name'), - target: zod.string().describe('NGC asset name (model or resource)'), - target_type: zod - .enum(['resource', 'model']) - .default( - evaluationListMetricJobsResponseDataItemSpecOneDatasetThreeStorageOneTargetTypeDefault - ) - .describe("Type of NGC asset: 'resource' or 'model'"), - version: zod - .string() - .optional() - .describe( - 'NGC asset version. If not provided, defaults to latest version' - ), - original_version: zod - .string() - .optional() - .describe( - "The original version requested by the user before resolution (e.g., 'latest' or None). The 'version' field contains the resolved version ID." - ), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecOneDatasetThreeStorageOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .describe('NGC API key secret name'), - host: zod - .string() - .default( - evaluationListMetricJobsResponseDataItemSpecOneDatasetThreeStorageOneHostDefault - ) - .describe('NGC API host URL'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationListMetricJobsResponseDataItemSpecOneDatasetThreeStorageTwoReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('huggingface') - .default( - evaluationListMetricJobsResponseDataItemSpecOneDatasetThreeStorageTwoTypeDefault - ), - repo_id: zod - .string() - .describe("Huggingface repository ID (e.g., 'meta-llama\/Llama-2-7b')"), - repo_type: zod - .enum(['model', 'dataset', 'space']) - .default( - evaluationListMetricJobsResponseDataItemSpecOneDatasetThreeStorageTwoRepoTypeDefault - ) - .describe( - "Type of Huggingface repository: 'model', 'dataset', or 'space'" - ), - revision: zod - .string() - .default( - evaluationListMetricJobsResponseDataItemSpecOneDatasetThreeStorageTwoRevisionDefault - ) - .describe("Branch, tag, or commit SHA. Defaults to 'main'"), - original_revision: zod - .string() - .optional() - .describe( - "The original revision requested by the user before resolution (e.g., 'main'). The 'revision' field contains the resolved commit SHA." - ), - token_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecOneDatasetThreeStorageTwoTokenSecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Huggingface API `token` secret name for private repositories' - ), - endpoint: zod - .string() - .default( - evaluationListMetricJobsResponseDataItemSpecOneDatasetThreeStorageTwoEndpointDefault - ) - .describe( - 'Huggingface Hub endpoint URL. Use for self-hosted instances.' - ), - }), - ]) - .describe('The storage configuration for the fileset.'), - metadata: zod - .object({ - dataset: zod - .object({ - schema: zod - .union([zod.record(zod.string(), zod.unknown()), zod.string()]) - .optional() - .describe( - 'Default row schema for files in this fileset, either inline JSON Schema or a schema_defs key.' - ), - schema_defs: zod - .record(zod.string(), zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'Reusable JSON Schema definitions keyed by name for deduplicating per-file dataset schemas.' - ), - schemas_by_path: zod - .record( - zod.string(), - zod.union([zod.record(zod.string(), zod.unknown()), zod.string()]) - ) - .optional() - .describe( - 'Optional per-file row schemas keyed by relative path within the fileset. Each value may be inline JSON Schema or a schema_defs key.' - ), - }) - .optional() - .describe('Content for dataset-type filesets.'), - model: zod - .object({ - tool_calling: zod - .object({ - chat_template: zod - .string() - .optional() - .describe('Jinja2 chat template for the model.'), - tool_call_parser: zod - .string() - .optional() - .describe( - "Name of the tool call parser (e.g., 'openai', 'hermes', 'pythonic', 'llama3_json', 'mistral')." - ), - tool_call_plugin: zod - .string() - .optional() - .describe( - "Reference to a fileset containing a custom tool call plugin Python file. Expected format: '{workspace}\/{fileset_name}'." - ), - auto_tool_choice: zod - .boolean() - .optional() - .describe('Whether to enable automatic tool choice.'), - }) - .optional() - .describe( - 'Content for tool-calling configuration on model filesets.\n\nStores chat template and tool calling settings that are merged into\nthe ModelSpec during checkpoint analysis.' - ), - }) - .optional() - .describe( - 'Content for model-type filesets.\n\nContains tool calling configuration that is merged into the ModelSpec\nduring checkpoint analysis.' - ), - }) - .describe( - 'Tagged metadata container - the key indicates the type.\n\nExample:\n metadata = FilesetMetadata(\n dataset=DatasetMetadataContent(\n schema={\"columns\": [\"id\", \"name\"]},\n )\n )' - ) - .optional() - .describe('Purpose-specific metadata for the fileset.'), - custom_fields: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Custom fields for the fileset.'), - }) - .describe('Fileset definition for use without persisting to the Files API.'), - ]) - .describe( - 'The dataset to evaluate which may represent generated outputs from a model.' - ), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default( - evaluationListMetricJobsResponseDataItemSpecOneParamsOneParallelismDefault - ) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - }) - .describe('Job parameters.') - .optional() - .describe('Execution parameters for the metric job.'), - }) - .describe('An offline metric job.'), - zod - .object({ - metric: zod - .union([ - zod - .string() - .regex(evaluationListMetricJobsResponseDataItemSpecTwoMetricOneRegExp) - .describe( - "Reference to a metric in the Metrics API.\n\nA reference is a string with format 'workspace\/metric-name' that points to a\npersisted metric entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ), - zod.union([ - zod - .object({ - type: zod - .literal('llm-judge') - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The model configuration.'), - scores: zod - .array( - zod.union([ - zod - .object({ - name: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneScoresItemOneNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneScoresItemOneParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneScoresItemOneParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneScoresItemOneParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - rubric: zod - .array( - zod.object({ - label: zod - .string() - .describe( - 'The label to use for the level of the rubric grading criteria. (e.g., \"helpful\", \"not_helpful\", \"positive\")' - ), - description: zod - .string() - .optional() - .describe( - 'Describe the semantic meaning of each criteria for the given rubric. If no judge template is set, the input description for labels are included in the generated judge prompt.' - ), - value: zod - .union([zod.number(), zod.number()]) - .describe( - 'The score value to assign for the criteria used for aggregation and ranking.' - ), - }) - ) - .min( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneScoresItemOneRubricMin - ) - .describe('The rubric for the score.'), - }) - .describe( - 'Score definition for a rubric with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - zod - .object({ - name: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneScoresItemTwoNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneScoresItemTwoParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneScoresItemTwoParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneScoresItemTwoParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .describe( - 'Minimum value for the score range. Must be less than maximum.' - ), - maximum: zod - .union([zod.number(), zod.number()]) - .describe( - 'Maximum value for the score range. Must be greater than minimum.' - ), - }) - .describe( - 'Score definition for a range of values with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - ]) - ) - .min(1) - .describe( - "Definitions of scores that will be extracted from the judge's output." - ), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .optional() - .describe( - 'The prompt template for the judge. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{sample.output_text}} to use the model output within the template or {{item.xxx}} to reference input columns from the dataset.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - "Prompt template fields that should remain in the inferred input schema but not be required. Use this for fields like 'reference' when the metric can still run without them." - ), - structured_output: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'JSON schema to apply structured output for the judge model evaluation. Structured output is derived from scores when omitted. Use this option if there are custom requirements for the output of the judge.' - ), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge model.'), - system_prompt: zod - .string() - .optional() - .describe( - "Initial instructions that define the judge model's role and behavior for the conversation. This is prepended to the messages as a system message." - ), - reasoning: zod - .object({ - end_token: zod - .string() - .optional() - .describe( - "Configure the end token to trim reasoning context based on the model's reasoning API. Example for Nemotron models: '<\/think>'" - ), - include_if_not_finished: zod - .boolean() - .optional() - .describe( - 'Configure whether to include reasoning context if the model has not finished reasoning.' - ), - effort: zod - .string() - .optional() - .describe( - 'Option for OpenAI models to specify low, medium, or high reasoning effort.' - ), - }) - .describe("Custom settings that control the model's reasoning behavior.") - .optional() - .describe( - "Custom settings that control the judge model's reasoning behavior. For reasoning models (e.g., Nemotron), use `end_token` to strip reasoning traces from the output." - ), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - }) - .describe('Request type for creating LLM Judge metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoTwoJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoTwoJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoTwoJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoTwoInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoTwoInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoTwoInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoTwoInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoTwoIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('topic_adherence') - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoTwoTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - metric_mode: zod - .enum(['f1', 'precision', 'recall']) - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoTwoMetricModeDefault - ) - .describe('The mode for computing topic adherence score.'), - }) - .describe('Request type for TopicAdherence metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoThreeJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoThreeJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoThreeJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoThreeInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoThreeInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoThreeInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoThreeInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoThreeIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('agent_goal_accuracy') - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoThreeTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - use_reference: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoThreeUseReferenceDefault - ) - .describe('Whether to use reference for goal accuracy evaluation.'), - }) - .describe('Request type for AgentGoalAccuracy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFourJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFourJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFourJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFourInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFourInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFourInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFourInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFourIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('answer_accuracy') - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFourTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for AnswerAccuracy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFiveJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFiveJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFiveJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFiveInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFiveInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFiveInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFiveInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFiveIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_relevance') - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoFiveTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextRelevance metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSixJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSixJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSixJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSixInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSixInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSixInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSixInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSixIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_groundedness') - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSixTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ResponseGroundedness metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSevenJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSevenJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSevenJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSevenInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSevenInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSevenInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSevenInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSevenIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_recall') - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoSevenTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextRecall metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoEightJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoEightJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoEightJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoEightInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoEightInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoEightInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoEightInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoEightIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_precision') - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoEightTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextPrecision metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoNineJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoNineJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoNineJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoNineInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoNineInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoNineInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoNineInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoNineIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_entity_recall') - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoNineTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextEntityRecall metrics.'), - zod - .object({ - embeddings_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnezeroEmbeddingsModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnezeroEmbeddingsModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnezeroEmbeddingsModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The embeddings model configuration.'), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnezeroJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnezeroJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnezeroJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnezeroInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnezeroInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnezeroInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnezeroInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnezeroIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_relevancy') - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnezeroTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - strictness: zod - .number() - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnezeroStrictnessDefault - ) - .describe( - 'Number of parallel questions generated. NIM can only generate 1.' - ), - }) - .describe('Request type for ResponseRelevancy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneoneJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneoneJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneoneJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneoneInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneoneInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneoneInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneoneInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneoneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('faithfulness') - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneoneTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for Faithfulness metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnetwoJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnetwoJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnetwoJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnetwoInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnetwoInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnetwoInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnetwoInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnetwoIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('noise_sensitivity') - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnetwoTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for NoiseSensitivity metrics.'), - zod - .object({ - type: zod - .literal('tool_call_accuracy') - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnethreeTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ToolCallAccuracy metrics (no judge required).'), - zod - .object({ - type: zod - .literal('bleu') - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnefourTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - references: zod - .array(zod.string()) - .describe( - 'The templates for the ground truth references to calculate BLEU metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to calculate BLEU metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for BLEUMetric.'), - zod - .object({ - type: zod - .literal('exact-match') - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnefiveTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the exact match metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the exact match metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for ExactMatchMetric.'), - zod - .object({ - type: zod - .literal('f1') - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnesixTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the F1 metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the F1 metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for F1Metric.'), - zod - .object({ - type: zod - .literal('number-check') - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnesevenTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - '>=', - 'gte', - 'greater than or equal', - '>', - 'gt', - 'greater than', - '<=', - 'lte', - 'less than or equal', - '<', - 'lt', - 'less than', - 'absolute difference', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - epsilon: zod - .union([zod.number(), zod.number()]) - .optional() - .describe('Specify the tolerance for the absolute difference of values.'), - }) - .describe( - 'Request type for NumberCheckMetric. Numeric-comparison metric with template-driven operands.' - ), - zod - .object({ - type: zod - .literal('remote') - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneeightTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneeightApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneeightTimeoutSecondsDefault - ) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneeightMaxRetriesDefault - ) - .describe('Maximum number of retry attempts.'), - body: zod - .record(zod.string(), zod.unknown()) - .describe('Jinja template for request payload'), - scores: zod - .array( - zod - .object({ - name: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneeightScoresItemNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .object({ - type: zod - .literal('json') - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOneeightScoresItemParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.') - .optional() - .describe( - 'The method to parse the score. Only JSON parsing is supported for remote metrics.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe( - 'Minimum value for the score range. Defaults to None (no lower bound).' - ), - maximum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe( - 'Maximum value for the score range. Defaults to None (no upper bound).' - ), - }) - .describe( - 'Score configuration for remote metrics.\n\nUnlike RangeScore, minimum and maximum are optional (default to None = no bounds).\nThis avoids JSON serialization issues with infinity values.' - ) - ) - .describe('List of scores to extract from the remote response'), - }) - .describe( - 'Request type for RemoteMetric. A metric that computes scores via a remote endpoint.' - ), - zod - .object({ - type: zod - .literal('nemo-agent-toolkit-remote') - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnenineTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnenineApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnenineTimeoutSecondsDefault - ) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoOnenineMaxRetriesDefault - ) - .describe('Maximum number of retry attempts.'), - evaluator_name: zod - .string() - .describe('The name of the evaluator (also used as the score name).'), - }) - .describe( - 'Request type for NemoAgentToolkitRemoteMetric. A remote metric that interfaces with NeMo Agent Toolkit evaluators.' - ), - zod - .object({ - type: zod - .literal('rouge') - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoTwozeroTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to evaluate the ROUGE metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the ROUGE metric on. If not provided, the output text from the model is used.' - ), - }) - .describe( - 'Request type for ROUGEMetric. ROUGE metric for overlap-based summarization quality scoring.' - ), - zod - .object({ - type: zod - .literal('string-check') - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoTwooneTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - 'contains', - 'not contains', - 'startswith', - 'endswith', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - }) - .describe( - 'Request type for StringCheckMetric. String-comparison metric with operator-based checks.' - ), - zod - .object({ - type: zod - .literal('tool-calling') - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricTwoTwotwoTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to evaluate tool calling accuracy.' - ), - }) - .describe( - 'Request type for ToolCallingMetric. Tool-calling accuracy metric for structured function calls.' - ), - ]), - zod - .object({ - type: zod - .enum(['system', 'system-retriever']) - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricThreeTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline', 'retriever'])) - .default([`online`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - name: zod - .string() - .default( - evaluationListMetricJobsResponseDataItemSpecTwoMetricThreeNameDefault - ), - required_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod - .string() - .optional() - .describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe( - 'List of required parameters for running an evaluation with the metric.' - ), - optional_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod - .string() - .optional() - .describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe( - 'List of optional parameters for running an evaluation with the metric.' - ), - }) - .describe('Metric entity for system metric that have pre-defined dataset.'), - ]) - .describe('The metric for evaluation.'), - metric_params: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Additional parameters for the metric. Required for system metrics, optional overrides for custom metrics.' - ), - field_mapping: zod - .object({ - input: zod - .string() - .min(1) - .regex(evaluationListMetricJobsResponseDataItemSpecTwoFieldMappingOneInputRegExp) - .optional() - .describe("Binding for the canonical 'input' evaluator field."), - output: zod - .string() - .min(1) - .regex(evaluationListMetricJobsResponseDataItemSpecTwoFieldMappingOneOutputRegExp) - .optional() - .describe("Binding for the canonical 'output' evaluator field."), - context: zod - .string() - .min(1) - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoFieldMappingOneContextRegExp - ) - .optional() - .describe("Binding for the canonical 'context' evaluator field."), - reference: zod - .string() - .min(1) - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoFieldMappingOneReferenceRegExp - ) - .optional() - .describe("Binding for the canonical 'reference' evaluator field."), - trajectory: zod - .string() - .min(1) - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoFieldMappingOneTrajectoryRegExp - ) - .optional() - .describe("Binding for the canonical 'trajectory' evaluator field."), - messages: zod - .string() - .min(1) - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoFieldMappingOneMessagesRegExp - ) - .optional() - .describe("Binding for the canonical 'messages' evaluator field."), - tool_calls: zod - .string() - .min(1) - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoFieldMappingOneToolCallsRegExp - ) - .optional() - .describe("Binding for the canonical 'tool_calls' evaluator field."), - tools: zod - .string() - .min(1) - .regex(evaluationListMetricJobsResponseDataItemSpecTwoFieldMappingOneToolsRegExp) - .optional() - .describe("Binding for the canonical 'tools' evaluator field."), - custom: zod - .record( - zod.string(), - zod - .string() - .min(1) - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoFieldMappingOneCustomRegExpOne - ) - ) - .optional() - .describe('Additional evaluator field bindings keyed by canonical field name.'), - }) - .describe( - "Maps canonical evaluator fields to raw dataset column paths.\nExample: {'input': 'question', 'output': 'answer', 'reference': 'gold', 'trajectory': 'steps'}" - ) - .optional() - .describe( - "Maps canonical evaluator fields such as 'input' and 'output' to dataset column paths for this job." - ), - model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationListMetricJobsResponseDataItemSpecTwoModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationListMetricJobsResponseDataItemSpecTwoModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The model configuration.'), - dataset: zod - .union([ - zod - .object({ - rows: zod - .array(zod.record(zod.string(), zod.unknown())) - .min(1) - .describe( - 'Array of data rows. Each row can be any valid JSON value (object, string, array, etc.).' - ), - }) - .describe( - 'Inline dataset definition with embedded rows.\n\nUse this for quick evaluations without persisting the dataset first.' - ), - zod - .string() - .describe( - "Reference to a Fileset in the Files API.\n\nA reference is a string with format 'workspace\/fileset-name' that points to a\npersisted fileset entity. When used as a dataset source, all files within the\nfileset will be downloaded to the job container.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform." - ), - zod - .object({ - path: zod - .string() - .min(1) - .optional() - .describe('The relative path to file\/directory in the storage.'), - storage: zod - .union([ - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationListMetricJobsResponseDataItemSpecTwoDatasetThreeStorageOneReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('ngc') - .default( - evaluationListMetricJobsResponseDataItemSpecTwoDatasetThreeStorageOneTypeDefault - ), - org: zod.string().describe('NGC organization name'), - team: zod.string().describe('NGC team name'), - target: zod.string().describe('NGC asset name (model or resource)'), - target_type: zod - .enum(['resource', 'model']) - .default( - evaluationListMetricJobsResponseDataItemSpecTwoDatasetThreeStorageOneTargetTypeDefault - ) - .describe("Type of NGC asset: 'resource' or 'model'"), - version: zod - .string() - .optional() - .describe( - 'NGC asset version. If not provided, defaults to latest version' - ), - original_version: zod - .string() - .optional() - .describe( - "The original version requested by the user before resolution (e.g., 'latest' or None). The 'version' field contains the resolved version ID." - ), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoDatasetThreeStorageOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .describe('NGC API key secret name'), - host: zod - .string() - .default( - evaluationListMetricJobsResponseDataItemSpecTwoDatasetThreeStorageOneHostDefault - ) - .describe('NGC API host URL'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationListMetricJobsResponseDataItemSpecTwoDatasetThreeStorageTwoReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('huggingface') - .default( - evaluationListMetricJobsResponseDataItemSpecTwoDatasetThreeStorageTwoTypeDefault - ), - repo_id: zod - .string() - .describe("Huggingface repository ID (e.g., 'meta-llama\/Llama-2-7b')"), - repo_type: zod - .enum(['model', 'dataset', 'space']) - .default( - evaluationListMetricJobsResponseDataItemSpecTwoDatasetThreeStorageTwoRepoTypeDefault - ) - .describe( - "Type of Huggingface repository: 'model', 'dataset', or 'space'" - ), - revision: zod - .string() - .default( - evaluationListMetricJobsResponseDataItemSpecTwoDatasetThreeStorageTwoRevisionDefault - ) - .describe("Branch, tag, or commit SHA. Defaults to 'main'"), - original_revision: zod - .string() - .optional() - .describe( - "The original revision requested by the user before resolution (e.g., 'main'). The 'revision' field contains the resolved commit SHA." - ), - token_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecTwoDatasetThreeStorageTwoTokenSecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Huggingface API `token` secret name for private repositories' - ), - endpoint: zod - .string() - .default( - evaluationListMetricJobsResponseDataItemSpecTwoDatasetThreeStorageTwoEndpointDefault - ) - .describe( - 'Huggingface Hub endpoint URL. Use for self-hosted instances.' - ), - }), - ]) - .describe('The storage configuration for the fileset.'), - metadata: zod - .object({ - dataset: zod - .object({ - schema: zod - .union([zod.record(zod.string(), zod.unknown()), zod.string()]) - .optional() - .describe( - 'Default row schema for files in this fileset, either inline JSON Schema or a schema_defs key.' - ), - schema_defs: zod - .record(zod.string(), zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'Reusable JSON Schema definitions keyed by name for deduplicating per-file dataset schemas.' - ), - schemas_by_path: zod - .record( - zod.string(), - zod.union([zod.record(zod.string(), zod.unknown()), zod.string()]) - ) - .optional() - .describe( - 'Optional per-file row schemas keyed by relative path within the fileset. Each value may be inline JSON Schema or a schema_defs key.' - ), - }) - .optional() - .describe('Content for dataset-type filesets.'), - model: zod - .object({ - tool_calling: zod - .object({ - chat_template: zod - .string() - .optional() - .describe('Jinja2 chat template for the model.'), - tool_call_parser: zod - .string() - .optional() - .describe( - "Name of the tool call parser (e.g., 'openai', 'hermes', 'pythonic', 'llama3_json', 'mistral')." - ), - tool_call_plugin: zod - .string() - .optional() - .describe( - "Reference to a fileset containing a custom tool call plugin Python file. Expected format: '{workspace}\/{fileset_name}'." - ), - auto_tool_choice: zod - .boolean() - .optional() - .describe('Whether to enable automatic tool choice.'), - }) - .optional() - .describe( - 'Content for tool-calling configuration on model filesets.\n\nStores chat template and tool calling settings that are merged into\nthe ModelSpec during checkpoint analysis.' - ), - }) - .optional() - .describe( - 'Content for model-type filesets.\n\nContains tool calling configuration that is merged into the ModelSpec\nduring checkpoint analysis.' - ), - }) - .describe( - 'Tagged metadata container - the key indicates the type.\n\nExample:\n metadata = FilesetMetadata(\n dataset=DatasetMetadataContent(\n schema={\"columns\": [\"id\", \"name\"]},\n )\n )' - ) - .optional() - .describe('Purpose-specific metadata for the fileset.'), - custom_fields: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Custom fields for the fileset.'), - }) - .describe('Fileset definition for use without persisting to the Files API.'), - ]) - .describe('The dataset to use for model prompts and evaluation.'), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default( - evaluationListMetricJobsResponseDataItemSpecTwoParamsOneParallelismDefault - ) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecTwoParamsOneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - request_timeout: zod - .number() - .optional() - .describe('The timeout to be used for requests made to the model.'), - max_retries: zod - .number() - .min(evaluationListMetricJobsResponseDataItemSpecTwoParamsOneMaxRetriesMin) - .default( - evaluationListMetricJobsResponseDataItemSpecTwoParamsOneMaxRetriesDefault - ) - .describe('Maximum number of retries for failed requests.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecTwoParamsOneInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecTwoParamsOneInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecTwoParamsOneInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecTwoParamsOneInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe("Custom settings that control the model's text generation behavior."), - system_prompt: zod - .string() - .optional() - .describe( - "Initial instructions that define the model's role and behavior for the conversation." - ), - reasoning: zod - .object({ - end_token: zod - .string() - .optional() - .describe( - "Configure the end token to trim reasoning context based on the model's reasoning API. Example for Nemotron models: '<\/think>'" - ), - include_if_not_finished: zod - .boolean() - .optional() - .describe( - 'Configure whether to include reasoning context if the model has not finished reasoning.' - ), - effort: zod - .string() - .optional() - .describe( - 'Option for OpenAI models to specify low, medium, or high reasoning effort.' - ), - }) - .describe("Custom settings that control the model's reasoning behavior.") - .optional() - .describe("Custom settings that control the model's reasoning behavior."), - structured_output: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('JSON schema to apply structured output for the model.'), - }) - .describe('Job parameters for model online evaluation.') - .optional() - .describe('Execution parameters for the metric job.'), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .describe( - 'The jinja template to prompt the model for evaluation. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{input}}, {{output}}, {{context}}, {{reference}} to reference input columns.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - 'Prompt template fields that should remain available to the prompt template but not be required by dataset schema validation.' - ), - }) - .describe('A online metric job.'), - zod - .object({ - metric: zod - .union([ - zod - .string() - .regex(evaluationListMetricJobsResponseDataItemSpecThreeMetricOneRegExp) - .describe( - "Reference to a metric in the Metrics API.\n\nA reference is a string with format 'workspace\/metric-name' that points to a\npersisted metric entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ), - zod.union([ - zod - .object({ - type: zod - .literal('llm-judge') - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The model configuration.'), - scores: zod - .array( - zod.union([ - zod - .object({ - name: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneScoresItemOneNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneScoresItemOneParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneScoresItemOneParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneScoresItemOneParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - rubric: zod - .array( - zod.object({ - label: zod - .string() - .describe( - 'The label to use for the level of the rubric grading criteria. (e.g., \"helpful\", \"not_helpful\", \"positive\")' - ), - description: zod - .string() - .optional() - .describe( - 'Describe the semantic meaning of each criteria for the given rubric. If no judge template is set, the input description for labels are included in the generated judge prompt.' - ), - value: zod - .union([zod.number(), zod.number()]) - .describe( - 'The score value to assign for the criteria used for aggregation and ranking.' - ), - }) - ) - .min( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneScoresItemOneRubricMin - ) - .describe('The rubric for the score.'), - }) - .describe( - 'Score definition for a rubric with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - zod - .object({ - name: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneScoresItemTwoNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneScoresItemTwoParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneScoresItemTwoParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneScoresItemTwoParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .describe( - 'Minimum value for the score range. Must be less than maximum.' - ), - maximum: zod - .union([zod.number(), zod.number()]) - .describe( - 'Maximum value for the score range. Must be greater than minimum.' - ), - }) - .describe( - 'Score definition for a range of values with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - ]) - ) - .min(1) - .describe( - "Definitions of scores that will be extracted from the judge's output." - ), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .optional() - .describe( - 'The prompt template for the judge. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{sample.output_text}} to use the model output within the template or {{item.xxx}} to reference input columns from the dataset.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - "Prompt template fields that should remain in the inferred input schema but not be required. Use this for fields like 'reference' when the metric can still run without them." - ), - structured_output: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'JSON schema to apply structured output for the judge model evaluation. Structured output is derived from scores when omitted. Use this option if there are custom requirements for the output of the judge.' - ), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge model.'), - system_prompt: zod - .string() - .optional() - .describe( - "Initial instructions that define the judge model's role and behavior for the conversation. This is prepended to the messages as a system message." - ), - reasoning: zod - .object({ - end_token: zod - .string() - .optional() - .describe( - "Configure the end token to trim reasoning context based on the model's reasoning API. Example for Nemotron models: '<\/think>'" - ), - include_if_not_finished: zod - .boolean() - .optional() - .describe( - 'Configure whether to include reasoning context if the model has not finished reasoning.' - ), - effort: zod - .string() - .optional() - .describe( - 'Option for OpenAI models to specify low, medium, or high reasoning effort.' - ), - }) - .describe("Custom settings that control the model's reasoning behavior.") - .optional() - .describe( - "Custom settings that control the judge model's reasoning behavior. For reasoning models (e.g., Nemotron), use `end_token` to strip reasoning traces from the output." - ), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - }) - .describe('Request type for creating LLM Judge metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoTwoJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoTwoJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoTwoJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoTwoInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoTwoInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoTwoInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoTwoInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoTwoIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('topic_adherence') - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoTwoTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - metric_mode: zod - .enum(['f1', 'precision', 'recall']) - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoTwoMetricModeDefault - ) - .describe('The mode for computing topic adherence score.'), - }) - .describe('Request type for TopicAdherence metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoThreeJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoThreeJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoThreeJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoThreeInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoThreeInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoThreeInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoThreeInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoThreeIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('agent_goal_accuracy') - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoThreeTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - use_reference: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoThreeUseReferenceDefault - ) - .describe('Whether to use reference for goal accuracy evaluation.'), - }) - .describe('Request type for AgentGoalAccuracy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFourJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFourJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFourJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFourInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFourInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFourInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFourInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFourIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('answer_accuracy') - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFourTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for AnswerAccuracy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFiveJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFiveJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFiveJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFiveInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFiveInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFiveInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFiveInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFiveIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_relevance') - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoFiveTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextRelevance metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSixJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSixJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSixJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSixInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSixInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSixInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSixInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSixIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_groundedness') - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSixTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ResponseGroundedness metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSevenJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSevenJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSevenJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSevenInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSevenInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSevenInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSevenInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSevenIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_recall') - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoSevenTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextRecall metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoEightJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoEightJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoEightJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoEightInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoEightInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoEightInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoEightInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoEightIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_precision') - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoEightTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextPrecision metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoNineJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoNineJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoNineJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoNineInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoNineInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoNineInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoNineInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoNineIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_entity_recall') - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoNineTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextEntityRecall metrics.'), - zod - .object({ - embeddings_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnezeroEmbeddingsModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnezeroEmbeddingsModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnezeroEmbeddingsModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The embeddings model configuration.'), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnezeroJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnezeroJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnezeroJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnezeroInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnezeroInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnezeroInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnezeroInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnezeroIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_relevancy') - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnezeroTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - strictness: zod - .number() - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnezeroStrictnessDefault - ) - .describe( - 'Number of parallel questions generated. NIM can only generate 1.' - ), - }) - .describe('Request type for ResponseRelevancy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneoneJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneoneJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneoneJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneoneInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneoneInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneoneInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneoneInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneoneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('faithfulness') - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneoneTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for Faithfulness metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnetwoJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnetwoJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe( - 'Model definition for use without persisting to the Models API.' - ), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnetwoJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnetwoInferenceOneTemperatureMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnetwoInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnetwoInferenceOneTopPMin - ) - .max( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnetwoInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnetwoIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('noise_sensitivity') - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnetwoTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for NoiseSensitivity metrics.'), - zod - .object({ - type: zod - .literal('tool_call_accuracy') - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnethreeTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ToolCallAccuracy metrics (no judge required).'), - zod - .object({ - type: zod - .literal('bleu') - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnefourTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - references: zod - .array(zod.string()) - .describe( - 'The templates for the ground truth references to calculate BLEU metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to calculate BLEU metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for BLEUMetric.'), - zod - .object({ - type: zod - .literal('exact-match') - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnefiveTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the exact match metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the exact match metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for ExactMatchMetric.'), - zod - .object({ - type: zod - .literal('f1') - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnesixTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the F1 metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the F1 metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for F1Metric.'), - zod - .object({ - type: zod - .literal('number-check') - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnesevenTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - '>=', - 'gte', - 'greater than or equal', - '>', - 'gt', - 'greater than', - '<=', - 'lte', - 'less than or equal', - '<', - 'lt', - 'less than', - 'absolute difference', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - epsilon: zod - .union([zod.number(), zod.number()]) - .optional() - .describe('Specify the tolerance for the absolute difference of values.'), - }) - .describe( - 'Request type for NumberCheckMetric. Numeric-comparison metric with template-driven operands.' - ), - zod - .object({ - type: zod - .literal('remote') - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneeightTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneeightApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneeightTimeoutSecondsDefault - ) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneeightMaxRetriesDefault - ) - .describe('Maximum number of retry attempts.'), - body: zod - .record(zod.string(), zod.unknown()) - .describe('Jinja template for request payload'), - scores: zod - .array( - zod - .object({ - name: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneeightScoresItemNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .object({ - type: zod - .literal('json') - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOneeightScoresItemParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.') - .optional() - .describe( - 'The method to parse the score. Only JSON parsing is supported for remote metrics.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe( - 'Minimum value for the score range. Defaults to None (no lower bound).' - ), - maximum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe( - 'Maximum value for the score range. Defaults to None (no upper bound).' - ), - }) - .describe( - 'Score configuration for remote metrics.\n\nUnlike RangeScore, minimum and maximum are optional (default to None = no bounds).\nThis avoids JSON serialization issues with infinity values.' - ) - ) - .describe('List of scores to extract from the remote response'), - }) - .describe( - 'Request type for RemoteMetric. A metric that computes scores via a remote endpoint.' - ), - zod - .object({ - type: zod - .literal('nemo-agent-toolkit-remote') - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnenineTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnenineApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnenineTimeoutSecondsDefault - ) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoOnenineMaxRetriesDefault - ) - .describe('Maximum number of retry attempts.'), - evaluator_name: zod - .string() - .describe('The name of the evaluator (also used as the score name).'), - }) - .describe( - 'Request type for NemoAgentToolkitRemoteMetric. A remote metric that interfaces with NeMo Agent Toolkit evaluators.' - ), - zod - .object({ - type: zod - .literal('rouge') - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoTwozeroTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to evaluate the ROUGE metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the ROUGE metric on. If not provided, the output text from the model is used.' - ), - }) - .describe( - 'Request type for ROUGEMetric. ROUGE metric for overlap-based summarization quality scoring.' - ), - zod - .object({ - type: zod - .literal('string-check') - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoTwooneTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - 'contains', - 'not contains', - 'startswith', - 'endswith', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - }) - .describe( - 'Request type for StringCheckMetric. String-comparison metric with operator-based checks.' - ), - zod - .object({ - type: zod - .literal('tool-calling') - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricTwoTwotwoTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to evaluate tool calling accuracy.' - ), - }) - .describe( - 'Request type for ToolCallingMetric. Tool-calling accuracy metric for structured function calls.' - ), - ]), - zod - .object({ - type: zod - .enum(['system', 'system-retriever']) - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricThreeTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline', 'retriever'])) - .default([`online`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - name: zod - .string() - .default( - evaluationListMetricJobsResponseDataItemSpecThreeMetricThreeNameDefault - ), - required_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod - .string() - .optional() - .describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe( - 'List of required parameters for running an evaluation with the metric.' - ), - optional_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod - .string() - .optional() - .describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe( - 'List of optional parameters for running an evaluation with the metric.' - ), - }) - .describe('Metric entity for system metric that have pre-defined dataset.'), - ]) - .describe('The metric for evaluation.'), - metric_params: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Additional parameters for the metric. Required for system metrics, optional overrides for custom metrics.' - ), - field_mapping: zod - .object({ - input: zod - .string() - .min(1) - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeFieldMappingOneInputRegExp - ) - .optional() - .describe("Binding for the canonical 'input' evaluator field."), - output: zod - .string() - .min(1) - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeFieldMappingOneOutputRegExp - ) - .optional() - .describe("Binding for the canonical 'output' evaluator field."), - context: zod - .string() - .min(1) - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeFieldMappingOneContextRegExp - ) - .optional() - .describe("Binding for the canonical 'context' evaluator field."), - reference: zod - .string() - .min(1) - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeFieldMappingOneReferenceRegExp - ) - .optional() - .describe("Binding for the canonical 'reference' evaluator field."), - trajectory: zod - .string() - .min(1) - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeFieldMappingOneTrajectoryRegExp - ) - .optional() - .describe("Binding for the canonical 'trajectory' evaluator field."), - messages: zod - .string() - .min(1) - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeFieldMappingOneMessagesRegExp - ) - .optional() - .describe("Binding for the canonical 'messages' evaluator field."), - tool_calls: zod - .string() - .min(1) - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeFieldMappingOneToolCallsRegExp - ) - .optional() - .describe("Binding for the canonical 'tool_calls' evaluator field."), - tools: zod - .string() - .min(1) - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeFieldMappingOneToolsRegExp - ) - .optional() - .describe("Binding for the canonical 'tools' evaluator field."), - custom: zod - .record( - zod.string(), - zod - .string() - .min(1) - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeFieldMappingOneCustomRegExpOne - ) - ) - .optional() - .describe('Additional evaluator field bindings keyed by canonical field name.'), - }) - .describe( - "Maps canonical evaluator fields to raw dataset column paths.\nExample: {'input': 'question', 'output': 'answer', 'reference': 'gold', 'trajectory': 'steps'}" - ) - .optional() - .describe( - "Maps canonical evaluator fields such as 'input' and 'output' to dataset column paths for this job." - ), - agent: zod - .object({ - url: zod.string().describe('Base URL of the agent endpoint.'), - name: zod.string().describe('Agent name \/ identifier.'), - format: zod - .enum(['generic', 'nemo_agent_toolkit']) - .default(evaluationListMetricJobsResponseDataItemSpecThreeAgentOneFormatDefault) - .describe('Agent format that determines the execution path.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeAgentOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the agent. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - body: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Jinja template for the request payload. Required for generic agents.'), - response_path: zod - .string() - .optional() - .describe( - "JSONPath expression to extract the response text from the agent's response body. Required for generic agents." - ), - trajectory_path: zod - .string() - .optional() - .describe( - "JSONPath expression to extract the trajectory from the agent's response body. Optional." - ), - }) - .describe( - 'Agent definition for inference in online evaluation jobs.\n\nAn agent is an endpoint that accepts a request and returns a response,\npotentially with a trajectory. Two formats are supported:\n\n- ``generic``: configurable HTTP POST with Jinja-templated body and\n JSONPath extraction for response and trajectory.\n- ``nemo_agent_toolkit``: NeMo Agent Toolkit SSE streaming protocol\n (``\/generate\/full?filter_steps=none``).' - ) - .describe('The agent to evaluate.'), - dataset: zod - .union([ - zod - .object({ - rows: zod - .array(zod.record(zod.string(), zod.unknown())) - .min(1) - .describe( - 'Array of data rows. Each row can be any valid JSON value (object, string, array, etc.).' - ), - }) - .describe( - 'Inline dataset definition with embedded rows.\n\nUse this for quick evaluations without persisting the dataset first.' - ), - zod - .string() - .describe( - "Reference to a Fileset in the Files API.\n\nA reference is a string with format 'workspace\/fileset-name' that points to a\npersisted fileset entity. When used as a dataset source, all files within the\nfileset will be downloaded to the job container.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform." - ), - zod - .object({ - path: zod - .string() - .min(1) - .optional() - .describe('The relative path to file\/directory in the storage.'), - storage: zod - .union([ - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationListMetricJobsResponseDataItemSpecThreeDatasetThreeStorageOneReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('ngc') - .default( - evaluationListMetricJobsResponseDataItemSpecThreeDatasetThreeStorageOneTypeDefault - ), - org: zod.string().describe('NGC organization name'), - team: zod.string().describe('NGC team name'), - target: zod.string().describe('NGC asset name (model or resource)'), - target_type: zod - .enum(['resource', 'model']) - .default( - evaluationListMetricJobsResponseDataItemSpecThreeDatasetThreeStorageOneTargetTypeDefault - ) - .describe("Type of NGC asset: 'resource' or 'model'"), - version: zod - .string() - .optional() - .describe( - 'NGC asset version. If not provided, defaults to latest version' - ), - original_version: zod - .string() - .optional() - .describe( - "The original version requested by the user before resolution (e.g., 'latest' or None). The 'version' field contains the resolved version ID." - ), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeDatasetThreeStorageOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .describe('NGC API key secret name'), - host: zod - .string() - .default( - evaluationListMetricJobsResponseDataItemSpecThreeDatasetThreeStorageOneHostDefault - ) - .describe('NGC API host URL'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationListMetricJobsResponseDataItemSpecThreeDatasetThreeStorageTwoReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('huggingface') - .default( - evaluationListMetricJobsResponseDataItemSpecThreeDatasetThreeStorageTwoTypeDefault - ), - repo_id: zod - .string() - .describe("Huggingface repository ID (e.g., 'meta-llama\/Llama-2-7b')"), - repo_type: zod - .enum(['model', 'dataset', 'space']) - .default( - evaluationListMetricJobsResponseDataItemSpecThreeDatasetThreeStorageTwoRepoTypeDefault - ) - .describe( - "Type of Huggingface repository: 'model', 'dataset', or 'space'" - ), - revision: zod - .string() - .default( - evaluationListMetricJobsResponseDataItemSpecThreeDatasetThreeStorageTwoRevisionDefault - ) - .describe("Branch, tag, or commit SHA. Defaults to 'main'"), - original_revision: zod - .string() - .optional() - .describe( - "The original revision requested by the user before resolution (e.g., 'main'). The 'revision' field contains the resolved commit SHA." - ), - token_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecThreeDatasetThreeStorageTwoTokenSecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Huggingface API `token` secret name for private repositories' - ), - endpoint: zod - .string() - .default( - evaluationListMetricJobsResponseDataItemSpecThreeDatasetThreeStorageTwoEndpointDefault - ) - .describe( - 'Huggingface Hub endpoint URL. Use for self-hosted instances.' - ), - }), - ]) - .describe('The storage configuration for the fileset.'), - metadata: zod - .object({ - dataset: zod - .object({ - schema: zod - .union([zod.record(zod.string(), zod.unknown()), zod.string()]) - .optional() - .describe( - 'Default row schema for files in this fileset, either inline JSON Schema or a schema_defs key.' - ), - schema_defs: zod - .record(zod.string(), zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'Reusable JSON Schema definitions keyed by name for deduplicating per-file dataset schemas.' - ), - schemas_by_path: zod - .record( - zod.string(), - zod.union([zod.record(zod.string(), zod.unknown()), zod.string()]) - ) - .optional() - .describe( - 'Optional per-file row schemas keyed by relative path within the fileset. Each value may be inline JSON Schema or a schema_defs key.' - ), - }) - .optional() - .describe('Content for dataset-type filesets.'), - model: zod - .object({ - tool_calling: zod - .object({ - chat_template: zod - .string() - .optional() - .describe('Jinja2 chat template for the model.'), - tool_call_parser: zod - .string() - .optional() - .describe( - "Name of the tool call parser (e.g., 'openai', 'hermes', 'pythonic', 'llama3_json', 'mistral')." - ), - tool_call_plugin: zod - .string() - .optional() - .describe( - "Reference to a fileset containing a custom tool call plugin Python file. Expected format: '{workspace}\/{fileset_name}'." - ), - auto_tool_choice: zod - .boolean() - .optional() - .describe('Whether to enable automatic tool choice.'), - }) - .optional() - .describe( - 'Content for tool-calling configuration on model filesets.\n\nStores chat template and tool calling settings that are merged into\nthe ModelSpec during checkpoint analysis.' - ), - }) - .optional() - .describe( - 'Content for model-type filesets.\n\nContains tool calling configuration that is merged into the ModelSpec\nduring checkpoint analysis.' - ), - }) - .describe( - 'Tagged metadata container - the key indicates the type.\n\nExample:\n metadata = FilesetMetadata(\n dataset=DatasetMetadataContent(\n schema={\"columns\": [\"id\", \"name\"]},\n )\n )' - ) - .optional() - .describe('Purpose-specific metadata for the fileset.'), - custom_fields: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Custom fields for the fileset.'), - }) - .describe('Fileset definition for use without persisting to the Files API.'), - ]) - .describe('The dataset to use for agent prompts and evaluation.'), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default( - evaluationListMetricJobsResponseDataItemSpecThreeParamsOneParallelismDefault - ) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecThreeParamsOneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - request_timeout: zod - .number() - .optional() - .describe('The timeout to be used for requests made to the model.'), - max_retries: zod - .number() - .min(evaluationListMetricJobsResponseDataItemSpecThreeParamsOneMaxRetriesMin) - .default( - evaluationListMetricJobsResponseDataItemSpecThreeParamsOneMaxRetriesDefault - ) - .describe('Maximum number of retries for failed requests.'), - }) - .describe('Job parameters for online evaluation.') - .optional() - .describe('Execution parameters for the metric job.'), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .describe( - 'The jinja template to prompt the agent for evaluation. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{input}}, {{output}}, {{context}}, {{reference}} to reference input columns.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - 'Prompt template fields that should remain available to the prompt template but not be required by dataset schema validation.' - ), - }) - .describe('An online metric job that evaluates an agent.'), - zod - .object({ - metric: zod - .union([ - zod - .string() - .regex(evaluationListMetricJobsResponseDataItemSpecFourMetricOneRegExp) - .describe( - "Reference to a metric in the Metrics API.\n\nA reference is a string with format 'workspace\/metric-name' that points to a\npersisted metric entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ), - zod - .object({ - type: zod - .enum(['system', 'system-retriever']) - .default( - evaluationListMetricJobsResponseDataItemSpecFourMetricTwoTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline', 'retriever'])) - .default([`online`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - name: zod - .string() - .default( - evaluationListMetricJobsResponseDataItemSpecFourMetricTwoNameDefault - ), - required_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod - .string() - .optional() - .describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe( - 'List of required parameters for running an evaluation with the metric.' - ), - optional_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod - .string() - .optional() - .describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe( - 'List of optional parameters for running an evaluation with the metric.' - ), - }) - .describe('Metric entity for system metric that have pre-defined dataset.'), - ]) - .describe('The metric for evaluation.'), - metric_params: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Additional parameters for the metric. Required for system metrics, optional overrides for custom metrics.' - ), - field_mapping: zod - .object({ - input: zod - .string() - .min(1) - .regex(evaluationListMetricJobsResponseDataItemSpecFourFieldMappingOneInputRegExp) - .optional() - .describe("Binding for the canonical 'input' evaluator field."), - output: zod - .string() - .min(1) - .regex( - evaluationListMetricJobsResponseDataItemSpecFourFieldMappingOneOutputRegExp - ) - .optional() - .describe("Binding for the canonical 'output' evaluator field."), - context: zod - .string() - .min(1) - .regex( - evaluationListMetricJobsResponseDataItemSpecFourFieldMappingOneContextRegExp - ) - .optional() - .describe("Binding for the canonical 'context' evaluator field."), - reference: zod - .string() - .min(1) - .regex( - evaluationListMetricJobsResponseDataItemSpecFourFieldMappingOneReferenceRegExp - ) - .optional() - .describe("Binding for the canonical 'reference' evaluator field."), - trajectory: zod - .string() - .min(1) - .regex( - evaluationListMetricJobsResponseDataItemSpecFourFieldMappingOneTrajectoryRegExp - ) - .optional() - .describe("Binding for the canonical 'trajectory' evaluator field."), - messages: zod - .string() - .min(1) - .regex( - evaluationListMetricJobsResponseDataItemSpecFourFieldMappingOneMessagesRegExp - ) - .optional() - .describe("Binding for the canonical 'messages' evaluator field."), - tool_calls: zod - .string() - .min(1) - .regex( - evaluationListMetricJobsResponseDataItemSpecFourFieldMappingOneToolCallsRegExp - ) - .optional() - .describe("Binding for the canonical 'tool_calls' evaluator field."), - tools: zod - .string() - .min(1) - .regex(evaluationListMetricJobsResponseDataItemSpecFourFieldMappingOneToolsRegExp) - .optional() - .describe("Binding for the canonical 'tools' evaluator field."), - custom: zod - .record( - zod.string(), - zod - .string() - .min(1) - .regex( - evaluationListMetricJobsResponseDataItemSpecFourFieldMappingOneCustomRegExpOne - ) - ) - .optional() - .describe('Additional evaluator field bindings keyed by canonical field name.'), - }) - .describe( - "Maps canonical evaluator fields to raw dataset column paths.\nExample: {'input': 'question', 'output': 'answer', 'reference': 'gold', 'trajectory': 'steps'}" - ) - .optional() - .describe( - "Maps canonical evaluator fields such as 'input' and 'output' to dataset column paths for this job." - ), - retriever_pipeline: zod - .object({ - embeddings_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecFourRetrieverPipelineOneEmbeddingsModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricJobsResponseDataItemSpecFourRetrieverPipelineOneEmbeddingsModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecFourRetrieverPipelineOneEmbeddingsModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The embeddings model configuration.'), - }) - .describe('Pipeline configuration for retriever-based evaluations.') - .describe('The pipeline configuration for retriever-based evaluation.'), - dataset: zod - .union([ - zod - .enum([ - 'beir/climate-fever', - 'beir/cqadupstack', - 'beir/dbpedia-entity', - 'beir/fever', - 'beir/fiqa', - 'beir/germanquad', - 'beir/hotpotqa', - 'beir/mmarco', - 'beir/mrtydi', - 'beir/msmarco-v2', - 'beir/msmarco', - 'beir/nfcorpus', - 'beir/nq-train', - 'beir/nq', - 'beir/quora', - 'beir/scidocs', - 'beir/scifact', - 'beir/trec-covid-beir', - 'beir/trec-covid-v2', - 'beir/trec-covid', - 'beir/vihealthqa', - 'beir/webis-touche2020', - 'ragas/amnesty_qa', - ]) - .describe('Well-known dataset (BEIR or RAGAS) referenced by its identifier.'), - zod - .object({ - rows: zod - .array(zod.record(zod.string(), zod.unknown())) - .min(1) - .describe( - 'Array of data rows. Each row can be any valid JSON value (object, string, array, etc.).' - ), - }) - .describe( - 'Inline dataset definition with embedded rows.\n\nUse this for quick evaluations without persisting the dataset first.' - ), - zod - .string() - .describe( - "Reference to a Fileset in the Files API.\n\nA reference is a string with format 'workspace\/fileset-name' that points to a\npersisted fileset entity. When used as a dataset source, all files within the\nfileset will be downloaded to the job container.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform." - ), - zod - .object({ - path: zod - .string() - .min(1) - .optional() - .describe('The relative path to file\/directory in the storage.'), - storage: zod - .union([ - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationListMetricJobsResponseDataItemSpecFourDatasetFourStorageOneReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('ngc') - .default( - evaluationListMetricJobsResponseDataItemSpecFourDatasetFourStorageOneTypeDefault - ), - org: zod.string().describe('NGC organization name'), - team: zod.string().describe('NGC team name'), - target: zod.string().describe('NGC asset name (model or resource)'), - target_type: zod - .enum(['resource', 'model']) - .default( - evaluationListMetricJobsResponseDataItemSpecFourDatasetFourStorageOneTargetTypeDefault - ) - .describe("Type of NGC asset: 'resource' or 'model'"), - version: zod - .string() - .optional() - .describe( - 'NGC asset version. If not provided, defaults to latest version' - ), - original_version: zod - .string() - .optional() - .describe( - "The original version requested by the user before resolution (e.g., 'latest' or None). The 'version' field contains the resolved version ID." - ), - api_key_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecFourDatasetFourStorageOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .describe('NGC API key secret name'), - host: zod - .string() - .default( - evaluationListMetricJobsResponseDataItemSpecFourDatasetFourStorageOneHostDefault - ) - .describe('NGC API host URL'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationListMetricJobsResponseDataItemSpecFourDatasetFourStorageTwoReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('huggingface') - .default( - evaluationListMetricJobsResponseDataItemSpecFourDatasetFourStorageTwoTypeDefault - ), - repo_id: zod - .string() - .describe("Huggingface repository ID (e.g., 'meta-llama\/Llama-2-7b')"), - repo_type: zod - .enum(['model', 'dataset', 'space']) - .default( - evaluationListMetricJobsResponseDataItemSpecFourDatasetFourStorageTwoRepoTypeDefault - ) - .describe( - "Type of Huggingface repository: 'model', 'dataset', or 'space'" - ), - revision: zod - .string() - .default( - evaluationListMetricJobsResponseDataItemSpecFourDatasetFourStorageTwoRevisionDefault - ) - .describe("Branch, tag, or commit SHA. Defaults to 'main'"), - original_revision: zod - .string() - .optional() - .describe( - "The original revision requested by the user before resolution (e.g., 'main'). The 'revision' field contains the resolved commit SHA." - ), - token_secret: zod - .string() - .regex( - evaluationListMetricJobsResponseDataItemSpecFourDatasetFourStorageTwoTokenSecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Huggingface API `token` secret name for private repositories' - ), - endpoint: zod - .string() - .default( - evaluationListMetricJobsResponseDataItemSpecFourDatasetFourStorageTwoEndpointDefault - ) - .describe( - 'Huggingface Hub endpoint URL. Use for self-hosted instances.' - ), - }), - ]) - .describe('The storage configuration for the fileset.'), - metadata: zod - .object({ - dataset: zod - .object({ - schema: zod - .union([zod.record(zod.string(), zod.unknown()), zod.string()]) - .optional() - .describe( - 'Default row schema for files in this fileset, either inline JSON Schema or a schema_defs key.' - ), - schema_defs: zod - .record(zod.string(), zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'Reusable JSON Schema definitions keyed by name for deduplicating per-file dataset schemas.' - ), - schemas_by_path: zod - .record( - zod.string(), - zod.union([zod.record(zod.string(), zod.unknown()), zod.string()]) - ) - .optional() - .describe( - 'Optional per-file row schemas keyed by relative path within the fileset. Each value may be inline JSON Schema or a schema_defs key.' - ), - }) - .optional() - .describe('Content for dataset-type filesets.'), - model: zod - .object({ - tool_calling: zod - .object({ - chat_template: zod - .string() - .optional() - .describe('Jinja2 chat template for the model.'), - tool_call_parser: zod - .string() - .optional() - .describe( - "Name of the tool call parser (e.g., 'openai', 'hermes', 'pythonic', 'llama3_json', 'mistral')." - ), - tool_call_plugin: zod - .string() - .optional() - .describe( - "Reference to a fileset containing a custom tool call plugin Python file. Expected format: '{workspace}\/{fileset_name}'." - ), - auto_tool_choice: zod - .boolean() - .optional() - .describe('Whether to enable automatic tool choice.'), - }) - .optional() - .describe( - 'Content for tool-calling configuration on model filesets.\n\nStores chat template and tool calling settings that are merged into\nthe ModelSpec during checkpoint analysis.' - ), - }) - .optional() - .describe( - 'Content for model-type filesets.\n\nContains tool calling configuration that is merged into the ModelSpec\nduring checkpoint analysis.' - ), - }) - .describe( - 'Tagged metadata container - the key indicates the type.\n\nExample:\n metadata = FilesetMetadata(\n dataset=DatasetMetadataContent(\n schema={\"columns\": [\"id\", \"name\"]},\n )\n )' - ) - .optional() - .describe('Purpose-specific metadata for the fileset.'), - custom_fields: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Custom fields for the fileset.'), - }) - .describe('Fileset definition for use without persisting to the Files API.'), - ]) - .describe('The dataset to use for evaluation.'), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default( - evaluationListMetricJobsResponseDataItemSpecFourParamsOneParallelismDefault - ) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - ignore_request_failure: zod - .boolean() - .default( - evaluationListMetricJobsResponseDataItemSpecFourParamsOneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - request_timeout: zod - .number() - .optional() - .describe('The timeout to be used for requests made to the model.'), - max_retries: zod - .number() - .min(evaluationListMetricJobsResponseDataItemSpecFourParamsOneMaxRetriesMin) - .default( - evaluationListMetricJobsResponseDataItemSpecFourParamsOneMaxRetriesDefault - ) - .describe('Maximum number of retries for failed requests.'), - }) - .describe('Job parameters for online evaluation.') - .optional() - .describe('Execution parameters for the metric job.'), - }) - .describe('Evaluation with a retriever-based metric.'), - ]), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .optional() - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ), - status_details: zod.record(zod.string(), zod.unknown()).optional(), - error_details: zod.record(zod.string(), zod.unknown()).optional(), - ownership: zod.record(zod.string(), zod.unknown()).optional(), - custom_fields: zod.record(zod.string(), zod.unknown()).optional(), - }) - ), - pagination: zod - .object({ - page: zod.number().describe('The current page number.'), - page_size: zod.number().describe('The page size used for the query.'), - current_page_size: zod.number().describe('The size for the current page.'), - total_pages: zod.number().describe('The total number of pages.'), - total_results: zod.number().describe('The total number of results.'), - }) - .optional() - .describe('Pagination information.'), - sort: zod.string().optional().describe('The field on which the results are sorted.'), - filter: zod.record(zod.string(), zod.unknown()).optional().describe('Filtering information.'), -}); - -/** - * @summary Download Job Result Aggregate-Scores - */ -export const EvaluationDownloadMetricJobResultAggregateScoresParams = zod.object({ - workspace: zod.string(), - job: zod.string(), -}); - -export const evaluationDownloadMetricJobResultAggregateScoresResponseScoresItemOneScoreTypeDefault = `range`; -export const evaluationDownloadMetricJobResultAggregateScoresResponseScoresItemTwoScoreTypeDefault = `rubric`; -export const evaluationDownloadMetricJobResultAggregateScoresResponseScoresItemTwoRubricDistributionItemCountDefault = 0; - -export const EvaluationDownloadMetricJobResultAggregateScoresResponse = zod - .object({ - scores: zod - .array( - zod.union([ - zod - .object({ - name: zod.string().describe('Name of the score.'), - count: zod.number().describe('Number of samples evaluated (excluding NaN).'), - nan_count: zod.number().describe('Number of samples that produced NaN scores.'), - sum: zod.number().optional().describe('Sum of all score values.'), - mean: zod.number().optional().describe('Mean score value.'), - min: zod.number().optional().describe('Minimum score value.'), - max: zod.number().optional().describe('Maximum score value.'), - std_dev: zod.number().optional().describe('Standard deviation of the scores.'), - variance: zod.number().optional().describe('Variance of the scores.'), - score_type: zod - .literal('range') - .default( - evaluationDownloadMetricJobResultAggregateScoresResponseScoresItemOneScoreTypeDefault - ) - .describe('Type of score.'), - percentiles: zod - .object({ - p10: zod.union([zod.number(), zod.number()]).describe('10th percentile.'), - p20: zod.union([zod.number(), zod.number()]).describe('20th percentile.'), - p30: zod.union([zod.number(), zod.number()]).describe('30th percentile.'), - p40: zod.union([zod.number(), zod.number()]).describe('40th percentile.'), - p50: zod - .union([zod.number(), zod.number()]) - .describe('50th percentile (median).'), - p60: zod.union([zod.number(), zod.number()]).describe('60th percentile.'), - p70: zod.union([zod.number(), zod.number()]).describe('70th percentile.'), - p80: zod.union([zod.number(), zod.number()]).describe('80th percentile.'), - p90: zod.union([zod.number(), zod.number()]).describe('90th percentile.'), - p100: zod.union([zod.number(), zod.number()]).describe('100th percentile.'), - }) - .describe('Percentile distribution of scores.') - .optional() - .describe('Percentile distribution of scores.'), - histogram: zod - .object({ - bins: zod - .array( - zod - .object({ - lower_bound: zod - .union([zod.number(), zod.number()]) - .describe('Lower bound of the bin (inclusive).'), - upper_bound: zod - .union([zod.number(), zod.number()]) - .describe('Upper bound of the bin (exclusive for all but last bin).'), - count: zod.number().describe('Number of values in this bin.'), - }) - .describe('A single bin in a histogram.') - ) - .describe('Histogram bins.'), - }) - .describe('Histogram of score distribution.') - .optional() - .describe('Histogram of score distribution.'), - }) - .describe( - 'Aggregated statistics for a range-type score with percentiles and histogram.' - ), - zod - .object({ - name: zod.string().describe('Name of the score.'), - count: zod.number().describe('Number of samples evaluated (excluding NaN).'), - nan_count: zod.number().describe('Number of samples that produced NaN scores.'), - sum: zod.number().optional().describe('Sum of all score values.'), - mean: zod.number().optional().describe('Mean score value.'), - min: zod.number().optional().describe('Minimum score value.'), - max: zod.number().optional().describe('Maximum score value.'), - std_dev: zod.number().optional().describe('Standard deviation of the scores.'), - variance: zod.number().optional().describe('Variance of the scores.'), - score_type: zod - .literal('rubric') - .default( - evaluationDownloadMetricJobResultAggregateScoresResponseScoresItemTwoScoreTypeDefault - ) - .describe('Type of score.'), - rubric_distribution: zod - .array( - zod - .object({ - label: zod - .string() - .describe('The label to use for the level of the rubric grading criteria.'), - description: zod - .string() - .optional() - .describe( - 'Describe the semantic meaning of each criteria for the given rubric.' - ), - value: zod - .union([zod.number(), zod.number()]) - .describe('The score value to assign for the criteria.'), - count: zod - .number() - .default( - evaluationDownloadMetricJobResultAggregateScoresResponseScoresItemTwoRubricDistributionItemCountDefault - ) - .describe('The number of samples evaluated with the rubric level.'), - }) - .describe('Rubric score with count statistics.') - ) - .describe('Distribution of rubric categories.'), - mode_category: zod.string().optional().describe('Most frequent rubric category.'), - }) - .describe('Aggregated statistics for a rubric-type score with category distribution.'), - ]) - ) - .describe('The list of aggregated scores.'), - }) - .describe('Result of aggregating metric scores with full statistics.'); - -/** - * @summary Download Job Result Artifacts - */ -export const EvaluationDownloadMetricJobResultArtifactsParams = zod.object({ - workspace: zod.string(), - job: zod.string(), -}); - -/** - * @summary Download Job Result Row-Scores - */ -export const EvaluationDownloadMetricJobResultRowScoresParams = zod.object({ - workspace: zod.string(), - job: zod.string(), -}); - -export const EvaluationDownloadMetricJobResultRowScoresQueryParams = zod.object({ - limit: zod.number().optional(), -}); - -/** - * @summary Get Job Result - */ -export const EvaluationGetMetricJobsResultsParams = zod.object({ - workspace: zod.string(), - job: zod.string(), - name: zod.string(), -}); - -export const EvaluationGetMetricJobsResultsResponse = zod.object({ - name: zod.string(), - job: zod.string(), - workspace: zod.string(), - project: zod.string().optional(), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - artifact_url: zod.string(), - artifact_storage_type: zod.enum(['fileset']), - download_url: zod.string().optional(), -}); - -/** - * @summary Download Job Result - */ -export const EvaluationDownloadMetricJobResultParams = zod.object({ - workspace: zod.string(), - job: zod.string(), - name: zod.string(), -}); - -/** - * @summary Get Job - */ -export const EvaluationGetMetricJobParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const evaluationGetMetricJobResponseSpecOneMetricOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecOneMetricTwoOneTypeDefault = `llm-judge`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOneModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecOneMetricTwoOneModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOneModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecOneMetricTwoOneScoresItemOneNameRegExp = new RegExp( - '^[a-z0-9_]+$' -); -export const evaluationGetMetricJobResponseSpecOneMetricTwoOneScoresItemOneParserOneTypeDefault = `json`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOneScoresItemOneParserTwoTypeDefault = `regex`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOneScoresItemOneParserTwoMethodDefault = `match`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOneScoresItemOneRubricMin = 2; - -export const evaluationGetMetricJobResponseSpecOneMetricTwoOneScoresItemTwoNameRegExp = new RegExp( - '^[a-z0-9_]+$' -); -export const evaluationGetMetricJobResponseSpecOneMetricTwoOneScoresItemTwoParserOneTypeDefault = `json`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOneScoresItemTwoParserTwoTypeDefault = `regex`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOneScoresItemTwoParserTwoMethodDefault = `match`; - -export const evaluationGetMetricJobResponseSpecOneMetricTwoOneInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOneInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecOneMetricTwoOneInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOneInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecOneMetricTwoOneIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecOneMetricTwoTwoJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecOneMetricTwoTwoJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoTwoJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecOneMetricTwoTwoInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecOneMetricTwoTwoInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecOneMetricTwoTwoInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecOneMetricTwoTwoInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecOneMetricTwoTwoIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecOneMetricTwoTwoTypeDefault = `topic_adherence`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoTwoMetricModeDefault = `f1`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoThreeJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecOneMetricTwoThreeJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoThreeJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecOneMetricTwoThreeInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecOneMetricTwoThreeInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecOneMetricTwoThreeInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecOneMetricTwoThreeInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecOneMetricTwoThreeIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecOneMetricTwoThreeTypeDefault = `agent_goal_accuracy`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoThreeUseReferenceDefault = true; -export const evaluationGetMetricJobResponseSpecOneMetricTwoFourJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecOneMetricTwoFourJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoFourJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecOneMetricTwoFourInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecOneMetricTwoFourInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecOneMetricTwoFourInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecOneMetricTwoFourInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecOneMetricTwoFourIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecOneMetricTwoFourTypeDefault = `answer_accuracy`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoFiveJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecOneMetricTwoFiveJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoFiveJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecOneMetricTwoFiveInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecOneMetricTwoFiveInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecOneMetricTwoFiveInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecOneMetricTwoFiveInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecOneMetricTwoFiveIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecOneMetricTwoFiveTypeDefault = `context_relevance`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoSixJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecOneMetricTwoSixJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoSixJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecOneMetricTwoSixInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecOneMetricTwoSixInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecOneMetricTwoSixInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecOneMetricTwoSixInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecOneMetricTwoSixIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecOneMetricTwoSixTypeDefault = `response_groundedness`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoSevenJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecOneMetricTwoSevenJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoSevenJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecOneMetricTwoSevenInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecOneMetricTwoSevenInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecOneMetricTwoSevenInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecOneMetricTwoSevenInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecOneMetricTwoSevenIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecOneMetricTwoSevenTypeDefault = `context_recall`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoEightJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecOneMetricTwoEightJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoEightJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecOneMetricTwoEightInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecOneMetricTwoEightInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecOneMetricTwoEightInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecOneMetricTwoEightInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecOneMetricTwoEightIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecOneMetricTwoEightTypeDefault = `context_precision`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoNineJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecOneMetricTwoNineJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoNineJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecOneMetricTwoNineInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecOneMetricTwoNineInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecOneMetricTwoNineInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecOneMetricTwoNineInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecOneMetricTwoNineIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecOneMetricTwoNineTypeDefault = `context_entity_recall`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOnezeroEmbeddingsModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecOneMetricTwoOnezeroEmbeddingsModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOnezeroEmbeddingsModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationGetMetricJobResponseSpecOneMetricTwoOnezeroJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecOneMetricTwoOnezeroJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOnezeroJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecOneMetricTwoOnezeroInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOnezeroInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecOneMetricTwoOnezeroInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOnezeroInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecOneMetricTwoOnezeroIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOnezeroTypeDefault = `response_relevancy`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOnezeroStrictnessDefault = 1; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOneoneJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecOneMetricTwoOneoneJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOneoneJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecOneMetricTwoOneoneInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOneoneInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecOneMetricTwoOneoneInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOneoneInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecOneMetricTwoOneoneIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOneoneTypeDefault = `faithfulness`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOnetwoJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecOneMetricTwoOnetwoJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOnetwoJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecOneMetricTwoOnetwoInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOnetwoInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecOneMetricTwoOnetwoInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOnetwoInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecOneMetricTwoOnetwoIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOnetwoTypeDefault = `noise_sensitivity`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOnethreeTypeDefault = `tool_call_accuracy`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOnefourTypeDefault = `bleu`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOnefiveTypeDefault = `exact-match`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOnesixTypeDefault = `f1`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOnesevenTypeDefault = `number-check`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOneeightTypeDefault = `remote`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOneeightApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecOneMetricTwoOneeightTimeoutSecondsDefault = 30; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOneeightMaxRetriesDefault = 3; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOneeightScoresItemNameRegExp = - new RegExp('^[a-z0-9_]+$'); -export const evaluationGetMetricJobResponseSpecOneMetricTwoOneeightScoresItemParserOneTypeDefault = `json`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOnenineTypeDefault = `nemo-agent-toolkit-remote`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOnenineApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecOneMetricTwoOnenineTimeoutSecondsDefault = 30; -export const evaluationGetMetricJobResponseSpecOneMetricTwoOnenineMaxRetriesDefault = 3; -export const evaluationGetMetricJobResponseSpecOneMetricTwoTwozeroTypeDefault = `rouge`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoTwooneTypeDefault = `string-check`; -export const evaluationGetMetricJobResponseSpecOneMetricTwoTwotwoTypeDefault = `tool-calling`; -export const evaluationGetMetricJobResponseSpecOneMetricThreeTypeDefault = `system`; -export const evaluationGetMetricJobResponseSpecOneMetricThreeNameDefault = `Metric name`; - -export const evaluationGetMetricJobResponseSpecOneFieldMappingOneInputRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetMetricJobResponseSpecOneFieldMappingOneOutputRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetMetricJobResponseSpecOneFieldMappingOneContextRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetMetricJobResponseSpecOneFieldMappingOneReferenceRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetMetricJobResponseSpecOneFieldMappingOneTrajectoryRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetMetricJobResponseSpecOneFieldMappingOneMessagesRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetMetricJobResponseSpecOneFieldMappingOneToolCallsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetMetricJobResponseSpecOneFieldMappingOneToolsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetMetricJobResponseSpecOneFieldMappingOneCustomRegExpOne = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetMetricJobResponseSpecOneDatasetThreeStorageOneReadChunkSizeDefault = 1048576; -export const evaluationGetMetricJobResponseSpecOneDatasetThreeStorageOneTypeDefault = `ngc`; -export const evaluationGetMetricJobResponseSpecOneDatasetThreeStorageOneTargetTypeDefault = `resource`; -export const evaluationGetMetricJobResponseSpecOneDatasetThreeStorageOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecOneDatasetThreeStorageOneHostDefault = `https://api.ngc.nvidia.com`; -export const evaluationGetMetricJobResponseSpecOneDatasetThreeStorageTwoReadChunkSizeDefault = 1048576; -export const evaluationGetMetricJobResponseSpecOneDatasetThreeStorageTwoTypeDefault = `huggingface`; -export const evaluationGetMetricJobResponseSpecOneDatasetThreeStorageTwoRepoTypeDefault = `model`; -export const evaluationGetMetricJobResponseSpecOneDatasetThreeStorageTwoRevisionDefault = `main`; -export const evaluationGetMetricJobResponseSpecOneDatasetThreeStorageTwoTokenSecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecOneDatasetThreeStorageTwoEndpointDefault = `https://huggingface.co`; -export const evaluationGetMetricJobResponseSpecOneParamsOneParallelismDefault = 8; - -export const evaluationGetMetricJobResponseSpecTwoMetricOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOneTypeDefault = `llm-judge`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOneModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOneModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOneModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOneScoresItemOneNameRegExp = new RegExp( - '^[a-z0-9_]+$' -); -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOneScoresItemOneParserOneTypeDefault = `json`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOneScoresItemOneParserTwoTypeDefault = `regex`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOneScoresItemOneParserTwoMethodDefault = `match`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOneScoresItemOneRubricMin = 2; - -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOneScoresItemTwoNameRegExp = new RegExp( - '^[a-z0-9_]+$' -); -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOneScoresItemTwoParserOneTypeDefault = `json`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOneScoresItemTwoParserTwoTypeDefault = `regex`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOneScoresItemTwoParserTwoMethodDefault = `match`; - -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOneInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOneInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOneInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOneInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOneIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoTwoJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecTwoMetricTwoTwoJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoTwoJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecTwoMetricTwoTwoInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoTwoInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecTwoMetricTwoTwoInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoTwoInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecTwoMetricTwoTwoIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoTwoTypeDefault = `topic_adherence`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoTwoMetricModeDefault = `f1`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoThreeJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecTwoMetricTwoThreeJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoThreeJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecTwoMetricTwoThreeInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoThreeInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecTwoMetricTwoThreeInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoThreeInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecTwoMetricTwoThreeIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoThreeTypeDefault = `agent_goal_accuracy`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoThreeUseReferenceDefault = true; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoFourJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecTwoMetricTwoFourJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoFourJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecTwoMetricTwoFourInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoFourInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecTwoMetricTwoFourInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoFourInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecTwoMetricTwoFourIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoFourTypeDefault = `answer_accuracy`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoFiveJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecTwoMetricTwoFiveJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoFiveJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecTwoMetricTwoFiveInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoFiveInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecTwoMetricTwoFiveInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoFiveInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecTwoMetricTwoFiveIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoFiveTypeDefault = `context_relevance`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoSixJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecTwoMetricTwoSixJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoSixJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecTwoMetricTwoSixInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoSixInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecTwoMetricTwoSixInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoSixInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecTwoMetricTwoSixIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoSixTypeDefault = `response_groundedness`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoSevenJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecTwoMetricTwoSevenJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoSevenJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecTwoMetricTwoSevenInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoSevenInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecTwoMetricTwoSevenInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoSevenInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecTwoMetricTwoSevenIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoSevenTypeDefault = `context_recall`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoEightJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecTwoMetricTwoEightJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoEightJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecTwoMetricTwoEightInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoEightInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecTwoMetricTwoEightInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoEightInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecTwoMetricTwoEightIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoEightTypeDefault = `context_precision`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoNineJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecTwoMetricTwoNineJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoNineJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecTwoMetricTwoNineInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoNineInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecTwoMetricTwoNineInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoNineInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecTwoMetricTwoNineIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoNineTypeDefault = `context_entity_recall`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOnezeroEmbeddingsModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOnezeroEmbeddingsModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOnezeroEmbeddingsModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOnezeroJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOnezeroJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOnezeroJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOnezeroInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOnezeroInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOnezeroInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOnezeroInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOnezeroIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOnezeroTypeDefault = `response_relevancy`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOnezeroStrictnessDefault = 1; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOneoneJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOneoneJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOneoneJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOneoneInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOneoneInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOneoneInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOneoneInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOneoneIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOneoneTypeDefault = `faithfulness`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOnetwoJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOnetwoJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOnetwoJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOnetwoInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOnetwoInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOnetwoInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOnetwoInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOnetwoIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOnetwoTypeDefault = `noise_sensitivity`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOnethreeTypeDefault = `tool_call_accuracy`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOnefourTypeDefault = `bleu`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOnefiveTypeDefault = `exact-match`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOnesixTypeDefault = `f1`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOnesevenTypeDefault = `number-check`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOneeightTypeDefault = `remote`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOneeightApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOneeightTimeoutSecondsDefault = 30; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOneeightMaxRetriesDefault = 3; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOneeightScoresItemNameRegExp = - new RegExp('^[a-z0-9_]+$'); -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOneeightScoresItemParserOneTypeDefault = `json`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOnenineTypeDefault = `nemo-agent-toolkit-remote`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOnenineApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOnenineTimeoutSecondsDefault = 30; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoOnenineMaxRetriesDefault = 3; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoTwozeroTypeDefault = `rouge`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoTwooneTypeDefault = `string-check`; -export const evaluationGetMetricJobResponseSpecTwoMetricTwoTwotwoTypeDefault = `tool-calling`; -export const evaluationGetMetricJobResponseSpecTwoMetricThreeTypeDefault = `system`; -export const evaluationGetMetricJobResponseSpecTwoMetricThreeNameDefault = `Metric name`; - -export const evaluationGetMetricJobResponseSpecTwoFieldMappingOneInputRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetMetricJobResponseSpecTwoFieldMappingOneOutputRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetMetricJobResponseSpecTwoFieldMappingOneContextRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetMetricJobResponseSpecTwoFieldMappingOneReferenceRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetMetricJobResponseSpecTwoFieldMappingOneTrajectoryRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetMetricJobResponseSpecTwoFieldMappingOneMessagesRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetMetricJobResponseSpecTwoFieldMappingOneToolCallsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetMetricJobResponseSpecTwoFieldMappingOneToolsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetMetricJobResponseSpecTwoFieldMappingOneCustomRegExpOne = new RegExp( - '^[^\\[\\]]\*$' -); -export const evaluationGetMetricJobResponseSpecTwoModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetMetricJobResponseSpecTwoModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecTwoModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); - -export const evaluationGetMetricJobResponseSpecTwoDatasetThreeStorageOneReadChunkSizeDefault = 1048576; -export const evaluationGetMetricJobResponseSpecTwoDatasetThreeStorageOneTypeDefault = `ngc`; -export const evaluationGetMetricJobResponseSpecTwoDatasetThreeStorageOneTargetTypeDefault = `resource`; -export const evaluationGetMetricJobResponseSpecTwoDatasetThreeStorageOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecTwoDatasetThreeStorageOneHostDefault = `https://api.ngc.nvidia.com`; -export const evaluationGetMetricJobResponseSpecTwoDatasetThreeStorageTwoReadChunkSizeDefault = 1048576; -export const evaluationGetMetricJobResponseSpecTwoDatasetThreeStorageTwoTypeDefault = `huggingface`; -export const evaluationGetMetricJobResponseSpecTwoDatasetThreeStorageTwoRepoTypeDefault = `model`; -export const evaluationGetMetricJobResponseSpecTwoDatasetThreeStorageTwoRevisionDefault = `main`; -export const evaluationGetMetricJobResponseSpecTwoDatasetThreeStorageTwoTokenSecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecTwoDatasetThreeStorageTwoEndpointDefault = `https://huggingface.co`; -export const evaluationGetMetricJobResponseSpecTwoParamsOneParallelismDefault = 8; - -export const evaluationGetMetricJobResponseSpecTwoParamsOneIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecTwoParamsOneMaxRetriesDefault = 3; -export const evaluationGetMetricJobResponseSpecTwoParamsOneMaxRetriesMin = 0; - -export const evaluationGetMetricJobResponseSpecTwoParamsOneInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecTwoParamsOneInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecTwoParamsOneInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecTwoParamsOneInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecThreeMetricOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOneTypeDefault = `llm-judge`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOneModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOneModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOneModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOneScoresItemOneNameRegExp = - new RegExp('^[a-z0-9_]+$'); -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOneScoresItemOneParserOneTypeDefault = `json`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOneScoresItemOneParserTwoTypeDefault = `regex`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOneScoresItemOneParserTwoMethodDefault = `match`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOneScoresItemOneRubricMin = 2; - -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOneScoresItemTwoNameRegExp = - new RegExp('^[a-z0-9_]+$'); -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOneScoresItemTwoParserOneTypeDefault = `json`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOneScoresItemTwoParserTwoTypeDefault = `regex`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOneScoresItemTwoParserTwoMethodDefault = `match`; - -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOneInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOneInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOneInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOneInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOneIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoTwoJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecThreeMetricTwoTwoJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoTwoJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecThreeMetricTwoTwoInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoTwoInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecThreeMetricTwoTwoInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoTwoInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecThreeMetricTwoTwoIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoTwoTypeDefault = `topic_adherence`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoTwoMetricModeDefault = `f1`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoThreeJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecThreeMetricTwoThreeJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoThreeJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecThreeMetricTwoThreeInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoThreeInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecThreeMetricTwoThreeInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoThreeInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecThreeMetricTwoThreeIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoThreeTypeDefault = `agent_goal_accuracy`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoThreeUseReferenceDefault = true; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoFourJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecThreeMetricTwoFourJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoFourJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecThreeMetricTwoFourInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoFourInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecThreeMetricTwoFourInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoFourInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecThreeMetricTwoFourIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoFourTypeDefault = `answer_accuracy`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoFiveJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecThreeMetricTwoFiveJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoFiveJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecThreeMetricTwoFiveInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoFiveInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecThreeMetricTwoFiveInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoFiveInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecThreeMetricTwoFiveIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoFiveTypeDefault = `context_relevance`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoSixJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecThreeMetricTwoSixJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoSixJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecThreeMetricTwoSixInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoSixInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecThreeMetricTwoSixInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoSixInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecThreeMetricTwoSixIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoSixTypeDefault = `response_groundedness`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoSevenJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecThreeMetricTwoSevenJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoSevenJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecThreeMetricTwoSevenInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoSevenInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecThreeMetricTwoSevenInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoSevenInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecThreeMetricTwoSevenIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoSevenTypeDefault = `context_recall`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoEightJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecThreeMetricTwoEightJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoEightJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecThreeMetricTwoEightInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoEightInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecThreeMetricTwoEightInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoEightInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecThreeMetricTwoEightIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoEightTypeDefault = `context_precision`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoNineJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecThreeMetricTwoNineJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoNineJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecThreeMetricTwoNineInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoNineInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecThreeMetricTwoNineInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoNineInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecThreeMetricTwoNineIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoNineTypeDefault = `context_entity_recall`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOnezeroEmbeddingsModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOnezeroEmbeddingsModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOnezeroEmbeddingsModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOnezeroJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOnezeroJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOnezeroJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOnezeroInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOnezeroInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOnezeroInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOnezeroInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOnezeroIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOnezeroTypeDefault = `response_relevancy`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOnezeroStrictnessDefault = 1; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOneoneJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOneoneJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOneoneJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOneoneInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOneoneInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOneoneInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOneoneInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOneoneIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOneoneTypeDefault = `faithfulness`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOnetwoJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOnetwoJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOnetwoJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOnetwoInferenceOneTemperatureMin = 0; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOnetwoInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOnetwoInferenceOneTopPMin = 0; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOnetwoInferenceOneTopPMax = 1; - -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOnetwoIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOnetwoTypeDefault = `noise_sensitivity`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOnethreeTypeDefault = `tool_call_accuracy`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOnefourTypeDefault = `bleu`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOnefiveTypeDefault = `exact-match`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOnesixTypeDefault = `f1`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOnesevenTypeDefault = `number-check`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOneeightTypeDefault = `remote`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOneeightApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOneeightTimeoutSecondsDefault = 30; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOneeightMaxRetriesDefault = 3; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOneeightScoresItemNameRegExp = - new RegExp('^[a-z0-9_]+$'); -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOneeightScoresItemParserOneTypeDefault = `json`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOnenineTypeDefault = `nemo-agent-toolkit-remote`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOnenineApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOnenineTimeoutSecondsDefault = 30; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoOnenineMaxRetriesDefault = 3; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoTwozeroTypeDefault = `rouge`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoTwooneTypeDefault = `string-check`; -export const evaluationGetMetricJobResponseSpecThreeMetricTwoTwotwoTypeDefault = `tool-calling`; -export const evaluationGetMetricJobResponseSpecThreeMetricThreeTypeDefault = `system`; -export const evaluationGetMetricJobResponseSpecThreeMetricThreeNameDefault = `Metric name`; - -export const evaluationGetMetricJobResponseSpecThreeFieldMappingOneInputRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetMetricJobResponseSpecThreeFieldMappingOneOutputRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetMetricJobResponseSpecThreeFieldMappingOneContextRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetMetricJobResponseSpecThreeFieldMappingOneReferenceRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetMetricJobResponseSpecThreeFieldMappingOneTrajectoryRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetMetricJobResponseSpecThreeFieldMappingOneMessagesRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetMetricJobResponseSpecThreeFieldMappingOneToolCallsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetMetricJobResponseSpecThreeFieldMappingOneToolsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetMetricJobResponseSpecThreeFieldMappingOneCustomRegExpOne = new RegExp( - '^[^\\[\\]]\*$' -); -export const evaluationGetMetricJobResponseSpecThreeAgentOneFormatDefault = `generic`; -export const evaluationGetMetricJobResponseSpecThreeAgentOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); - -export const evaluationGetMetricJobResponseSpecThreeDatasetThreeStorageOneReadChunkSizeDefault = 1048576; -export const evaluationGetMetricJobResponseSpecThreeDatasetThreeStorageOneTypeDefault = `ngc`; -export const evaluationGetMetricJobResponseSpecThreeDatasetThreeStorageOneTargetTypeDefault = `resource`; -export const evaluationGetMetricJobResponseSpecThreeDatasetThreeStorageOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecThreeDatasetThreeStorageOneHostDefault = `https://api.ngc.nvidia.com`; -export const evaluationGetMetricJobResponseSpecThreeDatasetThreeStorageTwoReadChunkSizeDefault = 1048576; -export const evaluationGetMetricJobResponseSpecThreeDatasetThreeStorageTwoTypeDefault = `huggingface`; -export const evaluationGetMetricJobResponseSpecThreeDatasetThreeStorageTwoRepoTypeDefault = `model`; -export const evaluationGetMetricJobResponseSpecThreeDatasetThreeStorageTwoRevisionDefault = `main`; -export const evaluationGetMetricJobResponseSpecThreeDatasetThreeStorageTwoTokenSecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecThreeDatasetThreeStorageTwoEndpointDefault = `https://huggingface.co`; -export const evaluationGetMetricJobResponseSpecThreeParamsOneParallelismDefault = 8; - -export const evaluationGetMetricJobResponseSpecThreeParamsOneIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecThreeParamsOneMaxRetriesDefault = 3; -export const evaluationGetMetricJobResponseSpecThreeParamsOneMaxRetriesMin = 0; - -export const evaluationGetMetricJobResponseSpecFourMetricOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricJobResponseSpecFourMetricTwoTypeDefault = `system`; -export const evaluationGetMetricJobResponseSpecFourMetricTwoNameDefault = `Metric name`; - -export const evaluationGetMetricJobResponseSpecFourFieldMappingOneInputRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetMetricJobResponseSpecFourFieldMappingOneOutputRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetMetricJobResponseSpecFourFieldMappingOneContextRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetMetricJobResponseSpecFourFieldMappingOneReferenceRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetMetricJobResponseSpecFourFieldMappingOneTrajectoryRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetMetricJobResponseSpecFourFieldMappingOneMessagesRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetMetricJobResponseSpecFourFieldMappingOneToolCallsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetMetricJobResponseSpecFourFieldMappingOneToolsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationGetMetricJobResponseSpecFourFieldMappingOneCustomRegExpOne = new RegExp( - '^[^\\[\\]]\*$' -); -export const evaluationGetMetricJobResponseSpecFourRetrieverPipelineOneEmbeddingsModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecFourRetrieverPipelineOneEmbeddingsModelOneFormatDefault = `nim`; -export const evaluationGetMetricJobResponseSpecFourRetrieverPipelineOneEmbeddingsModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); - -export const evaluationGetMetricJobResponseSpecFourDatasetFourStorageOneReadChunkSizeDefault = 1048576; -export const evaluationGetMetricJobResponseSpecFourDatasetFourStorageOneTypeDefault = `ngc`; -export const evaluationGetMetricJobResponseSpecFourDatasetFourStorageOneTargetTypeDefault = `resource`; -export const evaluationGetMetricJobResponseSpecFourDatasetFourStorageOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecFourDatasetFourStorageOneHostDefault = `https://api.ngc.nvidia.com`; -export const evaluationGetMetricJobResponseSpecFourDatasetFourStorageTwoReadChunkSizeDefault = 1048576; -export const evaluationGetMetricJobResponseSpecFourDatasetFourStorageTwoTypeDefault = `huggingface`; -export const evaluationGetMetricJobResponseSpecFourDatasetFourStorageTwoRepoTypeDefault = `model`; -export const evaluationGetMetricJobResponseSpecFourDatasetFourStorageTwoRevisionDefault = `main`; -export const evaluationGetMetricJobResponseSpecFourDatasetFourStorageTwoTokenSecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricJobResponseSpecFourDatasetFourStorageTwoEndpointDefault = `https://huggingface.co`; -export const evaluationGetMetricJobResponseSpecFourParamsOneParallelismDefault = 8; - -export const evaluationGetMetricJobResponseSpecFourParamsOneIgnoreRequestFailureDefault = false; -export const evaluationGetMetricJobResponseSpecFourParamsOneMaxRetriesDefault = 3; -export const evaluationGetMetricJobResponseSpecFourParamsOneMaxRetriesMin = 0; - -export const EvaluationGetMetricJobResponse = zod.object({ - id: zod.string().optional(), - name: zod.string(), - description: zod.string().optional(), - project: zod.string().optional(), - workspace: zod.string().optional(), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - spec: zod.union([ - zod - .object({ - metric: zod - .union([ - zod - .string() - .regex(evaluationGetMetricJobResponseSpecOneMetricOneRegExp) - .describe( - "Reference to a metric in the Metrics API.\n\nA reference is a string with format 'workspace\/metric-name' that points to a\npersisted metric entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ), - zod.union([ - zod - .object({ - type: zod - .literal('llm-judge') - .default(evaluationGetMetricJobResponseSpecOneMetricTwoOneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecOneMetricTwoOneModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoOneModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetMetricJobResponseSpecOneMetricTwoOneModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The model configuration.'), - scores: zod - .array( - zod.union([ - zod - .object({ - name: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecOneMetricTwoOneScoresItemOneNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoOneScoresItemOneParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoOneScoresItemOneParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoOneScoresItemOneParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - rubric: zod - .array( - zod.object({ - label: zod - .string() - .describe( - 'The label to use for the level of the rubric grading criteria. (e.g., \"helpful\", \"not_helpful\", \"positive\")' - ), - description: zod - .string() - .optional() - .describe( - 'Describe the semantic meaning of each criteria for the given rubric. If no judge template is set, the input description for labels are included in the generated judge prompt.' - ), - value: zod - .union([zod.number(), zod.number()]) - .describe( - 'The score value to assign for the criteria used for aggregation and ranking.' - ), - }) - ) - .min( - evaluationGetMetricJobResponseSpecOneMetricTwoOneScoresItemOneRubricMin - ) - .describe('The rubric for the score.'), - }) - .describe( - 'Score definition for a rubric with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - zod - .object({ - name: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecOneMetricTwoOneScoresItemTwoNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoOneScoresItemTwoParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoOneScoresItemTwoParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoOneScoresItemTwoParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .describe( - 'Minimum value for the score range. Must be less than maximum.' - ), - maximum: zod - .union([zod.number(), zod.number()]) - .describe( - 'Maximum value for the score range. Must be greater than minimum.' - ), - }) - .describe( - 'Score definition for a range of values with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - ]) - ) - .min(1) - .describe( - "Definitions of scores that will be extracted from the judge's output." - ), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .optional() - .describe( - 'The prompt template for the judge. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{sample.output_text}} to use the model output within the template or {{item.xxx}} to reference input columns from the dataset.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - "Prompt template fields that should remain in the inferred input schema but not be required. Use this for fields like 'reference' when the metric can still run without them." - ), - structured_output: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'JSON schema to apply structured output for the judge model evaluation. Structured output is derived from scores when omitted. Use this option if there are custom requirements for the output of the judge.' - ), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecOneMetricTwoOneInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecOneMetricTwoOneInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricJobResponseSpecOneMetricTwoOneInferenceOneTopPMin) - .max(evaluationGetMetricJobResponseSpecOneMetricTwoOneInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge model.'), - system_prompt: zod - .string() - .optional() - .describe( - "Initial instructions that define the judge model's role and behavior for the conversation. This is prepended to the messages as a system message." - ), - reasoning: zod - .object({ - end_token: zod - .string() - .optional() - .describe( - "Configure the end token to trim reasoning context based on the model's reasoning API. Example for Nemotron models: '<\/think>'" - ), - include_if_not_finished: zod - .boolean() - .optional() - .describe( - 'Configure whether to include reasoning context if the model has not finished reasoning.' - ), - effort: zod - .string() - .optional() - .describe( - 'Option for OpenAI models to specify low, medium, or high reasoning effort.' - ), - }) - .describe("Custom settings that control the model's reasoning behavior.") - .optional() - .describe( - "Custom settings that control the judge model's reasoning behavior. For reasoning models (e.g., Nemotron), use `end_token` to strip reasoning traces from the output." - ), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoOneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - }) - .describe('Request type for creating LLM Judge metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecOneMetricTwoTwoJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoTwoJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetMetricJobResponseSpecOneMetricTwoTwoJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecOneMetricTwoTwoInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecOneMetricTwoTwoInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricJobResponseSpecOneMetricTwoTwoInferenceOneTopPMin) - .max(evaluationGetMetricJobResponseSpecOneMetricTwoTwoInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoTwoIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('topic_adherence') - .default(evaluationGetMetricJobResponseSpecOneMetricTwoTwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - metric_mode: zod - .enum(['f1', 'precision', 'recall']) - .default(evaluationGetMetricJobResponseSpecOneMetricTwoTwoMetricModeDefault) - .describe('The mode for computing topic adherence score.'), - }) - .describe('Request type for TopicAdherence metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecOneMetricTwoThreeJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoThreeJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationGetMetricJobResponseSpecOneMetricTwoThreeJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecOneMetricTwoThreeInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecOneMetricTwoThreeInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricJobResponseSpecOneMetricTwoThreeInferenceOneTopPMin) - .max(evaluationGetMetricJobResponseSpecOneMetricTwoThreeInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoThreeIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('agent_goal_accuracy') - .default(evaluationGetMetricJobResponseSpecOneMetricTwoThreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - use_reference: zod - .boolean() - .default(evaluationGetMetricJobResponseSpecOneMetricTwoThreeUseReferenceDefault) - .describe('Whether to use reference for goal accuracy evaluation.'), - }) - .describe('Request type for AgentGoalAccuracy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecOneMetricTwoFourJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoFourJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationGetMetricJobResponseSpecOneMetricTwoFourJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecOneMetricTwoFourInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecOneMetricTwoFourInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricJobResponseSpecOneMetricTwoFourInferenceOneTopPMin) - .max(evaluationGetMetricJobResponseSpecOneMetricTwoFourInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoFourIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('answer_accuracy') - .default(evaluationGetMetricJobResponseSpecOneMetricTwoFourTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for AnswerAccuracy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecOneMetricTwoFiveJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoFiveJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationGetMetricJobResponseSpecOneMetricTwoFiveJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecOneMetricTwoFiveInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecOneMetricTwoFiveInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricJobResponseSpecOneMetricTwoFiveInferenceOneTopPMin) - .max(evaluationGetMetricJobResponseSpecOneMetricTwoFiveInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoFiveIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_relevance') - .default(evaluationGetMetricJobResponseSpecOneMetricTwoFiveTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextRelevance metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecOneMetricTwoSixJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoSixJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetMetricJobResponseSpecOneMetricTwoSixJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecOneMetricTwoSixInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecOneMetricTwoSixInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricJobResponseSpecOneMetricTwoSixInferenceOneTopPMin) - .max(evaluationGetMetricJobResponseSpecOneMetricTwoSixInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoSixIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_groundedness') - .default(evaluationGetMetricJobResponseSpecOneMetricTwoSixTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ResponseGroundedness metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecOneMetricTwoSevenJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoSevenJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationGetMetricJobResponseSpecOneMetricTwoSevenJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecOneMetricTwoSevenInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecOneMetricTwoSevenInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricJobResponseSpecOneMetricTwoSevenInferenceOneTopPMin) - .max(evaluationGetMetricJobResponseSpecOneMetricTwoSevenInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoSevenIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_recall') - .default(evaluationGetMetricJobResponseSpecOneMetricTwoSevenTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextRecall metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecOneMetricTwoEightJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoEightJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationGetMetricJobResponseSpecOneMetricTwoEightJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecOneMetricTwoEightInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecOneMetricTwoEightInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricJobResponseSpecOneMetricTwoEightInferenceOneTopPMin) - .max(evaluationGetMetricJobResponseSpecOneMetricTwoEightInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoEightIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_precision') - .default(evaluationGetMetricJobResponseSpecOneMetricTwoEightTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextPrecision metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecOneMetricTwoNineJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoNineJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationGetMetricJobResponseSpecOneMetricTwoNineJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecOneMetricTwoNineInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecOneMetricTwoNineInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricJobResponseSpecOneMetricTwoNineInferenceOneTopPMin) - .max(evaluationGetMetricJobResponseSpecOneMetricTwoNineInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoNineIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_entity_recall') - .default(evaluationGetMetricJobResponseSpecOneMetricTwoNineTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextEntityRecall metrics.'), - zod - .object({ - embeddings_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecOneMetricTwoOnezeroEmbeddingsModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoOnezeroEmbeddingsModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationGetMetricJobResponseSpecOneMetricTwoOnezeroEmbeddingsModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The embeddings model configuration.'), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecOneMetricTwoOnezeroJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoOnezeroJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationGetMetricJobResponseSpecOneMetricTwoOnezeroJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecOneMetricTwoOnezeroInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecOneMetricTwoOnezeroInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationGetMetricJobResponseSpecOneMetricTwoOnezeroInferenceOneTopPMin - ) - .max( - evaluationGetMetricJobResponseSpecOneMetricTwoOnezeroInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoOnezeroIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_relevancy') - .default(evaluationGetMetricJobResponseSpecOneMetricTwoOnezeroTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - strictness: zod - .number() - .default(evaluationGetMetricJobResponseSpecOneMetricTwoOnezeroStrictnessDefault) - .describe('Number of parallel questions generated. NIM can only generate 1.'), - }) - .describe('Request type for ResponseRelevancy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecOneMetricTwoOneoneJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoOneoneJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationGetMetricJobResponseSpecOneMetricTwoOneoneJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecOneMetricTwoOneoneInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecOneMetricTwoOneoneInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationGetMetricJobResponseSpecOneMetricTwoOneoneInferenceOneTopPMin - ) - .max( - evaluationGetMetricJobResponseSpecOneMetricTwoOneoneInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoOneoneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('faithfulness') - .default(evaluationGetMetricJobResponseSpecOneMetricTwoOneoneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for Faithfulness metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecOneMetricTwoOnetwoJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoOnetwoJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationGetMetricJobResponseSpecOneMetricTwoOnetwoJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecOneMetricTwoOnetwoInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecOneMetricTwoOnetwoInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationGetMetricJobResponseSpecOneMetricTwoOnetwoInferenceOneTopPMin - ) - .max( - evaluationGetMetricJobResponseSpecOneMetricTwoOnetwoInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoOnetwoIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('noise_sensitivity') - .default(evaluationGetMetricJobResponseSpecOneMetricTwoOnetwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for NoiseSensitivity metrics.'), - zod - .object({ - type: zod - .literal('tool_call_accuracy') - .default(evaluationGetMetricJobResponseSpecOneMetricTwoOnethreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ToolCallAccuracy metrics (no judge required).'), - zod - .object({ - type: zod - .literal('bleu') - .default(evaluationGetMetricJobResponseSpecOneMetricTwoOnefourTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - references: zod - .array(zod.string()) - .describe( - 'The templates for the ground truth references to calculate BLEU metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to calculate BLEU metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for BLEUMetric.'), - zod - .object({ - type: zod - .literal('exact-match') - .default(evaluationGetMetricJobResponseSpecOneMetricTwoOnefiveTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the exact match metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the exact match metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for ExactMatchMetric.'), - zod - .object({ - type: zod - .literal('f1') - .default(evaluationGetMetricJobResponseSpecOneMetricTwoOnesixTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the F1 metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the F1 metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for F1Metric.'), - zod - .object({ - type: zod - .literal('number-check') - .default(evaluationGetMetricJobResponseSpecOneMetricTwoOnesevenTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - '>=', - 'gte', - 'greater than or equal', - '>', - 'gt', - 'greater than', - '<=', - 'lte', - 'less than or equal', - '<', - 'lt', - 'less than', - 'absolute difference', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - epsilon: zod - .union([zod.number(), zod.number()]) - .optional() - .describe('Specify the tolerance for the absolute difference of values.'), - }) - .describe( - 'Request type for NumberCheckMetric. Numeric-comparison metric with template-driven operands.' - ), - zod - .object({ - type: zod - .literal('remote') - .default(evaluationGetMetricJobResponseSpecOneMetricTwoOneeightTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecOneMetricTwoOneeightApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoOneeightTimeoutSecondsDefault - ) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoOneeightMaxRetriesDefault - ) - .describe('Maximum number of retry attempts.'), - body: zod - .record(zod.string(), zod.unknown()) - .describe('Jinja template for request payload'), - scores: zod - .array( - zod - .object({ - name: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecOneMetricTwoOneeightScoresItemNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .object({ - type: zod - .literal('json') - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoOneeightScoresItemParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.') - .optional() - .describe( - 'The method to parse the score. Only JSON parsing is supported for remote metrics.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe( - 'Minimum value for the score range. Defaults to None (no lower bound).' - ), - maximum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe( - 'Maximum value for the score range. Defaults to None (no upper bound).' - ), - }) - .describe( - 'Score configuration for remote metrics.\n\nUnlike RangeScore, minimum and maximum are optional (default to None = no bounds).\nThis avoids JSON serialization issues with infinity values.' - ) - ) - .describe('List of scores to extract from the remote response'), - }) - .describe( - 'Request type for RemoteMetric. A metric that computes scores via a remote endpoint.' - ), - zod - .object({ - type: zod - .literal('nemo-agent-toolkit-remote') - .default(evaluationGetMetricJobResponseSpecOneMetricTwoOnenineTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecOneMetricTwoOnenineApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default( - evaluationGetMetricJobResponseSpecOneMetricTwoOnenineTimeoutSecondsDefault - ) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default(evaluationGetMetricJobResponseSpecOneMetricTwoOnenineMaxRetriesDefault) - .describe('Maximum number of retry attempts.'), - evaluator_name: zod - .string() - .describe('The name of the evaluator (also used as the score name).'), - }) - .describe( - 'Request type for NemoAgentToolkitRemoteMetric. A remote metric that interfaces with NeMo Agent Toolkit evaluators.' - ), - zod - .object({ - type: zod - .literal('rouge') - .default(evaluationGetMetricJobResponseSpecOneMetricTwoTwozeroTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to evaluate the ROUGE metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the ROUGE metric on. If not provided, the output text from the model is used.' - ), - }) - .describe( - 'Request type for ROUGEMetric. ROUGE metric for overlap-based summarization quality scoring.' - ), - zod - .object({ - type: zod - .literal('string-check') - .default(evaluationGetMetricJobResponseSpecOneMetricTwoTwooneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - 'contains', - 'not contains', - 'startswith', - 'endswith', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - }) - .describe( - 'Request type for StringCheckMetric. String-comparison metric with operator-based checks.' - ), - zod - .object({ - type: zod - .literal('tool-calling') - .default(evaluationGetMetricJobResponseSpecOneMetricTwoTwotwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to evaluate tool calling accuracy.' - ), - }) - .describe( - 'Request type for ToolCallingMetric. Tool-calling accuracy metric for structured function calls.' - ), - ]), - zod - .object({ - type: zod - .enum(['system', 'system-retriever']) - .default(evaluationGetMetricJobResponseSpecOneMetricThreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline', 'retriever'])) - .default([`online`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - name: zod - .string() - .default(evaluationGetMetricJobResponseSpecOneMetricThreeNameDefault), - required_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod - .string() - .optional() - .describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe( - 'List of required parameters for running an evaluation with the metric.' - ), - optional_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod - .string() - .optional() - .describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe( - 'List of optional parameters for running an evaluation with the metric.' - ), - }) - .describe('Metric entity for system metric that have pre-defined dataset.'), - ]) - .describe('The metric for evaluation.'), - metric_params: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Additional parameters for the metric. Required for system metrics, optional overrides for custom metrics.' - ), - field_mapping: zod - .object({ - input: zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecOneFieldMappingOneInputRegExp) - .optional() - .describe("Binding for the canonical 'input' evaluator field."), - output: zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecOneFieldMappingOneOutputRegExp) - .optional() - .describe("Binding for the canonical 'output' evaluator field."), - context: zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecOneFieldMappingOneContextRegExp) - .optional() - .describe("Binding for the canonical 'context' evaluator field."), - reference: zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecOneFieldMappingOneReferenceRegExp) - .optional() - .describe("Binding for the canonical 'reference' evaluator field."), - trajectory: zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecOneFieldMappingOneTrajectoryRegExp) - .optional() - .describe("Binding for the canonical 'trajectory' evaluator field."), - messages: zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecOneFieldMappingOneMessagesRegExp) - .optional() - .describe("Binding for the canonical 'messages' evaluator field."), - tool_calls: zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecOneFieldMappingOneToolCallsRegExp) - .optional() - .describe("Binding for the canonical 'tool_calls' evaluator field."), - tools: zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecOneFieldMappingOneToolsRegExp) - .optional() - .describe("Binding for the canonical 'tools' evaluator field."), - custom: zod - .record( - zod.string(), - zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecOneFieldMappingOneCustomRegExpOne) - ) - .optional() - .describe('Additional evaluator field bindings keyed by canonical field name.'), - }) - .describe( - "Maps canonical evaluator fields to raw dataset column paths.\nExample: {'input': 'question', 'output': 'answer', 'reference': 'gold', 'trajectory': 'steps'}" - ) - .optional() - .describe( - "Maps canonical evaluator fields such as 'input' and 'output' to dataset column paths for this job." - ), - dataset: zod - .union([ - zod - .object({ - rows: zod - .array(zod.record(zod.string(), zod.unknown())) - .min(1) - .describe( - 'Array of data rows. Each row can be any valid JSON value (object, string, array, etc.).' - ), - }) - .describe( - 'Inline dataset definition with embedded rows.\n\nUse this for quick evaluations without persisting the dataset first.' - ), - zod - .string() - .describe( - "Reference to a Fileset in the Files API.\n\nA reference is a string with format 'workspace\/fileset-name' that points to a\npersisted fileset entity. When used as a dataset source, all files within the\nfileset will be downloaded to the job container.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform." - ), - zod - .object({ - path: zod - .string() - .min(1) - .optional() - .describe('The relative path to file\/directory in the storage.'), - storage: zod - .union([ - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationGetMetricJobResponseSpecOneDatasetThreeStorageOneReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('ngc') - .default( - evaluationGetMetricJobResponseSpecOneDatasetThreeStorageOneTypeDefault - ), - org: zod.string().describe('NGC organization name'), - team: zod.string().describe('NGC team name'), - target: zod.string().describe('NGC asset name (model or resource)'), - target_type: zod - .enum(['resource', 'model']) - .default( - evaluationGetMetricJobResponseSpecOneDatasetThreeStorageOneTargetTypeDefault - ) - .describe("Type of NGC asset: 'resource' or 'model'"), - version: zod - .string() - .optional() - .describe('NGC asset version. If not provided, defaults to latest version'), - original_version: zod - .string() - .optional() - .describe( - "The original version requested by the user before resolution (e.g., 'latest' or None). The 'version' field contains the resolved version ID." - ), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecOneDatasetThreeStorageOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .describe('NGC API key secret name'), - host: zod - .string() - .default( - evaluationGetMetricJobResponseSpecOneDatasetThreeStorageOneHostDefault - ) - .describe('NGC API host URL'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationGetMetricJobResponseSpecOneDatasetThreeStorageTwoReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('huggingface') - .default( - evaluationGetMetricJobResponseSpecOneDatasetThreeStorageTwoTypeDefault - ), - repo_id: zod - .string() - .describe("Huggingface repository ID (e.g., 'meta-llama\/Llama-2-7b')"), - repo_type: zod - .enum(['model', 'dataset', 'space']) - .default( - evaluationGetMetricJobResponseSpecOneDatasetThreeStorageTwoRepoTypeDefault - ) - .describe("Type of Huggingface repository: 'model', 'dataset', or 'space'"), - revision: zod - .string() - .default( - evaluationGetMetricJobResponseSpecOneDatasetThreeStorageTwoRevisionDefault - ) - .describe("Branch, tag, or commit SHA. Defaults to 'main'"), - original_revision: zod - .string() - .optional() - .describe( - "The original revision requested by the user before resolution (e.g., 'main'). The 'revision' field contains the resolved commit SHA." - ), - token_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecOneDatasetThreeStorageTwoTokenSecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe('Huggingface API `token` secret name for private repositories'), - endpoint: zod - .string() - .default( - evaluationGetMetricJobResponseSpecOneDatasetThreeStorageTwoEndpointDefault - ) - .describe('Huggingface Hub endpoint URL. Use for self-hosted instances.'), - }), - ]) - .describe('The storage configuration for the fileset.'), - metadata: zod - .object({ - dataset: zod - .object({ - schema: zod - .union([zod.record(zod.string(), zod.unknown()), zod.string()]) - .optional() - .describe( - 'Default row schema for files in this fileset, either inline JSON Schema or a schema_defs key.' - ), - schema_defs: zod - .record(zod.string(), zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'Reusable JSON Schema definitions keyed by name for deduplicating per-file dataset schemas.' - ), - schemas_by_path: zod - .record( - zod.string(), - zod.union([zod.record(zod.string(), zod.unknown()), zod.string()]) - ) - .optional() - .describe( - 'Optional per-file row schemas keyed by relative path within the fileset. Each value may be inline JSON Schema or a schema_defs key.' - ), - }) - .optional() - .describe('Content for dataset-type filesets.'), - model: zod - .object({ - tool_calling: zod - .object({ - chat_template: zod - .string() - .optional() - .describe('Jinja2 chat template for the model.'), - tool_call_parser: zod - .string() - .optional() - .describe( - "Name of the tool call parser (e.g., 'openai', 'hermes', 'pythonic', 'llama3_json', 'mistral')." - ), - tool_call_plugin: zod - .string() - .optional() - .describe( - "Reference to a fileset containing a custom tool call plugin Python file. Expected format: '{workspace}\/{fileset_name}'." - ), - auto_tool_choice: zod - .boolean() - .optional() - .describe('Whether to enable automatic tool choice.'), - }) - .optional() - .describe( - 'Content for tool-calling configuration on model filesets.\n\nStores chat template and tool calling settings that are merged into\nthe ModelSpec during checkpoint analysis.' - ), - }) - .optional() - .describe( - 'Content for model-type filesets.\n\nContains tool calling configuration that is merged into the ModelSpec\nduring checkpoint analysis.' - ), - }) - .describe( - 'Tagged metadata container - the key indicates the type.\n\nExample:\n metadata = FilesetMetadata(\n dataset=DatasetMetadataContent(\n schema={\"columns\": [\"id\", \"name\"]},\n )\n )' - ) - .optional() - .describe('Purpose-specific metadata for the fileset.'), - custom_fields: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Custom fields for the fileset.'), - }) - .describe('Fileset definition for use without persisting to the Files API.'), - ]) - .describe('The dataset to evaluate which may represent generated outputs from a model.'), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default(evaluationGetMetricJobResponseSpecOneParamsOneParallelismDefault) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - }) - .describe('Job parameters.') - .optional() - .describe('Execution parameters for the metric job.'), - }) - .describe('An offline metric job.'), - zod - .object({ - metric: zod - .union([ - zod - .string() - .regex(evaluationGetMetricJobResponseSpecTwoMetricOneRegExp) - .describe( - "Reference to a metric in the Metrics API.\n\nA reference is a string with format 'workspace\/metric-name' that points to a\npersisted metric entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ), - zod.union([ - zod - .object({ - type: zod - .literal('llm-judge') - .default(evaluationGetMetricJobResponseSpecTwoMetricTwoOneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecTwoMetricTwoOneModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoOneModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetMetricJobResponseSpecTwoMetricTwoOneModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The model configuration.'), - scores: zod - .array( - zod.union([ - zod - .object({ - name: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecTwoMetricTwoOneScoresItemOneNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoOneScoresItemOneParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoOneScoresItemOneParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoOneScoresItemOneParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - rubric: zod - .array( - zod.object({ - label: zod - .string() - .describe( - 'The label to use for the level of the rubric grading criteria. (e.g., \"helpful\", \"not_helpful\", \"positive\")' - ), - description: zod - .string() - .optional() - .describe( - 'Describe the semantic meaning of each criteria for the given rubric. If no judge template is set, the input description for labels are included in the generated judge prompt.' - ), - value: zod - .union([zod.number(), zod.number()]) - .describe( - 'The score value to assign for the criteria used for aggregation and ranking.' - ), - }) - ) - .min( - evaluationGetMetricJobResponseSpecTwoMetricTwoOneScoresItemOneRubricMin - ) - .describe('The rubric for the score.'), - }) - .describe( - 'Score definition for a rubric with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - zod - .object({ - name: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecTwoMetricTwoOneScoresItemTwoNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoOneScoresItemTwoParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoOneScoresItemTwoParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoOneScoresItemTwoParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .describe( - 'Minimum value for the score range. Must be less than maximum.' - ), - maximum: zod - .union([zod.number(), zod.number()]) - .describe( - 'Maximum value for the score range. Must be greater than minimum.' - ), - }) - .describe( - 'Score definition for a range of values with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - ]) - ) - .min(1) - .describe( - "Definitions of scores that will be extracted from the judge's output." - ), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .optional() - .describe( - 'The prompt template for the judge. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{sample.output_text}} to use the model output within the template or {{item.xxx}} to reference input columns from the dataset.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - "Prompt template fields that should remain in the inferred input schema but not be required. Use this for fields like 'reference' when the metric can still run without them." - ), - structured_output: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'JSON schema to apply structured output for the judge model evaluation. Structured output is derived from scores when omitted. Use this option if there are custom requirements for the output of the judge.' - ), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecTwoMetricTwoOneInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecTwoMetricTwoOneInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricJobResponseSpecTwoMetricTwoOneInferenceOneTopPMin) - .max(evaluationGetMetricJobResponseSpecTwoMetricTwoOneInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge model.'), - system_prompt: zod - .string() - .optional() - .describe( - "Initial instructions that define the judge model's role and behavior for the conversation. This is prepended to the messages as a system message." - ), - reasoning: zod - .object({ - end_token: zod - .string() - .optional() - .describe( - "Configure the end token to trim reasoning context based on the model's reasoning API. Example for Nemotron models: '<\/think>'" - ), - include_if_not_finished: zod - .boolean() - .optional() - .describe( - 'Configure whether to include reasoning context if the model has not finished reasoning.' - ), - effort: zod - .string() - .optional() - .describe( - 'Option for OpenAI models to specify low, medium, or high reasoning effort.' - ), - }) - .describe("Custom settings that control the model's reasoning behavior.") - .optional() - .describe( - "Custom settings that control the judge model's reasoning behavior. For reasoning models (e.g., Nemotron), use `end_token` to strip reasoning traces from the output." - ), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoOneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - }) - .describe('Request type for creating LLM Judge metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecTwoMetricTwoTwoJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoTwoJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetMetricJobResponseSpecTwoMetricTwoTwoJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecTwoMetricTwoTwoInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecTwoMetricTwoTwoInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricJobResponseSpecTwoMetricTwoTwoInferenceOneTopPMin) - .max(evaluationGetMetricJobResponseSpecTwoMetricTwoTwoInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoTwoIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('topic_adherence') - .default(evaluationGetMetricJobResponseSpecTwoMetricTwoTwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - metric_mode: zod - .enum(['f1', 'precision', 'recall']) - .default(evaluationGetMetricJobResponseSpecTwoMetricTwoTwoMetricModeDefault) - .describe('The mode for computing topic adherence score.'), - }) - .describe('Request type for TopicAdherence metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecTwoMetricTwoThreeJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoThreeJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationGetMetricJobResponseSpecTwoMetricTwoThreeJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecTwoMetricTwoThreeInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecTwoMetricTwoThreeInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricJobResponseSpecTwoMetricTwoThreeInferenceOneTopPMin) - .max(evaluationGetMetricJobResponseSpecTwoMetricTwoThreeInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoThreeIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('agent_goal_accuracy') - .default(evaluationGetMetricJobResponseSpecTwoMetricTwoThreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - use_reference: zod - .boolean() - .default(evaluationGetMetricJobResponseSpecTwoMetricTwoThreeUseReferenceDefault) - .describe('Whether to use reference for goal accuracy evaluation.'), - }) - .describe('Request type for AgentGoalAccuracy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecTwoMetricTwoFourJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoFourJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationGetMetricJobResponseSpecTwoMetricTwoFourJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecTwoMetricTwoFourInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecTwoMetricTwoFourInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricJobResponseSpecTwoMetricTwoFourInferenceOneTopPMin) - .max(evaluationGetMetricJobResponseSpecTwoMetricTwoFourInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoFourIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('answer_accuracy') - .default(evaluationGetMetricJobResponseSpecTwoMetricTwoFourTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for AnswerAccuracy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecTwoMetricTwoFiveJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoFiveJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationGetMetricJobResponseSpecTwoMetricTwoFiveJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecTwoMetricTwoFiveInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecTwoMetricTwoFiveInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricJobResponseSpecTwoMetricTwoFiveInferenceOneTopPMin) - .max(evaluationGetMetricJobResponseSpecTwoMetricTwoFiveInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoFiveIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_relevance') - .default(evaluationGetMetricJobResponseSpecTwoMetricTwoFiveTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextRelevance metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecTwoMetricTwoSixJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoSixJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetMetricJobResponseSpecTwoMetricTwoSixJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecTwoMetricTwoSixInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecTwoMetricTwoSixInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricJobResponseSpecTwoMetricTwoSixInferenceOneTopPMin) - .max(evaluationGetMetricJobResponseSpecTwoMetricTwoSixInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoSixIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_groundedness') - .default(evaluationGetMetricJobResponseSpecTwoMetricTwoSixTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ResponseGroundedness metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecTwoMetricTwoSevenJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoSevenJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationGetMetricJobResponseSpecTwoMetricTwoSevenJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecTwoMetricTwoSevenInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecTwoMetricTwoSevenInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricJobResponseSpecTwoMetricTwoSevenInferenceOneTopPMin) - .max(evaluationGetMetricJobResponseSpecTwoMetricTwoSevenInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoSevenIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_recall') - .default(evaluationGetMetricJobResponseSpecTwoMetricTwoSevenTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextRecall metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecTwoMetricTwoEightJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoEightJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationGetMetricJobResponseSpecTwoMetricTwoEightJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecTwoMetricTwoEightInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecTwoMetricTwoEightInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricJobResponseSpecTwoMetricTwoEightInferenceOneTopPMin) - .max(evaluationGetMetricJobResponseSpecTwoMetricTwoEightInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoEightIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_precision') - .default(evaluationGetMetricJobResponseSpecTwoMetricTwoEightTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextPrecision metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecTwoMetricTwoNineJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoNineJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationGetMetricJobResponseSpecTwoMetricTwoNineJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecTwoMetricTwoNineInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecTwoMetricTwoNineInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricJobResponseSpecTwoMetricTwoNineInferenceOneTopPMin) - .max(evaluationGetMetricJobResponseSpecTwoMetricTwoNineInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoNineIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_entity_recall') - .default(evaluationGetMetricJobResponseSpecTwoMetricTwoNineTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextEntityRecall metrics.'), - zod - .object({ - embeddings_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecTwoMetricTwoOnezeroEmbeddingsModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoOnezeroEmbeddingsModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationGetMetricJobResponseSpecTwoMetricTwoOnezeroEmbeddingsModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The embeddings model configuration.'), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecTwoMetricTwoOnezeroJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoOnezeroJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationGetMetricJobResponseSpecTwoMetricTwoOnezeroJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecTwoMetricTwoOnezeroInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecTwoMetricTwoOnezeroInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationGetMetricJobResponseSpecTwoMetricTwoOnezeroInferenceOneTopPMin - ) - .max( - evaluationGetMetricJobResponseSpecTwoMetricTwoOnezeroInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoOnezeroIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_relevancy') - .default(evaluationGetMetricJobResponseSpecTwoMetricTwoOnezeroTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - strictness: zod - .number() - .default(evaluationGetMetricJobResponseSpecTwoMetricTwoOnezeroStrictnessDefault) - .describe('Number of parallel questions generated. NIM can only generate 1.'), - }) - .describe('Request type for ResponseRelevancy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecTwoMetricTwoOneoneJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoOneoneJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationGetMetricJobResponseSpecTwoMetricTwoOneoneJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecTwoMetricTwoOneoneInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecTwoMetricTwoOneoneInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationGetMetricJobResponseSpecTwoMetricTwoOneoneInferenceOneTopPMin - ) - .max( - evaluationGetMetricJobResponseSpecTwoMetricTwoOneoneInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoOneoneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('faithfulness') - .default(evaluationGetMetricJobResponseSpecTwoMetricTwoOneoneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for Faithfulness metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecTwoMetricTwoOnetwoJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoOnetwoJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationGetMetricJobResponseSpecTwoMetricTwoOnetwoJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecTwoMetricTwoOnetwoInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecTwoMetricTwoOnetwoInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationGetMetricJobResponseSpecTwoMetricTwoOnetwoInferenceOneTopPMin - ) - .max( - evaluationGetMetricJobResponseSpecTwoMetricTwoOnetwoInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoOnetwoIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('noise_sensitivity') - .default(evaluationGetMetricJobResponseSpecTwoMetricTwoOnetwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for NoiseSensitivity metrics.'), - zod - .object({ - type: zod - .literal('tool_call_accuracy') - .default(evaluationGetMetricJobResponseSpecTwoMetricTwoOnethreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ToolCallAccuracy metrics (no judge required).'), - zod - .object({ - type: zod - .literal('bleu') - .default(evaluationGetMetricJobResponseSpecTwoMetricTwoOnefourTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - references: zod - .array(zod.string()) - .describe( - 'The templates for the ground truth references to calculate BLEU metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to calculate BLEU metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for BLEUMetric.'), - zod - .object({ - type: zod - .literal('exact-match') - .default(evaluationGetMetricJobResponseSpecTwoMetricTwoOnefiveTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the exact match metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the exact match metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for ExactMatchMetric.'), - zod - .object({ - type: zod - .literal('f1') - .default(evaluationGetMetricJobResponseSpecTwoMetricTwoOnesixTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the F1 metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the F1 metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for F1Metric.'), - zod - .object({ - type: zod - .literal('number-check') - .default(evaluationGetMetricJobResponseSpecTwoMetricTwoOnesevenTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - '>=', - 'gte', - 'greater than or equal', - '>', - 'gt', - 'greater than', - '<=', - 'lte', - 'less than or equal', - '<', - 'lt', - 'less than', - 'absolute difference', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - epsilon: zod - .union([zod.number(), zod.number()]) - .optional() - .describe('Specify the tolerance for the absolute difference of values.'), - }) - .describe( - 'Request type for NumberCheckMetric. Numeric-comparison metric with template-driven operands.' - ), - zod - .object({ - type: zod - .literal('remote') - .default(evaluationGetMetricJobResponseSpecTwoMetricTwoOneeightTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecTwoMetricTwoOneeightApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoOneeightTimeoutSecondsDefault - ) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoOneeightMaxRetriesDefault - ) - .describe('Maximum number of retry attempts.'), - body: zod - .record(zod.string(), zod.unknown()) - .describe('Jinja template for request payload'), - scores: zod - .array( - zod - .object({ - name: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecTwoMetricTwoOneeightScoresItemNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .object({ - type: zod - .literal('json') - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoOneeightScoresItemParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.') - .optional() - .describe( - 'The method to parse the score. Only JSON parsing is supported for remote metrics.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe( - 'Minimum value for the score range. Defaults to None (no lower bound).' - ), - maximum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe( - 'Maximum value for the score range. Defaults to None (no upper bound).' - ), - }) - .describe( - 'Score configuration for remote metrics.\n\nUnlike RangeScore, minimum and maximum are optional (default to None = no bounds).\nThis avoids JSON serialization issues with infinity values.' - ) - ) - .describe('List of scores to extract from the remote response'), - }) - .describe( - 'Request type for RemoteMetric. A metric that computes scores via a remote endpoint.' - ), - zod - .object({ - type: zod - .literal('nemo-agent-toolkit-remote') - .default(evaluationGetMetricJobResponseSpecTwoMetricTwoOnenineTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecTwoMetricTwoOnenineApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default( - evaluationGetMetricJobResponseSpecTwoMetricTwoOnenineTimeoutSecondsDefault - ) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default(evaluationGetMetricJobResponseSpecTwoMetricTwoOnenineMaxRetriesDefault) - .describe('Maximum number of retry attempts.'), - evaluator_name: zod - .string() - .describe('The name of the evaluator (also used as the score name).'), - }) - .describe( - 'Request type for NemoAgentToolkitRemoteMetric. A remote metric that interfaces with NeMo Agent Toolkit evaluators.' - ), - zod - .object({ - type: zod - .literal('rouge') - .default(evaluationGetMetricJobResponseSpecTwoMetricTwoTwozeroTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to evaluate the ROUGE metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the ROUGE metric on. If not provided, the output text from the model is used.' - ), - }) - .describe( - 'Request type for ROUGEMetric. ROUGE metric for overlap-based summarization quality scoring.' - ), - zod - .object({ - type: zod - .literal('string-check') - .default(evaluationGetMetricJobResponseSpecTwoMetricTwoTwooneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - 'contains', - 'not contains', - 'startswith', - 'endswith', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - }) - .describe( - 'Request type for StringCheckMetric. String-comparison metric with operator-based checks.' - ), - zod - .object({ - type: zod - .literal('tool-calling') - .default(evaluationGetMetricJobResponseSpecTwoMetricTwoTwotwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to evaluate tool calling accuracy.' - ), - }) - .describe( - 'Request type for ToolCallingMetric. Tool-calling accuracy metric for structured function calls.' - ), - ]), - zod - .object({ - type: zod - .enum(['system', 'system-retriever']) - .default(evaluationGetMetricJobResponseSpecTwoMetricThreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline', 'retriever'])) - .default([`online`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - name: zod - .string() - .default(evaluationGetMetricJobResponseSpecTwoMetricThreeNameDefault), - required_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod - .string() - .optional() - .describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe( - 'List of required parameters for running an evaluation with the metric.' - ), - optional_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod - .string() - .optional() - .describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe( - 'List of optional parameters for running an evaluation with the metric.' - ), - }) - .describe('Metric entity for system metric that have pre-defined dataset.'), - ]) - .describe('The metric for evaluation.'), - metric_params: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Additional parameters for the metric. Required for system metrics, optional overrides for custom metrics.' - ), - field_mapping: zod - .object({ - input: zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecTwoFieldMappingOneInputRegExp) - .optional() - .describe("Binding for the canonical 'input' evaluator field."), - output: zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecTwoFieldMappingOneOutputRegExp) - .optional() - .describe("Binding for the canonical 'output' evaluator field."), - context: zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecTwoFieldMappingOneContextRegExp) - .optional() - .describe("Binding for the canonical 'context' evaluator field."), - reference: zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecTwoFieldMappingOneReferenceRegExp) - .optional() - .describe("Binding for the canonical 'reference' evaluator field."), - trajectory: zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecTwoFieldMappingOneTrajectoryRegExp) - .optional() - .describe("Binding for the canonical 'trajectory' evaluator field."), - messages: zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecTwoFieldMappingOneMessagesRegExp) - .optional() - .describe("Binding for the canonical 'messages' evaluator field."), - tool_calls: zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecTwoFieldMappingOneToolCallsRegExp) - .optional() - .describe("Binding for the canonical 'tool_calls' evaluator field."), - tools: zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecTwoFieldMappingOneToolsRegExp) - .optional() - .describe("Binding for the canonical 'tools' evaluator field."), - custom: zod - .record( - zod.string(), - zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecTwoFieldMappingOneCustomRegExpOne) - ) - .optional() - .describe('Additional evaluator field bindings keyed by canonical field name.'), - }) - .describe( - "Maps canonical evaluator fields to raw dataset column paths.\nExample: {'input': 'question', 'output': 'answer', 'reference': 'gold', 'trajectory': 'steps'}" - ) - .optional() - .describe( - "Maps canonical evaluator fields such as 'input' and 'output' to dataset column paths for this job." - ), - model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationGetMetricJobResponseSpecTwoModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationGetMetricJobResponseSpecTwoModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetMetricJobResponseSpecTwoModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The model configuration.'), - dataset: zod - .union([ - zod - .object({ - rows: zod - .array(zod.record(zod.string(), zod.unknown())) - .min(1) - .describe( - 'Array of data rows. Each row can be any valid JSON value (object, string, array, etc.).' - ), - }) - .describe( - 'Inline dataset definition with embedded rows.\n\nUse this for quick evaluations without persisting the dataset first.' - ), - zod - .string() - .describe( - "Reference to a Fileset in the Files API.\n\nA reference is a string with format 'workspace\/fileset-name' that points to a\npersisted fileset entity. When used as a dataset source, all files within the\nfileset will be downloaded to the job container.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform." - ), - zod - .object({ - path: zod - .string() - .min(1) - .optional() - .describe('The relative path to file\/directory in the storage.'), - storage: zod - .union([ - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationGetMetricJobResponseSpecTwoDatasetThreeStorageOneReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('ngc') - .default( - evaluationGetMetricJobResponseSpecTwoDatasetThreeStorageOneTypeDefault - ), - org: zod.string().describe('NGC organization name'), - team: zod.string().describe('NGC team name'), - target: zod.string().describe('NGC asset name (model or resource)'), - target_type: zod - .enum(['resource', 'model']) - .default( - evaluationGetMetricJobResponseSpecTwoDatasetThreeStorageOneTargetTypeDefault - ) - .describe("Type of NGC asset: 'resource' or 'model'"), - version: zod - .string() - .optional() - .describe('NGC asset version. If not provided, defaults to latest version'), - original_version: zod - .string() - .optional() - .describe( - "The original version requested by the user before resolution (e.g., 'latest' or None). The 'version' field contains the resolved version ID." - ), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecTwoDatasetThreeStorageOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .describe('NGC API key secret name'), - host: zod - .string() - .default( - evaluationGetMetricJobResponseSpecTwoDatasetThreeStorageOneHostDefault - ) - .describe('NGC API host URL'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationGetMetricJobResponseSpecTwoDatasetThreeStorageTwoReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('huggingface') - .default( - evaluationGetMetricJobResponseSpecTwoDatasetThreeStorageTwoTypeDefault - ), - repo_id: zod - .string() - .describe("Huggingface repository ID (e.g., 'meta-llama\/Llama-2-7b')"), - repo_type: zod - .enum(['model', 'dataset', 'space']) - .default( - evaluationGetMetricJobResponseSpecTwoDatasetThreeStorageTwoRepoTypeDefault - ) - .describe("Type of Huggingface repository: 'model', 'dataset', or 'space'"), - revision: zod - .string() - .default( - evaluationGetMetricJobResponseSpecTwoDatasetThreeStorageTwoRevisionDefault - ) - .describe("Branch, tag, or commit SHA. Defaults to 'main'"), - original_revision: zod - .string() - .optional() - .describe( - "The original revision requested by the user before resolution (e.g., 'main'). The 'revision' field contains the resolved commit SHA." - ), - token_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecTwoDatasetThreeStorageTwoTokenSecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe('Huggingface API `token` secret name for private repositories'), - endpoint: zod - .string() - .default( - evaluationGetMetricJobResponseSpecTwoDatasetThreeStorageTwoEndpointDefault - ) - .describe('Huggingface Hub endpoint URL. Use for self-hosted instances.'), - }), - ]) - .describe('The storage configuration for the fileset.'), - metadata: zod - .object({ - dataset: zod - .object({ - schema: zod - .union([zod.record(zod.string(), zod.unknown()), zod.string()]) - .optional() - .describe( - 'Default row schema for files in this fileset, either inline JSON Schema or a schema_defs key.' - ), - schema_defs: zod - .record(zod.string(), zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'Reusable JSON Schema definitions keyed by name for deduplicating per-file dataset schemas.' - ), - schemas_by_path: zod - .record( - zod.string(), - zod.union([zod.record(zod.string(), zod.unknown()), zod.string()]) - ) - .optional() - .describe( - 'Optional per-file row schemas keyed by relative path within the fileset. Each value may be inline JSON Schema or a schema_defs key.' - ), - }) - .optional() - .describe('Content for dataset-type filesets.'), - model: zod - .object({ - tool_calling: zod - .object({ - chat_template: zod - .string() - .optional() - .describe('Jinja2 chat template for the model.'), - tool_call_parser: zod - .string() - .optional() - .describe( - "Name of the tool call parser (e.g., 'openai', 'hermes', 'pythonic', 'llama3_json', 'mistral')." - ), - tool_call_plugin: zod - .string() - .optional() - .describe( - "Reference to a fileset containing a custom tool call plugin Python file. Expected format: '{workspace}\/{fileset_name}'." - ), - auto_tool_choice: zod - .boolean() - .optional() - .describe('Whether to enable automatic tool choice.'), - }) - .optional() - .describe( - 'Content for tool-calling configuration on model filesets.\n\nStores chat template and tool calling settings that are merged into\nthe ModelSpec during checkpoint analysis.' - ), - }) - .optional() - .describe( - 'Content for model-type filesets.\n\nContains tool calling configuration that is merged into the ModelSpec\nduring checkpoint analysis.' - ), - }) - .describe( - 'Tagged metadata container - the key indicates the type.\n\nExample:\n metadata = FilesetMetadata(\n dataset=DatasetMetadataContent(\n schema={\"columns\": [\"id\", \"name\"]},\n )\n )' - ) - .optional() - .describe('Purpose-specific metadata for the fileset.'), - custom_fields: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Custom fields for the fileset.'), - }) - .describe('Fileset definition for use without persisting to the Files API.'), - ]) - .describe('The dataset to use for model prompts and evaluation.'), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default(evaluationGetMetricJobResponseSpecTwoParamsOneParallelismDefault) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - ignore_request_failure: zod - .boolean() - .default(evaluationGetMetricJobResponseSpecTwoParamsOneIgnoreRequestFailureDefault) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - request_timeout: zod - .number() - .optional() - .describe('The timeout to be used for requests made to the model.'), - max_retries: zod - .number() - .min(evaluationGetMetricJobResponseSpecTwoParamsOneMaxRetriesMin) - .default(evaluationGetMetricJobResponseSpecTwoParamsOneMaxRetriesDefault) - .describe('Maximum number of retries for failed requests.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationGetMetricJobResponseSpecTwoParamsOneInferenceOneTemperatureMin) - .max(evaluationGetMetricJobResponseSpecTwoParamsOneInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricJobResponseSpecTwoParamsOneInferenceOneTopPMin) - .max(evaluationGetMetricJobResponseSpecTwoParamsOneInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe("Custom settings that control the model's text generation behavior."), - system_prompt: zod - .string() - .optional() - .describe( - "Initial instructions that define the model's role and behavior for the conversation." - ), - reasoning: zod - .object({ - end_token: zod - .string() - .optional() - .describe( - "Configure the end token to trim reasoning context based on the model's reasoning API. Example for Nemotron models: '<\/think>'" - ), - include_if_not_finished: zod - .boolean() - .optional() - .describe( - 'Configure whether to include reasoning context if the model has not finished reasoning.' - ), - effort: zod - .string() - .optional() - .describe( - 'Option for OpenAI models to specify low, medium, or high reasoning effort.' - ), - }) - .describe("Custom settings that control the model's reasoning behavior.") - .optional() - .describe("Custom settings that control the model's reasoning behavior."), - structured_output: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('JSON schema to apply structured output for the model.'), - }) - .describe('Job parameters for model online evaluation.') - .optional() - .describe('Execution parameters for the metric job.'), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .describe( - 'The jinja template to prompt the model for evaluation. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{input}}, {{output}}, {{context}}, {{reference}} to reference input columns.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - 'Prompt template fields that should remain available to the prompt template but not be required by dataset schema validation.' - ), - }) - .describe('A online metric job.'), - zod - .object({ - metric: zod - .union([ - zod - .string() - .regex(evaluationGetMetricJobResponseSpecThreeMetricOneRegExp) - .describe( - "Reference to a metric in the Metrics API.\n\nA reference is a string with format 'workspace\/metric-name' that points to a\npersisted metric entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ), - zod.union([ - zod - .object({ - type: zod - .literal('llm-judge') - .default(evaluationGetMetricJobResponseSpecThreeMetricTwoOneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecThreeMetricTwoOneModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoOneModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetMetricJobResponseSpecThreeMetricTwoOneModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The model configuration.'), - scores: zod - .array( - zod.union([ - zod - .object({ - name: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecThreeMetricTwoOneScoresItemOneNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoOneScoresItemOneParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoOneScoresItemOneParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoOneScoresItemOneParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - rubric: zod - .array( - zod.object({ - label: zod - .string() - .describe( - 'The label to use for the level of the rubric grading criteria. (e.g., \"helpful\", \"not_helpful\", \"positive\")' - ), - description: zod - .string() - .optional() - .describe( - 'Describe the semantic meaning of each criteria for the given rubric. If no judge template is set, the input description for labels are included in the generated judge prompt.' - ), - value: zod - .union([zod.number(), zod.number()]) - .describe( - 'The score value to assign for the criteria used for aggregation and ranking.' - ), - }) - ) - .min( - evaluationGetMetricJobResponseSpecThreeMetricTwoOneScoresItemOneRubricMin - ) - .describe('The rubric for the score.'), - }) - .describe( - 'Score definition for a rubric with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - zod - .object({ - name: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecThreeMetricTwoOneScoresItemTwoNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoOneScoresItemTwoParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoOneScoresItemTwoParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoOneScoresItemTwoParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .describe( - 'Minimum value for the score range. Must be less than maximum.' - ), - maximum: zod - .union([zod.number(), zod.number()]) - .describe( - 'Maximum value for the score range. Must be greater than minimum.' - ), - }) - .describe( - 'Score definition for a range of values with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - ]) - ) - .min(1) - .describe( - "Definitions of scores that will be extracted from the judge's output." - ), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .optional() - .describe( - 'The prompt template for the judge. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{sample.output_text}} to use the model output within the template or {{item.xxx}} to reference input columns from the dataset.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - "Prompt template fields that should remain in the inferred input schema but not be required. Use this for fields like 'reference' when the metric can still run without them." - ), - structured_output: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'JSON schema to apply structured output for the judge model evaluation. Structured output is derived from scores when omitted. Use this option if there are custom requirements for the output of the judge.' - ), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecThreeMetricTwoOneInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecThreeMetricTwoOneInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricJobResponseSpecThreeMetricTwoOneInferenceOneTopPMin) - .max(evaluationGetMetricJobResponseSpecThreeMetricTwoOneInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge model.'), - system_prompt: zod - .string() - .optional() - .describe( - "Initial instructions that define the judge model's role and behavior for the conversation. This is prepended to the messages as a system message." - ), - reasoning: zod - .object({ - end_token: zod - .string() - .optional() - .describe( - "Configure the end token to trim reasoning context based on the model's reasoning API. Example for Nemotron models: '<\/think>'" - ), - include_if_not_finished: zod - .boolean() - .optional() - .describe( - 'Configure whether to include reasoning context if the model has not finished reasoning.' - ), - effort: zod - .string() - .optional() - .describe( - 'Option for OpenAI models to specify low, medium, or high reasoning effort.' - ), - }) - .describe("Custom settings that control the model's reasoning behavior.") - .optional() - .describe( - "Custom settings that control the judge model's reasoning behavior. For reasoning models (e.g., Nemotron), use `end_token` to strip reasoning traces from the output." - ), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoOneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - }) - .describe('Request type for creating LLM Judge metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecThreeMetricTwoTwoJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoTwoJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationGetMetricJobResponseSpecThreeMetricTwoTwoJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecThreeMetricTwoTwoInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecThreeMetricTwoTwoInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricJobResponseSpecThreeMetricTwoTwoInferenceOneTopPMin) - .max(evaluationGetMetricJobResponseSpecThreeMetricTwoTwoInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoTwoIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('topic_adherence') - .default(evaluationGetMetricJobResponseSpecThreeMetricTwoTwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - metric_mode: zod - .enum(['f1', 'precision', 'recall']) - .default(evaluationGetMetricJobResponseSpecThreeMetricTwoTwoMetricModeDefault) - .describe('The mode for computing topic adherence score.'), - }) - .describe('Request type for TopicAdherence metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecThreeMetricTwoThreeJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoThreeJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationGetMetricJobResponseSpecThreeMetricTwoThreeJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecThreeMetricTwoThreeInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecThreeMetricTwoThreeInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationGetMetricJobResponseSpecThreeMetricTwoThreeInferenceOneTopPMin - ) - .max( - evaluationGetMetricJobResponseSpecThreeMetricTwoThreeInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoThreeIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('agent_goal_accuracy') - .default(evaluationGetMetricJobResponseSpecThreeMetricTwoThreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - use_reference: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoThreeUseReferenceDefault - ) - .describe('Whether to use reference for goal accuracy evaluation.'), - }) - .describe('Request type for AgentGoalAccuracy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecThreeMetricTwoFourJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoFourJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationGetMetricJobResponseSpecThreeMetricTwoFourJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecThreeMetricTwoFourInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecThreeMetricTwoFourInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationGetMetricJobResponseSpecThreeMetricTwoFourInferenceOneTopPMin - ) - .max( - evaluationGetMetricJobResponseSpecThreeMetricTwoFourInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoFourIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('answer_accuracy') - .default(evaluationGetMetricJobResponseSpecThreeMetricTwoFourTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for AnswerAccuracy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecThreeMetricTwoFiveJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoFiveJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationGetMetricJobResponseSpecThreeMetricTwoFiveJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecThreeMetricTwoFiveInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecThreeMetricTwoFiveInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationGetMetricJobResponseSpecThreeMetricTwoFiveInferenceOneTopPMin - ) - .max( - evaluationGetMetricJobResponseSpecThreeMetricTwoFiveInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoFiveIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_relevance') - .default(evaluationGetMetricJobResponseSpecThreeMetricTwoFiveTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextRelevance metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecThreeMetricTwoSixJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoSixJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationGetMetricJobResponseSpecThreeMetricTwoSixJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecThreeMetricTwoSixInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecThreeMetricTwoSixInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricJobResponseSpecThreeMetricTwoSixInferenceOneTopPMin) - .max(evaluationGetMetricJobResponseSpecThreeMetricTwoSixInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoSixIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_groundedness') - .default(evaluationGetMetricJobResponseSpecThreeMetricTwoSixTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ResponseGroundedness metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecThreeMetricTwoSevenJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoSevenJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationGetMetricJobResponseSpecThreeMetricTwoSevenJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecThreeMetricTwoSevenInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecThreeMetricTwoSevenInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationGetMetricJobResponseSpecThreeMetricTwoSevenInferenceOneTopPMin - ) - .max( - evaluationGetMetricJobResponseSpecThreeMetricTwoSevenInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoSevenIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_recall') - .default(evaluationGetMetricJobResponseSpecThreeMetricTwoSevenTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextRecall metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecThreeMetricTwoEightJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoEightJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationGetMetricJobResponseSpecThreeMetricTwoEightJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecThreeMetricTwoEightInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecThreeMetricTwoEightInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationGetMetricJobResponseSpecThreeMetricTwoEightInferenceOneTopPMin - ) - .max( - evaluationGetMetricJobResponseSpecThreeMetricTwoEightInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoEightIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_precision') - .default(evaluationGetMetricJobResponseSpecThreeMetricTwoEightTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextPrecision metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecThreeMetricTwoNineJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoNineJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationGetMetricJobResponseSpecThreeMetricTwoNineJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecThreeMetricTwoNineInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecThreeMetricTwoNineInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationGetMetricJobResponseSpecThreeMetricTwoNineInferenceOneTopPMin - ) - .max( - evaluationGetMetricJobResponseSpecThreeMetricTwoNineInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoNineIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_entity_recall') - .default(evaluationGetMetricJobResponseSpecThreeMetricTwoNineTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextEntityRecall metrics.'), - zod - .object({ - embeddings_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecThreeMetricTwoOnezeroEmbeddingsModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoOnezeroEmbeddingsModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationGetMetricJobResponseSpecThreeMetricTwoOnezeroEmbeddingsModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The embeddings model configuration.'), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecThreeMetricTwoOnezeroJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoOnezeroJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationGetMetricJobResponseSpecThreeMetricTwoOnezeroJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecThreeMetricTwoOnezeroInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecThreeMetricTwoOnezeroInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationGetMetricJobResponseSpecThreeMetricTwoOnezeroInferenceOneTopPMin - ) - .max( - evaluationGetMetricJobResponseSpecThreeMetricTwoOnezeroInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoOnezeroIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_relevancy') - .default(evaluationGetMetricJobResponseSpecThreeMetricTwoOnezeroTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - strictness: zod - .number() - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoOnezeroStrictnessDefault - ) - .describe('Number of parallel questions generated. NIM can only generate 1.'), - }) - .describe('Request type for ResponseRelevancy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecThreeMetricTwoOneoneJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoOneoneJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationGetMetricJobResponseSpecThreeMetricTwoOneoneJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecThreeMetricTwoOneoneInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecThreeMetricTwoOneoneInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationGetMetricJobResponseSpecThreeMetricTwoOneoneInferenceOneTopPMin - ) - .max( - evaluationGetMetricJobResponseSpecThreeMetricTwoOneoneInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoOneoneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('faithfulness') - .default(evaluationGetMetricJobResponseSpecThreeMetricTwoOneoneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for Faithfulness metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecThreeMetricTwoOnetwoJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoOnetwoJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationGetMetricJobResponseSpecThreeMetricTwoOnetwoJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationGetMetricJobResponseSpecThreeMetricTwoOnetwoInferenceOneTemperatureMin - ) - .max( - evaluationGetMetricJobResponseSpecThreeMetricTwoOnetwoInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationGetMetricJobResponseSpecThreeMetricTwoOnetwoInferenceOneTopPMin - ) - .max( - evaluationGetMetricJobResponseSpecThreeMetricTwoOnetwoInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoOnetwoIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('noise_sensitivity') - .default(evaluationGetMetricJobResponseSpecThreeMetricTwoOnetwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for NoiseSensitivity metrics.'), - zod - .object({ - type: zod - .literal('tool_call_accuracy') - .default(evaluationGetMetricJobResponseSpecThreeMetricTwoOnethreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ToolCallAccuracy metrics (no judge required).'), - zod - .object({ - type: zod - .literal('bleu') - .default(evaluationGetMetricJobResponseSpecThreeMetricTwoOnefourTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - references: zod - .array(zod.string()) - .describe( - 'The templates for the ground truth references to calculate BLEU metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to calculate BLEU metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for BLEUMetric.'), - zod - .object({ - type: zod - .literal('exact-match') - .default(evaluationGetMetricJobResponseSpecThreeMetricTwoOnefiveTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the exact match metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the exact match metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for ExactMatchMetric.'), - zod - .object({ - type: zod - .literal('f1') - .default(evaluationGetMetricJobResponseSpecThreeMetricTwoOnesixTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the F1 metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the F1 metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for F1Metric.'), - zod - .object({ - type: zod - .literal('number-check') - .default(evaluationGetMetricJobResponseSpecThreeMetricTwoOnesevenTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - '>=', - 'gte', - 'greater than or equal', - '>', - 'gt', - 'greater than', - '<=', - 'lte', - 'less than or equal', - '<', - 'lt', - 'less than', - 'absolute difference', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - epsilon: zod - .union([zod.number(), zod.number()]) - .optional() - .describe('Specify the tolerance for the absolute difference of values.'), - }) - .describe( - 'Request type for NumberCheckMetric. Numeric-comparison metric with template-driven operands.' - ), - zod - .object({ - type: zod - .literal('remote') - .default(evaluationGetMetricJobResponseSpecThreeMetricTwoOneeightTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecThreeMetricTwoOneeightApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoOneeightTimeoutSecondsDefault - ) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoOneeightMaxRetriesDefault - ) - .describe('Maximum number of retry attempts.'), - body: zod - .record(zod.string(), zod.unknown()) - .describe('Jinja template for request payload'), - scores: zod - .array( - zod - .object({ - name: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecThreeMetricTwoOneeightScoresItemNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .object({ - type: zod - .literal('json') - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoOneeightScoresItemParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.') - .optional() - .describe( - 'The method to parse the score. Only JSON parsing is supported for remote metrics.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe( - 'Minimum value for the score range. Defaults to None (no lower bound).' - ), - maximum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe( - 'Maximum value for the score range. Defaults to None (no upper bound).' - ), - }) - .describe( - 'Score configuration for remote metrics.\n\nUnlike RangeScore, minimum and maximum are optional (default to None = no bounds).\nThis avoids JSON serialization issues with infinity values.' - ) - ) - .describe('List of scores to extract from the remote response'), - }) - .describe( - 'Request type for RemoteMetric. A metric that computes scores via a remote endpoint.' - ), - zod - .object({ - type: zod - .literal('nemo-agent-toolkit-remote') - .default(evaluationGetMetricJobResponseSpecThreeMetricTwoOnenineTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecThreeMetricTwoOnenineApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoOnenineTimeoutSecondsDefault - ) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default( - evaluationGetMetricJobResponseSpecThreeMetricTwoOnenineMaxRetriesDefault - ) - .describe('Maximum number of retry attempts.'), - evaluator_name: zod - .string() - .describe('The name of the evaluator (also used as the score name).'), - }) - .describe( - 'Request type for NemoAgentToolkitRemoteMetric. A remote metric that interfaces with NeMo Agent Toolkit evaluators.' - ), - zod - .object({ - type: zod - .literal('rouge') - .default(evaluationGetMetricJobResponseSpecThreeMetricTwoTwozeroTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to evaluate the ROUGE metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the ROUGE metric on. If not provided, the output text from the model is used.' - ), - }) - .describe( - 'Request type for ROUGEMetric. ROUGE metric for overlap-based summarization quality scoring.' - ), - zod - .object({ - type: zod - .literal('string-check') - .default(evaluationGetMetricJobResponseSpecThreeMetricTwoTwooneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - 'contains', - 'not contains', - 'startswith', - 'endswith', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - }) - .describe( - 'Request type for StringCheckMetric. String-comparison metric with operator-based checks.' - ), - zod - .object({ - type: zod - .literal('tool-calling') - .default(evaluationGetMetricJobResponseSpecThreeMetricTwoTwotwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to evaluate tool calling accuracy.' - ), - }) - .describe( - 'Request type for ToolCallingMetric. Tool-calling accuracy metric for structured function calls.' - ), - ]), - zod - .object({ - type: zod - .enum(['system', 'system-retriever']) - .default(evaluationGetMetricJobResponseSpecThreeMetricThreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline', 'retriever'])) - .default([`online`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - name: zod - .string() - .default(evaluationGetMetricJobResponseSpecThreeMetricThreeNameDefault), - required_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod - .string() - .optional() - .describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe( - 'List of required parameters for running an evaluation with the metric.' - ), - optional_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod - .string() - .optional() - .describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe( - 'List of optional parameters for running an evaluation with the metric.' - ), - }) - .describe('Metric entity for system metric that have pre-defined dataset.'), - ]) - .describe('The metric for evaluation.'), - metric_params: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Additional parameters for the metric. Required for system metrics, optional overrides for custom metrics.' - ), - field_mapping: zod - .object({ - input: zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecThreeFieldMappingOneInputRegExp) - .optional() - .describe("Binding for the canonical 'input' evaluator field."), - output: zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecThreeFieldMappingOneOutputRegExp) - .optional() - .describe("Binding for the canonical 'output' evaluator field."), - context: zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecThreeFieldMappingOneContextRegExp) - .optional() - .describe("Binding for the canonical 'context' evaluator field."), - reference: zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecThreeFieldMappingOneReferenceRegExp) - .optional() - .describe("Binding for the canonical 'reference' evaluator field."), - trajectory: zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecThreeFieldMappingOneTrajectoryRegExp) - .optional() - .describe("Binding for the canonical 'trajectory' evaluator field."), - messages: zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecThreeFieldMappingOneMessagesRegExp) - .optional() - .describe("Binding for the canonical 'messages' evaluator field."), - tool_calls: zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecThreeFieldMappingOneToolCallsRegExp) - .optional() - .describe("Binding for the canonical 'tool_calls' evaluator field."), - tools: zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecThreeFieldMappingOneToolsRegExp) - .optional() - .describe("Binding for the canonical 'tools' evaluator field."), - custom: zod - .record( - zod.string(), - zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecThreeFieldMappingOneCustomRegExpOne) - ) - .optional() - .describe('Additional evaluator field bindings keyed by canonical field name.'), - }) - .describe( - "Maps canonical evaluator fields to raw dataset column paths.\nExample: {'input': 'question', 'output': 'answer', 'reference': 'gold', 'trajectory': 'steps'}" - ) - .optional() - .describe( - "Maps canonical evaluator fields such as 'input' and 'output' to dataset column paths for this job." - ), - agent: zod - .object({ - url: zod.string().describe('Base URL of the agent endpoint.'), - name: zod.string().describe('Agent name \/ identifier.'), - format: zod - .enum(['generic', 'nemo_agent_toolkit']) - .default(evaluationGetMetricJobResponseSpecThreeAgentOneFormatDefault) - .describe('Agent format that determines the execution path.'), - api_key_secret: zod - .string() - .regex(evaluationGetMetricJobResponseSpecThreeAgentOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the agent. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - body: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Jinja template for the request payload. Required for generic agents.'), - response_path: zod - .string() - .optional() - .describe( - "JSONPath expression to extract the response text from the agent's response body. Required for generic agents." - ), - trajectory_path: zod - .string() - .optional() - .describe( - "JSONPath expression to extract the trajectory from the agent's response body. Optional." - ), - }) - .describe( - 'Agent definition for inference in online evaluation jobs.\n\nAn agent is an endpoint that accepts a request and returns a response,\npotentially with a trajectory. Two formats are supported:\n\n- ``generic``: configurable HTTP POST with Jinja-templated body and\n JSONPath extraction for response and trajectory.\n- ``nemo_agent_toolkit``: NeMo Agent Toolkit SSE streaming protocol\n (``\/generate\/full?filter_steps=none``).' - ) - .describe('The agent to evaluate.'), - dataset: zod - .union([ - zod - .object({ - rows: zod - .array(zod.record(zod.string(), zod.unknown())) - .min(1) - .describe( - 'Array of data rows. Each row can be any valid JSON value (object, string, array, etc.).' - ), - }) - .describe( - 'Inline dataset definition with embedded rows.\n\nUse this for quick evaluations without persisting the dataset first.' - ), - zod - .string() - .describe( - "Reference to a Fileset in the Files API.\n\nA reference is a string with format 'workspace\/fileset-name' that points to a\npersisted fileset entity. When used as a dataset source, all files within the\nfileset will be downloaded to the job container.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform." - ), - zod - .object({ - path: zod - .string() - .min(1) - .optional() - .describe('The relative path to file\/directory in the storage.'), - storage: zod - .union([ - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationGetMetricJobResponseSpecThreeDatasetThreeStorageOneReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('ngc') - .default( - evaluationGetMetricJobResponseSpecThreeDatasetThreeStorageOneTypeDefault - ), - org: zod.string().describe('NGC organization name'), - team: zod.string().describe('NGC team name'), - target: zod.string().describe('NGC asset name (model or resource)'), - target_type: zod - .enum(['resource', 'model']) - .default( - evaluationGetMetricJobResponseSpecThreeDatasetThreeStorageOneTargetTypeDefault - ) - .describe("Type of NGC asset: 'resource' or 'model'"), - version: zod - .string() - .optional() - .describe('NGC asset version. If not provided, defaults to latest version'), - original_version: zod - .string() - .optional() - .describe( - "The original version requested by the user before resolution (e.g., 'latest' or None). The 'version' field contains the resolved version ID." - ), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecThreeDatasetThreeStorageOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .describe('NGC API key secret name'), - host: zod - .string() - .default( - evaluationGetMetricJobResponseSpecThreeDatasetThreeStorageOneHostDefault - ) - .describe('NGC API host URL'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationGetMetricJobResponseSpecThreeDatasetThreeStorageTwoReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('huggingface') - .default( - evaluationGetMetricJobResponseSpecThreeDatasetThreeStorageTwoTypeDefault - ), - repo_id: zod - .string() - .describe("Huggingface repository ID (e.g., 'meta-llama\/Llama-2-7b')"), - repo_type: zod - .enum(['model', 'dataset', 'space']) - .default( - evaluationGetMetricJobResponseSpecThreeDatasetThreeStorageTwoRepoTypeDefault - ) - .describe("Type of Huggingface repository: 'model', 'dataset', or 'space'"), - revision: zod - .string() - .default( - evaluationGetMetricJobResponseSpecThreeDatasetThreeStorageTwoRevisionDefault - ) - .describe("Branch, tag, or commit SHA. Defaults to 'main'"), - original_revision: zod - .string() - .optional() - .describe( - "The original revision requested by the user before resolution (e.g., 'main'). The 'revision' field contains the resolved commit SHA." - ), - token_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecThreeDatasetThreeStorageTwoTokenSecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe('Huggingface API `token` secret name for private repositories'), - endpoint: zod - .string() - .default( - evaluationGetMetricJobResponseSpecThreeDatasetThreeStorageTwoEndpointDefault - ) - .describe('Huggingface Hub endpoint URL. Use for self-hosted instances.'), - }), - ]) - .describe('The storage configuration for the fileset.'), - metadata: zod - .object({ - dataset: zod - .object({ - schema: zod - .union([zod.record(zod.string(), zod.unknown()), zod.string()]) - .optional() - .describe( - 'Default row schema for files in this fileset, either inline JSON Schema or a schema_defs key.' - ), - schema_defs: zod - .record(zod.string(), zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'Reusable JSON Schema definitions keyed by name for deduplicating per-file dataset schemas.' - ), - schemas_by_path: zod - .record( - zod.string(), - zod.union([zod.record(zod.string(), zod.unknown()), zod.string()]) - ) - .optional() - .describe( - 'Optional per-file row schemas keyed by relative path within the fileset. Each value may be inline JSON Schema or a schema_defs key.' - ), - }) - .optional() - .describe('Content for dataset-type filesets.'), - model: zod - .object({ - tool_calling: zod - .object({ - chat_template: zod - .string() - .optional() - .describe('Jinja2 chat template for the model.'), - tool_call_parser: zod - .string() - .optional() - .describe( - "Name of the tool call parser (e.g., 'openai', 'hermes', 'pythonic', 'llama3_json', 'mistral')." - ), - tool_call_plugin: zod - .string() - .optional() - .describe( - "Reference to a fileset containing a custom tool call plugin Python file. Expected format: '{workspace}\/{fileset_name}'." - ), - auto_tool_choice: zod - .boolean() - .optional() - .describe('Whether to enable automatic tool choice.'), - }) - .optional() - .describe( - 'Content for tool-calling configuration on model filesets.\n\nStores chat template and tool calling settings that are merged into\nthe ModelSpec during checkpoint analysis.' - ), - }) - .optional() - .describe( - 'Content for model-type filesets.\n\nContains tool calling configuration that is merged into the ModelSpec\nduring checkpoint analysis.' - ), - }) - .describe( - 'Tagged metadata container - the key indicates the type.\n\nExample:\n metadata = FilesetMetadata(\n dataset=DatasetMetadataContent(\n schema={\"columns\": [\"id\", \"name\"]},\n )\n )' - ) - .optional() - .describe('Purpose-specific metadata for the fileset.'), - custom_fields: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Custom fields for the fileset.'), - }) - .describe('Fileset definition for use without persisting to the Files API.'), - ]) - .describe('The dataset to use for agent prompts and evaluation.'), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default(evaluationGetMetricJobResponseSpecThreeParamsOneParallelismDefault) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - ignore_request_failure: zod - .boolean() - .default(evaluationGetMetricJobResponseSpecThreeParamsOneIgnoreRequestFailureDefault) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - request_timeout: zod - .number() - .optional() - .describe('The timeout to be used for requests made to the model.'), - max_retries: zod - .number() - .min(evaluationGetMetricJobResponseSpecThreeParamsOneMaxRetriesMin) - .default(evaluationGetMetricJobResponseSpecThreeParamsOneMaxRetriesDefault) - .describe('Maximum number of retries for failed requests.'), - }) - .describe('Job parameters for online evaluation.') - .optional() - .describe('Execution parameters for the metric job.'), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .describe( - 'The jinja template to prompt the agent for evaluation. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{input}}, {{output}}, {{context}}, {{reference}} to reference input columns.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - 'Prompt template fields that should remain available to the prompt template but not be required by dataset schema validation.' - ), - }) - .describe('An online metric job that evaluates an agent.'), - zod - .object({ - metric: zod - .union([ - zod - .string() - .regex(evaluationGetMetricJobResponseSpecFourMetricOneRegExp) - .describe( - "Reference to a metric in the Metrics API.\n\nA reference is a string with format 'workspace\/metric-name' that points to a\npersisted metric entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ), - zod - .object({ - type: zod - .enum(['system', 'system-retriever']) - .default(evaluationGetMetricJobResponseSpecFourMetricTwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline', 'retriever'])) - .default([`online`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - name: zod - .string() - .default(evaluationGetMetricJobResponseSpecFourMetricTwoNameDefault), - required_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod - .string() - .optional() - .describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe( - 'List of required parameters for running an evaluation with the metric.' - ), - optional_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod - .string() - .optional() - .describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe( - 'List of optional parameters for running an evaluation with the metric.' - ), - }) - .describe('Metric entity for system metric that have pre-defined dataset.'), - ]) - .describe('The metric for evaluation.'), - metric_params: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Additional parameters for the metric. Required for system metrics, optional overrides for custom metrics.' - ), - field_mapping: zod - .object({ - input: zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecFourFieldMappingOneInputRegExp) - .optional() - .describe("Binding for the canonical 'input' evaluator field."), - output: zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecFourFieldMappingOneOutputRegExp) - .optional() - .describe("Binding for the canonical 'output' evaluator field."), - context: zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecFourFieldMappingOneContextRegExp) - .optional() - .describe("Binding for the canonical 'context' evaluator field."), - reference: zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecFourFieldMappingOneReferenceRegExp) - .optional() - .describe("Binding for the canonical 'reference' evaluator field."), - trajectory: zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecFourFieldMappingOneTrajectoryRegExp) - .optional() - .describe("Binding for the canonical 'trajectory' evaluator field."), - messages: zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecFourFieldMappingOneMessagesRegExp) - .optional() - .describe("Binding for the canonical 'messages' evaluator field."), - tool_calls: zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecFourFieldMappingOneToolCallsRegExp) - .optional() - .describe("Binding for the canonical 'tool_calls' evaluator field."), - tools: zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecFourFieldMappingOneToolsRegExp) - .optional() - .describe("Binding for the canonical 'tools' evaluator field."), - custom: zod - .record( - zod.string(), - zod - .string() - .min(1) - .regex(evaluationGetMetricJobResponseSpecFourFieldMappingOneCustomRegExpOne) - ) - .optional() - .describe('Additional evaluator field bindings keyed by canonical field name.'), - }) - .describe( - "Maps canonical evaluator fields to raw dataset column paths.\nExample: {'input': 'question', 'output': 'answer', 'reference': 'gold', 'trajectory': 'steps'}" - ) - .optional() - .describe( - "Maps canonical evaluator fields such as 'input' and 'output' to dataset column paths for this job." - ), - retriever_pipeline: zod - .object({ - embeddings_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecFourRetrieverPipelineOneEmbeddingsModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationGetMetricJobResponseSpecFourRetrieverPipelineOneEmbeddingsModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationGetMetricJobResponseSpecFourRetrieverPipelineOneEmbeddingsModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The embeddings model configuration.'), - }) - .describe('Pipeline configuration for retriever-based evaluations.') - .describe('The pipeline configuration for retriever-based evaluation.'), - dataset: zod - .union([ - zod - .enum([ - 'beir/climate-fever', - 'beir/cqadupstack', - 'beir/dbpedia-entity', - 'beir/fever', - 'beir/fiqa', - 'beir/germanquad', - 'beir/hotpotqa', - 'beir/mmarco', - 'beir/mrtydi', - 'beir/msmarco-v2', - 'beir/msmarco', - 'beir/nfcorpus', - 'beir/nq-train', - 'beir/nq', - 'beir/quora', - 'beir/scidocs', - 'beir/scifact', - 'beir/trec-covid-beir', - 'beir/trec-covid-v2', - 'beir/trec-covid', - 'beir/vihealthqa', - 'beir/webis-touche2020', - 'ragas/amnesty_qa', - ]) - .describe('Well-known dataset (BEIR or RAGAS) referenced by its identifier.'), - zod - .object({ - rows: zod - .array(zod.record(zod.string(), zod.unknown())) - .min(1) - .describe( - 'Array of data rows. Each row can be any valid JSON value (object, string, array, etc.).' - ), - }) - .describe( - 'Inline dataset definition with embedded rows.\n\nUse this for quick evaluations without persisting the dataset first.' - ), - zod - .string() - .describe( - "Reference to a Fileset in the Files API.\n\nA reference is a string with format 'workspace\/fileset-name' that points to a\npersisted fileset entity. When used as a dataset source, all files within the\nfileset will be downloaded to the job container.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform." - ), - zod - .object({ - path: zod - .string() - .min(1) - .optional() - .describe('The relative path to file\/directory in the storage.'), - storage: zod - .union([ - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationGetMetricJobResponseSpecFourDatasetFourStorageOneReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('ngc') - .default( - evaluationGetMetricJobResponseSpecFourDatasetFourStorageOneTypeDefault - ), - org: zod.string().describe('NGC organization name'), - team: zod.string().describe('NGC team name'), - target: zod.string().describe('NGC asset name (model or resource)'), - target_type: zod - .enum(['resource', 'model']) - .default( - evaluationGetMetricJobResponseSpecFourDatasetFourStorageOneTargetTypeDefault - ) - .describe("Type of NGC asset: 'resource' or 'model'"), - version: zod - .string() - .optional() - .describe('NGC asset version. If not provided, defaults to latest version'), - original_version: zod - .string() - .optional() - .describe( - "The original version requested by the user before resolution (e.g., 'latest' or None). The 'version' field contains the resolved version ID." - ), - api_key_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecFourDatasetFourStorageOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .describe('NGC API key secret name'), - host: zod - .string() - .default( - evaluationGetMetricJobResponseSpecFourDatasetFourStorageOneHostDefault - ) - .describe('NGC API host URL'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationGetMetricJobResponseSpecFourDatasetFourStorageTwoReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('huggingface') - .default( - evaluationGetMetricJobResponseSpecFourDatasetFourStorageTwoTypeDefault - ), - repo_id: zod - .string() - .describe("Huggingface repository ID (e.g., 'meta-llama\/Llama-2-7b')"), - repo_type: zod - .enum(['model', 'dataset', 'space']) - .default( - evaluationGetMetricJobResponseSpecFourDatasetFourStorageTwoRepoTypeDefault - ) - .describe("Type of Huggingface repository: 'model', 'dataset', or 'space'"), - revision: zod - .string() - .default( - evaluationGetMetricJobResponseSpecFourDatasetFourStorageTwoRevisionDefault - ) - .describe("Branch, tag, or commit SHA. Defaults to 'main'"), - original_revision: zod - .string() - .optional() - .describe( - "The original revision requested by the user before resolution (e.g., 'main'). The 'revision' field contains the resolved commit SHA." - ), - token_secret: zod - .string() - .regex( - evaluationGetMetricJobResponseSpecFourDatasetFourStorageTwoTokenSecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe('Huggingface API `token` secret name for private repositories'), - endpoint: zod - .string() - .default( - evaluationGetMetricJobResponseSpecFourDatasetFourStorageTwoEndpointDefault - ) - .describe('Huggingface Hub endpoint URL. Use for self-hosted instances.'), - }), - ]) - .describe('The storage configuration for the fileset.'), - metadata: zod - .object({ - dataset: zod - .object({ - schema: zod - .union([zod.record(zod.string(), zod.unknown()), zod.string()]) - .optional() - .describe( - 'Default row schema for files in this fileset, either inline JSON Schema or a schema_defs key.' - ), - schema_defs: zod - .record(zod.string(), zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'Reusable JSON Schema definitions keyed by name for deduplicating per-file dataset schemas.' - ), - schemas_by_path: zod - .record( - zod.string(), - zod.union([zod.record(zod.string(), zod.unknown()), zod.string()]) - ) - .optional() - .describe( - 'Optional per-file row schemas keyed by relative path within the fileset. Each value may be inline JSON Schema or a schema_defs key.' - ), - }) - .optional() - .describe('Content for dataset-type filesets.'), - model: zod - .object({ - tool_calling: zod - .object({ - chat_template: zod - .string() - .optional() - .describe('Jinja2 chat template for the model.'), - tool_call_parser: zod - .string() - .optional() - .describe( - "Name of the tool call parser (e.g., 'openai', 'hermes', 'pythonic', 'llama3_json', 'mistral')." - ), - tool_call_plugin: zod - .string() - .optional() - .describe( - "Reference to a fileset containing a custom tool call plugin Python file. Expected format: '{workspace}\/{fileset_name}'." - ), - auto_tool_choice: zod - .boolean() - .optional() - .describe('Whether to enable automatic tool choice.'), - }) - .optional() - .describe( - 'Content for tool-calling configuration on model filesets.\n\nStores chat template and tool calling settings that are merged into\nthe ModelSpec during checkpoint analysis.' - ), - }) - .optional() - .describe( - 'Content for model-type filesets.\n\nContains tool calling configuration that is merged into the ModelSpec\nduring checkpoint analysis.' - ), - }) - .describe( - 'Tagged metadata container - the key indicates the type.\n\nExample:\n metadata = FilesetMetadata(\n dataset=DatasetMetadataContent(\n schema={\"columns\": [\"id\", \"name\"]},\n )\n )' - ) - .optional() - .describe('Purpose-specific metadata for the fileset.'), - custom_fields: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Custom fields for the fileset.'), - }) - .describe('Fileset definition for use without persisting to the Files API.'), - ]) - .describe('The dataset to use for evaluation.'), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default(evaluationGetMetricJobResponseSpecFourParamsOneParallelismDefault) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - ignore_request_failure: zod - .boolean() - .default(evaluationGetMetricJobResponseSpecFourParamsOneIgnoreRequestFailureDefault) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - request_timeout: zod - .number() - .optional() - .describe('The timeout to be used for requests made to the model.'), - max_retries: zod - .number() - .min(evaluationGetMetricJobResponseSpecFourParamsOneMaxRetriesMin) - .default(evaluationGetMetricJobResponseSpecFourParamsOneMaxRetriesDefault) - .describe('Maximum number of retries for failed requests.'), - }) - .describe('Job parameters for online evaluation.') - .optional() - .describe('Execution parameters for the metric job.'), - }) - .describe('Evaluation with a retriever-based metric.'), - ]), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .optional() - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ), - status_details: zod.record(zod.string(), zod.unknown()).optional(), - error_details: zod.record(zod.string(), zod.unknown()).optional(), - ownership: zod.record(zod.string(), zod.unknown()).optional(), - custom_fields: zod.record(zod.string(), zod.unknown()).optional(), -}); - -/** - * @summary Delete Job - */ -export const EvaluationDeleteMetricJobParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -/** - * @summary Cancel Job - */ -export const EvaluationCancelMetricJobParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const evaluationCancelMetricJobResponseSpecOneMetricOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOneTypeDefault = `llm-judge`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOneModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOneModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOneModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOneScoresItemOneNameRegExp = - new RegExp('^[a-z0-9_]+$'); -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOneScoresItemOneParserOneTypeDefault = `json`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOneScoresItemOneParserTwoTypeDefault = `regex`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOneScoresItemOneParserTwoMethodDefault = `match`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOneScoresItemOneRubricMin = 2; - -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOneScoresItemTwoNameRegExp = - new RegExp('^[a-z0-9_]+$'); -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOneScoresItemTwoParserOneTypeDefault = `json`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOneScoresItemTwoParserTwoTypeDefault = `regex`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOneScoresItemTwoParserTwoMethodDefault = `match`; - -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOneInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOneInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOneInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOneInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOneIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoTwoJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecOneMetricTwoTwoJudgeModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoTwoJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCancelMetricJobResponseSpecOneMetricTwoTwoInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoTwoInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecOneMetricTwoTwoInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoTwoInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecOneMetricTwoTwoIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoTwoTypeDefault = `topic_adherence`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoTwoMetricModeDefault = `f1`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoThreeJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecOneMetricTwoThreeJudgeModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoThreeJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCancelMetricJobResponseSpecOneMetricTwoThreeInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoThreeInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecOneMetricTwoThreeInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoThreeInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecOneMetricTwoThreeIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoThreeTypeDefault = `agent_goal_accuracy`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoThreeUseReferenceDefault = true; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoFourJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecOneMetricTwoFourJudgeModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoFourJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCancelMetricJobResponseSpecOneMetricTwoFourInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoFourInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecOneMetricTwoFourInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoFourInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecOneMetricTwoFourIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoFourTypeDefault = `answer_accuracy`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoFiveJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecOneMetricTwoFiveJudgeModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoFiveJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCancelMetricJobResponseSpecOneMetricTwoFiveInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoFiveInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecOneMetricTwoFiveInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoFiveInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecOneMetricTwoFiveIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoFiveTypeDefault = `context_relevance`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoSixJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecOneMetricTwoSixJudgeModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoSixJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCancelMetricJobResponseSpecOneMetricTwoSixInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoSixInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecOneMetricTwoSixInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoSixInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecOneMetricTwoSixIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoSixTypeDefault = `response_groundedness`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoSevenJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecOneMetricTwoSevenJudgeModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoSevenJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCancelMetricJobResponseSpecOneMetricTwoSevenInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoSevenInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecOneMetricTwoSevenInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoSevenInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecOneMetricTwoSevenIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoSevenTypeDefault = `context_recall`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoEightJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecOneMetricTwoEightJudgeModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoEightJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCancelMetricJobResponseSpecOneMetricTwoEightInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoEightInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecOneMetricTwoEightInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoEightInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecOneMetricTwoEightIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoEightTypeDefault = `context_precision`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoNineJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecOneMetricTwoNineJudgeModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoNineJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCancelMetricJobResponseSpecOneMetricTwoNineInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoNineInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecOneMetricTwoNineInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoNineInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecOneMetricTwoNineIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoNineTypeDefault = `context_entity_recall`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOnezeroEmbeddingsModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOnezeroEmbeddingsModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOnezeroEmbeddingsModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOnezeroJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOnezeroJudgeModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOnezeroJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOnezeroInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOnezeroInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOnezeroInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOnezeroInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOnezeroIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOnezeroTypeDefault = `response_relevancy`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOnezeroStrictnessDefault = 1; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOneoneJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOneoneJudgeModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOneoneJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOneoneInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOneoneInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOneoneInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOneoneInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOneoneIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOneoneTypeDefault = `faithfulness`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOnetwoJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOnetwoJudgeModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOnetwoJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOnetwoInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOnetwoInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOnetwoInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOnetwoInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOnetwoIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOnetwoTypeDefault = `noise_sensitivity`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOnethreeTypeDefault = `tool_call_accuracy`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOnefourTypeDefault = `bleu`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOnefiveTypeDefault = `exact-match`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOnesixTypeDefault = `f1`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOnesevenTypeDefault = `number-check`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOneeightTypeDefault = `remote`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOneeightApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOneeightTimeoutSecondsDefault = 30; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOneeightMaxRetriesDefault = 3; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOneeightScoresItemNameRegExp = - new RegExp('^[a-z0-9_]+$'); -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOneeightScoresItemParserOneTypeDefault = `json`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOnenineTypeDefault = `nemo-agent-toolkit-remote`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOnenineApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOnenineTimeoutSecondsDefault = 30; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoOnenineMaxRetriesDefault = 3; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoTwozeroTypeDefault = `rouge`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoTwooneTypeDefault = `string-check`; -export const evaluationCancelMetricJobResponseSpecOneMetricTwoTwotwoTypeDefault = `tool-calling`; -export const evaluationCancelMetricJobResponseSpecOneMetricThreeTypeDefault = `system`; -export const evaluationCancelMetricJobResponseSpecOneMetricThreeNameDefault = `Metric name`; - -export const evaluationCancelMetricJobResponseSpecOneFieldMappingOneInputRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCancelMetricJobResponseSpecOneFieldMappingOneOutputRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCancelMetricJobResponseSpecOneFieldMappingOneContextRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCancelMetricJobResponseSpecOneFieldMappingOneReferenceRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCancelMetricJobResponseSpecOneFieldMappingOneTrajectoryRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCancelMetricJobResponseSpecOneFieldMappingOneMessagesRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCancelMetricJobResponseSpecOneFieldMappingOneToolCallsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCancelMetricJobResponseSpecOneFieldMappingOneToolsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCancelMetricJobResponseSpecOneFieldMappingOneCustomRegExpOne = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCancelMetricJobResponseSpecOneDatasetThreeStorageOneReadChunkSizeDefault = 1048576; -export const evaluationCancelMetricJobResponseSpecOneDatasetThreeStorageOneTypeDefault = `ngc`; -export const evaluationCancelMetricJobResponseSpecOneDatasetThreeStorageOneTargetTypeDefault = `resource`; -export const evaluationCancelMetricJobResponseSpecOneDatasetThreeStorageOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecOneDatasetThreeStorageOneHostDefault = `https://api.ngc.nvidia.com`; -export const evaluationCancelMetricJobResponseSpecOneDatasetThreeStorageTwoReadChunkSizeDefault = 1048576; -export const evaluationCancelMetricJobResponseSpecOneDatasetThreeStorageTwoTypeDefault = `huggingface`; -export const evaluationCancelMetricJobResponseSpecOneDatasetThreeStorageTwoRepoTypeDefault = `model`; -export const evaluationCancelMetricJobResponseSpecOneDatasetThreeStorageTwoRevisionDefault = `main`; -export const evaluationCancelMetricJobResponseSpecOneDatasetThreeStorageTwoTokenSecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecOneDatasetThreeStorageTwoEndpointDefault = `https://huggingface.co`; -export const evaluationCancelMetricJobResponseSpecOneParamsOneParallelismDefault = 8; - -export const evaluationCancelMetricJobResponseSpecTwoMetricOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOneTypeDefault = `llm-judge`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOneModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOneModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOneModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOneScoresItemOneNameRegExp = - new RegExp('^[a-z0-9_]+$'); -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOneScoresItemOneParserOneTypeDefault = `json`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOneScoresItemOneParserTwoTypeDefault = `regex`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOneScoresItemOneParserTwoMethodDefault = `match`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOneScoresItemOneRubricMin = 2; - -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOneScoresItemTwoNameRegExp = - new RegExp('^[a-z0-9_]+$'); -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOneScoresItemTwoParserOneTypeDefault = `json`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOneScoresItemTwoParserTwoTypeDefault = `regex`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOneScoresItemTwoParserTwoMethodDefault = `match`; - -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOneInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOneInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOneInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOneInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOneIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoTwoJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoTwoJudgeModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoTwoJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoTwoInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoTwoInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoTwoInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoTwoInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoTwoIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoTwoTypeDefault = `topic_adherence`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoTwoMetricModeDefault = `f1`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoThreeJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoThreeJudgeModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoThreeJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoThreeInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoThreeInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoThreeInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoThreeInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoThreeIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoThreeTypeDefault = `agent_goal_accuracy`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoThreeUseReferenceDefault = true; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoFourJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoFourJudgeModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoFourJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoFourInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoFourInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoFourInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoFourInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoFourIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoFourTypeDefault = `answer_accuracy`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoFiveJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoFiveJudgeModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoFiveJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoFiveInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoFiveInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoFiveInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoFiveInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoFiveIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoFiveTypeDefault = `context_relevance`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoSixJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoSixJudgeModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoSixJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoSixInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoSixInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoSixInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoSixInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoSixIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoSixTypeDefault = `response_groundedness`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoSevenJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoSevenJudgeModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoSevenJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoSevenInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoSevenInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoSevenInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoSevenInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoSevenIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoSevenTypeDefault = `context_recall`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoEightJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoEightJudgeModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoEightJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoEightInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoEightInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoEightInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoEightInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoEightIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoEightTypeDefault = `context_precision`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoNineJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoNineJudgeModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoNineJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoNineInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoNineInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoNineInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoNineInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoNineIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoNineTypeDefault = `context_entity_recall`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOnezeroEmbeddingsModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOnezeroEmbeddingsModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOnezeroEmbeddingsModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOnezeroJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOnezeroJudgeModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOnezeroJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOnezeroInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOnezeroInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOnezeroInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOnezeroInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOnezeroIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOnezeroTypeDefault = `response_relevancy`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOnezeroStrictnessDefault = 1; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOneoneJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOneoneJudgeModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOneoneJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOneoneInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOneoneInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOneoneInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOneoneInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOneoneIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOneoneTypeDefault = `faithfulness`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOnetwoJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOnetwoJudgeModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOnetwoJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOnetwoInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOnetwoInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOnetwoInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOnetwoInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOnetwoIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOnetwoTypeDefault = `noise_sensitivity`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOnethreeTypeDefault = `tool_call_accuracy`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOnefourTypeDefault = `bleu`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOnefiveTypeDefault = `exact-match`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOnesixTypeDefault = `f1`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOnesevenTypeDefault = `number-check`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOneeightTypeDefault = `remote`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOneeightApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOneeightTimeoutSecondsDefault = 30; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOneeightMaxRetriesDefault = 3; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOneeightScoresItemNameRegExp = - new RegExp('^[a-z0-9_]+$'); -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOneeightScoresItemParserOneTypeDefault = `json`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOnenineTypeDefault = `nemo-agent-toolkit-remote`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOnenineApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOnenineTimeoutSecondsDefault = 30; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoOnenineMaxRetriesDefault = 3; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoTwozeroTypeDefault = `rouge`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoTwooneTypeDefault = `string-check`; -export const evaluationCancelMetricJobResponseSpecTwoMetricTwoTwotwoTypeDefault = `tool-calling`; -export const evaluationCancelMetricJobResponseSpecTwoMetricThreeTypeDefault = `system`; -export const evaluationCancelMetricJobResponseSpecTwoMetricThreeNameDefault = `Metric name`; - -export const evaluationCancelMetricJobResponseSpecTwoFieldMappingOneInputRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCancelMetricJobResponseSpecTwoFieldMappingOneOutputRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCancelMetricJobResponseSpecTwoFieldMappingOneContextRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCancelMetricJobResponseSpecTwoFieldMappingOneReferenceRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCancelMetricJobResponseSpecTwoFieldMappingOneTrajectoryRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCancelMetricJobResponseSpecTwoFieldMappingOneMessagesRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCancelMetricJobResponseSpecTwoFieldMappingOneToolCallsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCancelMetricJobResponseSpecTwoFieldMappingOneToolsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCancelMetricJobResponseSpecTwoFieldMappingOneCustomRegExpOne = new RegExp( - '^[^\\[\\]]\*$' -); -export const evaluationCancelMetricJobResponseSpecTwoModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCancelMetricJobResponseSpecTwoModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecTwoModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); - -export const evaluationCancelMetricJobResponseSpecTwoDatasetThreeStorageOneReadChunkSizeDefault = 1048576; -export const evaluationCancelMetricJobResponseSpecTwoDatasetThreeStorageOneTypeDefault = `ngc`; -export const evaluationCancelMetricJobResponseSpecTwoDatasetThreeStorageOneTargetTypeDefault = `resource`; -export const evaluationCancelMetricJobResponseSpecTwoDatasetThreeStorageOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecTwoDatasetThreeStorageOneHostDefault = `https://api.ngc.nvidia.com`; -export const evaluationCancelMetricJobResponseSpecTwoDatasetThreeStorageTwoReadChunkSizeDefault = 1048576; -export const evaluationCancelMetricJobResponseSpecTwoDatasetThreeStorageTwoTypeDefault = `huggingface`; -export const evaluationCancelMetricJobResponseSpecTwoDatasetThreeStorageTwoRepoTypeDefault = `model`; -export const evaluationCancelMetricJobResponseSpecTwoDatasetThreeStorageTwoRevisionDefault = `main`; -export const evaluationCancelMetricJobResponseSpecTwoDatasetThreeStorageTwoTokenSecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecTwoDatasetThreeStorageTwoEndpointDefault = `https://huggingface.co`; -export const evaluationCancelMetricJobResponseSpecTwoParamsOneParallelismDefault = 8; - -export const evaluationCancelMetricJobResponseSpecTwoParamsOneIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecTwoParamsOneMaxRetriesDefault = 3; -export const evaluationCancelMetricJobResponseSpecTwoParamsOneMaxRetriesMin = 0; - -export const evaluationCancelMetricJobResponseSpecTwoParamsOneInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecTwoParamsOneInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecTwoParamsOneInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecTwoParamsOneInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecThreeMetricOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOneTypeDefault = `llm-judge`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOneModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOneModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOneModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOneScoresItemOneNameRegExp = - new RegExp('^[a-z0-9_]+$'); -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOneScoresItemOneParserOneTypeDefault = `json`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOneScoresItemOneParserTwoTypeDefault = `regex`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOneScoresItemOneParserTwoMethodDefault = `match`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOneScoresItemOneRubricMin = 2; - -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOneScoresItemTwoNameRegExp = - new RegExp('^[a-z0-9_]+$'); -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOneScoresItemTwoParserOneTypeDefault = `json`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOneScoresItemTwoParserTwoTypeDefault = `regex`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOneScoresItemTwoParserTwoMethodDefault = `match`; - -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOneInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOneInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOneInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOneInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOneIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoTwoJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoTwoJudgeModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoTwoJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoTwoInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoTwoInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoTwoInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoTwoInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoTwoIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoTwoTypeDefault = `topic_adherence`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoTwoMetricModeDefault = `f1`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoThreeJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoThreeJudgeModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoThreeJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoThreeInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoThreeInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoThreeInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoThreeInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoThreeIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoThreeTypeDefault = `agent_goal_accuracy`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoThreeUseReferenceDefault = true; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoFourJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoFourJudgeModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoFourJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoFourInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoFourInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoFourInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoFourInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoFourIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoFourTypeDefault = `answer_accuracy`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoFiveJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoFiveJudgeModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoFiveJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoFiveInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoFiveInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoFiveInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoFiveInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoFiveIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoFiveTypeDefault = `context_relevance`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoSixJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoSixJudgeModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoSixJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoSixInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoSixInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoSixInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoSixInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoSixIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoSixTypeDefault = `response_groundedness`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoSevenJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoSevenJudgeModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoSevenJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoSevenInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoSevenInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoSevenInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoSevenInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoSevenIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoSevenTypeDefault = `context_recall`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoEightJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoEightJudgeModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoEightJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoEightInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoEightInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoEightInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoEightInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoEightIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoEightTypeDefault = `context_precision`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoNineJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoNineJudgeModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoNineJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoNineInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoNineInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoNineInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoNineInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoNineIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoNineTypeDefault = `context_entity_recall`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOnezeroEmbeddingsModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOnezeroEmbeddingsModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOnezeroEmbeddingsModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOnezeroJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOnezeroJudgeModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOnezeroJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOnezeroInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOnezeroInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOnezeroInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOnezeroInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOnezeroIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOnezeroTypeDefault = `response_relevancy`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOnezeroStrictnessDefault = 1; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOneoneJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOneoneJudgeModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOneoneJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOneoneInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOneoneInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOneoneInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOneoneInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOneoneIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOneoneTypeDefault = `faithfulness`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOnetwoJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOnetwoJudgeModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOnetwoJudgeModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOnetwoInferenceOneTemperatureMin = 0; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOnetwoInferenceOneTemperatureMax = 2; - -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOnetwoInferenceOneTopPMin = 0; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOnetwoInferenceOneTopPMax = 1; - -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOnetwoIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOnetwoTypeDefault = `noise_sensitivity`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOnethreeTypeDefault = `tool_call_accuracy`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOnefourTypeDefault = `bleu`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOnefiveTypeDefault = `exact-match`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOnesixTypeDefault = `f1`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOnesevenTypeDefault = `number-check`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOneeightTypeDefault = `remote`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOneeightApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOneeightTimeoutSecondsDefault = 30; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOneeightMaxRetriesDefault = 3; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOneeightScoresItemNameRegExp = - new RegExp('^[a-z0-9_]+$'); -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOneeightScoresItemParserOneTypeDefault = `json`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOnenineTypeDefault = `nemo-agent-toolkit-remote`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOnenineApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOnenineTimeoutSecondsDefault = 30; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoOnenineMaxRetriesDefault = 3; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoTwozeroTypeDefault = `rouge`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoTwooneTypeDefault = `string-check`; -export const evaluationCancelMetricJobResponseSpecThreeMetricTwoTwotwoTypeDefault = `tool-calling`; -export const evaluationCancelMetricJobResponseSpecThreeMetricThreeTypeDefault = `system`; -export const evaluationCancelMetricJobResponseSpecThreeMetricThreeNameDefault = `Metric name`; - -export const evaluationCancelMetricJobResponseSpecThreeFieldMappingOneInputRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCancelMetricJobResponseSpecThreeFieldMappingOneOutputRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCancelMetricJobResponseSpecThreeFieldMappingOneContextRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCancelMetricJobResponseSpecThreeFieldMappingOneReferenceRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCancelMetricJobResponseSpecThreeFieldMappingOneTrajectoryRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCancelMetricJobResponseSpecThreeFieldMappingOneMessagesRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCancelMetricJobResponseSpecThreeFieldMappingOneToolCallsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCancelMetricJobResponseSpecThreeFieldMappingOneToolsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCancelMetricJobResponseSpecThreeFieldMappingOneCustomRegExpOne = new RegExp( - '^[^\\[\\]]\*$' -); -export const evaluationCancelMetricJobResponseSpecThreeAgentOneFormatDefault = `generic`; -export const evaluationCancelMetricJobResponseSpecThreeAgentOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); - -export const evaluationCancelMetricJobResponseSpecThreeDatasetThreeStorageOneReadChunkSizeDefault = 1048576; -export const evaluationCancelMetricJobResponseSpecThreeDatasetThreeStorageOneTypeDefault = `ngc`; -export const evaluationCancelMetricJobResponseSpecThreeDatasetThreeStorageOneTargetTypeDefault = `resource`; -export const evaluationCancelMetricJobResponseSpecThreeDatasetThreeStorageOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecThreeDatasetThreeStorageOneHostDefault = `https://api.ngc.nvidia.com`; -export const evaluationCancelMetricJobResponseSpecThreeDatasetThreeStorageTwoReadChunkSizeDefault = 1048576; -export const evaluationCancelMetricJobResponseSpecThreeDatasetThreeStorageTwoTypeDefault = `huggingface`; -export const evaluationCancelMetricJobResponseSpecThreeDatasetThreeStorageTwoRepoTypeDefault = `model`; -export const evaluationCancelMetricJobResponseSpecThreeDatasetThreeStorageTwoRevisionDefault = `main`; -export const evaluationCancelMetricJobResponseSpecThreeDatasetThreeStorageTwoTokenSecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecThreeDatasetThreeStorageTwoEndpointDefault = `https://huggingface.co`; -export const evaluationCancelMetricJobResponseSpecThreeParamsOneParallelismDefault = 8; - -export const evaluationCancelMetricJobResponseSpecThreeParamsOneIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecThreeParamsOneMaxRetriesDefault = 3; -export const evaluationCancelMetricJobResponseSpecThreeParamsOneMaxRetriesMin = 0; - -export const evaluationCancelMetricJobResponseSpecFourMetricOneRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCancelMetricJobResponseSpecFourMetricTwoTypeDefault = `system`; -export const evaluationCancelMetricJobResponseSpecFourMetricTwoNameDefault = `Metric name`; - -export const evaluationCancelMetricJobResponseSpecFourFieldMappingOneInputRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCancelMetricJobResponseSpecFourFieldMappingOneOutputRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCancelMetricJobResponseSpecFourFieldMappingOneContextRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCancelMetricJobResponseSpecFourFieldMappingOneReferenceRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCancelMetricJobResponseSpecFourFieldMappingOneTrajectoryRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCancelMetricJobResponseSpecFourFieldMappingOneMessagesRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCancelMetricJobResponseSpecFourFieldMappingOneToolCallsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCancelMetricJobResponseSpecFourFieldMappingOneToolsRegExp = new RegExp( - '^[^\\[\\]]\*$' -); - -export const evaluationCancelMetricJobResponseSpecFourFieldMappingOneCustomRegExpOne = new RegExp( - '^[^\\[\\]]\*$' -); -export const evaluationCancelMetricJobResponseSpecFourRetrieverPipelineOneEmbeddingsModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecFourRetrieverPipelineOneEmbeddingsModelOneFormatDefault = `nim`; -export const evaluationCancelMetricJobResponseSpecFourRetrieverPipelineOneEmbeddingsModelTwoRegExp = - new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); - -export const evaluationCancelMetricJobResponseSpecFourDatasetFourStorageOneReadChunkSizeDefault = 1048576; -export const evaluationCancelMetricJobResponseSpecFourDatasetFourStorageOneTypeDefault = `ngc`; -export const evaluationCancelMetricJobResponseSpecFourDatasetFourStorageOneTargetTypeDefault = `resource`; -export const evaluationCancelMetricJobResponseSpecFourDatasetFourStorageOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecFourDatasetFourStorageOneHostDefault = `https://api.ngc.nvidia.com`; -export const evaluationCancelMetricJobResponseSpecFourDatasetFourStorageTwoReadChunkSizeDefault = 1048576; -export const evaluationCancelMetricJobResponseSpecFourDatasetFourStorageTwoTypeDefault = `huggingface`; -export const evaluationCancelMetricJobResponseSpecFourDatasetFourStorageTwoRepoTypeDefault = `model`; -export const evaluationCancelMetricJobResponseSpecFourDatasetFourStorageTwoRevisionDefault = `main`; -export const evaluationCancelMetricJobResponseSpecFourDatasetFourStorageTwoTokenSecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCancelMetricJobResponseSpecFourDatasetFourStorageTwoEndpointDefault = `https://huggingface.co`; -export const evaluationCancelMetricJobResponseSpecFourParamsOneParallelismDefault = 8; - -export const evaluationCancelMetricJobResponseSpecFourParamsOneIgnoreRequestFailureDefault = false; -export const evaluationCancelMetricJobResponseSpecFourParamsOneMaxRetriesDefault = 3; -export const evaluationCancelMetricJobResponseSpecFourParamsOneMaxRetriesMin = 0; - -export const EvaluationCancelMetricJobResponse = zod.object({ - id: zod.string().optional(), - name: zod.string(), - description: zod.string().optional(), - project: zod.string().optional(), - workspace: zod.string().optional(), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - spec: zod.union([ - zod - .object({ - metric: zod - .union([ - zod - .string() - .regex(evaluationCancelMetricJobResponseSpecOneMetricOneRegExp) - .describe( - "Reference to a metric in the Metrics API.\n\nA reference is a string with format 'workspace\/metric-name' that points to a\npersisted metric entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ), - zod.union([ - zod - .object({ - type: zod - .literal('llm-judge') - .default(evaluationCancelMetricJobResponseSpecOneMetricTwoOneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecOneMetricTwoOneModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoOneModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCancelMetricJobResponseSpecOneMetricTwoOneModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The model configuration.'), - scores: zod - .array( - zod.union([ - zod - .object({ - name: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecOneMetricTwoOneScoresItemOneNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoOneScoresItemOneParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoOneScoresItemOneParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoOneScoresItemOneParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - rubric: zod - .array( - zod.object({ - label: zod - .string() - .describe( - 'The label to use for the level of the rubric grading criteria. (e.g., \"helpful\", \"not_helpful\", \"positive\")' - ), - description: zod - .string() - .optional() - .describe( - 'Describe the semantic meaning of each criteria for the given rubric. If no judge template is set, the input description for labels are included in the generated judge prompt.' - ), - value: zod - .union([zod.number(), zod.number()]) - .describe( - 'The score value to assign for the criteria used for aggregation and ranking.' - ), - }) - ) - .min( - evaluationCancelMetricJobResponseSpecOneMetricTwoOneScoresItemOneRubricMin - ) - .describe('The rubric for the score.'), - }) - .describe( - 'Score definition for a rubric with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - zod - .object({ - name: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecOneMetricTwoOneScoresItemTwoNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoOneScoresItemTwoParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoOneScoresItemTwoParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoOneScoresItemTwoParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .describe( - 'Minimum value for the score range. Must be less than maximum.' - ), - maximum: zod - .union([zod.number(), zod.number()]) - .describe( - 'Maximum value for the score range. Must be greater than minimum.' - ), - }) - .describe( - 'Score definition for a range of values with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - ]) - ) - .min(1) - .describe( - "Definitions of scores that will be extracted from the judge's output." - ), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .optional() - .describe( - 'The prompt template for the judge. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{sample.output_text}} to use the model output within the template or {{item.xxx}} to reference input columns from the dataset.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - "Prompt template fields that should remain in the inferred input schema but not be required. Use this for fields like 'reference' when the metric can still run without them." - ), - structured_output: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'JSON schema to apply structured output for the judge model evaluation. Structured output is derived from scores when omitted. Use this option if there are custom requirements for the output of the judge.' - ), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecOneMetricTwoOneInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecOneMetricTwoOneInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecOneMetricTwoOneInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecOneMetricTwoOneInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge model.'), - system_prompt: zod - .string() - .optional() - .describe( - "Initial instructions that define the judge model's role and behavior for the conversation. This is prepended to the messages as a system message." - ), - reasoning: zod - .object({ - end_token: zod - .string() - .optional() - .describe( - "Configure the end token to trim reasoning context based on the model's reasoning API. Example for Nemotron models: '<\/think>'" - ), - include_if_not_finished: zod - .boolean() - .optional() - .describe( - 'Configure whether to include reasoning context if the model has not finished reasoning.' - ), - effort: zod - .string() - .optional() - .describe( - 'Option for OpenAI models to specify low, medium, or high reasoning effort.' - ), - }) - .describe("Custom settings that control the model's reasoning behavior.") - .optional() - .describe( - "Custom settings that control the judge model's reasoning behavior. For reasoning models (e.g., Nemotron), use `end_token` to strip reasoning traces from the output." - ), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoOneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - }) - .describe('Request type for creating LLM Judge metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecOneMetricTwoTwoJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoTwoJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecOneMetricTwoTwoJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecOneMetricTwoTwoInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecOneMetricTwoTwoInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecOneMetricTwoTwoInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecOneMetricTwoTwoInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoTwoIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('topic_adherence') - .default(evaluationCancelMetricJobResponseSpecOneMetricTwoTwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - metric_mode: zod - .enum(['f1', 'precision', 'recall']) - .default(evaluationCancelMetricJobResponseSpecOneMetricTwoTwoMetricModeDefault) - .describe('The mode for computing topic adherence score.'), - }) - .describe('Request type for TopicAdherence metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecOneMetricTwoThreeJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoThreeJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecOneMetricTwoThreeJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecOneMetricTwoThreeInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecOneMetricTwoThreeInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecOneMetricTwoThreeInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecOneMetricTwoThreeInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoThreeIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('agent_goal_accuracy') - .default(evaluationCancelMetricJobResponseSpecOneMetricTwoThreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - use_reference: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoThreeUseReferenceDefault - ) - .describe('Whether to use reference for goal accuracy evaluation.'), - }) - .describe('Request type for AgentGoalAccuracy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecOneMetricTwoFourJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoFourJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecOneMetricTwoFourJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecOneMetricTwoFourInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecOneMetricTwoFourInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecOneMetricTwoFourInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecOneMetricTwoFourInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoFourIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('answer_accuracy') - .default(evaluationCancelMetricJobResponseSpecOneMetricTwoFourTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for AnswerAccuracy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecOneMetricTwoFiveJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoFiveJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecOneMetricTwoFiveJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecOneMetricTwoFiveInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecOneMetricTwoFiveInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecOneMetricTwoFiveInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecOneMetricTwoFiveInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoFiveIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_relevance') - .default(evaluationCancelMetricJobResponseSpecOneMetricTwoFiveTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextRelevance metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecOneMetricTwoSixJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoSixJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecOneMetricTwoSixJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecOneMetricTwoSixInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecOneMetricTwoSixInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecOneMetricTwoSixInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecOneMetricTwoSixInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoSixIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_groundedness') - .default(evaluationCancelMetricJobResponseSpecOneMetricTwoSixTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ResponseGroundedness metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecOneMetricTwoSevenJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoSevenJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecOneMetricTwoSevenJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecOneMetricTwoSevenInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecOneMetricTwoSevenInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecOneMetricTwoSevenInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecOneMetricTwoSevenInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoSevenIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_recall') - .default(evaluationCancelMetricJobResponseSpecOneMetricTwoSevenTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextRecall metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecOneMetricTwoEightJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoEightJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecOneMetricTwoEightJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecOneMetricTwoEightInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecOneMetricTwoEightInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecOneMetricTwoEightInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecOneMetricTwoEightInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoEightIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_precision') - .default(evaluationCancelMetricJobResponseSpecOneMetricTwoEightTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextPrecision metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecOneMetricTwoNineJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoNineJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecOneMetricTwoNineJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecOneMetricTwoNineInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecOneMetricTwoNineInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecOneMetricTwoNineInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecOneMetricTwoNineInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoNineIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_entity_recall') - .default(evaluationCancelMetricJobResponseSpecOneMetricTwoNineTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextEntityRecall metrics.'), - zod - .object({ - embeddings_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecOneMetricTwoOnezeroEmbeddingsModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoOnezeroEmbeddingsModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecOneMetricTwoOnezeroEmbeddingsModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The embeddings model configuration.'), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecOneMetricTwoOnezeroJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoOnezeroJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecOneMetricTwoOnezeroJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecOneMetricTwoOnezeroInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecOneMetricTwoOnezeroInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecOneMetricTwoOnezeroInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecOneMetricTwoOnezeroInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoOnezeroIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_relevancy') - .default(evaluationCancelMetricJobResponseSpecOneMetricTwoOnezeroTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - strictness: zod - .number() - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoOnezeroStrictnessDefault - ) - .describe('Number of parallel questions generated. NIM can only generate 1.'), - }) - .describe('Request type for ResponseRelevancy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecOneMetricTwoOneoneJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoOneoneJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecOneMetricTwoOneoneJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecOneMetricTwoOneoneInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecOneMetricTwoOneoneInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecOneMetricTwoOneoneInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecOneMetricTwoOneoneInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoOneoneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('faithfulness') - .default(evaluationCancelMetricJobResponseSpecOneMetricTwoOneoneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for Faithfulness metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecOneMetricTwoOnetwoJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoOnetwoJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecOneMetricTwoOnetwoJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecOneMetricTwoOnetwoInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecOneMetricTwoOnetwoInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecOneMetricTwoOnetwoInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecOneMetricTwoOnetwoInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoOnetwoIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('noise_sensitivity') - .default(evaluationCancelMetricJobResponseSpecOneMetricTwoOnetwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for NoiseSensitivity metrics.'), - zod - .object({ - type: zod - .literal('tool_call_accuracy') - .default(evaluationCancelMetricJobResponseSpecOneMetricTwoOnethreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ToolCallAccuracy metrics (no judge required).'), - zod - .object({ - type: zod - .literal('bleu') - .default(evaluationCancelMetricJobResponseSpecOneMetricTwoOnefourTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - references: zod - .array(zod.string()) - .describe( - 'The templates for the ground truth references to calculate BLEU metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to calculate BLEU metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for BLEUMetric.'), - zod - .object({ - type: zod - .literal('exact-match') - .default(evaluationCancelMetricJobResponseSpecOneMetricTwoOnefiveTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the exact match metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the exact match metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for ExactMatchMetric.'), - zod - .object({ - type: zod - .literal('f1') - .default(evaluationCancelMetricJobResponseSpecOneMetricTwoOnesixTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the F1 metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the F1 metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for F1Metric.'), - zod - .object({ - type: zod - .literal('number-check') - .default(evaluationCancelMetricJobResponseSpecOneMetricTwoOnesevenTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - '>=', - 'gte', - 'greater than or equal', - '>', - 'gt', - 'greater than', - '<=', - 'lte', - 'less than or equal', - '<', - 'lt', - 'less than', - 'absolute difference', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - epsilon: zod - .union([zod.number(), zod.number()]) - .optional() - .describe('Specify the tolerance for the absolute difference of values.'), - }) - .describe( - 'Request type for NumberCheckMetric. Numeric-comparison metric with template-driven operands.' - ), - zod - .object({ - type: zod - .literal('remote') - .default(evaluationCancelMetricJobResponseSpecOneMetricTwoOneeightTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecOneMetricTwoOneeightApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoOneeightTimeoutSecondsDefault - ) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoOneeightMaxRetriesDefault - ) - .describe('Maximum number of retry attempts.'), - body: zod - .record(zod.string(), zod.unknown()) - .describe('Jinja template for request payload'), - scores: zod - .array( - zod - .object({ - name: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecOneMetricTwoOneeightScoresItemNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .object({ - type: zod - .literal('json') - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoOneeightScoresItemParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.') - .optional() - .describe( - 'The method to parse the score. Only JSON parsing is supported for remote metrics.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe( - 'Minimum value for the score range. Defaults to None (no lower bound).' - ), - maximum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe( - 'Maximum value for the score range. Defaults to None (no upper bound).' - ), - }) - .describe( - 'Score configuration for remote metrics.\n\nUnlike RangeScore, minimum and maximum are optional (default to None = no bounds).\nThis avoids JSON serialization issues with infinity values.' - ) - ) - .describe('List of scores to extract from the remote response'), - }) - .describe( - 'Request type for RemoteMetric. A metric that computes scores via a remote endpoint.' - ), - zod - .object({ - type: zod - .literal('nemo-agent-toolkit-remote') - .default(evaluationCancelMetricJobResponseSpecOneMetricTwoOnenineTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecOneMetricTwoOnenineApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoOnenineTimeoutSecondsDefault - ) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default( - evaluationCancelMetricJobResponseSpecOneMetricTwoOnenineMaxRetriesDefault - ) - .describe('Maximum number of retry attempts.'), - evaluator_name: zod - .string() - .describe('The name of the evaluator (also used as the score name).'), - }) - .describe( - 'Request type for NemoAgentToolkitRemoteMetric. A remote metric that interfaces with NeMo Agent Toolkit evaluators.' - ), - zod - .object({ - type: zod - .literal('rouge') - .default(evaluationCancelMetricJobResponseSpecOneMetricTwoTwozeroTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to evaluate the ROUGE metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the ROUGE metric on. If not provided, the output text from the model is used.' - ), - }) - .describe( - 'Request type for ROUGEMetric. ROUGE metric for overlap-based summarization quality scoring.' - ), - zod - .object({ - type: zod - .literal('string-check') - .default(evaluationCancelMetricJobResponseSpecOneMetricTwoTwooneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - 'contains', - 'not contains', - 'startswith', - 'endswith', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - }) - .describe( - 'Request type for StringCheckMetric. String-comparison metric with operator-based checks.' - ), - zod - .object({ - type: zod - .literal('tool-calling') - .default(evaluationCancelMetricJobResponseSpecOneMetricTwoTwotwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to evaluate tool calling accuracy.' - ), - }) - .describe( - 'Request type for ToolCallingMetric. Tool-calling accuracy metric for structured function calls.' - ), - ]), - zod - .object({ - type: zod - .enum(['system', 'system-retriever']) - .default(evaluationCancelMetricJobResponseSpecOneMetricThreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline', 'retriever'])) - .default([`online`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - name: zod - .string() - .default(evaluationCancelMetricJobResponseSpecOneMetricThreeNameDefault), - required_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod - .string() - .optional() - .describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe( - 'List of required parameters for running an evaluation with the metric.' - ), - optional_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod - .string() - .optional() - .describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe( - 'List of optional parameters for running an evaluation with the metric.' - ), - }) - .describe('Metric entity for system metric that have pre-defined dataset.'), - ]) - .describe('The metric for evaluation.'), - metric_params: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Additional parameters for the metric. Required for system metrics, optional overrides for custom metrics.' - ), - field_mapping: zod - .object({ - input: zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecOneFieldMappingOneInputRegExp) - .optional() - .describe("Binding for the canonical 'input' evaluator field."), - output: zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecOneFieldMappingOneOutputRegExp) - .optional() - .describe("Binding for the canonical 'output' evaluator field."), - context: zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecOneFieldMappingOneContextRegExp) - .optional() - .describe("Binding for the canonical 'context' evaluator field."), - reference: zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecOneFieldMappingOneReferenceRegExp) - .optional() - .describe("Binding for the canonical 'reference' evaluator field."), - trajectory: zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecOneFieldMappingOneTrajectoryRegExp) - .optional() - .describe("Binding for the canonical 'trajectory' evaluator field."), - messages: zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecOneFieldMappingOneMessagesRegExp) - .optional() - .describe("Binding for the canonical 'messages' evaluator field."), - tool_calls: zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecOneFieldMappingOneToolCallsRegExp) - .optional() - .describe("Binding for the canonical 'tool_calls' evaluator field."), - tools: zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecOneFieldMappingOneToolsRegExp) - .optional() - .describe("Binding for the canonical 'tools' evaluator field."), - custom: zod - .record( - zod.string(), - zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecOneFieldMappingOneCustomRegExpOne) - ) - .optional() - .describe('Additional evaluator field bindings keyed by canonical field name.'), - }) - .describe( - "Maps canonical evaluator fields to raw dataset column paths.\nExample: {'input': 'question', 'output': 'answer', 'reference': 'gold', 'trajectory': 'steps'}" - ) - .optional() - .describe( - "Maps canonical evaluator fields such as 'input' and 'output' to dataset column paths for this job." - ), - dataset: zod - .union([ - zod - .object({ - rows: zod - .array(zod.record(zod.string(), zod.unknown())) - .min(1) - .describe( - 'Array of data rows. Each row can be any valid JSON value (object, string, array, etc.).' - ), - }) - .describe( - 'Inline dataset definition with embedded rows.\n\nUse this for quick evaluations without persisting the dataset first.' - ), - zod - .string() - .describe( - "Reference to a Fileset in the Files API.\n\nA reference is a string with format 'workspace\/fileset-name' that points to a\npersisted fileset entity. When used as a dataset source, all files within the\nfileset will be downloaded to the job container.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform." - ), - zod - .object({ - path: zod - .string() - .min(1) - .optional() - .describe('The relative path to file\/directory in the storage.'), - storage: zod - .union([ - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationCancelMetricJobResponseSpecOneDatasetThreeStorageOneReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('ngc') - .default( - evaluationCancelMetricJobResponseSpecOneDatasetThreeStorageOneTypeDefault - ), - org: zod.string().describe('NGC organization name'), - team: zod.string().describe('NGC team name'), - target: zod.string().describe('NGC asset name (model or resource)'), - target_type: zod - .enum(['resource', 'model']) - .default( - evaluationCancelMetricJobResponseSpecOneDatasetThreeStorageOneTargetTypeDefault - ) - .describe("Type of NGC asset: 'resource' or 'model'"), - version: zod - .string() - .optional() - .describe('NGC asset version. If not provided, defaults to latest version'), - original_version: zod - .string() - .optional() - .describe( - "The original version requested by the user before resolution (e.g., 'latest' or None). The 'version' field contains the resolved version ID." - ), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecOneDatasetThreeStorageOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .describe('NGC API key secret name'), - host: zod - .string() - .default( - evaluationCancelMetricJobResponseSpecOneDatasetThreeStorageOneHostDefault - ) - .describe('NGC API host URL'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationCancelMetricJobResponseSpecOneDatasetThreeStorageTwoReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('huggingface') - .default( - evaluationCancelMetricJobResponseSpecOneDatasetThreeStorageTwoTypeDefault - ), - repo_id: zod - .string() - .describe("Huggingface repository ID (e.g., 'meta-llama\/Llama-2-7b')"), - repo_type: zod - .enum(['model', 'dataset', 'space']) - .default( - evaluationCancelMetricJobResponseSpecOneDatasetThreeStorageTwoRepoTypeDefault - ) - .describe("Type of Huggingface repository: 'model', 'dataset', or 'space'"), - revision: zod - .string() - .default( - evaluationCancelMetricJobResponseSpecOneDatasetThreeStorageTwoRevisionDefault - ) - .describe("Branch, tag, or commit SHA. Defaults to 'main'"), - original_revision: zod - .string() - .optional() - .describe( - "The original revision requested by the user before resolution (e.g., 'main'). The 'revision' field contains the resolved commit SHA." - ), - token_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecOneDatasetThreeStorageTwoTokenSecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe('Huggingface API `token` secret name for private repositories'), - endpoint: zod - .string() - .default( - evaluationCancelMetricJobResponseSpecOneDatasetThreeStorageTwoEndpointDefault - ) - .describe('Huggingface Hub endpoint URL. Use for self-hosted instances.'), - }), - ]) - .describe('The storage configuration for the fileset.'), - metadata: zod - .object({ - dataset: zod - .object({ - schema: zod - .union([zod.record(zod.string(), zod.unknown()), zod.string()]) - .optional() - .describe( - 'Default row schema for files in this fileset, either inline JSON Schema or a schema_defs key.' - ), - schema_defs: zod - .record(zod.string(), zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'Reusable JSON Schema definitions keyed by name for deduplicating per-file dataset schemas.' - ), - schemas_by_path: zod - .record( - zod.string(), - zod.union([zod.record(zod.string(), zod.unknown()), zod.string()]) - ) - .optional() - .describe( - 'Optional per-file row schemas keyed by relative path within the fileset. Each value may be inline JSON Schema or a schema_defs key.' - ), - }) - .optional() - .describe('Content for dataset-type filesets.'), - model: zod - .object({ - tool_calling: zod - .object({ - chat_template: zod - .string() - .optional() - .describe('Jinja2 chat template for the model.'), - tool_call_parser: zod - .string() - .optional() - .describe( - "Name of the tool call parser (e.g., 'openai', 'hermes', 'pythonic', 'llama3_json', 'mistral')." - ), - tool_call_plugin: zod - .string() - .optional() - .describe( - "Reference to a fileset containing a custom tool call plugin Python file. Expected format: '{workspace}\/{fileset_name}'." - ), - auto_tool_choice: zod - .boolean() - .optional() - .describe('Whether to enable automatic tool choice.'), - }) - .optional() - .describe( - 'Content for tool-calling configuration on model filesets.\n\nStores chat template and tool calling settings that are merged into\nthe ModelSpec during checkpoint analysis.' - ), - }) - .optional() - .describe( - 'Content for model-type filesets.\n\nContains tool calling configuration that is merged into the ModelSpec\nduring checkpoint analysis.' - ), - }) - .describe( - 'Tagged metadata container - the key indicates the type.\n\nExample:\n metadata = FilesetMetadata(\n dataset=DatasetMetadataContent(\n schema={\"columns\": [\"id\", \"name\"]},\n )\n )' - ) - .optional() - .describe('Purpose-specific metadata for the fileset.'), - custom_fields: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Custom fields for the fileset.'), - }) - .describe('Fileset definition for use without persisting to the Files API.'), - ]) - .describe('The dataset to evaluate which may represent generated outputs from a model.'), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default(evaluationCancelMetricJobResponseSpecOneParamsOneParallelismDefault) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - }) - .describe('Job parameters.') - .optional() - .describe('Execution parameters for the metric job.'), - }) - .describe('An offline metric job.'), - zod - .object({ - metric: zod - .union([ - zod - .string() - .regex(evaluationCancelMetricJobResponseSpecTwoMetricOneRegExp) - .describe( - "Reference to a metric in the Metrics API.\n\nA reference is a string with format 'workspace\/metric-name' that points to a\npersisted metric entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ), - zod.union([ - zod - .object({ - type: zod - .literal('llm-judge') - .default(evaluationCancelMetricJobResponseSpecTwoMetricTwoOneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOneModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOneModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCancelMetricJobResponseSpecTwoMetricTwoOneModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The model configuration.'), - scores: zod - .array( - zod.union([ - zod - .object({ - name: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOneScoresItemOneNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOneScoresItemOneParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOneScoresItemOneParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOneScoresItemOneParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - rubric: zod - .array( - zod.object({ - label: zod - .string() - .describe( - 'The label to use for the level of the rubric grading criteria. (e.g., \"helpful\", \"not_helpful\", \"positive\")' - ), - description: zod - .string() - .optional() - .describe( - 'Describe the semantic meaning of each criteria for the given rubric. If no judge template is set, the input description for labels are included in the generated judge prompt.' - ), - value: zod - .union([zod.number(), zod.number()]) - .describe( - 'The score value to assign for the criteria used for aggregation and ranking.' - ), - }) - ) - .min( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOneScoresItemOneRubricMin - ) - .describe('The rubric for the score.'), - }) - .describe( - 'Score definition for a rubric with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - zod - .object({ - name: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOneScoresItemTwoNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOneScoresItemTwoParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOneScoresItemTwoParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOneScoresItemTwoParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .describe( - 'Minimum value for the score range. Must be less than maximum.' - ), - maximum: zod - .union([zod.number(), zod.number()]) - .describe( - 'Maximum value for the score range. Must be greater than minimum.' - ), - }) - .describe( - 'Score definition for a range of values with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - ]) - ) - .min(1) - .describe( - "Definitions of scores that will be extracted from the judge's output." - ), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .optional() - .describe( - 'The prompt template for the judge. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{sample.output_text}} to use the model output within the template or {{item.xxx}} to reference input columns from the dataset.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - "Prompt template fields that should remain in the inferred input schema but not be required. Use this for fields like 'reference' when the metric can still run without them." - ), - structured_output: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'JSON schema to apply structured output for the judge model evaluation. Structured output is derived from scores when omitted. Use this option if there are custom requirements for the output of the judge.' - ), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOneInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOneInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOneInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOneInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge model.'), - system_prompt: zod - .string() - .optional() - .describe( - "Initial instructions that define the judge model's role and behavior for the conversation. This is prepended to the messages as a system message." - ), - reasoning: zod - .object({ - end_token: zod - .string() - .optional() - .describe( - "Configure the end token to trim reasoning context based on the model's reasoning API. Example for Nemotron models: '<\/think>'" - ), - include_if_not_finished: zod - .boolean() - .optional() - .describe( - 'Configure whether to include reasoning context if the model has not finished reasoning.' - ), - effort: zod - .string() - .optional() - .describe( - 'Option for OpenAI models to specify low, medium, or high reasoning effort.' - ), - }) - .describe("Custom settings that control the model's reasoning behavior.") - .optional() - .describe( - "Custom settings that control the judge model's reasoning behavior. For reasoning models (e.g., Nemotron), use `end_token` to strip reasoning traces from the output." - ), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - }) - .describe('Request type for creating LLM Judge metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecTwoMetricTwoTwoJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoTwoJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecTwoMetricTwoTwoJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecTwoMetricTwoTwoInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecTwoMetricTwoTwoInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecTwoMetricTwoTwoInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecTwoMetricTwoTwoInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoTwoIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('topic_adherence') - .default(evaluationCancelMetricJobResponseSpecTwoMetricTwoTwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - metric_mode: zod - .enum(['f1', 'precision', 'recall']) - .default(evaluationCancelMetricJobResponseSpecTwoMetricTwoTwoMetricModeDefault) - .describe('The mode for computing topic adherence score.'), - }) - .describe('Request type for TopicAdherence metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecTwoMetricTwoThreeJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoThreeJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecTwoMetricTwoThreeJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecTwoMetricTwoThreeInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecTwoMetricTwoThreeInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecTwoMetricTwoThreeInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecTwoMetricTwoThreeInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoThreeIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('agent_goal_accuracy') - .default(evaluationCancelMetricJobResponseSpecTwoMetricTwoThreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - use_reference: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoThreeUseReferenceDefault - ) - .describe('Whether to use reference for goal accuracy evaluation.'), - }) - .describe('Request type for AgentGoalAccuracy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecTwoMetricTwoFourJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoFourJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecTwoMetricTwoFourJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecTwoMetricTwoFourInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecTwoMetricTwoFourInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecTwoMetricTwoFourInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecTwoMetricTwoFourInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoFourIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('answer_accuracy') - .default(evaluationCancelMetricJobResponseSpecTwoMetricTwoFourTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for AnswerAccuracy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecTwoMetricTwoFiveJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoFiveJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecTwoMetricTwoFiveJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecTwoMetricTwoFiveInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecTwoMetricTwoFiveInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecTwoMetricTwoFiveInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecTwoMetricTwoFiveInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoFiveIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_relevance') - .default(evaluationCancelMetricJobResponseSpecTwoMetricTwoFiveTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextRelevance metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecTwoMetricTwoSixJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoSixJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecTwoMetricTwoSixJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecTwoMetricTwoSixInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecTwoMetricTwoSixInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecTwoMetricTwoSixInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecTwoMetricTwoSixInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoSixIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_groundedness') - .default(evaluationCancelMetricJobResponseSpecTwoMetricTwoSixTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ResponseGroundedness metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecTwoMetricTwoSevenJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoSevenJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecTwoMetricTwoSevenJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecTwoMetricTwoSevenInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecTwoMetricTwoSevenInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecTwoMetricTwoSevenInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecTwoMetricTwoSevenInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoSevenIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_recall') - .default(evaluationCancelMetricJobResponseSpecTwoMetricTwoSevenTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextRecall metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecTwoMetricTwoEightJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoEightJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecTwoMetricTwoEightJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecTwoMetricTwoEightInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecTwoMetricTwoEightInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecTwoMetricTwoEightInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecTwoMetricTwoEightInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoEightIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_precision') - .default(evaluationCancelMetricJobResponseSpecTwoMetricTwoEightTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextPrecision metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecTwoMetricTwoNineJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoNineJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecTwoMetricTwoNineJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecTwoMetricTwoNineInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecTwoMetricTwoNineInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecTwoMetricTwoNineInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecTwoMetricTwoNineInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoNineIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_entity_recall') - .default(evaluationCancelMetricJobResponseSpecTwoMetricTwoNineTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextEntityRecall metrics.'), - zod - .object({ - embeddings_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOnezeroEmbeddingsModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOnezeroEmbeddingsModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOnezeroEmbeddingsModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The embeddings model configuration.'), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOnezeroJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOnezeroJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOnezeroJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOnezeroInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOnezeroInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOnezeroInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOnezeroInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOnezeroIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_relevancy') - .default(evaluationCancelMetricJobResponseSpecTwoMetricTwoOnezeroTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - strictness: zod - .number() - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOnezeroStrictnessDefault - ) - .describe('Number of parallel questions generated. NIM can only generate 1.'), - }) - .describe('Request type for ResponseRelevancy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOneoneJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOneoneJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOneoneJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOneoneInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOneoneInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOneoneInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOneoneInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOneoneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('faithfulness') - .default(evaluationCancelMetricJobResponseSpecTwoMetricTwoOneoneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for Faithfulness metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOnetwoJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOnetwoJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOnetwoJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOnetwoInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOnetwoInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOnetwoInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOnetwoInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOnetwoIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('noise_sensitivity') - .default(evaluationCancelMetricJobResponseSpecTwoMetricTwoOnetwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for NoiseSensitivity metrics.'), - zod - .object({ - type: zod - .literal('tool_call_accuracy') - .default(evaluationCancelMetricJobResponseSpecTwoMetricTwoOnethreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ToolCallAccuracy metrics (no judge required).'), - zod - .object({ - type: zod - .literal('bleu') - .default(evaluationCancelMetricJobResponseSpecTwoMetricTwoOnefourTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - references: zod - .array(zod.string()) - .describe( - 'The templates for the ground truth references to calculate BLEU metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to calculate BLEU metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for BLEUMetric.'), - zod - .object({ - type: zod - .literal('exact-match') - .default(evaluationCancelMetricJobResponseSpecTwoMetricTwoOnefiveTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the exact match metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the exact match metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for ExactMatchMetric.'), - zod - .object({ - type: zod - .literal('f1') - .default(evaluationCancelMetricJobResponseSpecTwoMetricTwoOnesixTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the F1 metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the F1 metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for F1Metric.'), - zod - .object({ - type: zod - .literal('number-check') - .default(evaluationCancelMetricJobResponseSpecTwoMetricTwoOnesevenTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - '>=', - 'gte', - 'greater than or equal', - '>', - 'gt', - 'greater than', - '<=', - 'lte', - 'less than or equal', - '<', - 'lt', - 'less than', - 'absolute difference', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - epsilon: zod - .union([zod.number(), zod.number()]) - .optional() - .describe('Specify the tolerance for the absolute difference of values.'), - }) - .describe( - 'Request type for NumberCheckMetric. Numeric-comparison metric with template-driven operands.' - ), - zod - .object({ - type: zod - .literal('remote') - .default(evaluationCancelMetricJobResponseSpecTwoMetricTwoOneeightTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOneeightApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOneeightTimeoutSecondsDefault - ) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOneeightMaxRetriesDefault - ) - .describe('Maximum number of retry attempts.'), - body: zod - .record(zod.string(), zod.unknown()) - .describe('Jinja template for request payload'), - scores: zod - .array( - zod - .object({ - name: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOneeightScoresItemNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .object({ - type: zod - .literal('json') - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOneeightScoresItemParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.') - .optional() - .describe( - 'The method to parse the score. Only JSON parsing is supported for remote metrics.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe( - 'Minimum value for the score range. Defaults to None (no lower bound).' - ), - maximum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe( - 'Maximum value for the score range. Defaults to None (no upper bound).' - ), - }) - .describe( - 'Score configuration for remote metrics.\n\nUnlike RangeScore, minimum and maximum are optional (default to None = no bounds).\nThis avoids JSON serialization issues with infinity values.' - ) - ) - .describe('List of scores to extract from the remote response'), - }) - .describe( - 'Request type for RemoteMetric. A metric that computes scores via a remote endpoint.' - ), - zod - .object({ - type: zod - .literal('nemo-agent-toolkit-remote') - .default(evaluationCancelMetricJobResponseSpecTwoMetricTwoOnenineTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOnenineApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOnenineTimeoutSecondsDefault - ) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default( - evaluationCancelMetricJobResponseSpecTwoMetricTwoOnenineMaxRetriesDefault - ) - .describe('Maximum number of retry attempts.'), - evaluator_name: zod - .string() - .describe('The name of the evaluator (also used as the score name).'), - }) - .describe( - 'Request type for NemoAgentToolkitRemoteMetric. A remote metric that interfaces with NeMo Agent Toolkit evaluators.' - ), - zod - .object({ - type: zod - .literal('rouge') - .default(evaluationCancelMetricJobResponseSpecTwoMetricTwoTwozeroTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to evaluate the ROUGE metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the ROUGE metric on. If not provided, the output text from the model is used.' - ), - }) - .describe( - 'Request type for ROUGEMetric. ROUGE metric for overlap-based summarization quality scoring.' - ), - zod - .object({ - type: zod - .literal('string-check') - .default(evaluationCancelMetricJobResponseSpecTwoMetricTwoTwooneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - 'contains', - 'not contains', - 'startswith', - 'endswith', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - }) - .describe( - 'Request type for StringCheckMetric. String-comparison metric with operator-based checks.' - ), - zod - .object({ - type: zod - .literal('tool-calling') - .default(evaluationCancelMetricJobResponseSpecTwoMetricTwoTwotwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to evaluate tool calling accuracy.' - ), - }) - .describe( - 'Request type for ToolCallingMetric. Tool-calling accuracy metric for structured function calls.' - ), - ]), - zod - .object({ - type: zod - .enum(['system', 'system-retriever']) - .default(evaluationCancelMetricJobResponseSpecTwoMetricThreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline', 'retriever'])) - .default([`online`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - name: zod - .string() - .default(evaluationCancelMetricJobResponseSpecTwoMetricThreeNameDefault), - required_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod - .string() - .optional() - .describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe( - 'List of required parameters for running an evaluation with the metric.' - ), - optional_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod - .string() - .optional() - .describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe( - 'List of optional parameters for running an evaluation with the metric.' - ), - }) - .describe('Metric entity for system metric that have pre-defined dataset.'), - ]) - .describe('The metric for evaluation.'), - metric_params: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Additional parameters for the metric. Required for system metrics, optional overrides for custom metrics.' - ), - field_mapping: zod - .object({ - input: zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecTwoFieldMappingOneInputRegExp) - .optional() - .describe("Binding for the canonical 'input' evaluator field."), - output: zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecTwoFieldMappingOneOutputRegExp) - .optional() - .describe("Binding for the canonical 'output' evaluator field."), - context: zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecTwoFieldMappingOneContextRegExp) - .optional() - .describe("Binding for the canonical 'context' evaluator field."), - reference: zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecTwoFieldMappingOneReferenceRegExp) - .optional() - .describe("Binding for the canonical 'reference' evaluator field."), - trajectory: zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecTwoFieldMappingOneTrajectoryRegExp) - .optional() - .describe("Binding for the canonical 'trajectory' evaluator field."), - messages: zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecTwoFieldMappingOneMessagesRegExp) - .optional() - .describe("Binding for the canonical 'messages' evaluator field."), - tool_calls: zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecTwoFieldMappingOneToolCallsRegExp) - .optional() - .describe("Binding for the canonical 'tool_calls' evaluator field."), - tools: zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecTwoFieldMappingOneToolsRegExp) - .optional() - .describe("Binding for the canonical 'tools' evaluator field."), - custom: zod - .record( - zod.string(), - zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecTwoFieldMappingOneCustomRegExpOne) - ) - .optional() - .describe('Additional evaluator field bindings keyed by canonical field name.'), - }) - .describe( - "Maps canonical evaluator fields to raw dataset column paths.\nExample: {'input': 'question', 'output': 'answer', 'reference': 'gold', 'trajectory': 'steps'}" - ) - .optional() - .describe( - "Maps canonical evaluator fields such as 'input' and 'output' to dataset column paths for this job." - ), - model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationCancelMetricJobResponseSpecTwoModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationCancelMetricJobResponseSpecTwoModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCancelMetricJobResponseSpecTwoModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The model configuration.'), - dataset: zod - .union([ - zod - .object({ - rows: zod - .array(zod.record(zod.string(), zod.unknown())) - .min(1) - .describe( - 'Array of data rows. Each row can be any valid JSON value (object, string, array, etc.).' - ), - }) - .describe( - 'Inline dataset definition with embedded rows.\n\nUse this for quick evaluations without persisting the dataset first.' - ), - zod - .string() - .describe( - "Reference to a Fileset in the Files API.\n\nA reference is a string with format 'workspace\/fileset-name' that points to a\npersisted fileset entity. When used as a dataset source, all files within the\nfileset will be downloaded to the job container.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform." - ), - zod - .object({ - path: zod - .string() - .min(1) - .optional() - .describe('The relative path to file\/directory in the storage.'), - storage: zod - .union([ - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationCancelMetricJobResponseSpecTwoDatasetThreeStorageOneReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('ngc') - .default( - evaluationCancelMetricJobResponseSpecTwoDatasetThreeStorageOneTypeDefault - ), - org: zod.string().describe('NGC organization name'), - team: zod.string().describe('NGC team name'), - target: zod.string().describe('NGC asset name (model or resource)'), - target_type: zod - .enum(['resource', 'model']) - .default( - evaluationCancelMetricJobResponseSpecTwoDatasetThreeStorageOneTargetTypeDefault - ) - .describe("Type of NGC asset: 'resource' or 'model'"), - version: zod - .string() - .optional() - .describe('NGC asset version. If not provided, defaults to latest version'), - original_version: zod - .string() - .optional() - .describe( - "The original version requested by the user before resolution (e.g., 'latest' or None). The 'version' field contains the resolved version ID." - ), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecTwoDatasetThreeStorageOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .describe('NGC API key secret name'), - host: zod - .string() - .default( - evaluationCancelMetricJobResponseSpecTwoDatasetThreeStorageOneHostDefault - ) - .describe('NGC API host URL'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationCancelMetricJobResponseSpecTwoDatasetThreeStorageTwoReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('huggingface') - .default( - evaluationCancelMetricJobResponseSpecTwoDatasetThreeStorageTwoTypeDefault - ), - repo_id: zod - .string() - .describe("Huggingface repository ID (e.g., 'meta-llama\/Llama-2-7b')"), - repo_type: zod - .enum(['model', 'dataset', 'space']) - .default( - evaluationCancelMetricJobResponseSpecTwoDatasetThreeStorageTwoRepoTypeDefault - ) - .describe("Type of Huggingface repository: 'model', 'dataset', or 'space'"), - revision: zod - .string() - .default( - evaluationCancelMetricJobResponseSpecTwoDatasetThreeStorageTwoRevisionDefault - ) - .describe("Branch, tag, or commit SHA. Defaults to 'main'"), - original_revision: zod - .string() - .optional() - .describe( - "The original revision requested by the user before resolution (e.g., 'main'). The 'revision' field contains the resolved commit SHA." - ), - token_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecTwoDatasetThreeStorageTwoTokenSecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe('Huggingface API `token` secret name for private repositories'), - endpoint: zod - .string() - .default( - evaluationCancelMetricJobResponseSpecTwoDatasetThreeStorageTwoEndpointDefault - ) - .describe('Huggingface Hub endpoint URL. Use for self-hosted instances.'), - }), - ]) - .describe('The storage configuration for the fileset.'), - metadata: zod - .object({ - dataset: zod - .object({ - schema: zod - .union([zod.record(zod.string(), zod.unknown()), zod.string()]) - .optional() - .describe( - 'Default row schema for files in this fileset, either inline JSON Schema or a schema_defs key.' - ), - schema_defs: zod - .record(zod.string(), zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'Reusable JSON Schema definitions keyed by name for deduplicating per-file dataset schemas.' - ), - schemas_by_path: zod - .record( - zod.string(), - zod.union([zod.record(zod.string(), zod.unknown()), zod.string()]) - ) - .optional() - .describe( - 'Optional per-file row schemas keyed by relative path within the fileset. Each value may be inline JSON Schema or a schema_defs key.' - ), - }) - .optional() - .describe('Content for dataset-type filesets.'), - model: zod - .object({ - tool_calling: zod - .object({ - chat_template: zod - .string() - .optional() - .describe('Jinja2 chat template for the model.'), - tool_call_parser: zod - .string() - .optional() - .describe( - "Name of the tool call parser (e.g., 'openai', 'hermes', 'pythonic', 'llama3_json', 'mistral')." - ), - tool_call_plugin: zod - .string() - .optional() - .describe( - "Reference to a fileset containing a custom tool call plugin Python file. Expected format: '{workspace}\/{fileset_name}'." - ), - auto_tool_choice: zod - .boolean() - .optional() - .describe('Whether to enable automatic tool choice.'), - }) - .optional() - .describe( - 'Content for tool-calling configuration on model filesets.\n\nStores chat template and tool calling settings that are merged into\nthe ModelSpec during checkpoint analysis.' - ), - }) - .optional() - .describe( - 'Content for model-type filesets.\n\nContains tool calling configuration that is merged into the ModelSpec\nduring checkpoint analysis.' - ), - }) - .describe( - 'Tagged metadata container - the key indicates the type.\n\nExample:\n metadata = FilesetMetadata(\n dataset=DatasetMetadataContent(\n schema={\"columns\": [\"id\", \"name\"]},\n )\n )' - ) - .optional() - .describe('Purpose-specific metadata for the fileset.'), - custom_fields: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Custom fields for the fileset.'), - }) - .describe('Fileset definition for use without persisting to the Files API.'), - ]) - .describe('The dataset to use for model prompts and evaluation.'), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default(evaluationCancelMetricJobResponseSpecTwoParamsOneParallelismDefault) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - ignore_request_failure: zod - .boolean() - .default(evaluationCancelMetricJobResponseSpecTwoParamsOneIgnoreRequestFailureDefault) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - request_timeout: zod - .number() - .optional() - .describe('The timeout to be used for requests made to the model.'), - max_retries: zod - .number() - .min(evaluationCancelMetricJobResponseSpecTwoParamsOneMaxRetriesMin) - .default(evaluationCancelMetricJobResponseSpecTwoParamsOneMaxRetriesDefault) - .describe('Maximum number of retries for failed requests.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationCancelMetricJobResponseSpecTwoParamsOneInferenceOneTemperatureMin) - .max(evaluationCancelMetricJobResponseSpecTwoParamsOneInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCancelMetricJobResponseSpecTwoParamsOneInferenceOneTopPMin) - .max(evaluationCancelMetricJobResponseSpecTwoParamsOneInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe("Custom settings that control the model's text generation behavior."), - system_prompt: zod - .string() - .optional() - .describe( - "Initial instructions that define the model's role and behavior for the conversation." - ), - reasoning: zod - .object({ - end_token: zod - .string() - .optional() - .describe( - "Configure the end token to trim reasoning context based on the model's reasoning API. Example for Nemotron models: '<\/think>'" - ), - include_if_not_finished: zod - .boolean() - .optional() - .describe( - 'Configure whether to include reasoning context if the model has not finished reasoning.' - ), - effort: zod - .string() - .optional() - .describe( - 'Option for OpenAI models to specify low, medium, or high reasoning effort.' - ), - }) - .describe("Custom settings that control the model's reasoning behavior.") - .optional() - .describe("Custom settings that control the model's reasoning behavior."), - structured_output: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('JSON schema to apply structured output for the model.'), - }) - .describe('Job parameters for model online evaluation.') - .optional() - .describe('Execution parameters for the metric job.'), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .describe( - 'The jinja template to prompt the model for evaluation. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{input}}, {{output}}, {{context}}, {{reference}} to reference input columns.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - 'Prompt template fields that should remain available to the prompt template but not be required by dataset schema validation.' - ), - }) - .describe('A online metric job.'), - zod - .object({ - metric: zod - .union([ - zod - .string() - .regex(evaluationCancelMetricJobResponseSpecThreeMetricOneRegExp) - .describe( - "Reference to a metric in the Metrics API.\n\nA reference is a string with format 'workspace\/metric-name' that points to a\npersisted metric entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ), - zod.union([ - zod - .object({ - type: zod - .literal('llm-judge') - .default(evaluationCancelMetricJobResponseSpecThreeMetricTwoOneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOneModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOneModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCancelMetricJobResponseSpecThreeMetricTwoOneModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The model configuration.'), - scores: zod - .array( - zod.union([ - zod - .object({ - name: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOneScoresItemOneNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOneScoresItemOneParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOneScoresItemOneParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOneScoresItemOneParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - rubric: zod - .array( - zod.object({ - label: zod - .string() - .describe( - 'The label to use for the level of the rubric grading criteria. (e.g., \"helpful\", \"not_helpful\", \"positive\")' - ), - description: zod - .string() - .optional() - .describe( - 'Describe the semantic meaning of each criteria for the given rubric. If no judge template is set, the input description for labels are included in the generated judge prompt.' - ), - value: zod - .union([zod.number(), zod.number()]) - .describe( - 'The score value to assign for the criteria used for aggregation and ranking.' - ), - }) - ) - .min( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOneScoresItemOneRubricMin - ) - .describe('The rubric for the score.'), - }) - .describe( - 'Score definition for a rubric with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - zod - .object({ - name: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOneScoresItemTwoNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOneScoresItemTwoParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOneScoresItemTwoParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOneScoresItemTwoParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .describe( - 'Minimum value for the score range. Must be less than maximum.' - ), - maximum: zod - .union([zod.number(), zod.number()]) - .describe( - 'Maximum value for the score range. Must be greater than minimum.' - ), - }) - .describe( - 'Score definition for a range of values with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - ]) - ) - .min(1) - .describe( - "Definitions of scores that will be extracted from the judge's output." - ), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .optional() - .describe( - 'The prompt template for the judge. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{sample.output_text}} to use the model output within the template or {{item.xxx}} to reference input columns from the dataset.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - "Prompt template fields that should remain in the inferred input schema but not be required. Use this for fields like 'reference' when the metric can still run without them." - ), - structured_output: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'JSON schema to apply structured output for the judge model evaluation. Structured output is derived from scores when omitted. Use this option if there are custom requirements for the output of the judge.' - ), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOneInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOneInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOneInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOneInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge model.'), - system_prompt: zod - .string() - .optional() - .describe( - "Initial instructions that define the judge model's role and behavior for the conversation. This is prepended to the messages as a system message." - ), - reasoning: zod - .object({ - end_token: zod - .string() - .optional() - .describe( - "Configure the end token to trim reasoning context based on the model's reasoning API. Example for Nemotron models: '<\/think>'" - ), - include_if_not_finished: zod - .boolean() - .optional() - .describe( - 'Configure whether to include reasoning context if the model has not finished reasoning.' - ), - effort: zod - .string() - .optional() - .describe( - 'Option for OpenAI models to specify low, medium, or high reasoning effort.' - ), - }) - .describe("Custom settings that control the model's reasoning behavior.") - .optional() - .describe( - "Custom settings that control the judge model's reasoning behavior. For reasoning models (e.g., Nemotron), use `end_token` to strip reasoning traces from the output." - ), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - }) - .describe('Request type for creating LLM Judge metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecThreeMetricTwoTwoJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoTwoJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecThreeMetricTwoTwoJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecThreeMetricTwoTwoInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecThreeMetricTwoTwoInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecThreeMetricTwoTwoInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecThreeMetricTwoTwoInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoTwoIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('topic_adherence') - .default(evaluationCancelMetricJobResponseSpecThreeMetricTwoTwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - metric_mode: zod - .enum(['f1', 'precision', 'recall']) - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoTwoMetricModeDefault - ) - .describe('The mode for computing topic adherence score.'), - }) - .describe('Request type for TopicAdherence metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecThreeMetricTwoThreeJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoThreeJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecThreeMetricTwoThreeJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecThreeMetricTwoThreeInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecThreeMetricTwoThreeInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecThreeMetricTwoThreeInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecThreeMetricTwoThreeInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoThreeIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('agent_goal_accuracy') - .default(evaluationCancelMetricJobResponseSpecThreeMetricTwoThreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - use_reference: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoThreeUseReferenceDefault - ) - .describe('Whether to use reference for goal accuracy evaluation.'), - }) - .describe('Request type for AgentGoalAccuracy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecThreeMetricTwoFourJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoFourJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecThreeMetricTwoFourJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecThreeMetricTwoFourInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecThreeMetricTwoFourInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecThreeMetricTwoFourInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecThreeMetricTwoFourInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoFourIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('answer_accuracy') - .default(evaluationCancelMetricJobResponseSpecThreeMetricTwoFourTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for AnswerAccuracy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecThreeMetricTwoFiveJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoFiveJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecThreeMetricTwoFiveJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecThreeMetricTwoFiveInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecThreeMetricTwoFiveInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecThreeMetricTwoFiveInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecThreeMetricTwoFiveInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoFiveIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_relevance') - .default(evaluationCancelMetricJobResponseSpecThreeMetricTwoFiveTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextRelevance metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecThreeMetricTwoSixJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoSixJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecThreeMetricTwoSixJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecThreeMetricTwoSixInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecThreeMetricTwoSixInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecThreeMetricTwoSixInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecThreeMetricTwoSixInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoSixIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_groundedness') - .default(evaluationCancelMetricJobResponseSpecThreeMetricTwoSixTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ResponseGroundedness metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecThreeMetricTwoSevenJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoSevenJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecThreeMetricTwoSevenJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecThreeMetricTwoSevenInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecThreeMetricTwoSevenInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecThreeMetricTwoSevenInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecThreeMetricTwoSevenInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoSevenIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_recall') - .default(evaluationCancelMetricJobResponseSpecThreeMetricTwoSevenTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextRecall metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecThreeMetricTwoEightJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoEightJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecThreeMetricTwoEightJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecThreeMetricTwoEightInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecThreeMetricTwoEightInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecThreeMetricTwoEightInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecThreeMetricTwoEightInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoEightIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_precision') - .default(evaluationCancelMetricJobResponseSpecThreeMetricTwoEightTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextPrecision metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecThreeMetricTwoNineJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoNineJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecThreeMetricTwoNineJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecThreeMetricTwoNineInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecThreeMetricTwoNineInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecThreeMetricTwoNineInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecThreeMetricTwoNineInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoNineIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_entity_recall') - .default(evaluationCancelMetricJobResponseSpecThreeMetricTwoNineTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ContextEntityRecall metrics.'), - zod - .object({ - embeddings_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOnezeroEmbeddingsModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOnezeroEmbeddingsModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOnezeroEmbeddingsModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The embeddings model configuration.'), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOnezeroJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOnezeroJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOnezeroJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOnezeroInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOnezeroInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOnezeroInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOnezeroInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOnezeroIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_relevancy') - .default(evaluationCancelMetricJobResponseSpecThreeMetricTwoOnezeroTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - strictness: zod - .number() - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOnezeroStrictnessDefault - ) - .describe('Number of parallel questions generated. NIM can only generate 1.'), - }) - .describe('Request type for ResponseRelevancy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOneoneJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOneoneJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOneoneJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOneoneInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOneoneInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOneoneInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOneoneInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOneoneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('faithfulness') - .default(evaluationCancelMetricJobResponseSpecThreeMetricTwoOneoneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for Faithfulness metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOnetwoJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOnetwoJudgeModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOnetwoJudgeModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOnetwoInferenceOneTemperatureMin - ) - .max( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOnetwoInferenceOneTemperatureMax - ) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOnetwoInferenceOneTopPMin - ) - .max( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOnetwoInferenceOneTopPMax - ) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOnetwoIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('noise_sensitivity') - .default(evaluationCancelMetricJobResponseSpecThreeMetricTwoOnetwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for NoiseSensitivity metrics.'), - zod - .object({ - type: zod - .literal('tool_call_accuracy') - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOnethreeTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Request type for ToolCallAccuracy metrics (no judge required).'), - zod - .object({ - type: zod - .literal('bleu') - .default(evaluationCancelMetricJobResponseSpecThreeMetricTwoOnefourTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - references: zod - .array(zod.string()) - .describe( - 'The templates for the ground truth references to calculate BLEU metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to calculate BLEU metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for BLEUMetric.'), - zod - .object({ - type: zod - .literal('exact-match') - .default(evaluationCancelMetricJobResponseSpecThreeMetricTwoOnefiveTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the exact match metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the exact match metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for ExactMatchMetric.'), - zod - .object({ - type: zod - .literal('f1') - .default(evaluationCancelMetricJobResponseSpecThreeMetricTwoOnesixTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the F1 metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the F1 metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for F1Metric.'), - zod - .object({ - type: zod - .literal('number-check') - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOnesevenTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - '>=', - 'gte', - 'greater than or equal', - '>', - 'gt', - 'greater than', - '<=', - 'lte', - 'less than or equal', - '<', - 'lt', - 'less than', - 'absolute difference', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - epsilon: zod - .union([zod.number(), zod.number()]) - .optional() - .describe('Specify the tolerance for the absolute difference of values.'), - }) - .describe( - 'Request type for NumberCheckMetric. Numeric-comparison metric with template-driven operands.' - ), - zod - .object({ - type: zod - .literal('remote') - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOneeightTypeDefault - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOneeightApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOneeightTimeoutSecondsDefault - ) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOneeightMaxRetriesDefault - ) - .describe('Maximum number of retry attempts.'), - body: zod - .record(zod.string(), zod.unknown()) - .describe('Jinja template for request payload'), - scores: zod - .array( - zod - .object({ - name: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOneeightScoresItemNameRegExp - ) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .object({ - type: zod - .literal('json') - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOneeightScoresItemParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.') - .optional() - .describe( - 'The method to parse the score. Only JSON parsing is supported for remote metrics.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe( - 'Minimum value for the score range. Defaults to None (no lower bound).' - ), - maximum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe( - 'Maximum value for the score range. Defaults to None (no upper bound).' - ), - }) - .describe( - 'Score configuration for remote metrics.\n\nUnlike RangeScore, minimum and maximum are optional (default to None = no bounds).\nThis avoids JSON serialization issues with infinity values.' - ) - ) - .describe('List of scores to extract from the remote response'), - }) - .describe( - 'Request type for RemoteMetric. A metric that computes scores via a remote endpoint.' - ), - zod - .object({ - type: zod - .literal('nemo-agent-toolkit-remote') - .default(evaluationCancelMetricJobResponseSpecThreeMetricTwoOnenineTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOnenineApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOnenineTimeoutSecondsDefault - ) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default( - evaluationCancelMetricJobResponseSpecThreeMetricTwoOnenineMaxRetriesDefault - ) - .describe('Maximum number of retry attempts.'), - evaluator_name: zod - .string() - .describe('The name of the evaluator (also used as the score name).'), - }) - .describe( - 'Request type for NemoAgentToolkitRemoteMetric. A remote metric that interfaces with NeMo Agent Toolkit evaluators.' - ), - zod - .object({ - type: zod - .literal('rouge') - .default(evaluationCancelMetricJobResponseSpecThreeMetricTwoTwozeroTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to evaluate the ROUGE metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the ROUGE metric on. If not provided, the output text from the model is used.' - ), - }) - .describe( - 'Request type for ROUGEMetric. ROUGE metric for overlap-based summarization quality scoring.' - ), - zod - .object({ - type: zod - .literal('string-check') - .default(evaluationCancelMetricJobResponseSpecThreeMetricTwoTwooneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - 'contains', - 'not contains', - 'startswith', - 'endswith', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - }) - .describe( - 'Request type for StringCheckMetric. String-comparison metric with operator-based checks.' - ), - zod - .object({ - type: zod - .literal('tool-calling') - .default(evaluationCancelMetricJobResponseSpecThreeMetricTwoTwotwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to evaluate tool calling accuracy.' - ), - }) - .describe( - 'Request type for ToolCallingMetric. Tool-calling accuracy metric for structured function calls.' - ), - ]), - zod - .object({ - type: zod - .enum(['system', 'system-retriever']) - .default(evaluationCancelMetricJobResponseSpecThreeMetricThreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline', 'retriever'])) - .default([`online`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - name: zod - .string() - .default(evaluationCancelMetricJobResponseSpecThreeMetricThreeNameDefault), - required_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod - .string() - .optional() - .describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe( - 'List of required parameters for running an evaluation with the metric.' - ), - optional_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod - .string() - .optional() - .describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe( - 'List of optional parameters for running an evaluation with the metric.' - ), - }) - .describe('Metric entity for system metric that have pre-defined dataset.'), - ]) - .describe('The metric for evaluation.'), - metric_params: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Additional parameters for the metric. Required for system metrics, optional overrides for custom metrics.' - ), - field_mapping: zod - .object({ - input: zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecThreeFieldMappingOneInputRegExp) - .optional() - .describe("Binding for the canonical 'input' evaluator field."), - output: zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecThreeFieldMappingOneOutputRegExp) - .optional() - .describe("Binding for the canonical 'output' evaluator field."), - context: zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecThreeFieldMappingOneContextRegExp) - .optional() - .describe("Binding for the canonical 'context' evaluator field."), - reference: zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecThreeFieldMappingOneReferenceRegExp) - .optional() - .describe("Binding for the canonical 'reference' evaluator field."), - trajectory: zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecThreeFieldMappingOneTrajectoryRegExp) - .optional() - .describe("Binding for the canonical 'trajectory' evaluator field."), - messages: zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecThreeFieldMappingOneMessagesRegExp) - .optional() - .describe("Binding for the canonical 'messages' evaluator field."), - tool_calls: zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecThreeFieldMappingOneToolCallsRegExp) - .optional() - .describe("Binding for the canonical 'tool_calls' evaluator field."), - tools: zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecThreeFieldMappingOneToolsRegExp) - .optional() - .describe("Binding for the canonical 'tools' evaluator field."), - custom: zod - .record( - zod.string(), - zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecThreeFieldMappingOneCustomRegExpOne) - ) - .optional() - .describe('Additional evaluator field bindings keyed by canonical field name.'), - }) - .describe( - "Maps canonical evaluator fields to raw dataset column paths.\nExample: {'input': 'question', 'output': 'answer', 'reference': 'gold', 'trajectory': 'steps'}" - ) - .optional() - .describe( - "Maps canonical evaluator fields such as 'input' and 'output' to dataset column paths for this job." - ), - agent: zod - .object({ - url: zod.string().describe('Base URL of the agent endpoint.'), - name: zod.string().describe('Agent name \/ identifier.'), - format: zod - .enum(['generic', 'nemo_agent_toolkit']) - .default(evaluationCancelMetricJobResponseSpecThreeAgentOneFormatDefault) - .describe('Agent format that determines the execution path.'), - api_key_secret: zod - .string() - .regex(evaluationCancelMetricJobResponseSpecThreeAgentOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the agent. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - body: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Jinja template for the request payload. Required for generic agents.'), - response_path: zod - .string() - .optional() - .describe( - "JSONPath expression to extract the response text from the agent's response body. Required for generic agents." - ), - trajectory_path: zod - .string() - .optional() - .describe( - "JSONPath expression to extract the trajectory from the agent's response body. Optional." - ), - }) - .describe( - 'Agent definition for inference in online evaluation jobs.\n\nAn agent is an endpoint that accepts a request and returns a response,\npotentially with a trajectory. Two formats are supported:\n\n- ``generic``: configurable HTTP POST with Jinja-templated body and\n JSONPath extraction for response and trajectory.\n- ``nemo_agent_toolkit``: NeMo Agent Toolkit SSE streaming protocol\n (``\/generate\/full?filter_steps=none``).' - ) - .describe('The agent to evaluate.'), - dataset: zod - .union([ - zod - .object({ - rows: zod - .array(zod.record(zod.string(), zod.unknown())) - .min(1) - .describe( - 'Array of data rows. Each row can be any valid JSON value (object, string, array, etc.).' - ), - }) - .describe( - 'Inline dataset definition with embedded rows.\n\nUse this for quick evaluations without persisting the dataset first.' - ), - zod - .string() - .describe( - "Reference to a Fileset in the Files API.\n\nA reference is a string with format 'workspace\/fileset-name' that points to a\npersisted fileset entity. When used as a dataset source, all files within the\nfileset will be downloaded to the job container.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform." - ), - zod - .object({ - path: zod - .string() - .min(1) - .optional() - .describe('The relative path to file\/directory in the storage.'), - storage: zod - .union([ - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationCancelMetricJobResponseSpecThreeDatasetThreeStorageOneReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('ngc') - .default( - evaluationCancelMetricJobResponseSpecThreeDatasetThreeStorageOneTypeDefault - ), - org: zod.string().describe('NGC organization name'), - team: zod.string().describe('NGC team name'), - target: zod.string().describe('NGC asset name (model or resource)'), - target_type: zod - .enum(['resource', 'model']) - .default( - evaluationCancelMetricJobResponseSpecThreeDatasetThreeStorageOneTargetTypeDefault - ) - .describe("Type of NGC asset: 'resource' or 'model'"), - version: zod - .string() - .optional() - .describe('NGC asset version. If not provided, defaults to latest version'), - original_version: zod - .string() - .optional() - .describe( - "The original version requested by the user before resolution (e.g., 'latest' or None). The 'version' field contains the resolved version ID." - ), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecThreeDatasetThreeStorageOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .describe('NGC API key secret name'), - host: zod - .string() - .default( - evaluationCancelMetricJobResponseSpecThreeDatasetThreeStorageOneHostDefault - ) - .describe('NGC API host URL'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationCancelMetricJobResponseSpecThreeDatasetThreeStorageTwoReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('huggingface') - .default( - evaluationCancelMetricJobResponseSpecThreeDatasetThreeStorageTwoTypeDefault - ), - repo_id: zod - .string() - .describe("Huggingface repository ID (e.g., 'meta-llama\/Llama-2-7b')"), - repo_type: zod - .enum(['model', 'dataset', 'space']) - .default( - evaluationCancelMetricJobResponseSpecThreeDatasetThreeStorageTwoRepoTypeDefault - ) - .describe("Type of Huggingface repository: 'model', 'dataset', or 'space'"), - revision: zod - .string() - .default( - evaluationCancelMetricJobResponseSpecThreeDatasetThreeStorageTwoRevisionDefault - ) - .describe("Branch, tag, or commit SHA. Defaults to 'main'"), - original_revision: zod - .string() - .optional() - .describe( - "The original revision requested by the user before resolution (e.g., 'main'). The 'revision' field contains the resolved commit SHA." - ), - token_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecThreeDatasetThreeStorageTwoTokenSecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe('Huggingface API `token` secret name for private repositories'), - endpoint: zod - .string() - .default( - evaluationCancelMetricJobResponseSpecThreeDatasetThreeStorageTwoEndpointDefault - ) - .describe('Huggingface Hub endpoint URL. Use for self-hosted instances.'), - }), - ]) - .describe('The storage configuration for the fileset.'), - metadata: zod - .object({ - dataset: zod - .object({ - schema: zod - .union([zod.record(zod.string(), zod.unknown()), zod.string()]) - .optional() - .describe( - 'Default row schema for files in this fileset, either inline JSON Schema or a schema_defs key.' - ), - schema_defs: zod - .record(zod.string(), zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'Reusable JSON Schema definitions keyed by name for deduplicating per-file dataset schemas.' - ), - schemas_by_path: zod - .record( - zod.string(), - zod.union([zod.record(zod.string(), zod.unknown()), zod.string()]) - ) - .optional() - .describe( - 'Optional per-file row schemas keyed by relative path within the fileset. Each value may be inline JSON Schema or a schema_defs key.' - ), - }) - .optional() - .describe('Content for dataset-type filesets.'), - model: zod - .object({ - tool_calling: zod - .object({ - chat_template: zod - .string() - .optional() - .describe('Jinja2 chat template for the model.'), - tool_call_parser: zod - .string() - .optional() - .describe( - "Name of the tool call parser (e.g., 'openai', 'hermes', 'pythonic', 'llama3_json', 'mistral')." - ), - tool_call_plugin: zod - .string() - .optional() - .describe( - "Reference to a fileset containing a custom tool call plugin Python file. Expected format: '{workspace}\/{fileset_name}'." - ), - auto_tool_choice: zod - .boolean() - .optional() - .describe('Whether to enable automatic tool choice.'), - }) - .optional() - .describe( - 'Content for tool-calling configuration on model filesets.\n\nStores chat template and tool calling settings that are merged into\nthe ModelSpec during checkpoint analysis.' - ), - }) - .optional() - .describe( - 'Content for model-type filesets.\n\nContains tool calling configuration that is merged into the ModelSpec\nduring checkpoint analysis.' - ), - }) - .describe( - 'Tagged metadata container - the key indicates the type.\n\nExample:\n metadata = FilesetMetadata(\n dataset=DatasetMetadataContent(\n schema={\"columns\": [\"id\", \"name\"]},\n )\n )' - ) - .optional() - .describe('Purpose-specific metadata for the fileset.'), - custom_fields: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Custom fields for the fileset.'), - }) - .describe('Fileset definition for use without persisting to the Files API.'), - ]) - .describe('The dataset to use for agent prompts and evaluation.'), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default(evaluationCancelMetricJobResponseSpecThreeParamsOneParallelismDefault) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecThreeParamsOneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - request_timeout: zod - .number() - .optional() - .describe('The timeout to be used for requests made to the model.'), - max_retries: zod - .number() - .min(evaluationCancelMetricJobResponseSpecThreeParamsOneMaxRetriesMin) - .default(evaluationCancelMetricJobResponseSpecThreeParamsOneMaxRetriesDefault) - .describe('Maximum number of retries for failed requests.'), - }) - .describe('Job parameters for online evaluation.') - .optional() - .describe('Execution parameters for the metric job.'), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .describe( - 'The jinja template to prompt the agent for evaluation. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{input}}, {{output}}, {{context}}, {{reference}} to reference input columns.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - 'Prompt template fields that should remain available to the prompt template but not be required by dataset schema validation.' - ), - }) - .describe('An online metric job that evaluates an agent.'), - zod - .object({ - metric: zod - .union([ - zod - .string() - .regex(evaluationCancelMetricJobResponseSpecFourMetricOneRegExp) - .describe( - "Reference to a metric in the Metrics API.\n\nA reference is a string with format 'workspace\/metric-name' that points to a\npersisted metric entity. See [Entity references](docs\/get-started\/concepts\/entity-references.md) for the\ngeneral entity reference pattern used across the platform." - ), - zod - .object({ - type: zod - .enum(['system', 'system-retriever']) - .default(evaluationCancelMetricJobResponseSpecFourMetricTwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Labels are key-value pairs that can be used for grouping and filtering.' - ), - supported_job_types: zod - .array(zod.enum(['online', 'offline', 'retriever'])) - .default([`online`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - name: zod - .string() - .default(evaluationCancelMetricJobResponseSpecFourMetricTwoNameDefault), - required_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod - .string() - .optional() - .describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe( - 'List of required parameters for running an evaluation with the metric.' - ), - optional_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod - .string() - .optional() - .describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe( - 'List of optional parameters for running an evaluation with the metric.' - ), - }) - .describe('Metric entity for system metric that have pre-defined dataset.'), - ]) - .describe('The metric for evaluation.'), - metric_params: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Additional parameters for the metric. Required for system metrics, optional overrides for custom metrics.' - ), - field_mapping: zod - .object({ - input: zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecFourFieldMappingOneInputRegExp) - .optional() - .describe("Binding for the canonical 'input' evaluator field."), - output: zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecFourFieldMappingOneOutputRegExp) - .optional() - .describe("Binding for the canonical 'output' evaluator field."), - context: zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecFourFieldMappingOneContextRegExp) - .optional() - .describe("Binding for the canonical 'context' evaluator field."), - reference: zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecFourFieldMappingOneReferenceRegExp) - .optional() - .describe("Binding for the canonical 'reference' evaluator field."), - trajectory: zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecFourFieldMappingOneTrajectoryRegExp) - .optional() - .describe("Binding for the canonical 'trajectory' evaluator field."), - messages: zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecFourFieldMappingOneMessagesRegExp) - .optional() - .describe("Binding for the canonical 'messages' evaluator field."), - tool_calls: zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecFourFieldMappingOneToolCallsRegExp) - .optional() - .describe("Binding for the canonical 'tool_calls' evaluator field."), - tools: zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecFourFieldMappingOneToolsRegExp) - .optional() - .describe("Binding for the canonical 'tools' evaluator field."), - custom: zod - .record( - zod.string(), - zod - .string() - .min(1) - .regex(evaluationCancelMetricJobResponseSpecFourFieldMappingOneCustomRegExpOne) - ) - .optional() - .describe('Additional evaluator field bindings keyed by canonical field name.'), - }) - .describe( - "Maps canonical evaluator fields to raw dataset column paths.\nExample: {'input': 'question', 'output': 'answer', 'reference': 'gold', 'trajectory': 'steps'}" - ) - .optional() - .describe( - "Maps canonical evaluator fields such as 'input' and 'output' to dataset column paths for this job." - ), - retriever_pipeline: zod - .object({ - embeddings_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecFourRetrieverPipelineOneEmbeddingsModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationCancelMetricJobResponseSpecFourRetrieverPipelineOneEmbeddingsModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecFourRetrieverPipelineOneEmbeddingsModelTwoRegExp - ) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The embeddings model configuration.'), - }) - .describe('Pipeline configuration for retriever-based evaluations.') - .describe('The pipeline configuration for retriever-based evaluation.'), - dataset: zod - .union([ - zod - .enum([ - 'beir/climate-fever', - 'beir/cqadupstack', - 'beir/dbpedia-entity', - 'beir/fever', - 'beir/fiqa', - 'beir/germanquad', - 'beir/hotpotqa', - 'beir/mmarco', - 'beir/mrtydi', - 'beir/msmarco-v2', - 'beir/msmarco', - 'beir/nfcorpus', - 'beir/nq-train', - 'beir/nq', - 'beir/quora', - 'beir/scidocs', - 'beir/scifact', - 'beir/trec-covid-beir', - 'beir/trec-covid-v2', - 'beir/trec-covid', - 'beir/vihealthqa', - 'beir/webis-touche2020', - 'ragas/amnesty_qa', - ]) - .describe('Well-known dataset (BEIR or RAGAS) referenced by its identifier.'), - zod - .object({ - rows: zod - .array(zod.record(zod.string(), zod.unknown())) - .min(1) - .describe( - 'Array of data rows. Each row can be any valid JSON value (object, string, array, etc.).' - ), - }) - .describe( - 'Inline dataset definition with embedded rows.\n\nUse this for quick evaluations without persisting the dataset first.' - ), - zod - .string() - .describe( - "Reference to a Fileset in the Files API.\n\nA reference is a string with format 'workspace\/fileset-name' that points to a\npersisted fileset entity. When used as a dataset source, all files within the\nfileset will be downloaded to the job container.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform." - ), - zod - .object({ - path: zod - .string() - .min(1) - .optional() - .describe('The relative path to file\/directory in the storage.'), - storage: zod - .union([ - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationCancelMetricJobResponseSpecFourDatasetFourStorageOneReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('ngc') - .default( - evaluationCancelMetricJobResponseSpecFourDatasetFourStorageOneTypeDefault - ), - org: zod.string().describe('NGC organization name'), - team: zod.string().describe('NGC team name'), - target: zod.string().describe('NGC asset name (model or resource)'), - target_type: zod - .enum(['resource', 'model']) - .default( - evaluationCancelMetricJobResponseSpecFourDatasetFourStorageOneTargetTypeDefault - ) - .describe("Type of NGC asset: 'resource' or 'model'"), - version: zod - .string() - .optional() - .describe('NGC asset version. If not provided, defaults to latest version'), - original_version: zod - .string() - .optional() - .describe( - "The original version requested by the user before resolution (e.g., 'latest' or None). The 'version' field contains the resolved version ID." - ), - api_key_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecFourDatasetFourStorageOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .describe('NGC API key secret name'), - host: zod - .string() - .default( - evaluationCancelMetricJobResponseSpecFourDatasetFourStorageOneHostDefault - ) - .describe('NGC API host URL'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default( - evaluationCancelMetricJobResponseSpecFourDatasetFourStorageTwoReadChunkSizeDefault - ) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('huggingface') - .default( - evaluationCancelMetricJobResponseSpecFourDatasetFourStorageTwoTypeDefault - ), - repo_id: zod - .string() - .describe("Huggingface repository ID (e.g., 'meta-llama\/Llama-2-7b')"), - repo_type: zod - .enum(['model', 'dataset', 'space']) - .default( - evaluationCancelMetricJobResponseSpecFourDatasetFourStorageTwoRepoTypeDefault - ) - .describe("Type of Huggingface repository: 'model', 'dataset', or 'space'"), - revision: zod - .string() - .default( - evaluationCancelMetricJobResponseSpecFourDatasetFourStorageTwoRevisionDefault - ) - .describe("Branch, tag, or commit SHA. Defaults to 'main'"), - original_revision: zod - .string() - .optional() - .describe( - "The original revision requested by the user before resolution (e.g., 'main'). The 'revision' field contains the resolved commit SHA." - ), - token_secret: zod - .string() - .regex( - evaluationCancelMetricJobResponseSpecFourDatasetFourStorageTwoTokenSecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe('Huggingface API `token` secret name for private repositories'), - endpoint: zod - .string() - .default( - evaluationCancelMetricJobResponseSpecFourDatasetFourStorageTwoEndpointDefault - ) - .describe('Huggingface Hub endpoint URL. Use for self-hosted instances.'), - }), - ]) - .describe('The storage configuration for the fileset.'), - metadata: zod - .object({ - dataset: zod - .object({ - schema: zod - .union([zod.record(zod.string(), zod.unknown()), zod.string()]) - .optional() - .describe( - 'Default row schema for files in this fileset, either inline JSON Schema or a schema_defs key.' - ), - schema_defs: zod - .record(zod.string(), zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'Reusable JSON Schema definitions keyed by name for deduplicating per-file dataset schemas.' - ), - schemas_by_path: zod - .record( - zod.string(), - zod.union([zod.record(zod.string(), zod.unknown()), zod.string()]) - ) - .optional() - .describe( - 'Optional per-file row schemas keyed by relative path within the fileset. Each value may be inline JSON Schema or a schema_defs key.' - ), - }) - .optional() - .describe('Content for dataset-type filesets.'), - model: zod - .object({ - tool_calling: zod - .object({ - chat_template: zod - .string() - .optional() - .describe('Jinja2 chat template for the model.'), - tool_call_parser: zod - .string() - .optional() - .describe( - "Name of the tool call parser (e.g., 'openai', 'hermes', 'pythonic', 'llama3_json', 'mistral')." - ), - tool_call_plugin: zod - .string() - .optional() - .describe( - "Reference to a fileset containing a custom tool call plugin Python file. Expected format: '{workspace}\/{fileset_name}'." - ), - auto_tool_choice: zod - .boolean() - .optional() - .describe('Whether to enable automatic tool choice.'), - }) - .optional() - .describe( - 'Content for tool-calling configuration on model filesets.\n\nStores chat template and tool calling settings that are merged into\nthe ModelSpec during checkpoint analysis.' - ), - }) - .optional() - .describe( - 'Content for model-type filesets.\n\nContains tool calling configuration that is merged into the ModelSpec\nduring checkpoint analysis.' - ), - }) - .describe( - 'Tagged metadata container - the key indicates the type.\n\nExample:\n metadata = FilesetMetadata(\n dataset=DatasetMetadataContent(\n schema={\"columns\": [\"id\", \"name\"]},\n )\n )' - ) - .optional() - .describe('Purpose-specific metadata for the fileset.'), - custom_fields: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Custom fields for the fileset.'), - }) - .describe('Fileset definition for use without persisting to the Files API.'), - ]) - .describe('The dataset to use for evaluation.'), - params: zod - .object({ - parallelism: zod - .number() - .min(1) - .default(evaluationCancelMetricJobResponseSpecFourParamsOneParallelismDefault) - .describe( - 'Parallelism to be used for the evaluation job. Typically, this represents the maximum number of concurrent requests made to the model.' - ), - limit_samples: zod - .number() - .min(1) - .optional() - .describe( - 'Limit number of evaluation samples, taking the first `limit` samples from the dataset.' - ), - ignore_request_failure: zod - .boolean() - .default( - evaluationCancelMetricJobResponseSpecFourParamsOneIgnoreRequestFailureDefault - ) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - request_timeout: zod - .number() - .optional() - .describe('The timeout to be used for requests made to the model.'), - max_retries: zod - .number() - .min(evaluationCancelMetricJobResponseSpecFourParamsOneMaxRetriesMin) - .default(evaluationCancelMetricJobResponseSpecFourParamsOneMaxRetriesDefault) - .describe('Maximum number of retries for failed requests.'), - }) - .describe('Job parameters for online evaluation.') - .optional() - .describe('Execution parameters for the metric job.'), - }) - .describe('Evaluation with a retriever-based metric.'), - ]), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .optional() - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ), - status_details: zod.record(zod.string(), zod.unknown()).optional(), - error_details: zod.record(zod.string(), zod.unknown()).optional(), - ownership: zod.record(zod.string(), zod.unknown()).optional(), - custom_fields: zod.record(zod.string(), zod.unknown()).optional(), -}); - -/** - * @summary Get Job Logs - */ -export const EvaluationGetMetricJobLogsParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const EvaluationGetMetricJobLogsQueryParams = zod.object({ - limit: zod.number().optional(), - page_cursor: zod.string().optional(), -}); - -export const EvaluationGetMetricJobLogsResponse = zod.object({ - data: zod.array( - zod.object({ - timestamp: zod.string().datetime({}), - job: zod.string(), - job_step: zod.string(), - job_task: zod.string(), - message: zod.string(), - }) - ), - total: zod.number(), - next_page: zod.string(), - prev_page: zod.string(), -}); - -/** - * @summary List Job Results - */ -export const EvaluationListMetricJobsResultsParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const EvaluationListMetricJobsResultsResponse = zod.object({ - data: zod.array( - zod.object({ - name: zod.string(), - job: zod.string(), - workspace: zod.string(), - project: zod.string().optional(), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - artifact_url: zod.string(), - artifact_storage_type: zod.enum(['fileset']), - download_url: zod.string().optional(), - }) - ), -}); - -/** - * @summary Get Job Status - */ -export const EvaluationGetMetricJobStatusParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const EvaluationGetMetricJobStatusResponse = zod.object({ - id: zod.string(), - name: zod.string(), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ), - status_details: zod.record(zod.string(), zod.unknown()), - error_details: zod.record(zod.string(), zod.unknown()), - steps: zod.array( - zod.object({ - id: zod.string(), - name: zod.string(), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ), - status_details: zod.record(zod.string(), zod.unknown()), - error_details: zod.record(zod.string(), zod.unknown()), - tasks: zod.array( - zod.object({ - id: zod.string(), - name: zod.string(), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ), - status_details: zod.record(zod.string(), zod.unknown()), - error_details: zod.record(zod.string(), zod.unknown()), - error_stack: zod.string(), - created_at: zod.string().datetime({}), - updated_at: zod.string().datetime({}), - }) - ), - created_at: zod.string().datetime({}), - updated_at: zod.string().datetime({}), - }) - ), - created_at: zod.string().datetime({}), - updated_at: zod.string().datetime({}), -}); - -/** - * List evaluation metrics. - * @summary List Metrics - */ -export const EvaluationListMetricsParams = zod.object({ - workspace: zod.string(), -}); - -export const evaluationListMetricsQueryPageDefault = 1; -export const evaluationListMetricsQueryPageSizeDefault = 100; -export const evaluationListMetricsQuerySortDefault = `-created_at`; - -export const EvaluationListMetricsQueryParams = zod.object({ - page: zod.number().default(evaluationListMetricsQueryPageDefault).describe('Page number.'), - page_size: zod.number().default(evaluationListMetricsQueryPageSizeDefault).describe('Page size.'), - sort: zod - .enum(['-created_at', 'created_at', '-updated_at', 'updated_at', '-name', 'name']) - .default(evaluationListMetricsQuerySortDefault) - .describe( - 'The field to sort by. To sort in decreasing order, use `-` in front of the field name.' - ), - filter: zod - .object({ - name: zod.string().optional().describe('Filter metrics by name.'), - description: zod.string().optional().describe('Filter metrics by description.'), - type: zod - .enum([ - 'bleu', - 'rouge', - 'f1', - 'exact-match', - 'string-check', - 'number-check', - 'llm-judge', - 'tool-calling', - 'remote', - 'nemo-agent-toolkit-remote', - 'topic_adherence', - 'tool_call_accuracy', - 'agent_goal_accuracy', - 'answer_accuracy', - 'context_relevance', - 'response_groundedness', - 'context_recall', - 'context_precision', - 'context_entity_recall', - 'response_relevancy', - 'faithfulness', - 'noise_sensitivity', - 'system', - 'system-retriever', - ]) - .describe('The predefined metric types.') - .optional() - .describe('Filter metrics by metric type (e.g. llm-judge, exact-match, route, system)'), - project: zod.string().optional().describe('Filter metrics by project name.'), - created_at: zod - .object({ - $gte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results greater than or equal to this datetime.'), - $lte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results less than or equal to this datetime.'), - }) - .optional() - .describe('Filter metrics by creation date range.'), - updated_at: zod - .object({ - $gte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results greater than or equal to this datetime.'), - $lte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results less than or equal to this datetime.'), - }) - .optional() - .describe('Filter metrics by last update date range.'), - }) - .optional() - .describe( - 'Filter metrics by name, description, type, project, and dates. Supports JSON filter syntax with operators: $eq, $like, $lt, $lte, $gt, $gte, $in, $nin, $and, $or, $not. Also supports text filter syntax.' - ), -}); - -export const evaluationListMetricsResponseDataItemOneTypeDefault = `llm-judge`; -export const evaluationListMetricsResponseDataItemOneModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationListMetricsResponseDataItemOneModelOneFormatDefault = `nim`; -export const evaluationListMetricsResponseDataItemOneModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationListMetricsResponseDataItemOneScoresItemOneNameRegExp = new RegExp( - '^[a-z0-9_]+$' -); -export const evaluationListMetricsResponseDataItemOneScoresItemOneParserOneTypeDefault = `json`; -export const evaluationListMetricsResponseDataItemOneScoresItemOneParserTwoTypeDefault = `regex`; -export const evaluationListMetricsResponseDataItemOneScoresItemOneParserTwoMethodDefault = `match`; -export const evaluationListMetricsResponseDataItemOneScoresItemOneRubricMin = 2; - -export const evaluationListMetricsResponseDataItemOneScoresItemTwoNameRegExp = new RegExp( - '^[a-z0-9_]+$' -); -export const evaluationListMetricsResponseDataItemOneScoresItemTwoParserOneTypeDefault = `json`; -export const evaluationListMetricsResponseDataItemOneScoresItemTwoParserTwoTypeDefault = `regex`; -export const evaluationListMetricsResponseDataItemOneScoresItemTwoParserTwoMethodDefault = `match`; - -export const evaluationListMetricsResponseDataItemOneInferenceOneTemperatureMin = 0; -export const evaluationListMetricsResponseDataItemOneInferenceOneTemperatureMax = 2; - -export const evaluationListMetricsResponseDataItemOneInferenceOneTopPMin = 0; -export const evaluationListMetricsResponseDataItemOneInferenceOneTopPMax = 1; - -export const evaluationListMetricsResponseDataItemOneIgnoreRequestFailureDefault = false; -export const evaluationListMetricsResponseDataItemTwoJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricsResponseDataItemTwoJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricsResponseDataItemTwoJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationListMetricsResponseDataItemTwoInferenceOneTemperatureMin = 0; -export const evaluationListMetricsResponseDataItemTwoInferenceOneTemperatureMax = 2; - -export const evaluationListMetricsResponseDataItemTwoInferenceOneTopPMin = 0; -export const evaluationListMetricsResponseDataItemTwoInferenceOneTopPMax = 1; - -export const evaluationListMetricsResponseDataItemTwoIgnoreRequestFailureDefault = false; -export const evaluationListMetricsResponseDataItemTwoTypeDefault = `topic_adherence`; -export const evaluationListMetricsResponseDataItemTwoMetricModeDefault = `f1`; -export const evaluationListMetricsResponseDataItemThreeJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricsResponseDataItemThreeJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricsResponseDataItemThreeJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationListMetricsResponseDataItemThreeInferenceOneTemperatureMin = 0; -export const evaluationListMetricsResponseDataItemThreeInferenceOneTemperatureMax = 2; - -export const evaluationListMetricsResponseDataItemThreeInferenceOneTopPMin = 0; -export const evaluationListMetricsResponseDataItemThreeInferenceOneTopPMax = 1; - -export const evaluationListMetricsResponseDataItemThreeIgnoreRequestFailureDefault = false; -export const evaluationListMetricsResponseDataItemThreeTypeDefault = `agent_goal_accuracy`; -export const evaluationListMetricsResponseDataItemThreeUseReferenceDefault = true; -export const evaluationListMetricsResponseDataItemFourJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricsResponseDataItemFourJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricsResponseDataItemFourJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationListMetricsResponseDataItemFourInferenceOneTemperatureMin = 0; -export const evaluationListMetricsResponseDataItemFourInferenceOneTemperatureMax = 2; - -export const evaluationListMetricsResponseDataItemFourInferenceOneTopPMin = 0; -export const evaluationListMetricsResponseDataItemFourInferenceOneTopPMax = 1; - -export const evaluationListMetricsResponseDataItemFourIgnoreRequestFailureDefault = false; -export const evaluationListMetricsResponseDataItemFourTypeDefault = `answer_accuracy`; -export const evaluationListMetricsResponseDataItemFiveJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricsResponseDataItemFiveJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricsResponseDataItemFiveJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationListMetricsResponseDataItemFiveInferenceOneTemperatureMin = 0; -export const evaluationListMetricsResponseDataItemFiveInferenceOneTemperatureMax = 2; - -export const evaluationListMetricsResponseDataItemFiveInferenceOneTopPMin = 0; -export const evaluationListMetricsResponseDataItemFiveInferenceOneTopPMax = 1; - -export const evaluationListMetricsResponseDataItemFiveIgnoreRequestFailureDefault = false; -export const evaluationListMetricsResponseDataItemFiveTypeDefault = `context_relevance`; -export const evaluationListMetricsResponseDataItemSixJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricsResponseDataItemSixJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricsResponseDataItemSixJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationListMetricsResponseDataItemSixInferenceOneTemperatureMin = 0; -export const evaluationListMetricsResponseDataItemSixInferenceOneTemperatureMax = 2; - -export const evaluationListMetricsResponseDataItemSixInferenceOneTopPMin = 0; -export const evaluationListMetricsResponseDataItemSixInferenceOneTopPMax = 1; - -export const evaluationListMetricsResponseDataItemSixIgnoreRequestFailureDefault = false; -export const evaluationListMetricsResponseDataItemSixTypeDefault = `response_groundedness`; -export const evaluationListMetricsResponseDataItemSevenJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricsResponseDataItemSevenJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricsResponseDataItemSevenJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationListMetricsResponseDataItemSevenInferenceOneTemperatureMin = 0; -export const evaluationListMetricsResponseDataItemSevenInferenceOneTemperatureMax = 2; - -export const evaluationListMetricsResponseDataItemSevenInferenceOneTopPMin = 0; -export const evaluationListMetricsResponseDataItemSevenInferenceOneTopPMax = 1; - -export const evaluationListMetricsResponseDataItemSevenIgnoreRequestFailureDefault = false; -export const evaluationListMetricsResponseDataItemSevenTypeDefault = `context_recall`; -export const evaluationListMetricsResponseDataItemEightJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricsResponseDataItemEightJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricsResponseDataItemEightJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationListMetricsResponseDataItemEightInferenceOneTemperatureMin = 0; -export const evaluationListMetricsResponseDataItemEightInferenceOneTemperatureMax = 2; - -export const evaluationListMetricsResponseDataItemEightInferenceOneTopPMin = 0; -export const evaluationListMetricsResponseDataItemEightInferenceOneTopPMax = 1; - -export const evaluationListMetricsResponseDataItemEightIgnoreRequestFailureDefault = false; -export const evaluationListMetricsResponseDataItemEightTypeDefault = `context_precision`; -export const evaluationListMetricsResponseDataItemNineJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricsResponseDataItemNineJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricsResponseDataItemNineJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationListMetricsResponseDataItemNineInferenceOneTemperatureMin = 0; -export const evaluationListMetricsResponseDataItemNineInferenceOneTemperatureMax = 2; - -export const evaluationListMetricsResponseDataItemNineInferenceOneTopPMin = 0; -export const evaluationListMetricsResponseDataItemNineInferenceOneTopPMax = 1; - -export const evaluationListMetricsResponseDataItemNineIgnoreRequestFailureDefault = false; -export const evaluationListMetricsResponseDataItemNineTypeDefault = `context_entity_recall`; -export const evaluationListMetricsResponseDataItemOnezeroEmbeddingsModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricsResponseDataItemOnezeroEmbeddingsModelOneFormatDefault = `nim`; -export const evaluationListMetricsResponseDataItemOnezeroEmbeddingsModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationListMetricsResponseDataItemOnezeroJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricsResponseDataItemOnezeroJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricsResponseDataItemOnezeroJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationListMetricsResponseDataItemOnezeroInferenceOneTemperatureMin = 0; -export const evaluationListMetricsResponseDataItemOnezeroInferenceOneTemperatureMax = 2; - -export const evaluationListMetricsResponseDataItemOnezeroInferenceOneTopPMin = 0; -export const evaluationListMetricsResponseDataItemOnezeroInferenceOneTopPMax = 1; - -export const evaluationListMetricsResponseDataItemOnezeroIgnoreRequestFailureDefault = false; -export const evaluationListMetricsResponseDataItemOnezeroTypeDefault = `response_relevancy`; -export const evaluationListMetricsResponseDataItemOnezeroStrictnessDefault = 1; -export const evaluationListMetricsResponseDataItemOneoneJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricsResponseDataItemOneoneJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricsResponseDataItemOneoneJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationListMetricsResponseDataItemOneoneInferenceOneTemperatureMin = 0; -export const evaluationListMetricsResponseDataItemOneoneInferenceOneTemperatureMax = 2; - -export const evaluationListMetricsResponseDataItemOneoneInferenceOneTopPMin = 0; -export const evaluationListMetricsResponseDataItemOneoneInferenceOneTopPMax = 1; - -export const evaluationListMetricsResponseDataItemOneoneIgnoreRequestFailureDefault = false; -export const evaluationListMetricsResponseDataItemOneoneTypeDefault = `faithfulness`; -export const evaluationListMetricsResponseDataItemOnetwoJudgeModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationListMetricsResponseDataItemOnetwoJudgeModelOneFormatDefault = `nim`; -export const evaluationListMetricsResponseDataItemOnetwoJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationListMetricsResponseDataItemOnetwoInferenceOneTemperatureMin = 0; -export const evaluationListMetricsResponseDataItemOnetwoInferenceOneTemperatureMax = 2; - -export const evaluationListMetricsResponseDataItemOnetwoInferenceOneTopPMin = 0; -export const evaluationListMetricsResponseDataItemOnetwoInferenceOneTopPMax = 1; - -export const evaluationListMetricsResponseDataItemOnetwoIgnoreRequestFailureDefault = false; -export const evaluationListMetricsResponseDataItemOnetwoTypeDefault = `noise_sensitivity`; -export const evaluationListMetricsResponseDataItemOnethreeTypeDefault = `tool_call_accuracy`; -export const evaluationListMetricsResponseDataItemOnefourTypeDefault = `bleu`; -export const evaluationListMetricsResponseDataItemOnefiveTypeDefault = `exact-match`; -export const evaluationListMetricsResponseDataItemOnesixTypeDefault = `f1`; -export const evaluationListMetricsResponseDataItemOnesevenTypeDefault = `number-check`; -export const evaluationListMetricsResponseDataItemOneeightTypeDefault = `remote`; -export const evaluationListMetricsResponseDataItemOneeightApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationListMetricsResponseDataItemOneeightTimeoutSecondsDefault = 30; -export const evaluationListMetricsResponseDataItemOneeightMaxRetriesDefault = 3; -export const evaluationListMetricsResponseDataItemOneeightScoresItemNameRegExp = new RegExp( - '^[a-z0-9_]+$' -); -export const evaluationListMetricsResponseDataItemOneeightScoresItemParserOneTypeDefault = `json`; -export const evaluationListMetricsResponseDataItemOnenineTypeDefault = `nemo-agent-toolkit-remote`; -export const evaluationListMetricsResponseDataItemOnenineApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationListMetricsResponseDataItemOnenineTimeoutSecondsDefault = 30; -export const evaluationListMetricsResponseDataItemOnenineMaxRetriesDefault = 3; -export const evaluationListMetricsResponseDataItemTwozeroTypeDefault = `rouge`; -export const evaluationListMetricsResponseDataItemTwooneTypeDefault = `string-check`; -export const evaluationListMetricsResponseDataItemTwotwoTypeDefault = `tool-calling`; -export const evaluationListMetricsResponseDataItemTwothreeNameDefault = `Metric name`; -export const evaluationListMetricsResponseDataItemTwothreeTypeDefault = `system`; - -export const EvaluationListMetricsResponse = zod.object({ - data: zod.array( - zod.union([ - zod.object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod.literal('llm-judge').default(evaluationListMetricsResponseDataItemOneTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationListMetricsResponseDataItemOneModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationListMetricsResponseDataItemOneModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationListMetricsResponseDataItemOneModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The model configuration.'), - scores: zod - .array( - zod.union([ - zod - .object({ - name: zod - .string() - .regex(evaluationListMetricsResponseDataItemOneScoresItemOneNameRegExp) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationListMetricsResponseDataItemOneScoresItemOneParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationListMetricsResponseDataItemOneScoresItemOneParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationListMetricsResponseDataItemOneScoresItemOneParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - rubric: zod - .array( - zod.object({ - label: zod - .string() - .describe( - 'The label to use for the level of the rubric grading criteria. (e.g., \"helpful\", \"not_helpful\", \"positive\")' - ), - description: zod - .string() - .optional() - .describe( - 'Describe the semantic meaning of each criteria for the given rubric. If no judge template is set, the input description for labels are included in the generated judge prompt.' - ), - value: zod - .union([zod.number(), zod.number()]) - .describe( - 'The score value to assign for the criteria used for aggregation and ranking.' - ), - }) - ) - .min(evaluationListMetricsResponseDataItemOneScoresItemOneRubricMin) - .describe('The rubric for the score.'), - }) - .describe( - 'Score definition for a rubric with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - zod - .object({ - name: zod - .string() - .regex(evaluationListMetricsResponseDataItemOneScoresItemTwoNameRegExp) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationListMetricsResponseDataItemOneScoresItemTwoParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationListMetricsResponseDataItemOneScoresItemTwoParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationListMetricsResponseDataItemOneScoresItemTwoParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .describe('Minimum value for the score range. Must be less than maximum.'), - maximum: zod - .union([zod.number(), zod.number()]) - .describe('Maximum value for the score range. Must be greater than minimum.'), - }) - .describe( - 'Score definition for a range of values with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - ]) - ) - .min(1) - .describe("Definitions of scores that will be extracted from the judge's output."), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .optional() - .describe( - 'The prompt template for the judge. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{sample.output_text}} to use the model output within the template or {{item.xxx}} to reference input columns from the dataset.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - "Prompt template fields that should remain in the inferred input schema but not be required. Use this for fields like 'reference' when the metric can still run without them." - ), - structured_output: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'JSON schema to apply structured output for the judge model evaluation. Structured output is derived from scores when omitted. Use this option if there are custom requirements for the output of the judge.' - ), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationListMetricsResponseDataItemOneInferenceOneTemperatureMin) - .max(evaluationListMetricsResponseDataItemOneInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationListMetricsResponseDataItemOneInferenceOneTopPMin) - .max(evaluationListMetricsResponseDataItemOneInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge model.'), - system_prompt: zod - .string() - .optional() - .describe( - "Initial instructions that define the judge model's role and behavior for the conversation. This is prepended to the messages as a system message." - ), - reasoning: zod - .object({ - end_token: zod - .string() - .optional() - .describe( - "Configure the end token to trim reasoning context based on the model's reasoning API. Example for Nemotron models: '<\/think>'" - ), - include_if_not_finished: zod - .boolean() - .optional() - .describe( - 'Configure whether to include reasoning context if the model has not finished reasoning.' - ), - effort: zod - .string() - .optional() - .describe( - 'Option for OpenAI models to specify low, medium, or high reasoning effort.' - ), - }) - .describe("Custom settings that control the model's reasoning behavior.") - .optional() - .describe( - "Custom settings that control the judge model's reasoning behavior. For reasoning models (e.g., Nemotron), use `end_token` to strip reasoning traces from the output." - ), - ignore_request_failure: zod - .boolean() - .default(evaluationListMetricsResponseDataItemOneIgnoreRequestFailureDefault) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - }), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricsResponseDataItemTwoJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationListMetricsResponseDataItemTwoJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationListMetricsResponseDataItemTwoJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationListMetricsResponseDataItemTwoInferenceOneTemperatureMin) - .max(evaluationListMetricsResponseDataItemTwoInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationListMetricsResponseDataItemTwoInferenceOneTopPMin) - .max(evaluationListMetricsResponseDataItemTwoInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationListMetricsResponseDataItemTwoIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('topic_adherence') - .default(evaluationListMetricsResponseDataItemTwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - metric_mode: zod - .enum(['f1', 'precision', 'recall']) - .default(evaluationListMetricsResponseDataItemTwoMetricModeDefault) - .describe('The mode for computing topic adherence score.'), - }) - .describe('Response type for TopicAdherence metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricsResponseDataItemThreeJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationListMetricsResponseDataItemThreeJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationListMetricsResponseDataItemThreeJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationListMetricsResponseDataItemThreeInferenceOneTemperatureMin) - .max(evaluationListMetricsResponseDataItemThreeInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationListMetricsResponseDataItemThreeInferenceOneTopPMin) - .max(evaluationListMetricsResponseDataItemThreeInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationListMetricsResponseDataItemThreeIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('agent_goal_accuracy') - .default(evaluationListMetricsResponseDataItemThreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - use_reference: zod - .boolean() - .default(evaluationListMetricsResponseDataItemThreeUseReferenceDefault) - .describe('Whether to use reference for goal accuracy evaluation.'), - }) - .describe('Response type for AgentGoalAccuracy metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricsResponseDataItemFourJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationListMetricsResponseDataItemFourJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationListMetricsResponseDataItemFourJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationListMetricsResponseDataItemFourInferenceOneTemperatureMin) - .max(evaluationListMetricsResponseDataItemFourInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationListMetricsResponseDataItemFourInferenceOneTopPMin) - .max(evaluationListMetricsResponseDataItemFourInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationListMetricsResponseDataItemFourIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('answer_accuracy') - .default(evaluationListMetricsResponseDataItemFourTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Response type for AnswerAccuracy metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricsResponseDataItemFiveJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationListMetricsResponseDataItemFiveJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationListMetricsResponseDataItemFiveJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationListMetricsResponseDataItemFiveInferenceOneTemperatureMin) - .max(evaluationListMetricsResponseDataItemFiveInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationListMetricsResponseDataItemFiveInferenceOneTopPMin) - .max(evaluationListMetricsResponseDataItemFiveInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationListMetricsResponseDataItemFiveIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_relevance') - .default(evaluationListMetricsResponseDataItemFiveTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Response type for ContextRelevance metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricsResponseDataItemSixJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationListMetricsResponseDataItemSixJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationListMetricsResponseDataItemSixJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationListMetricsResponseDataItemSixInferenceOneTemperatureMin) - .max(evaluationListMetricsResponseDataItemSixInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationListMetricsResponseDataItemSixInferenceOneTopPMin) - .max(evaluationListMetricsResponseDataItemSixInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationListMetricsResponseDataItemSixIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_groundedness') - .default(evaluationListMetricsResponseDataItemSixTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Response type for ResponseGroundedness metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricsResponseDataItemSevenJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationListMetricsResponseDataItemSevenJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationListMetricsResponseDataItemSevenJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationListMetricsResponseDataItemSevenInferenceOneTemperatureMin) - .max(evaluationListMetricsResponseDataItemSevenInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationListMetricsResponseDataItemSevenInferenceOneTopPMin) - .max(evaluationListMetricsResponseDataItemSevenInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationListMetricsResponseDataItemSevenIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_recall') - .default(evaluationListMetricsResponseDataItemSevenTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Response type for ContextRecall metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricsResponseDataItemEightJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationListMetricsResponseDataItemEightJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationListMetricsResponseDataItemEightJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationListMetricsResponseDataItemEightInferenceOneTemperatureMin) - .max(evaluationListMetricsResponseDataItemEightInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationListMetricsResponseDataItemEightInferenceOneTopPMin) - .max(evaluationListMetricsResponseDataItemEightInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationListMetricsResponseDataItemEightIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_precision') - .default(evaluationListMetricsResponseDataItemEightTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Response type for ContextPrecision metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricsResponseDataItemNineJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationListMetricsResponseDataItemNineJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationListMetricsResponseDataItemNineJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationListMetricsResponseDataItemNineInferenceOneTemperatureMin) - .max(evaluationListMetricsResponseDataItemNineInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationListMetricsResponseDataItemNineInferenceOneTopPMin) - .max(evaluationListMetricsResponseDataItemNineInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationListMetricsResponseDataItemNineIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_entity_recall') - .default(evaluationListMetricsResponseDataItemNineTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Response type for ContextEntityRecall metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - embeddings_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricsResponseDataItemOnezeroEmbeddingsModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default( - evaluationListMetricsResponseDataItemOnezeroEmbeddingsModelOneFormatDefault - ) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationListMetricsResponseDataItemOnezeroEmbeddingsModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The embeddings model configuration.'), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricsResponseDataItemOnezeroJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationListMetricsResponseDataItemOnezeroJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationListMetricsResponseDataItemOnezeroJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationListMetricsResponseDataItemOnezeroInferenceOneTemperatureMin) - .max(evaluationListMetricsResponseDataItemOnezeroInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationListMetricsResponseDataItemOnezeroInferenceOneTopPMin) - .max(evaluationListMetricsResponseDataItemOnezeroInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationListMetricsResponseDataItemOnezeroIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_relevancy') - .default(evaluationListMetricsResponseDataItemOnezeroTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - strictness: zod - .number() - .default(evaluationListMetricsResponseDataItemOnezeroStrictnessDefault) - .describe('Number of parallel questions generated. NIM can only generate 1.'), - }) - .describe('Response type for ResponseRelevancy metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricsResponseDataItemOneoneJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationListMetricsResponseDataItemOneoneJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationListMetricsResponseDataItemOneoneJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationListMetricsResponseDataItemOneoneInferenceOneTemperatureMin) - .max(evaluationListMetricsResponseDataItemOneoneInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationListMetricsResponseDataItemOneoneInferenceOneTopPMin) - .max(evaluationListMetricsResponseDataItemOneoneInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationListMetricsResponseDataItemOneoneIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('faithfulness') - .default(evaluationListMetricsResponseDataItemOneoneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Response type for Faithfulness metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex( - evaluationListMetricsResponseDataItemOnetwoJudgeModelOneApiKeySecretOneRegExp - ) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationListMetricsResponseDataItemOnetwoJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationListMetricsResponseDataItemOnetwoJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationListMetricsResponseDataItemOnetwoInferenceOneTemperatureMin) - .max(evaluationListMetricsResponseDataItemOnetwoInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationListMetricsResponseDataItemOnetwoInferenceOneTopPMin) - .max(evaluationListMetricsResponseDataItemOnetwoInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationListMetricsResponseDataItemOnetwoIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('noise_sensitivity') - .default(evaluationListMetricsResponseDataItemOnetwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Response type for NoiseSensitivity metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod - .literal('tool_call_accuracy') - .default(evaluationListMetricsResponseDataItemOnethreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Optional Jinja template for rendering the input payload for RAGAS evaluation.' - ), - }) - .describe('Response type for ToolCallAccuracy metrics (no judge required).'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod - .literal('bleu') - .default(evaluationListMetricsResponseDataItemOnefourTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - references: zod - .array(zod.string()) - .describe( - 'The templates for the ground truth references to calculate BLEU metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to calculate BLEU metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Response type for BLEUMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod - .literal('exact-match') - .default(evaluationListMetricsResponseDataItemOnefiveTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the exact match metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the exact match metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Response type for ExactMatchMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod.literal('f1').default(evaluationListMetricsResponseDataItemOnesixTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the F1 metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the F1 metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Response type for F1Metric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod - .literal('number-check') - .default(evaluationListMetricsResponseDataItemOnesevenTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - '>=', - 'gte', - 'greater than or equal', - '>', - 'gt', - 'greater than', - '<=', - 'lte', - 'less than or equal', - '<', - 'lt', - 'less than', - 'absolute difference', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - epsilon: zod - .union([zod.number(), zod.number()]) - .optional() - .describe('Specify the tolerance for the absolute difference of values.'), - }) - .describe('Response type for NumberCheckMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod - .literal('remote') - .default(evaluationListMetricsResponseDataItemOneeightTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex(evaluationListMetricsResponseDataItemOneeightApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default(evaluationListMetricsResponseDataItemOneeightTimeoutSecondsDefault) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default(evaluationListMetricsResponseDataItemOneeightMaxRetriesDefault) - .describe('Maximum number of retry attempts.'), - body: zod - .record(zod.string(), zod.unknown()) - .describe('Jinja template for request payload'), - scores: zod - .array( - zod - .object({ - name: zod - .string() - .regex(evaluationListMetricsResponseDataItemOneeightScoresItemNameRegExp) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .object({ - type: zod - .literal('json') - .default( - evaluationListMetricsResponseDataItemOneeightScoresItemParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.') - .optional() - .describe( - 'The method to parse the score. Only JSON parsing is supported for remote metrics.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe( - 'Minimum value for the score range. Defaults to None (no lower bound).' - ), - maximum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe( - 'Maximum value for the score range. Defaults to None (no upper bound).' - ), - }) - .describe( - 'Score configuration for remote metrics.\n\nUnlike RangeScore, minimum and maximum are optional (default to None = no bounds).\nThis avoids JSON serialization issues with infinity values.' - ) - ) - .describe('List of scores to extract from the remote response'), - }) - .describe('Response type for RemoteMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod - .literal('nemo-agent-toolkit-remote') - .default(evaluationListMetricsResponseDataItemOnenineTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex(evaluationListMetricsResponseDataItemOnenineApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default(evaluationListMetricsResponseDataItemOnenineTimeoutSecondsDefault) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default(evaluationListMetricsResponseDataItemOnenineMaxRetriesDefault) - .describe('Maximum number of retry attempts.'), - evaluator_name: zod - .string() - .describe('The name of the evaluator (also used as the score name).'), - }) - .describe('Response type for NemoAgentToolkitRemoteMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod - .literal('rouge') - .default(evaluationListMetricsResponseDataItemTwozeroTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to evaluate the ROUGE metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the ROUGE metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Response type for ROUGEMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod - .literal('string-check') - .default(evaluationListMetricsResponseDataItemTwooneTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - 'contains', - 'not contains', - 'startswith', - 'endswith', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - }) - .describe('Response type for StringCheckMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod - .literal('tool-calling') - .default(evaluationListMetricsResponseDataItemTwotwoTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to evaluate tool calling accuracy.' - ), - }) - .describe('Response type for ToolCallingMetric.'), - zod - .object({ - name: zod.string().default(evaluationListMetricsResponseDataItemTwothreeNameDefault), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod - .enum(['system', 'system-retriever']) - .default(evaluationListMetricsResponseDataItemTwothreeTypeDefault), - description: zod - .string() - .optional() - .describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline', 'retriever'])) - .default([`online`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - required_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod.string().optional().describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe('List of required parameters for running an evaluation with the metric.'), - optional_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod.string().optional().describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe('List of optional parameters for running an evaluation with the metric.'), - }) - .describe('Response type for SystemMetric.'), - ]) - ), - pagination: zod - .object({ - page: zod.number().describe('The current page number.'), - page_size: zod.number().describe('The page size used for the query.'), - current_page_size: zod.number().describe('The size for the current page.'), - total_pages: zod.number().describe('The total number of pages.'), - total_results: zod.number().describe('The total number of results.'), - }) - .optional() - .describe('Pagination information.'), - sort: zod.string().optional().describe('The field on which the results are sorted.'), - filter: zod.record(zod.string(), zod.unknown()).optional().describe('Filtering information.'), -}); - -/** - * Get a specific evaluation metric by workspace and metric name. - * @summary Get Metric - */ -export const EvaluationGetMetricParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const evaluationGetMetricResponseOneTypeDefault = `llm-judge`; -export const evaluationGetMetricResponseOneModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetMetricResponseOneModelOneFormatDefault = `nim`; -export const evaluationGetMetricResponseOneModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricResponseOneScoresItemOneNameRegExp = new RegExp('^[a-z0-9_]+$'); -export const evaluationGetMetricResponseOneScoresItemOneParserOneTypeDefault = `json`; -export const evaluationGetMetricResponseOneScoresItemOneParserTwoTypeDefault = `regex`; -export const evaluationGetMetricResponseOneScoresItemOneParserTwoMethodDefault = `match`; -export const evaluationGetMetricResponseOneScoresItemOneRubricMin = 2; - -export const evaluationGetMetricResponseOneScoresItemTwoNameRegExp = new RegExp('^[a-z0-9_]+$'); -export const evaluationGetMetricResponseOneScoresItemTwoParserOneTypeDefault = `json`; -export const evaluationGetMetricResponseOneScoresItemTwoParserTwoTypeDefault = `regex`; -export const evaluationGetMetricResponseOneScoresItemTwoParserTwoMethodDefault = `match`; - -export const evaluationGetMetricResponseOneInferenceOneTemperatureMin = 0; -export const evaluationGetMetricResponseOneInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricResponseOneInferenceOneTopPMin = 0; -export const evaluationGetMetricResponseOneInferenceOneTopPMax = 1; - -export const evaluationGetMetricResponseOneIgnoreRequestFailureDefault = false; -export const evaluationGetMetricResponseTwoJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetMetricResponseTwoJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricResponseTwoJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricResponseTwoInferenceOneTemperatureMin = 0; -export const evaluationGetMetricResponseTwoInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricResponseTwoInferenceOneTopPMin = 0; -export const evaluationGetMetricResponseTwoInferenceOneTopPMax = 1; - -export const evaluationGetMetricResponseTwoIgnoreRequestFailureDefault = false; -export const evaluationGetMetricResponseTwoTypeDefault = `topic_adherence`; -export const evaluationGetMetricResponseTwoMetricModeDefault = `f1`; -export const evaluationGetMetricResponseThreeJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetMetricResponseThreeJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricResponseThreeJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricResponseThreeInferenceOneTemperatureMin = 0; -export const evaluationGetMetricResponseThreeInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricResponseThreeInferenceOneTopPMin = 0; -export const evaluationGetMetricResponseThreeInferenceOneTopPMax = 1; - -export const evaluationGetMetricResponseThreeIgnoreRequestFailureDefault = false; -export const evaluationGetMetricResponseThreeTypeDefault = `agent_goal_accuracy`; -export const evaluationGetMetricResponseThreeUseReferenceDefault = true; -export const evaluationGetMetricResponseFourJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetMetricResponseFourJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricResponseFourJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricResponseFourInferenceOneTemperatureMin = 0; -export const evaluationGetMetricResponseFourInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricResponseFourInferenceOneTopPMin = 0; -export const evaluationGetMetricResponseFourInferenceOneTopPMax = 1; - -export const evaluationGetMetricResponseFourIgnoreRequestFailureDefault = false; -export const evaluationGetMetricResponseFourTypeDefault = `answer_accuracy`; -export const evaluationGetMetricResponseFiveJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetMetricResponseFiveJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricResponseFiveJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricResponseFiveInferenceOneTemperatureMin = 0; -export const evaluationGetMetricResponseFiveInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricResponseFiveInferenceOneTopPMin = 0; -export const evaluationGetMetricResponseFiveInferenceOneTopPMax = 1; - -export const evaluationGetMetricResponseFiveIgnoreRequestFailureDefault = false; -export const evaluationGetMetricResponseFiveTypeDefault = `context_relevance`; -export const evaluationGetMetricResponseSixJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetMetricResponseSixJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricResponseSixJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricResponseSixInferenceOneTemperatureMin = 0; -export const evaluationGetMetricResponseSixInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricResponseSixInferenceOneTopPMin = 0; -export const evaluationGetMetricResponseSixInferenceOneTopPMax = 1; - -export const evaluationGetMetricResponseSixIgnoreRequestFailureDefault = false; -export const evaluationGetMetricResponseSixTypeDefault = `response_groundedness`; -export const evaluationGetMetricResponseSevenJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetMetricResponseSevenJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricResponseSevenJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricResponseSevenInferenceOneTemperatureMin = 0; -export const evaluationGetMetricResponseSevenInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricResponseSevenInferenceOneTopPMin = 0; -export const evaluationGetMetricResponseSevenInferenceOneTopPMax = 1; - -export const evaluationGetMetricResponseSevenIgnoreRequestFailureDefault = false; -export const evaluationGetMetricResponseSevenTypeDefault = `context_recall`; -export const evaluationGetMetricResponseEightJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetMetricResponseEightJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricResponseEightJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricResponseEightInferenceOneTemperatureMin = 0; -export const evaluationGetMetricResponseEightInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricResponseEightInferenceOneTopPMin = 0; -export const evaluationGetMetricResponseEightInferenceOneTopPMax = 1; - -export const evaluationGetMetricResponseEightIgnoreRequestFailureDefault = false; -export const evaluationGetMetricResponseEightTypeDefault = `context_precision`; -export const evaluationGetMetricResponseNineJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetMetricResponseNineJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricResponseNineJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricResponseNineInferenceOneTemperatureMin = 0; -export const evaluationGetMetricResponseNineInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricResponseNineInferenceOneTopPMin = 0; -export const evaluationGetMetricResponseNineInferenceOneTopPMax = 1; - -export const evaluationGetMetricResponseNineIgnoreRequestFailureDefault = false; -export const evaluationGetMetricResponseNineTypeDefault = `context_entity_recall`; -export const evaluationGetMetricResponseOnezeroEmbeddingsModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetMetricResponseOnezeroEmbeddingsModelOneFormatDefault = `nim`; -export const evaluationGetMetricResponseOnezeroEmbeddingsModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricResponseOnezeroJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetMetricResponseOnezeroJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricResponseOnezeroJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricResponseOnezeroInferenceOneTemperatureMin = 0; -export const evaluationGetMetricResponseOnezeroInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricResponseOnezeroInferenceOneTopPMin = 0; -export const evaluationGetMetricResponseOnezeroInferenceOneTopPMax = 1; - -export const evaluationGetMetricResponseOnezeroIgnoreRequestFailureDefault = false; -export const evaluationGetMetricResponseOnezeroTypeDefault = `response_relevancy`; -export const evaluationGetMetricResponseOnezeroStrictnessDefault = 1; -export const evaluationGetMetricResponseOneoneJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetMetricResponseOneoneJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricResponseOneoneJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricResponseOneoneInferenceOneTemperatureMin = 0; -export const evaluationGetMetricResponseOneoneInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricResponseOneoneInferenceOneTopPMin = 0; -export const evaluationGetMetricResponseOneoneInferenceOneTopPMax = 1; - -export const evaluationGetMetricResponseOneoneIgnoreRequestFailureDefault = false; -export const evaluationGetMetricResponseOneoneTypeDefault = `faithfulness`; -export const evaluationGetMetricResponseOnetwoJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetMetricResponseOnetwoJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricResponseOnetwoJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricResponseOnetwoInferenceOneTemperatureMin = 0; -export const evaluationGetMetricResponseOnetwoInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricResponseOnetwoInferenceOneTopPMin = 0; -export const evaluationGetMetricResponseOnetwoInferenceOneTopPMax = 1; - -export const evaluationGetMetricResponseOnetwoIgnoreRequestFailureDefault = false; -export const evaluationGetMetricResponseOnetwoTypeDefault = `noise_sensitivity`; -export const evaluationGetMetricResponseOnethreeTypeDefault = `tool_call_accuracy`; -export const evaluationGetMetricResponseOnefourTypeDefault = `bleu`; -export const evaluationGetMetricResponseOnefiveTypeDefault = `exact-match`; -export const evaluationGetMetricResponseOnesixTypeDefault = `f1`; -export const evaluationGetMetricResponseOnesevenTypeDefault = `number-check`; -export const evaluationGetMetricResponseOneeightTypeDefault = `remote`; -export const evaluationGetMetricResponseOneeightApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetMetricResponseOneeightTimeoutSecondsDefault = 30; -export const evaluationGetMetricResponseOneeightMaxRetriesDefault = 3; -export const evaluationGetMetricResponseOneeightScoresItemNameRegExp = new RegExp('^[a-z0-9_]+$'); -export const evaluationGetMetricResponseOneeightScoresItemParserOneTypeDefault = `json`; -export const evaluationGetMetricResponseOnenineTypeDefault = `nemo-agent-toolkit-remote`; -export const evaluationGetMetricResponseOnenineApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetMetricResponseOnenineTimeoutSecondsDefault = 30; -export const evaluationGetMetricResponseOnenineMaxRetriesDefault = 3; -export const evaluationGetMetricResponseTwozeroTypeDefault = `rouge`; -export const evaluationGetMetricResponseTwooneTypeDefault = `string-check`; -export const evaluationGetMetricResponseTwotwoTypeDefault = `tool-calling`; -export const evaluationGetMetricResponseTwothreeNameDefault = `Metric name`; -export const evaluationGetMetricResponseTwothreeTypeDefault = `system`; -export const evaluationGetMetricResponseTwofourTypeDefault = `llm-judge`; -export const evaluationGetMetricResponseTwofourModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetMetricResponseTwofourModelOneFormatDefault = `nim`; -export const evaluationGetMetricResponseTwofourModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricResponseTwofourScoresItemOneNameRegExp = new RegExp('^[a-z0-9_]+$'); -export const evaluationGetMetricResponseTwofourScoresItemOneParserOneTypeDefault = `json`; -export const evaluationGetMetricResponseTwofourScoresItemOneParserTwoTypeDefault = `regex`; -export const evaluationGetMetricResponseTwofourScoresItemOneParserTwoMethodDefault = `match`; -export const evaluationGetMetricResponseTwofourScoresItemOneRubricMin = 2; - -export const evaluationGetMetricResponseTwofourScoresItemTwoNameRegExp = new RegExp('^[a-z0-9_]+$'); -export const evaluationGetMetricResponseTwofourScoresItemTwoParserOneTypeDefault = `json`; -export const evaluationGetMetricResponseTwofourScoresItemTwoParserTwoTypeDefault = `regex`; -export const evaluationGetMetricResponseTwofourScoresItemTwoParserTwoMethodDefault = `match`; - -export const evaluationGetMetricResponseTwofourInferenceOneTemperatureMin = 0; -export const evaluationGetMetricResponseTwofourInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricResponseTwofourInferenceOneTopPMin = 0; -export const evaluationGetMetricResponseTwofourInferenceOneTopPMax = 1; - -export const evaluationGetMetricResponseTwofourIgnoreRequestFailureDefault = false; -export const evaluationGetMetricResponseTwofiveJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetMetricResponseTwofiveJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricResponseTwofiveJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricResponseTwofiveInferenceOneTemperatureMin = 0; -export const evaluationGetMetricResponseTwofiveInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricResponseTwofiveInferenceOneTopPMin = 0; -export const evaluationGetMetricResponseTwofiveInferenceOneTopPMax = 1; - -export const evaluationGetMetricResponseTwofiveIgnoreRequestFailureDefault = false; -export const evaluationGetMetricResponseTwofiveTypeDefault = `topic_adherence`; -export const evaluationGetMetricResponseTwofiveMetricModeDefault = `f1`; -export const evaluationGetMetricResponseTwosixJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetMetricResponseTwosixJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricResponseTwosixJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricResponseTwosixInferenceOneTemperatureMin = 0; -export const evaluationGetMetricResponseTwosixInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricResponseTwosixInferenceOneTopPMin = 0; -export const evaluationGetMetricResponseTwosixInferenceOneTopPMax = 1; - -export const evaluationGetMetricResponseTwosixIgnoreRequestFailureDefault = false; -export const evaluationGetMetricResponseTwosixTypeDefault = `agent_goal_accuracy`; -export const evaluationGetMetricResponseTwosixUseReferenceDefault = true; -export const evaluationGetMetricResponseTwosevenJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetMetricResponseTwosevenJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricResponseTwosevenJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricResponseTwosevenInferenceOneTemperatureMin = 0; -export const evaluationGetMetricResponseTwosevenInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricResponseTwosevenInferenceOneTopPMin = 0; -export const evaluationGetMetricResponseTwosevenInferenceOneTopPMax = 1; - -export const evaluationGetMetricResponseTwosevenIgnoreRequestFailureDefault = false; -export const evaluationGetMetricResponseTwosevenTypeDefault = `answer_accuracy`; -export const evaluationGetMetricResponseTwoeightJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetMetricResponseTwoeightJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricResponseTwoeightJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricResponseTwoeightInferenceOneTemperatureMin = 0; -export const evaluationGetMetricResponseTwoeightInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricResponseTwoeightInferenceOneTopPMin = 0; -export const evaluationGetMetricResponseTwoeightInferenceOneTopPMax = 1; - -export const evaluationGetMetricResponseTwoeightIgnoreRequestFailureDefault = false; -export const evaluationGetMetricResponseTwoeightTypeDefault = `context_relevance`; -export const evaluationGetMetricResponseTwonineJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetMetricResponseTwonineJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricResponseTwonineJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricResponseTwonineInferenceOneTemperatureMin = 0; -export const evaluationGetMetricResponseTwonineInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricResponseTwonineInferenceOneTopPMin = 0; -export const evaluationGetMetricResponseTwonineInferenceOneTopPMax = 1; - -export const evaluationGetMetricResponseTwonineIgnoreRequestFailureDefault = false; -export const evaluationGetMetricResponseTwonineTypeDefault = `response_groundedness`; -export const evaluationGetMetricResponseThreezeroJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetMetricResponseThreezeroJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricResponseThreezeroJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricResponseThreezeroInferenceOneTemperatureMin = 0; -export const evaluationGetMetricResponseThreezeroInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricResponseThreezeroInferenceOneTopPMin = 0; -export const evaluationGetMetricResponseThreezeroInferenceOneTopPMax = 1; - -export const evaluationGetMetricResponseThreezeroIgnoreRequestFailureDefault = false; -export const evaluationGetMetricResponseThreezeroTypeDefault = `context_recall`; -export const evaluationGetMetricResponseThreeoneJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetMetricResponseThreeoneJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricResponseThreeoneJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricResponseThreeoneInferenceOneTemperatureMin = 0; -export const evaluationGetMetricResponseThreeoneInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricResponseThreeoneInferenceOneTopPMin = 0; -export const evaluationGetMetricResponseThreeoneInferenceOneTopPMax = 1; - -export const evaluationGetMetricResponseThreeoneIgnoreRequestFailureDefault = false; -export const evaluationGetMetricResponseThreeoneTypeDefault = `context_precision`; -export const evaluationGetMetricResponseThreetwoJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetMetricResponseThreetwoJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricResponseThreetwoJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricResponseThreetwoInferenceOneTemperatureMin = 0; -export const evaluationGetMetricResponseThreetwoInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricResponseThreetwoInferenceOneTopPMin = 0; -export const evaluationGetMetricResponseThreetwoInferenceOneTopPMax = 1; - -export const evaluationGetMetricResponseThreetwoIgnoreRequestFailureDefault = false; -export const evaluationGetMetricResponseThreetwoTypeDefault = `context_entity_recall`; -export const evaluationGetMetricResponseThreethreeEmbeddingsModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationGetMetricResponseThreethreeEmbeddingsModelOneFormatDefault = `nim`; -export const evaluationGetMetricResponseThreethreeEmbeddingsModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricResponseThreethreeJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetMetricResponseThreethreeJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricResponseThreethreeJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricResponseThreethreeInferenceOneTemperatureMin = 0; -export const evaluationGetMetricResponseThreethreeInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricResponseThreethreeInferenceOneTopPMin = 0; -export const evaluationGetMetricResponseThreethreeInferenceOneTopPMax = 1; - -export const evaluationGetMetricResponseThreethreeIgnoreRequestFailureDefault = false; -export const evaluationGetMetricResponseThreethreeTypeDefault = `response_relevancy`; -export const evaluationGetMetricResponseThreethreeStrictnessDefault = 1; -export const evaluationGetMetricResponseThreefourJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetMetricResponseThreefourJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricResponseThreefourJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricResponseThreefourInferenceOneTemperatureMin = 0; -export const evaluationGetMetricResponseThreefourInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricResponseThreefourInferenceOneTopPMin = 0; -export const evaluationGetMetricResponseThreefourInferenceOneTopPMax = 1; - -export const evaluationGetMetricResponseThreefourIgnoreRequestFailureDefault = false; -export const evaluationGetMetricResponseThreefourTypeDefault = `faithfulness`; -export const evaluationGetMetricResponseThreefiveJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetMetricResponseThreefiveJudgeModelOneFormatDefault = `nim`; -export const evaluationGetMetricResponseThreefiveJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationGetMetricResponseThreefiveInferenceOneTemperatureMin = 0; -export const evaluationGetMetricResponseThreefiveInferenceOneTemperatureMax = 2; - -export const evaluationGetMetricResponseThreefiveInferenceOneTopPMin = 0; -export const evaluationGetMetricResponseThreefiveInferenceOneTopPMax = 1; - -export const evaluationGetMetricResponseThreefiveIgnoreRequestFailureDefault = false; -export const evaluationGetMetricResponseThreefiveTypeDefault = `noise_sensitivity`; -export const evaluationGetMetricResponseThreesixTypeDefault = `tool_call_accuracy`; -export const evaluationGetMetricResponseThreesevenTypeDefault = `bleu`; -export const evaluationGetMetricResponseThreeeightTypeDefault = `exact-match`; -export const evaluationGetMetricResponseThreenineTypeDefault = `f1`; -export const evaluationGetMetricResponseFourzeroTypeDefault = `number-check`; -export const evaluationGetMetricResponseFouroneTypeDefault = `remote`; -export const evaluationGetMetricResponseFouroneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetMetricResponseFouroneTimeoutSecondsDefault = 30; -export const evaluationGetMetricResponseFouroneMaxRetriesDefault = 3; -export const evaluationGetMetricResponseFouroneScoresItemNameRegExp = new RegExp('^[a-z0-9_]+$'); -export const evaluationGetMetricResponseFouroneScoresItemParserOneTypeDefault = `json`; -export const evaluationGetMetricResponseFourtwoTypeDefault = `nemo-agent-toolkit-remote`; -export const evaluationGetMetricResponseFourtwoApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationGetMetricResponseFourtwoTimeoutSecondsDefault = 30; -export const evaluationGetMetricResponseFourtwoMaxRetriesDefault = 3; -export const evaluationGetMetricResponseFourthreeTypeDefault = `rouge`; -export const evaluationGetMetricResponseFourfourTypeDefault = `string-check`; -export const evaluationGetMetricResponseFourfiveTypeDefault = `tool-calling`; -export const evaluationGetMetricResponseFoursixNameDefault = `Metric name`; -export const evaluationGetMetricResponseFoursixTypeDefault = `system`; - -export const EvaluationGetMetricResponse = zod.union([ - zod.object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod.literal('llm-judge').default(evaluationGetMetricResponseOneTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationGetMetricResponseOneModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationGetMetricResponseOneModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetMetricResponseOneModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The model configuration.'), - scores: zod - .array( - zod.union([ - zod - .object({ - name: zod - .string() - .regex(evaluationGetMetricResponseOneScoresItemOneNameRegExp) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default(evaluationGetMetricResponseOneScoresItemOneParserOneTypeDefault), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default(evaluationGetMetricResponseOneScoresItemOneParserTwoTypeDefault), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default(evaluationGetMetricResponseOneScoresItemOneParserTwoMethodDefault) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe('Parse a score from content in any format using regular expression.'), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - rubric: zod - .array( - zod.object({ - label: zod - .string() - .describe( - 'The label to use for the level of the rubric grading criteria. (e.g., \"helpful\", \"not_helpful\", \"positive\")' - ), - description: zod - .string() - .optional() - .describe( - 'Describe the semantic meaning of each criteria for the given rubric. If no judge template is set, the input description for labels are included in the generated judge prompt.' - ), - value: zod - .union([zod.number(), zod.number()]) - .describe( - 'The score value to assign for the criteria used for aggregation and ranking.' - ), - }) - ) - .min(evaluationGetMetricResponseOneScoresItemOneRubricMin) - .describe('The rubric for the score.'), - }) - .describe( - 'Score definition for a rubric with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - zod - .object({ - name: zod - .string() - .regex(evaluationGetMetricResponseOneScoresItemTwoNameRegExp) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default(evaluationGetMetricResponseOneScoresItemTwoParserOneTypeDefault), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default(evaluationGetMetricResponseOneScoresItemTwoParserTwoTypeDefault), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default(evaluationGetMetricResponseOneScoresItemTwoParserTwoMethodDefault) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe('Parse a score from content in any format using regular expression.'), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .describe('Minimum value for the score range. Must be less than maximum.'), - maximum: zod - .union([zod.number(), zod.number()]) - .describe('Maximum value for the score range. Must be greater than minimum.'), - }) - .describe( - 'Score definition for a range of values with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - ]) - ) - .min(1) - .describe("Definitions of scores that will be extracted from the judge's output."), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .optional() - .describe( - 'The prompt template for the judge. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{sample.output_text}} to use the model output within the template or {{item.xxx}} to reference input columns from the dataset.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - "Prompt template fields that should remain in the inferred input schema but not be required. Use this for fields like 'reference' when the metric can still run without them." - ), - structured_output: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'JSON schema to apply structured output for the judge model evaluation. Structured output is derived from scores when omitted. Use this option if there are custom requirements for the output of the judge.' - ), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationGetMetricResponseOneInferenceOneTemperatureMin) - .max(evaluationGetMetricResponseOneInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricResponseOneInferenceOneTopPMin) - .max(evaluationGetMetricResponseOneInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge model.'), - system_prompt: zod - .string() - .optional() - .describe( - "Initial instructions that define the judge model's role and behavior for the conversation. This is prepended to the messages as a system message." - ), - reasoning: zod - .object({ - end_token: zod - .string() - .optional() - .describe( - "Configure the end token to trim reasoning context based on the model's reasoning API. Example for Nemotron models: '<\/think>'" - ), - include_if_not_finished: zod - .boolean() - .optional() - .describe( - 'Configure whether to include reasoning context if the model has not finished reasoning.' - ), - effort: zod - .string() - .optional() - .describe('Option for OpenAI models to specify low, medium, or high reasoning effort.'), - }) - .describe("Custom settings that control the model's reasoning behavior.") - .optional() - .describe( - "Custom settings that control the judge model's reasoning behavior. For reasoning models (e.g., Nemotron), use `end_token` to strip reasoning traces from the output." - ), - ignore_request_failure: zod - .boolean() - .default(evaluationGetMetricResponseOneIgnoreRequestFailureDefault) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - }), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationGetMetricResponseTwoJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationGetMetricResponseTwoJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetMetricResponseTwoJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationGetMetricResponseTwoInferenceOneTemperatureMin) - .max(evaluationGetMetricResponseTwoInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricResponseTwoInferenceOneTopPMin) - .max(evaluationGetMetricResponseTwoInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationGetMetricResponseTwoIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod.literal('topic_adherence').default(evaluationGetMetricResponseTwoTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - metric_mode: zod - .enum(['f1', 'precision', 'recall']) - .default(evaluationGetMetricResponseTwoMetricModeDefault) - .describe('The mode for computing topic adherence score.'), - }) - .describe('Response type for TopicAdherence metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationGetMetricResponseThreeJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationGetMetricResponseThreeJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetMetricResponseThreeJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationGetMetricResponseThreeInferenceOneTemperatureMin) - .max(evaluationGetMetricResponseThreeInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricResponseThreeInferenceOneTopPMin) - .max(evaluationGetMetricResponseThreeInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationGetMetricResponseThreeIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod.literal('agent_goal_accuracy').default(evaluationGetMetricResponseThreeTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - use_reference: zod - .boolean() - .default(evaluationGetMetricResponseThreeUseReferenceDefault) - .describe('Whether to use reference for goal accuracy evaluation.'), - }) - .describe('Response type for AgentGoalAccuracy metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationGetMetricResponseFourJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationGetMetricResponseFourJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetMetricResponseFourJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationGetMetricResponseFourInferenceOneTemperatureMin) - .max(evaluationGetMetricResponseFourInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricResponseFourInferenceOneTopPMin) - .max(evaluationGetMetricResponseFourInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationGetMetricResponseFourIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod.literal('answer_accuracy').default(evaluationGetMetricResponseFourTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Response type for AnswerAccuracy metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationGetMetricResponseFiveJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationGetMetricResponseFiveJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetMetricResponseFiveJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationGetMetricResponseFiveInferenceOneTemperatureMin) - .max(evaluationGetMetricResponseFiveInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricResponseFiveInferenceOneTopPMin) - .max(evaluationGetMetricResponseFiveInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationGetMetricResponseFiveIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod.literal('context_relevance').default(evaluationGetMetricResponseFiveTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Response type for ContextRelevance metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationGetMetricResponseSixJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationGetMetricResponseSixJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetMetricResponseSixJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationGetMetricResponseSixInferenceOneTemperatureMin) - .max(evaluationGetMetricResponseSixInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricResponseSixInferenceOneTopPMin) - .max(evaluationGetMetricResponseSixInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationGetMetricResponseSixIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod.literal('response_groundedness').default(evaluationGetMetricResponseSixTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Response type for ResponseGroundedness metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationGetMetricResponseSevenJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationGetMetricResponseSevenJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetMetricResponseSevenJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationGetMetricResponseSevenInferenceOneTemperatureMin) - .max(evaluationGetMetricResponseSevenInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricResponseSevenInferenceOneTopPMin) - .max(evaluationGetMetricResponseSevenInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationGetMetricResponseSevenIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod.literal('context_recall').default(evaluationGetMetricResponseSevenTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Response type for ContextRecall metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationGetMetricResponseEightJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationGetMetricResponseEightJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetMetricResponseEightJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationGetMetricResponseEightInferenceOneTemperatureMin) - .max(evaluationGetMetricResponseEightInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricResponseEightInferenceOneTopPMin) - .max(evaluationGetMetricResponseEightInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationGetMetricResponseEightIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod.literal('context_precision').default(evaluationGetMetricResponseEightTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Response type for ContextPrecision metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationGetMetricResponseNineJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationGetMetricResponseNineJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetMetricResponseNineJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationGetMetricResponseNineInferenceOneTemperatureMin) - .max(evaluationGetMetricResponseNineInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricResponseNineInferenceOneTopPMin) - .max(evaluationGetMetricResponseNineInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationGetMetricResponseNineIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_entity_recall') - .default(evaluationGetMetricResponseNineTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Response type for ContextEntityRecall metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - embeddings_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationGetMetricResponseOnezeroEmbeddingsModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationGetMetricResponseOnezeroEmbeddingsModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetMetricResponseOnezeroEmbeddingsModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The embeddings model configuration.'), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationGetMetricResponseOnezeroJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationGetMetricResponseOnezeroJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetMetricResponseOnezeroJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationGetMetricResponseOnezeroInferenceOneTemperatureMin) - .max(evaluationGetMetricResponseOnezeroInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricResponseOnezeroInferenceOneTopPMin) - .max(evaluationGetMetricResponseOnezeroInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationGetMetricResponseOnezeroIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_relevancy') - .default(evaluationGetMetricResponseOnezeroTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - strictness: zod - .number() - .default(evaluationGetMetricResponseOnezeroStrictnessDefault) - .describe('Number of parallel questions generated. NIM can only generate 1.'), - }) - .describe('Response type for ResponseRelevancy metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationGetMetricResponseOneoneJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationGetMetricResponseOneoneJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetMetricResponseOneoneJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationGetMetricResponseOneoneInferenceOneTemperatureMin) - .max(evaluationGetMetricResponseOneoneInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricResponseOneoneInferenceOneTopPMin) - .max(evaluationGetMetricResponseOneoneInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationGetMetricResponseOneoneIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod.literal('faithfulness').default(evaluationGetMetricResponseOneoneTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Response type for Faithfulness metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationGetMetricResponseOnetwoJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationGetMetricResponseOnetwoJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetMetricResponseOnetwoJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationGetMetricResponseOnetwoInferenceOneTemperatureMin) - .max(evaluationGetMetricResponseOnetwoInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricResponseOnetwoInferenceOneTopPMin) - .max(evaluationGetMetricResponseOnetwoInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationGetMetricResponseOnetwoIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod.literal('noise_sensitivity').default(evaluationGetMetricResponseOnetwoTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Response type for NoiseSensitivity metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod - .literal('tool_call_accuracy') - .default(evaluationGetMetricResponseOnethreeTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Response type for ToolCallAccuracy metrics (no judge required).'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod.literal('bleu').default(evaluationGetMetricResponseOnefourTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - references: zod - .array(zod.string()) - .describe('The templates for the ground truth references to calculate BLEU metric with.'), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to calculate BLEU metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Response type for BLEUMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod.literal('exact-match').default(evaluationGetMetricResponseOnefiveTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the exact match metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the exact match metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Response type for ExactMatchMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod.literal('f1').default(evaluationGetMetricResponseOnesixTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe('The template for the ground truth reference to calculate the F1 metric with.'), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the F1 metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Response type for F1Metric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod.literal('number-check').default(evaluationGetMetricResponseOnesevenTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - '>=', - 'gte', - 'greater than or equal', - '>', - 'gt', - 'greater than', - '<=', - 'lte', - 'less than or equal', - '<', - 'lt', - 'less than', - 'absolute difference', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - epsilon: zod - .union([zod.number(), zod.number()]) - .optional() - .describe('Specify the tolerance for the absolute difference of values.'), - }) - .describe('Response type for NumberCheckMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod.literal('remote').default(evaluationGetMetricResponseOneeightTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex(evaluationGetMetricResponseOneeightApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default(evaluationGetMetricResponseOneeightTimeoutSecondsDefault) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default(evaluationGetMetricResponseOneeightMaxRetriesDefault) - .describe('Maximum number of retry attempts.'), - body: zod.record(zod.string(), zod.unknown()).describe('Jinja template for request payload'), - scores: zod - .array( - zod - .object({ - name: zod - .string() - .regex(evaluationGetMetricResponseOneeightScoresItemNameRegExp) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .object({ - type: zod - .literal('json') - .default(evaluationGetMetricResponseOneeightScoresItemParserOneTypeDefault), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.') - .optional() - .describe( - 'The method to parse the score. Only JSON parsing is supported for remote metrics.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe('Minimum value for the score range. Defaults to None (no lower bound).'), - maximum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe('Maximum value for the score range. Defaults to None (no upper bound).'), - }) - .describe( - 'Score configuration for remote metrics.\n\nUnlike RangeScore, minimum and maximum are optional (default to None = no bounds).\nThis avoids JSON serialization issues with infinity values.' - ) - ) - .describe('List of scores to extract from the remote response'), - }) - .describe('Response type for RemoteMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod - .literal('nemo-agent-toolkit-remote') - .default(evaluationGetMetricResponseOnenineTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex(evaluationGetMetricResponseOnenineApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default(evaluationGetMetricResponseOnenineTimeoutSecondsDefault) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default(evaluationGetMetricResponseOnenineMaxRetriesDefault) - .describe('Maximum number of retry attempts.'), - evaluator_name: zod - .string() - .describe('The name of the evaluator (also used as the score name).'), - }) - .describe('Response type for NemoAgentToolkitRemoteMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod.literal('rouge').default(evaluationGetMetricResponseTwozeroTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe('The template for the ground truth reference to evaluate the ROUGE metric with.'), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the ROUGE metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Response type for ROUGEMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod.literal('string-check').default(evaluationGetMetricResponseTwooneTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - 'contains', - 'not contains', - 'startswith', - 'endswith', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - }) - .describe('Response type for StringCheckMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod.literal('tool-calling').default(evaluationGetMetricResponseTwotwoTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe('The template for the ground truth reference to evaluate tool calling accuracy.'), - }) - .describe('Response type for ToolCallingMetric.'), - zod - .object({ - name: zod.string().default(evaluationGetMetricResponseTwothreeNameDefault), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod - .enum(['system', 'system-retriever']) - .default(evaluationGetMetricResponseTwothreeTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline', 'retriever'])) - .default([`online`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - required_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod.string().optional().describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe('List of required parameters for running an evaluation with the metric.'), - optional_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod.string().optional().describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe('List of optional parameters for running an evaluation with the metric.'), - }) - .describe('Response type for SystemMetric.'), - zod.object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod.literal('llm-judge').default(evaluationGetMetricResponseTwofourTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationGetMetricResponseTwofourModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationGetMetricResponseTwofourModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetMetricResponseTwofourModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The model configuration.'), - scores: zod - .array( - zod.union([ - zod - .object({ - name: zod - .string() - .regex(evaluationGetMetricResponseTwofourScoresItemOneNameRegExp) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationGetMetricResponseTwofourScoresItemOneParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationGetMetricResponseTwofourScoresItemOneParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationGetMetricResponseTwofourScoresItemOneParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe('Parse a score from content in any format using regular expression.'), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - rubric: zod - .array( - zod.object({ - label: zod - .string() - .describe( - 'The label to use for the level of the rubric grading criteria. (e.g., \"helpful\", \"not_helpful\", \"positive\")' - ), - description: zod - .string() - .optional() - .describe( - 'Describe the semantic meaning of each criteria for the given rubric. If no judge template is set, the input description for labels are included in the generated judge prompt.' - ), - value: zod - .union([zod.number(), zod.number()]) - .describe( - 'The score value to assign for the criteria used for aggregation and ranking.' - ), - }) - ) - .min(evaluationGetMetricResponseTwofourScoresItemOneRubricMin) - .describe('The rubric for the score.'), - }) - .describe( - 'Score definition for a rubric with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - zod - .object({ - name: zod - .string() - .regex(evaluationGetMetricResponseTwofourScoresItemTwoNameRegExp) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationGetMetricResponseTwofourScoresItemTwoParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationGetMetricResponseTwofourScoresItemTwoParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationGetMetricResponseTwofourScoresItemTwoParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe('Parse a score from content in any format using regular expression.'), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .describe('Minimum value for the score range. Must be less than maximum.'), - maximum: zod - .union([zod.number(), zod.number()]) - .describe('Maximum value for the score range. Must be greater than minimum.'), - }) - .describe( - 'Score definition for a range of values with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - ]) - ) - .min(1) - .describe("Definitions of scores that will be extracted from the judge's output."), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .optional() - .describe( - 'The prompt template for the judge. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{sample.output_text}} to use the model output within the template or {{item.xxx}} to reference input columns from the dataset.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - "Prompt template fields that should remain in the inferred input schema but not be required. Use this for fields like 'reference' when the metric can still run without them." - ), - structured_output: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'JSON schema to apply structured output for the judge model evaluation. Structured output is derived from scores when omitted. Use this option if there are custom requirements for the output of the judge.' - ), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationGetMetricResponseTwofourInferenceOneTemperatureMin) - .max(evaluationGetMetricResponseTwofourInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricResponseTwofourInferenceOneTopPMin) - .max(evaluationGetMetricResponseTwofourInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge model.'), - system_prompt: zod - .string() - .optional() - .describe( - "Initial instructions that define the judge model's role and behavior for the conversation. This is prepended to the messages as a system message." - ), - reasoning: zod - .object({ - end_token: zod - .string() - .optional() - .describe( - "Configure the end token to trim reasoning context based on the model's reasoning API. Example for Nemotron models: '<\/think>'" - ), - include_if_not_finished: zod - .boolean() - .optional() - .describe( - 'Configure whether to include reasoning context if the model has not finished reasoning.' - ), - effort: zod - .string() - .optional() - .describe('Option for OpenAI models to specify low, medium, or high reasoning effort.'), - }) - .describe("Custom settings that control the model's reasoning behavior.") - .optional() - .describe( - "Custom settings that control the judge model's reasoning behavior. For reasoning models (e.g., Nemotron), use `end_token` to strip reasoning traces from the output." - ), - ignore_request_failure: zod - .boolean() - .default(evaluationGetMetricResponseTwofourIgnoreRequestFailureDefault) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - }), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationGetMetricResponseTwofiveJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationGetMetricResponseTwofiveJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetMetricResponseTwofiveJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationGetMetricResponseTwofiveInferenceOneTemperatureMin) - .max(evaluationGetMetricResponseTwofiveInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricResponseTwofiveInferenceOneTopPMin) - .max(evaluationGetMetricResponseTwofiveInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationGetMetricResponseTwofiveIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod.literal('topic_adherence').default(evaluationGetMetricResponseTwofiveTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - metric_mode: zod - .enum(['f1', 'precision', 'recall']) - .default(evaluationGetMetricResponseTwofiveMetricModeDefault) - .describe('The mode for computing topic adherence score.'), - }) - .describe('Response type for TopicAdherence metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationGetMetricResponseTwosixJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationGetMetricResponseTwosixJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetMetricResponseTwosixJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationGetMetricResponseTwosixInferenceOneTemperatureMin) - .max(evaluationGetMetricResponseTwosixInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricResponseTwosixInferenceOneTopPMin) - .max(evaluationGetMetricResponseTwosixInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationGetMetricResponseTwosixIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('agent_goal_accuracy') - .default(evaluationGetMetricResponseTwosixTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - use_reference: zod - .boolean() - .default(evaluationGetMetricResponseTwosixUseReferenceDefault) - .describe('Whether to use reference for goal accuracy evaluation.'), - }) - .describe('Response type for AgentGoalAccuracy metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationGetMetricResponseTwosevenJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationGetMetricResponseTwosevenJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetMetricResponseTwosevenJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationGetMetricResponseTwosevenInferenceOneTemperatureMin) - .max(evaluationGetMetricResponseTwosevenInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricResponseTwosevenInferenceOneTopPMin) - .max(evaluationGetMetricResponseTwosevenInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationGetMetricResponseTwosevenIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod.literal('answer_accuracy').default(evaluationGetMetricResponseTwosevenTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Response type for AnswerAccuracy metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationGetMetricResponseTwoeightJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationGetMetricResponseTwoeightJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetMetricResponseTwoeightJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationGetMetricResponseTwoeightInferenceOneTemperatureMin) - .max(evaluationGetMetricResponseTwoeightInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricResponseTwoeightInferenceOneTopPMin) - .max(evaluationGetMetricResponseTwoeightInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationGetMetricResponseTwoeightIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_relevance') - .default(evaluationGetMetricResponseTwoeightTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Response type for ContextRelevance metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationGetMetricResponseTwonineJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationGetMetricResponseTwonineJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetMetricResponseTwonineJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationGetMetricResponseTwonineInferenceOneTemperatureMin) - .max(evaluationGetMetricResponseTwonineInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricResponseTwonineInferenceOneTopPMin) - .max(evaluationGetMetricResponseTwonineInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationGetMetricResponseTwonineIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_groundedness') - .default(evaluationGetMetricResponseTwonineTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Response type for ResponseGroundedness metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationGetMetricResponseThreezeroJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationGetMetricResponseThreezeroJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetMetricResponseThreezeroJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationGetMetricResponseThreezeroInferenceOneTemperatureMin) - .max(evaluationGetMetricResponseThreezeroInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricResponseThreezeroInferenceOneTopPMin) - .max(evaluationGetMetricResponseThreezeroInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationGetMetricResponseThreezeroIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod.literal('context_recall').default(evaluationGetMetricResponseThreezeroTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Response type for ContextRecall metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationGetMetricResponseThreeoneJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationGetMetricResponseThreeoneJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetMetricResponseThreeoneJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationGetMetricResponseThreeoneInferenceOneTemperatureMin) - .max(evaluationGetMetricResponseThreeoneInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricResponseThreeoneInferenceOneTopPMin) - .max(evaluationGetMetricResponseThreeoneInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationGetMetricResponseThreeoneIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_precision') - .default(evaluationGetMetricResponseThreeoneTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Response type for ContextPrecision metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationGetMetricResponseThreetwoJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationGetMetricResponseThreetwoJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetMetricResponseThreetwoJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationGetMetricResponseThreetwoInferenceOneTemperatureMin) - .max(evaluationGetMetricResponseThreetwoInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricResponseThreetwoInferenceOneTopPMin) - .max(evaluationGetMetricResponseThreetwoInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationGetMetricResponseThreetwoIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_entity_recall') - .default(evaluationGetMetricResponseThreetwoTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Response type for ContextEntityRecall metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - embeddings_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationGetMetricResponseThreethreeEmbeddingsModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationGetMetricResponseThreethreeEmbeddingsModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetMetricResponseThreethreeEmbeddingsModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The embeddings model configuration.'), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationGetMetricResponseThreethreeJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationGetMetricResponseThreethreeJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetMetricResponseThreethreeJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationGetMetricResponseThreethreeInferenceOneTemperatureMin) - .max(evaluationGetMetricResponseThreethreeInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricResponseThreethreeInferenceOneTopPMin) - .max(evaluationGetMetricResponseThreethreeInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationGetMetricResponseThreethreeIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_relevancy') - .default(evaluationGetMetricResponseThreethreeTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - strictness: zod - .number() - .default(evaluationGetMetricResponseThreethreeStrictnessDefault) - .describe('Number of parallel questions generated. NIM can only generate 1.'), - }) - .describe('Response type for ResponseRelevancy metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationGetMetricResponseThreefourJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationGetMetricResponseThreefourJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetMetricResponseThreefourJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationGetMetricResponseThreefourInferenceOneTemperatureMin) - .max(evaluationGetMetricResponseThreefourInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricResponseThreefourInferenceOneTopPMin) - .max(evaluationGetMetricResponseThreefourInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationGetMetricResponseThreefourIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod.literal('faithfulness').default(evaluationGetMetricResponseThreefourTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Response type for Faithfulness metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationGetMetricResponseThreefiveJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationGetMetricResponseThreefiveJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationGetMetricResponseThreefiveJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationGetMetricResponseThreefiveInferenceOneTemperatureMin) - .max(evaluationGetMetricResponseThreefiveInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationGetMetricResponseThreefiveInferenceOneTopPMin) - .max(evaluationGetMetricResponseThreefiveInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationGetMetricResponseThreefiveIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('noise_sensitivity') - .default(evaluationGetMetricResponseThreefiveTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Response type for NoiseSensitivity metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod - .literal('tool_call_accuracy') - .default(evaluationGetMetricResponseThreesixTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Response type for ToolCallAccuracy metrics (no judge required).'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod.literal('bleu').default(evaluationGetMetricResponseThreesevenTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - references: zod - .array(zod.string()) - .describe('The templates for the ground truth references to calculate BLEU metric with.'), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to calculate BLEU metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Response type for BLEUMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod.literal('exact-match').default(evaluationGetMetricResponseThreeeightTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the exact match metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the exact match metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Response type for ExactMatchMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod.literal('f1').default(evaluationGetMetricResponseThreenineTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe('The template for the ground truth reference to calculate the F1 metric with.'), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the F1 metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Response type for F1Metric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod.literal('number-check').default(evaluationGetMetricResponseFourzeroTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - '>=', - 'gte', - 'greater than or equal', - '>', - 'gt', - 'greater than', - '<=', - 'lte', - 'less than or equal', - '<', - 'lt', - 'less than', - 'absolute difference', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - epsilon: zod - .union([zod.number(), zod.number()]) - .optional() - .describe('Specify the tolerance for the absolute difference of values.'), - }) - .describe('Response type for NumberCheckMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod.literal('remote').default(evaluationGetMetricResponseFouroneTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex(evaluationGetMetricResponseFouroneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default(evaluationGetMetricResponseFouroneTimeoutSecondsDefault) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default(evaluationGetMetricResponseFouroneMaxRetriesDefault) - .describe('Maximum number of retry attempts.'), - body: zod.record(zod.string(), zod.unknown()).describe('Jinja template for request payload'), - scores: zod - .array( - zod - .object({ - name: zod - .string() - .regex(evaluationGetMetricResponseFouroneScoresItemNameRegExp) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .object({ - type: zod - .literal('json') - .default(evaluationGetMetricResponseFouroneScoresItemParserOneTypeDefault), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.') - .optional() - .describe( - 'The method to parse the score. Only JSON parsing is supported for remote metrics.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe('Minimum value for the score range. Defaults to None (no lower bound).'), - maximum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe('Maximum value for the score range. Defaults to None (no upper bound).'), - }) - .describe( - 'Score configuration for remote metrics.\n\nUnlike RangeScore, minimum and maximum are optional (default to None = no bounds).\nThis avoids JSON serialization issues with infinity values.' - ) - ) - .describe('List of scores to extract from the remote response'), - }) - .describe('Response type for RemoteMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod - .literal('nemo-agent-toolkit-remote') - .default(evaluationGetMetricResponseFourtwoTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex(evaluationGetMetricResponseFourtwoApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default(evaluationGetMetricResponseFourtwoTimeoutSecondsDefault) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default(evaluationGetMetricResponseFourtwoMaxRetriesDefault) - .describe('Maximum number of retry attempts.'), - evaluator_name: zod - .string() - .describe('The name of the evaluator (also used as the score name).'), - }) - .describe('Response type for NemoAgentToolkitRemoteMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod.literal('rouge').default(evaluationGetMetricResponseFourthreeTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe('The template for the ground truth reference to evaluate the ROUGE metric with.'), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the ROUGE metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Response type for ROUGEMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod.literal('string-check').default(evaluationGetMetricResponseFourfourTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - 'contains', - 'not contains', - 'startswith', - 'endswith', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - }) - .describe('Response type for StringCheckMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod.literal('tool-calling').default(evaluationGetMetricResponseFourfiveTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe('The template for the ground truth reference to evaluate tool calling accuracy.'), - }) - .describe('Response type for ToolCallingMetric.'), - zod - .object({ - name: zod.string().default(evaluationGetMetricResponseFoursixNameDefault), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod - .enum(['system', 'system-retriever']) - .default(evaluationGetMetricResponseFoursixTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline', 'retriever'])) - .default([`online`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - required_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod.string().optional().describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe('List of required parameters for running an evaluation with the metric.'), - optional_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod.string().optional().describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe('List of optional parameters for running an evaluation with the metric.'), - }) - .describe('Response type for SystemMetric.'), -]); - -/** - * Create a new custom evaluation metric. - -Metrics can be reused across multiple evaluations. The metric type determines -the evaluation method (currently only LLM-as-a-Judge is supported). - * @summary Create Metric - */ -export const EvaluationCreateMetricParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const evaluationCreateMetricBodyOneTypeDefault = `llm-judge`; -export const evaluationCreateMetricBodyOneModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateMetricBodyOneModelOneFormatDefault = `nim`; -export const evaluationCreateMetricBodyOneModelTwoRegExp = new RegExp('^[a-z0-9_-]+\/[a-z0-9_-]+$'); -export const evaluationCreateMetricBodyOneScoresItemOneNameRegExp = new RegExp('^[a-z0-9_]+$'); -export const evaluationCreateMetricBodyOneScoresItemOneParserOneTypeDefault = `json`; -export const evaluationCreateMetricBodyOneScoresItemOneParserTwoTypeDefault = `regex`; -export const evaluationCreateMetricBodyOneScoresItemOneParserTwoMethodDefault = `match`; -export const evaluationCreateMetricBodyOneScoresItemOneRubricMin = 2; - -export const evaluationCreateMetricBodyOneScoresItemTwoNameRegExp = new RegExp('^[a-z0-9_]+$'); -export const evaluationCreateMetricBodyOneScoresItemTwoParserOneTypeDefault = `json`; -export const evaluationCreateMetricBodyOneScoresItemTwoParserTwoTypeDefault = `regex`; -export const evaluationCreateMetricBodyOneScoresItemTwoParserTwoMethodDefault = `match`; - -export const evaluationCreateMetricBodyOneInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricBodyOneInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricBodyOneInferenceOneTopPMin = 0; -export const evaluationCreateMetricBodyOneInferenceOneTopPMax = 1; - -export const evaluationCreateMetricBodyOneIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricBodyTwoJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateMetricBodyTwoJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricBodyTwoJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricBodyTwoInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricBodyTwoInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricBodyTwoInferenceOneTopPMin = 0; -export const evaluationCreateMetricBodyTwoInferenceOneTopPMax = 1; - -export const evaluationCreateMetricBodyTwoIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricBodyTwoTypeDefault = `topic_adherence`; -export const evaluationCreateMetricBodyTwoMetricModeDefault = `f1`; -export const evaluationCreateMetricBodyThreeJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateMetricBodyThreeJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricBodyThreeJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricBodyThreeInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricBodyThreeInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricBodyThreeInferenceOneTopPMin = 0; -export const evaluationCreateMetricBodyThreeInferenceOneTopPMax = 1; - -export const evaluationCreateMetricBodyThreeIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricBodyThreeTypeDefault = `agent_goal_accuracy`; -export const evaluationCreateMetricBodyThreeUseReferenceDefault = true; -export const evaluationCreateMetricBodyFourJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateMetricBodyFourJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricBodyFourJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricBodyFourInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricBodyFourInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricBodyFourInferenceOneTopPMin = 0; -export const evaluationCreateMetricBodyFourInferenceOneTopPMax = 1; - -export const evaluationCreateMetricBodyFourIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricBodyFourTypeDefault = `answer_accuracy`; -export const evaluationCreateMetricBodyFiveJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateMetricBodyFiveJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricBodyFiveJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricBodyFiveInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricBodyFiveInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricBodyFiveInferenceOneTopPMin = 0; -export const evaluationCreateMetricBodyFiveInferenceOneTopPMax = 1; - -export const evaluationCreateMetricBodyFiveIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricBodyFiveTypeDefault = `context_relevance`; -export const evaluationCreateMetricBodySixJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateMetricBodySixJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricBodySixJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricBodySixInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricBodySixInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricBodySixInferenceOneTopPMin = 0; -export const evaluationCreateMetricBodySixInferenceOneTopPMax = 1; - -export const evaluationCreateMetricBodySixIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricBodySixTypeDefault = `response_groundedness`; -export const evaluationCreateMetricBodySevenJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateMetricBodySevenJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricBodySevenJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricBodySevenInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricBodySevenInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricBodySevenInferenceOneTopPMin = 0; -export const evaluationCreateMetricBodySevenInferenceOneTopPMax = 1; - -export const evaluationCreateMetricBodySevenIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricBodySevenTypeDefault = `context_recall`; -export const evaluationCreateMetricBodyEightJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateMetricBodyEightJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricBodyEightJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricBodyEightInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricBodyEightInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricBodyEightInferenceOneTopPMin = 0; -export const evaluationCreateMetricBodyEightInferenceOneTopPMax = 1; - -export const evaluationCreateMetricBodyEightIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricBodyEightTypeDefault = `context_precision`; -export const evaluationCreateMetricBodyNineJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateMetricBodyNineJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricBodyNineJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricBodyNineInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricBodyNineInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricBodyNineInferenceOneTopPMin = 0; -export const evaluationCreateMetricBodyNineInferenceOneTopPMax = 1; - -export const evaluationCreateMetricBodyNineIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricBodyNineTypeDefault = `context_entity_recall`; -export const evaluationCreateMetricBodyOnezeroEmbeddingsModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateMetricBodyOnezeroEmbeddingsModelOneFormatDefault = `nim`; -export const evaluationCreateMetricBodyOnezeroEmbeddingsModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricBodyOnezeroJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateMetricBodyOnezeroJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricBodyOnezeroJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricBodyOnezeroInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricBodyOnezeroInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricBodyOnezeroInferenceOneTopPMin = 0; -export const evaluationCreateMetricBodyOnezeroInferenceOneTopPMax = 1; - -export const evaluationCreateMetricBodyOnezeroIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricBodyOnezeroTypeDefault = `response_relevancy`; -export const evaluationCreateMetricBodyOnezeroStrictnessDefault = 1; -export const evaluationCreateMetricBodyOneoneJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateMetricBodyOneoneJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricBodyOneoneJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricBodyOneoneInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricBodyOneoneInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricBodyOneoneInferenceOneTopPMin = 0; -export const evaluationCreateMetricBodyOneoneInferenceOneTopPMax = 1; - -export const evaluationCreateMetricBodyOneoneIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricBodyOneoneTypeDefault = `faithfulness`; -export const evaluationCreateMetricBodyOnetwoJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateMetricBodyOnetwoJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricBodyOnetwoJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricBodyOnetwoInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricBodyOnetwoInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricBodyOnetwoInferenceOneTopPMin = 0; -export const evaluationCreateMetricBodyOnetwoInferenceOneTopPMax = 1; - -export const evaluationCreateMetricBodyOnetwoIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricBodyOnetwoTypeDefault = `noise_sensitivity`; -export const evaluationCreateMetricBodyOnethreeTypeDefault = `tool_call_accuracy`; -export const evaluationCreateMetricBodyOnefourTypeDefault = `bleu`; -export const evaluationCreateMetricBodyOnefiveTypeDefault = `exact-match`; -export const evaluationCreateMetricBodyOnesixTypeDefault = `f1`; -export const evaluationCreateMetricBodyOnesevenTypeDefault = `number-check`; -export const evaluationCreateMetricBodyOneeightTypeDefault = `remote`; -export const evaluationCreateMetricBodyOneeightApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateMetricBodyOneeightTimeoutSecondsDefault = 30; -export const evaluationCreateMetricBodyOneeightMaxRetriesDefault = 3; -export const evaluationCreateMetricBodyOneeightScoresItemNameRegExp = new RegExp('^[a-z0-9_]+$'); -export const evaluationCreateMetricBodyOneeightScoresItemParserOneTypeDefault = `json`; -export const evaluationCreateMetricBodyOnenineTypeDefault = `nemo-agent-toolkit-remote`; -export const evaluationCreateMetricBodyOnenineApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateMetricBodyOnenineTimeoutSecondsDefault = 30; -export const evaluationCreateMetricBodyOnenineMaxRetriesDefault = 3; -export const evaluationCreateMetricBodyTwozeroTypeDefault = `rouge`; -export const evaluationCreateMetricBodyTwooneTypeDefault = `string-check`; -export const evaluationCreateMetricBodyTwotwoTypeDefault = `tool-calling`; - -export const EvaluationCreateMetricBody = zod.union([ - zod - .object({ - type: zod.literal('llm-judge').default(evaluationCreateMetricBodyOneTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationCreateMetricBodyOneModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationCreateMetricBodyOneModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricBodyOneModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The model configuration.'), - scores: zod - .array( - zod.union([ - zod - .object({ - name: zod - .string() - .regex(evaluationCreateMetricBodyOneScoresItemOneNameRegExp) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default(evaluationCreateMetricBodyOneScoresItemOneParserOneTypeDefault), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default(evaluationCreateMetricBodyOneScoresItemOneParserTwoTypeDefault), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default(evaluationCreateMetricBodyOneScoresItemOneParserTwoMethodDefault) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - rubric: zod - .array( - zod.object({ - label: zod - .string() - .describe( - 'The label to use for the level of the rubric grading criteria. (e.g., \"helpful\", \"not_helpful\", \"positive\")' - ), - description: zod - .string() - .optional() - .describe( - 'Describe the semantic meaning of each criteria for the given rubric. If no judge template is set, the input description for labels are included in the generated judge prompt.' - ), - value: zod - .union([zod.number(), zod.number()]) - .describe( - 'The score value to assign for the criteria used for aggregation and ranking.' - ), - }) - ) - .min(evaluationCreateMetricBodyOneScoresItemOneRubricMin) - .describe('The rubric for the score.'), - }) - .describe( - 'Score definition for a rubric with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - zod - .object({ - name: zod - .string() - .regex(evaluationCreateMetricBodyOneScoresItemTwoNameRegExp) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default(evaluationCreateMetricBodyOneScoresItemTwoParserOneTypeDefault), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default(evaluationCreateMetricBodyOneScoresItemTwoParserTwoTypeDefault), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default(evaluationCreateMetricBodyOneScoresItemTwoParserTwoMethodDefault) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe( - 'Parse a score from content in any format using regular expression.' - ), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .describe('Minimum value for the score range. Must be less than maximum.'), - maximum: zod - .union([zod.number(), zod.number()]) - .describe('Maximum value for the score range. Must be greater than minimum.'), - }) - .describe( - 'Score definition for a range of values with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - ]) - ) - .min(1) - .describe("Definitions of scores that will be extracted from the judge's output."), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .optional() - .describe( - 'The prompt template for the judge. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{sample.output_text}} to use the model output within the template or {{item.xxx}} to reference input columns from the dataset.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - "Prompt template fields that should remain in the inferred input schema but not be required. Use this for fields like 'reference' when the metric can still run without them." - ), - structured_output: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'JSON schema to apply structured output for the judge model evaluation. Structured output is derived from scores when omitted. Use this option if there are custom requirements for the output of the judge.' - ), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationCreateMetricBodyOneInferenceOneTemperatureMin) - .max(evaluationCreateMetricBodyOneInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricBodyOneInferenceOneTopPMin) - .max(evaluationCreateMetricBodyOneInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge model.'), - system_prompt: zod - .string() - .optional() - .describe( - "Initial instructions that define the judge model's role and behavior for the conversation. This is prepended to the messages as a system message." - ), - reasoning: zod - .object({ - end_token: zod - .string() - .optional() - .describe( - "Configure the end token to trim reasoning context based on the model's reasoning API. Example for Nemotron models: '<\/think>'" - ), - include_if_not_finished: zod - .boolean() - .optional() - .describe( - 'Configure whether to include reasoning context if the model has not finished reasoning.' - ), - effort: zod - .string() - .optional() - .describe('Option for OpenAI models to specify low, medium, or high reasoning effort.'), - }) - .describe("Custom settings that control the model's reasoning behavior.") - .optional() - .describe( - "Custom settings that control the judge model's reasoning behavior. For reasoning models (e.g., Nemotron), use `end_token` to strip reasoning traces from the output." - ), - ignore_request_failure: zod - .boolean() - .default(evaluationCreateMetricBodyOneIgnoreRequestFailureDefault) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - }) - .describe('Request type for creating LLM Judge metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationCreateMetricBodyTwoJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationCreateMetricBodyTwoJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricBodyTwoJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationCreateMetricBodyTwoInferenceOneTemperatureMin) - .max(evaluationCreateMetricBodyTwoInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricBodyTwoInferenceOneTopPMin) - .max(evaluationCreateMetricBodyTwoInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationCreateMetricBodyTwoIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod.literal('topic_adherence').default(evaluationCreateMetricBodyTwoTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - metric_mode: zod - .enum(['f1', 'precision', 'recall']) - .default(evaluationCreateMetricBodyTwoMetricModeDefault) - .describe('The mode for computing topic adherence score.'), - }) - .describe('Request type for TopicAdherence metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationCreateMetricBodyThreeJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationCreateMetricBodyThreeJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricBodyThreeJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationCreateMetricBodyThreeInferenceOneTemperatureMin) - .max(evaluationCreateMetricBodyThreeInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricBodyThreeInferenceOneTopPMin) - .max(evaluationCreateMetricBodyThreeInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationCreateMetricBodyThreeIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod.literal('agent_goal_accuracy').default(evaluationCreateMetricBodyThreeTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - use_reference: zod - .boolean() - .default(evaluationCreateMetricBodyThreeUseReferenceDefault) - .describe('Whether to use reference for goal accuracy evaluation.'), - }) - .describe('Request type for AgentGoalAccuracy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationCreateMetricBodyFourJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationCreateMetricBodyFourJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricBodyFourJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationCreateMetricBodyFourInferenceOneTemperatureMin) - .max(evaluationCreateMetricBodyFourInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricBodyFourInferenceOneTopPMin) - .max(evaluationCreateMetricBodyFourInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationCreateMetricBodyFourIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod.literal('answer_accuracy').default(evaluationCreateMetricBodyFourTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Request type for AnswerAccuracy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationCreateMetricBodyFiveJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationCreateMetricBodyFiveJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricBodyFiveJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationCreateMetricBodyFiveInferenceOneTemperatureMin) - .max(evaluationCreateMetricBodyFiveInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricBodyFiveInferenceOneTopPMin) - .max(evaluationCreateMetricBodyFiveInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationCreateMetricBodyFiveIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod.literal('context_relevance').default(evaluationCreateMetricBodyFiveTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Request type for ContextRelevance metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationCreateMetricBodySixJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationCreateMetricBodySixJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricBodySixJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationCreateMetricBodySixInferenceOneTemperatureMin) - .max(evaluationCreateMetricBodySixInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricBodySixInferenceOneTopPMin) - .max(evaluationCreateMetricBodySixInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationCreateMetricBodySixIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod.literal('response_groundedness').default(evaluationCreateMetricBodySixTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Request type for ResponseGroundedness metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationCreateMetricBodySevenJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationCreateMetricBodySevenJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricBodySevenJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationCreateMetricBodySevenInferenceOneTemperatureMin) - .max(evaluationCreateMetricBodySevenInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricBodySevenInferenceOneTopPMin) - .max(evaluationCreateMetricBodySevenInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationCreateMetricBodySevenIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod.literal('context_recall').default(evaluationCreateMetricBodySevenTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Request type for ContextRecall metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationCreateMetricBodyEightJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationCreateMetricBodyEightJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricBodyEightJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationCreateMetricBodyEightInferenceOneTemperatureMin) - .max(evaluationCreateMetricBodyEightInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricBodyEightInferenceOneTopPMin) - .max(evaluationCreateMetricBodyEightInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationCreateMetricBodyEightIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod.literal('context_precision').default(evaluationCreateMetricBodyEightTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Request type for ContextPrecision metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationCreateMetricBodyNineJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationCreateMetricBodyNineJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricBodyNineJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationCreateMetricBodyNineInferenceOneTemperatureMin) - .max(evaluationCreateMetricBodyNineInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricBodyNineInferenceOneTopPMin) - .max(evaluationCreateMetricBodyNineInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationCreateMetricBodyNineIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod.literal('context_entity_recall').default(evaluationCreateMetricBodyNineTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Request type for ContextEntityRecall metrics.'), - zod - .object({ - embeddings_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationCreateMetricBodyOnezeroEmbeddingsModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationCreateMetricBodyOnezeroEmbeddingsModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricBodyOnezeroEmbeddingsModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The embeddings model configuration.'), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationCreateMetricBodyOnezeroJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationCreateMetricBodyOnezeroJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricBodyOnezeroJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationCreateMetricBodyOnezeroInferenceOneTemperatureMin) - .max(evaluationCreateMetricBodyOnezeroInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricBodyOnezeroInferenceOneTopPMin) - .max(evaluationCreateMetricBodyOnezeroInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationCreateMetricBodyOnezeroIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod.literal('response_relevancy').default(evaluationCreateMetricBodyOnezeroTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - strictness: zod - .number() - .default(evaluationCreateMetricBodyOnezeroStrictnessDefault) - .describe('Number of parallel questions generated. NIM can only generate 1.'), - }) - .describe('Request type for ResponseRelevancy metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationCreateMetricBodyOneoneJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationCreateMetricBodyOneoneJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricBodyOneoneJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationCreateMetricBodyOneoneInferenceOneTemperatureMin) - .max(evaluationCreateMetricBodyOneoneInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricBodyOneoneInferenceOneTopPMin) - .max(evaluationCreateMetricBodyOneoneInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationCreateMetricBodyOneoneIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod.literal('faithfulness').default(evaluationCreateMetricBodyOneoneTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Request type for Faithfulness metrics.'), - zod - .object({ - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationCreateMetricBodyOnetwoJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationCreateMetricBodyOnetwoJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricBodyOnetwoJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationCreateMetricBodyOnetwoInferenceOneTemperatureMin) - .max(evaluationCreateMetricBodyOnetwoInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricBodyOnetwoInferenceOneTopPMin) - .max(evaluationCreateMetricBodyOnetwoInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationCreateMetricBodyOnetwoIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod.literal('noise_sensitivity').default(evaluationCreateMetricBodyOnetwoTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Request type for NoiseSensitivity metrics.'), - zod - .object({ - type: zod - .literal('tool_call_accuracy') - .default(evaluationCreateMetricBodyOnethreeTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Request type for ToolCallAccuracy metrics (no judge required).'), - zod - .object({ - type: zod.literal('bleu').default(evaluationCreateMetricBodyOnefourTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - references: zod - .array(zod.string()) - .describe('The templates for the ground truth references to calculate BLEU metric with.'), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to calculate BLEU metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for BLEUMetric.'), - zod - .object({ - type: zod.literal('exact-match').default(evaluationCreateMetricBodyOnefiveTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the exact match metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the exact match metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for ExactMatchMetric.'), - zod - .object({ - type: zod.literal('f1').default(evaluationCreateMetricBodyOnesixTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe('The template for the ground truth reference to calculate the F1 metric with.'), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the F1 metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Request type for F1Metric.'), - zod - .object({ - type: zod.literal('number-check').default(evaluationCreateMetricBodyOnesevenTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - '>=', - 'gte', - 'greater than or equal', - '>', - 'gt', - 'greater than', - '<=', - 'lte', - 'less than or equal', - '<', - 'lt', - 'less than', - 'absolute difference', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - epsilon: zod - .union([zod.number(), zod.number()]) - .optional() - .describe('Specify the tolerance for the absolute difference of values.'), - }) - .describe( - 'Request type for NumberCheckMetric. Numeric-comparison metric with template-driven operands.' - ), - zod - .object({ - type: zod.literal('remote').default(evaluationCreateMetricBodyOneeightTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex(evaluationCreateMetricBodyOneeightApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default(evaluationCreateMetricBodyOneeightTimeoutSecondsDefault) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default(evaluationCreateMetricBodyOneeightMaxRetriesDefault) - .describe('Maximum number of retry attempts.'), - body: zod.record(zod.string(), zod.unknown()).describe('Jinja template for request payload'), - scores: zod - .array( - zod - .object({ - name: zod - .string() - .regex(evaluationCreateMetricBodyOneeightScoresItemNameRegExp) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .object({ - type: zod - .literal('json') - .default(evaluationCreateMetricBodyOneeightScoresItemParserOneTypeDefault), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.') - .optional() - .describe( - 'The method to parse the score. Only JSON parsing is supported for remote metrics.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe('Minimum value for the score range. Defaults to None (no lower bound).'), - maximum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe('Maximum value for the score range. Defaults to None (no upper bound).'), - }) - .describe( - 'Score configuration for remote metrics.\n\nUnlike RangeScore, minimum and maximum are optional (default to None = no bounds).\nThis avoids JSON serialization issues with infinity values.' - ) - ) - .describe('List of scores to extract from the remote response'), - }) - .describe( - 'Request type for RemoteMetric. A metric that computes scores via a remote endpoint.' - ), - zod - .object({ - type: zod - .literal('nemo-agent-toolkit-remote') - .default(evaluationCreateMetricBodyOnenineTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex(evaluationCreateMetricBodyOnenineApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default(evaluationCreateMetricBodyOnenineTimeoutSecondsDefault) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default(evaluationCreateMetricBodyOnenineMaxRetriesDefault) - .describe('Maximum number of retry attempts.'), - evaluator_name: zod - .string() - .describe('The name of the evaluator (also used as the score name).'), - }) - .describe( - 'Request type for NemoAgentToolkitRemoteMetric. A remote metric that interfaces with NeMo Agent Toolkit evaluators.' - ), - zod - .object({ - type: zod.literal('rouge').default(evaluationCreateMetricBodyTwozeroTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe('The template for the ground truth reference to evaluate the ROUGE metric with.'), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the ROUGE metric on. If not provided, the output text from the model is used.' - ), - }) - .describe( - 'Request type for ROUGEMetric. ROUGE metric for overlap-based summarization quality scoring.' - ), - zod - .object({ - type: zod.literal('string-check').default(evaluationCreateMetricBodyTwooneTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - 'contains', - 'not contains', - 'startswith', - 'endswith', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - }) - .describe( - 'Request type for StringCheckMetric. String-comparison metric with operator-based checks.' - ), - zod - .object({ - type: zod.literal('tool-calling').default(evaluationCreateMetricBodyTwotwoTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe('The template for the ground truth reference to evaluate tool calling accuracy.'), - }) - .describe( - 'Request type for ToolCallingMetric. Tool-calling accuracy metric for structured function calls.' - ), -]); - -export const evaluationCreateMetricResponseOneTypeDefault = `llm-judge`; -export const evaluationCreateMetricResponseOneModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateMetricResponseOneModelOneFormatDefault = `nim`; -export const evaluationCreateMetricResponseOneModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricResponseOneScoresItemOneNameRegExp = new RegExp('^[a-z0-9_]+$'); -export const evaluationCreateMetricResponseOneScoresItemOneParserOneTypeDefault = `json`; -export const evaluationCreateMetricResponseOneScoresItemOneParserTwoTypeDefault = `regex`; -export const evaluationCreateMetricResponseOneScoresItemOneParserTwoMethodDefault = `match`; -export const evaluationCreateMetricResponseOneScoresItemOneRubricMin = 2; - -export const evaluationCreateMetricResponseOneScoresItemTwoNameRegExp = new RegExp('^[a-z0-9_]+$'); -export const evaluationCreateMetricResponseOneScoresItemTwoParserOneTypeDefault = `json`; -export const evaluationCreateMetricResponseOneScoresItemTwoParserTwoTypeDefault = `regex`; -export const evaluationCreateMetricResponseOneScoresItemTwoParserTwoMethodDefault = `match`; - -export const evaluationCreateMetricResponseOneInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricResponseOneInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricResponseOneInferenceOneTopPMin = 0; -export const evaluationCreateMetricResponseOneInferenceOneTopPMax = 1; - -export const evaluationCreateMetricResponseOneIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricResponseTwoJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateMetricResponseTwoJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricResponseTwoJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricResponseTwoInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricResponseTwoInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricResponseTwoInferenceOneTopPMin = 0; -export const evaluationCreateMetricResponseTwoInferenceOneTopPMax = 1; - -export const evaluationCreateMetricResponseTwoIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricResponseTwoTypeDefault = `topic_adherence`; -export const evaluationCreateMetricResponseTwoMetricModeDefault = `f1`; -export const evaluationCreateMetricResponseThreeJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateMetricResponseThreeJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricResponseThreeJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricResponseThreeInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricResponseThreeInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricResponseThreeInferenceOneTopPMin = 0; -export const evaluationCreateMetricResponseThreeInferenceOneTopPMax = 1; - -export const evaluationCreateMetricResponseThreeIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricResponseThreeTypeDefault = `agent_goal_accuracy`; -export const evaluationCreateMetricResponseThreeUseReferenceDefault = true; -export const evaluationCreateMetricResponseFourJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateMetricResponseFourJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricResponseFourJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricResponseFourInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricResponseFourInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricResponseFourInferenceOneTopPMin = 0; -export const evaluationCreateMetricResponseFourInferenceOneTopPMax = 1; - -export const evaluationCreateMetricResponseFourIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricResponseFourTypeDefault = `answer_accuracy`; -export const evaluationCreateMetricResponseFiveJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateMetricResponseFiveJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricResponseFiveJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricResponseFiveInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricResponseFiveInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricResponseFiveInferenceOneTopPMin = 0; -export const evaluationCreateMetricResponseFiveInferenceOneTopPMax = 1; - -export const evaluationCreateMetricResponseFiveIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricResponseFiveTypeDefault = `context_relevance`; -export const evaluationCreateMetricResponseSixJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateMetricResponseSixJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricResponseSixJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricResponseSixInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricResponseSixInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricResponseSixInferenceOneTopPMin = 0; -export const evaluationCreateMetricResponseSixInferenceOneTopPMax = 1; - -export const evaluationCreateMetricResponseSixIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricResponseSixTypeDefault = `response_groundedness`; -export const evaluationCreateMetricResponseSevenJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateMetricResponseSevenJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricResponseSevenJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricResponseSevenInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricResponseSevenInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricResponseSevenInferenceOneTopPMin = 0; -export const evaluationCreateMetricResponseSevenInferenceOneTopPMax = 1; - -export const evaluationCreateMetricResponseSevenIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricResponseSevenTypeDefault = `context_recall`; -export const evaluationCreateMetricResponseEightJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateMetricResponseEightJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricResponseEightJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricResponseEightInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricResponseEightInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricResponseEightInferenceOneTopPMin = 0; -export const evaluationCreateMetricResponseEightInferenceOneTopPMax = 1; - -export const evaluationCreateMetricResponseEightIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricResponseEightTypeDefault = `context_precision`; -export const evaluationCreateMetricResponseNineJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateMetricResponseNineJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricResponseNineJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricResponseNineInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricResponseNineInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricResponseNineInferenceOneTopPMin = 0; -export const evaluationCreateMetricResponseNineInferenceOneTopPMax = 1; - -export const evaluationCreateMetricResponseNineIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricResponseNineTypeDefault = `context_entity_recall`; -export const evaluationCreateMetricResponseOnezeroEmbeddingsModelOneApiKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const evaluationCreateMetricResponseOnezeroEmbeddingsModelOneFormatDefault = `nim`; -export const evaluationCreateMetricResponseOnezeroEmbeddingsModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricResponseOnezeroJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateMetricResponseOnezeroJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricResponseOnezeroJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricResponseOnezeroInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricResponseOnezeroInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricResponseOnezeroInferenceOneTopPMin = 0; -export const evaluationCreateMetricResponseOnezeroInferenceOneTopPMax = 1; - -export const evaluationCreateMetricResponseOnezeroIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricResponseOnezeroTypeDefault = `response_relevancy`; -export const evaluationCreateMetricResponseOnezeroStrictnessDefault = 1; -export const evaluationCreateMetricResponseOneoneJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateMetricResponseOneoneJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricResponseOneoneJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricResponseOneoneInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricResponseOneoneInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricResponseOneoneInferenceOneTopPMin = 0; -export const evaluationCreateMetricResponseOneoneInferenceOneTopPMax = 1; - -export const evaluationCreateMetricResponseOneoneIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricResponseOneoneTypeDefault = `faithfulness`; -export const evaluationCreateMetricResponseOnetwoJudgeModelOneApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateMetricResponseOnetwoJudgeModelOneFormatDefault = `nim`; -export const evaluationCreateMetricResponseOnetwoJudgeModelTwoRegExp = new RegExp( - '^[a-z0-9_-]+\/[a-z0-9_-]+$' -); -export const evaluationCreateMetricResponseOnetwoInferenceOneTemperatureMin = 0; -export const evaluationCreateMetricResponseOnetwoInferenceOneTemperatureMax = 2; - -export const evaluationCreateMetricResponseOnetwoInferenceOneTopPMin = 0; -export const evaluationCreateMetricResponseOnetwoInferenceOneTopPMax = 1; - -export const evaluationCreateMetricResponseOnetwoIgnoreRequestFailureDefault = false; -export const evaluationCreateMetricResponseOnetwoTypeDefault = `noise_sensitivity`; -export const evaluationCreateMetricResponseOnethreeTypeDefault = `tool_call_accuracy`; -export const evaluationCreateMetricResponseOnefourTypeDefault = `bleu`; -export const evaluationCreateMetricResponseOnefiveTypeDefault = `exact-match`; -export const evaluationCreateMetricResponseOnesixTypeDefault = `f1`; -export const evaluationCreateMetricResponseOnesevenTypeDefault = `number-check`; -export const evaluationCreateMetricResponseOneeightTypeDefault = `remote`; -export const evaluationCreateMetricResponseOneeightApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateMetricResponseOneeightTimeoutSecondsDefault = 30; -export const evaluationCreateMetricResponseOneeightMaxRetriesDefault = 3; -export const evaluationCreateMetricResponseOneeightScoresItemNameRegExp = new RegExp( - '^[a-z0-9_]+$' -); -export const evaluationCreateMetricResponseOneeightScoresItemParserOneTypeDefault = `json`; -export const evaluationCreateMetricResponseOnenineTypeDefault = `nemo-agent-toolkit-remote`; -export const evaluationCreateMetricResponseOnenineApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const evaluationCreateMetricResponseOnenineTimeoutSecondsDefault = 30; -export const evaluationCreateMetricResponseOnenineMaxRetriesDefault = 3; -export const evaluationCreateMetricResponseTwozeroTypeDefault = `rouge`; -export const evaluationCreateMetricResponseTwooneTypeDefault = `string-check`; -export const evaluationCreateMetricResponseTwotwoTypeDefault = `tool-calling`; -export const evaluationCreateMetricResponseTwothreeNameDefault = `Metric name`; -export const evaluationCreateMetricResponseTwothreeTypeDefault = `system`; - -export const EvaluationCreateMetricResponse = zod.union([ - zod.object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod.literal('llm-judge').default(evaluationCreateMetricResponseOneTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationCreateMetricResponseOneModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationCreateMetricResponseOneModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricResponseOneModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The model configuration.'), - scores: zod - .array( - zod.union([ - zod - .object({ - name: zod - .string() - .regex(evaluationCreateMetricResponseOneScoresItemOneNameRegExp) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationCreateMetricResponseOneScoresItemOneParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationCreateMetricResponseOneScoresItemOneParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationCreateMetricResponseOneScoresItemOneParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe('Parse a score from content in any format using regular expression.'), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - rubric: zod - .array( - zod.object({ - label: zod - .string() - .describe( - 'The label to use for the level of the rubric grading criteria. (e.g., \"helpful\", \"not_helpful\", \"positive\")' - ), - description: zod - .string() - .optional() - .describe( - 'Describe the semantic meaning of each criteria for the given rubric. If no judge template is set, the input description for labels are included in the generated judge prompt.' - ), - value: zod - .union([zod.number(), zod.number()]) - .describe( - 'The score value to assign for the criteria used for aggregation and ranking.' - ), - }) - ) - .min(evaluationCreateMetricResponseOneScoresItemOneRubricMin) - .describe('The rubric for the score.'), - }) - .describe( - 'Score definition for a rubric with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - zod - .object({ - name: zod - .string() - .regex(evaluationCreateMetricResponseOneScoresItemTwoNameRegExp) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .union([ - zod - .object({ - type: zod - .literal('json') - .default( - evaluationCreateMetricResponseOneScoresItemTwoParserOneTypeDefault - ), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.'), - zod - .object({ - type: zod - .literal('regex') - .default( - evaluationCreateMetricResponseOneScoresItemTwoParserTwoTypeDefault - ), - pattern: zod - .string() - .describe( - 'The regular expression to parse the score from the judge response.' - ), - method: zod - .enum(['search', 'match']) - .default( - evaluationCreateMetricResponseOneScoresItemTwoParserTwoMethodDefault - ) - .describe( - "The regex method to use: 'search' looks anywhere in the string, 'match' starts from the beginning." - ), - }) - .describe('Parse a score from content in any format using regular expression.'), - ]) - .optional() - .describe( - 'The method to parse the score. When used with llm-judge metric, and no parser is set, JSONScoreParser is the default parser inferred from the score parameters.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .describe('Minimum value for the score range. Must be less than maximum.'), - maximum: zod - .union([zod.number(), zod.number()]) - .describe('Maximum value for the score range. Must be greater than minimum.'), - }) - .describe( - 'Score definition for a range of values with optional parser. If no parser is set, JSONScoreParser is the default parser inferred from the score parameters' - ), - ]) - ) - .min(1) - .describe("Definitions of scores that will be extracted from the judge's output."), - prompt_template: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .optional() - .describe( - 'The prompt template for the judge. Can be either a simple string or a structured object (e.g., OpenAI messages format). Use Jinja template variables like {{sample.output_text}} to use the model output within the template or {{item.xxx}} to reference input columns from the dataset.' - ), - optional_fields: zod - .array(zod.string().min(1)) - .optional() - .describe( - "Prompt template fields that should remain in the inferred input schema but not be required. Use this for fields like 'reference' when the metric can still run without them." - ), - structured_output: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'JSON schema to apply structured output for the judge model evaluation. Structured output is derived from scores when omitted. Use this option if there are custom requirements for the output of the judge.' - ), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationCreateMetricResponseOneInferenceOneTemperatureMin) - .max(evaluationCreateMetricResponseOneInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricResponseOneInferenceOneTopPMin) - .max(evaluationCreateMetricResponseOneInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge model.'), - system_prompt: zod - .string() - .optional() - .describe( - "Initial instructions that define the judge model's role and behavior for the conversation. This is prepended to the messages as a system message." - ), - reasoning: zod - .object({ - end_token: zod - .string() - .optional() - .describe( - "Configure the end token to trim reasoning context based on the model's reasoning API. Example for Nemotron models: '<\/think>'" - ), - include_if_not_finished: zod - .boolean() - .optional() - .describe( - 'Configure whether to include reasoning context if the model has not finished reasoning.' - ), - effort: zod - .string() - .optional() - .describe('Option for OpenAI models to specify low, medium, or high reasoning effort.'), - }) - .describe("Custom settings that control the model's reasoning behavior.") - .optional() - .describe( - "Custom settings that control the judge model's reasoning behavior. For reasoning models (e.g., Nemotron), use `end_token` to strip reasoning traces from the output." - ), - ignore_request_failure: zod - .boolean() - .default(evaluationCreateMetricResponseOneIgnoreRequestFailureDefault) - .describe( - 'If True, request failures will be ignored and the result will be marked as NaN. If False (default), request failures will raise an exception.' - ), - }), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationCreateMetricResponseTwoJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationCreateMetricResponseTwoJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricResponseTwoJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationCreateMetricResponseTwoInferenceOneTemperatureMin) - .max(evaluationCreateMetricResponseTwoInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricResponseTwoInferenceOneTopPMin) - .max(evaluationCreateMetricResponseTwoInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationCreateMetricResponseTwoIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod.literal('topic_adherence').default(evaluationCreateMetricResponseTwoTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - metric_mode: zod - .enum(['f1', 'precision', 'recall']) - .default(evaluationCreateMetricResponseTwoMetricModeDefault) - .describe('The mode for computing topic adherence score.'), - }) - .describe('Response type for TopicAdherence metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationCreateMetricResponseThreeJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationCreateMetricResponseThreeJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricResponseThreeJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationCreateMetricResponseThreeInferenceOneTemperatureMin) - .max(evaluationCreateMetricResponseThreeInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricResponseThreeInferenceOneTopPMin) - .max(evaluationCreateMetricResponseThreeInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationCreateMetricResponseThreeIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('agent_goal_accuracy') - .default(evaluationCreateMetricResponseThreeTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - use_reference: zod - .boolean() - .default(evaluationCreateMetricResponseThreeUseReferenceDefault) - .describe('Whether to use reference for goal accuracy evaluation.'), - }) - .describe('Response type for AgentGoalAccuracy metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationCreateMetricResponseFourJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationCreateMetricResponseFourJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricResponseFourJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationCreateMetricResponseFourInferenceOneTemperatureMin) - .max(evaluationCreateMetricResponseFourInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricResponseFourInferenceOneTopPMin) - .max(evaluationCreateMetricResponseFourInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationCreateMetricResponseFourIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod.literal('answer_accuracy').default(evaluationCreateMetricResponseFourTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Response type for AnswerAccuracy metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationCreateMetricResponseFiveJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationCreateMetricResponseFiveJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricResponseFiveJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationCreateMetricResponseFiveInferenceOneTemperatureMin) - .max(evaluationCreateMetricResponseFiveInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricResponseFiveInferenceOneTopPMin) - .max(evaluationCreateMetricResponseFiveInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationCreateMetricResponseFiveIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod.literal('context_relevance').default(evaluationCreateMetricResponseFiveTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Response type for ContextRelevance metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationCreateMetricResponseSixJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationCreateMetricResponseSixJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricResponseSixJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationCreateMetricResponseSixInferenceOneTemperatureMin) - .max(evaluationCreateMetricResponseSixInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricResponseSixInferenceOneTopPMin) - .max(evaluationCreateMetricResponseSixInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationCreateMetricResponseSixIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_groundedness') - .default(evaluationCreateMetricResponseSixTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Response type for ResponseGroundedness metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationCreateMetricResponseSevenJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationCreateMetricResponseSevenJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricResponseSevenJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationCreateMetricResponseSevenInferenceOneTemperatureMin) - .max(evaluationCreateMetricResponseSevenInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricResponseSevenInferenceOneTopPMin) - .max(evaluationCreateMetricResponseSevenInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationCreateMetricResponseSevenIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod.literal('context_recall').default(evaluationCreateMetricResponseSevenTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Response type for ContextRecall metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationCreateMetricResponseEightJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationCreateMetricResponseEightJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricResponseEightJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationCreateMetricResponseEightInferenceOneTemperatureMin) - .max(evaluationCreateMetricResponseEightInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricResponseEightInferenceOneTopPMin) - .max(evaluationCreateMetricResponseEightInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationCreateMetricResponseEightIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_precision') - .default(evaluationCreateMetricResponseEightTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Response type for ContextPrecision metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationCreateMetricResponseNineJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationCreateMetricResponseNineJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricResponseNineJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationCreateMetricResponseNineInferenceOneTemperatureMin) - .max(evaluationCreateMetricResponseNineInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricResponseNineInferenceOneTopPMin) - .max(evaluationCreateMetricResponseNineInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationCreateMetricResponseNineIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('context_entity_recall') - .default(evaluationCreateMetricResponseNineTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Response type for ContextEntityRecall metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - embeddings_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationCreateMetricResponseOnezeroEmbeddingsModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationCreateMetricResponseOnezeroEmbeddingsModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricResponseOnezeroEmbeddingsModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The embeddings model configuration.'), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationCreateMetricResponseOnezeroJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationCreateMetricResponseOnezeroJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricResponseOnezeroJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationCreateMetricResponseOnezeroInferenceOneTemperatureMin) - .max(evaluationCreateMetricResponseOnezeroInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricResponseOnezeroInferenceOneTopPMin) - .max(evaluationCreateMetricResponseOnezeroInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationCreateMetricResponseOnezeroIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('response_relevancy') - .default(evaluationCreateMetricResponseOnezeroTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - strictness: zod - .number() - .default(evaluationCreateMetricResponseOnezeroStrictnessDefault) - .describe('Number of parallel questions generated. NIM can only generate 1.'), - }) - .describe('Response type for ResponseRelevancy metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationCreateMetricResponseOneoneJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationCreateMetricResponseOneoneJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricResponseOneoneJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationCreateMetricResponseOneoneInferenceOneTemperatureMin) - .max(evaluationCreateMetricResponseOneoneInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricResponseOneoneInferenceOneTopPMin) - .max(evaluationCreateMetricResponseOneoneInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationCreateMetricResponseOneoneIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod.literal('faithfulness').default(evaluationCreateMetricResponseOneoneTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Response type for Faithfulness metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - judge_model: zod - .union([ - zod - .object({ - url: zod.string().describe('URL of the model.'), - name: zod.string().describe('Name of the model.'), - api_key_secret: zod - .string() - .regex(evaluationCreateMetricResponseOnetwoJudgeModelOneApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'API key secret reference for the model. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - format: zod - .enum(['nim', 'openai', 'llama_stack']) - .default(evaluationCreateMetricResponseOnetwoJudgeModelOneFormatDefault) - .describe('API format of the model.'), - }) - .describe('Model definition for use without persisting to the Models API.'), - zod - .string() - .regex(evaluationCreateMetricResponseOnetwoJudgeModelTwoRegExp) - .describe( - 'Reference to a Model in the Models API.\n\nSee [Entity references](docs\/get-started\/concepts\/entity-references.md) for the general entity reference\npattern used across the platform.' - ), - ]) - .describe('The judge model configuration.'), - inference: zod - .object({ - temperature: zod - .number() - .min(evaluationCreateMetricResponseOnetwoInferenceOneTemperatureMin) - .max(evaluationCreateMetricResponseOnetwoInferenceOneTemperatureMax) - .optional() - .describe( - "Float value between 0 and 1. temp of 0 indicates greedy decoding, where the token with highest prob is chosen. Temperature can't be set to 0.0 currently" - ), - max_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - max_completion_tokens: zod.number().min(1).optional().describe('Max tokens to generate'), - top_p: zod - .number() - .min(evaluationCreateMetricResponseOnetwoInferenceOneTopPMin) - .max(evaluationCreateMetricResponseOnetwoInferenceOneTopPMax) - .optional() - .describe( - 'Float value between 0 and 1; limits to the top tokens within a certain probability. top_p=0 means the model will only consider the single most likely token for the next prediction' - ), - stop: zod.array(zod.string()).optional(), - }) - .describe( - 'Parameters for model inference. Extra fields can be supplied for additional options applied to the inference request directly. Fields not supported by the model may cause inference errors during evaluation.' - ) - .optional() - .describe('Inference parameters for the judge.'), - ignore_request_failure: zod - .boolean() - .default(evaluationCreateMetricResponseOnetwoIgnoreRequestFailureDefault) - .describe( - 'If True, request failures to the judge model are ignored and the metric result is marked as NaN. Parse\/output formatting failures are always converted to NaN.' - ), - type: zod - .literal('noise_sensitivity') - .default(evaluationCreateMetricResponseOnetwoTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Response type for NoiseSensitivity metrics.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod - .literal('tool_call_accuracy') - .default(evaluationCreateMetricResponseOnethreeTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - input_template: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Optional Jinja template for rendering the input payload for RAGAS evaluation.'), - }) - .describe('Response type for ToolCallAccuracy metrics (no judge required).'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod.literal('bleu').default(evaluationCreateMetricResponseOnefourTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - references: zod - .array(zod.string()) - .describe('The templates for the ground truth references to calculate BLEU metric with.'), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to calculate BLEU metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Response type for BLEUMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod.literal('exact-match').default(evaluationCreateMetricResponseOnefiveTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe( - 'The template for the ground truth reference to calculate the exact match metric with.' - ), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the exact match metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Response type for ExactMatchMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod.literal('f1').default(evaluationCreateMetricResponseOnesixTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe('The template for the ground truth reference to calculate the F1 metric with.'), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the F1 metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Response type for F1Metric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod.literal('number-check').default(evaluationCreateMetricResponseOnesevenTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - '>=', - 'gte', - 'greater than or equal', - '>', - 'gt', - 'greater than', - '<=', - 'lte', - 'less than or equal', - '<', - 'lt', - 'less than', - 'absolute difference', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - epsilon: zod - .union([zod.number(), zod.number()]) - .optional() - .describe('Specify the tolerance for the absolute difference of values.'), - }) - .describe('Response type for NumberCheckMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod.literal('remote').default(evaluationCreateMetricResponseOneeightTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex(evaluationCreateMetricResponseOneeightApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default(evaluationCreateMetricResponseOneeightTimeoutSecondsDefault) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default(evaluationCreateMetricResponseOneeightMaxRetriesDefault) - .describe('Maximum number of retry attempts.'), - body: zod.record(zod.string(), zod.unknown()).describe('Jinja template for request payload'), - scores: zod - .array( - zod - .object({ - name: zod - .string() - .regex(evaluationCreateMetricResponseOneeightScoresItemNameRegExp) - .describe( - 'The name of the score. Only lowercase letters, numbers, and underscores allowed.' - ), - description: zod - .string() - .optional() - .describe('Human-readable description of the score.'), - parser: zod - .object({ - type: zod - .literal('json') - .default(evaluationCreateMetricResponseOneeightScoresItemParserOneTypeDefault), - json_path: zod - .string() - .describe( - 'The JSON path to parse the score from the judge response when using structured output.' - ), - }) - .describe('Parse a score from JSON structured content.') - .optional() - .describe( - 'The method to parse the score. Only JSON parsing is supported for remote metrics.' - ), - minimum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe('Minimum value for the score range. Defaults to None (no lower bound).'), - maximum: zod - .union([zod.number(), zod.number()]) - .optional() - .describe('Maximum value for the score range. Defaults to None (no upper bound).'), - }) - .describe( - 'Score configuration for remote metrics.\n\nUnlike RangeScore, minimum and maximum are optional (default to None = no bounds).\nThis avoids JSON serialization issues with infinity values.' - ) - ) - .describe('List of scores to extract from the remote response'), - }) - .describe('Response type for RemoteMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod - .literal('nemo-agent-toolkit-remote') - .default(evaluationCreateMetricResponseOnenineTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - url: zod.string().describe('The URL of the remote endpoint.'), - api_key_secret: zod - .string() - .regex(evaluationCreateMetricResponseOnenineApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe( - 'Optional secret reference of an API key for authentication. Format: workspace\/secret_name or secret_name within the job workspace.' - ), - timeout_seconds: zod - .number() - .default(evaluationCreateMetricResponseOnenineTimeoutSecondsDefault) - .describe('Request timeout in seconds.'), - max_retries: zod - .number() - .default(evaluationCreateMetricResponseOnenineMaxRetriesDefault) - .describe('Maximum number of retry attempts.'), - evaluator_name: zod - .string() - .describe('The name of the evaluator (also used as the score name).'), - }) - .describe('Response type for NemoAgentToolkitRemoteMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod.literal('rouge').default(evaluationCreateMetricResponseTwozeroTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe('The template for the ground truth reference to evaluate the ROUGE metric with.'), - candidate: zod - .string() - .optional() - .describe( - 'The template for the candidate to evaluate the ROUGE metric on. If not provided, the output text from the model is used.' - ), - }) - .describe('Response type for ROUGEMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod.literal('string-check').default(evaluationCreateMetricResponseTwooneTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - operation: zod - .enum([ - 'equals', - '==', - '!=', - '<>', - 'not equals', - 'contains', - 'not contains', - 'startswith', - 'endswith', - ]) - .describe('The operation to compute for the metric.'), - left_template: zod - .string() - .describe( - 'The template to use for rendering the left value of the operator to compute the metric.' - ), - right_template: zod - .string() - .describe( - 'The template to use for rendering the right value of the operator to compute the metric.' - ), - }) - .describe('Response type for StringCheckMetric.'), - zod - .object({ - name: zod.string().optional().describe('Entity name within the workspace'), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod.literal('tool-calling').default(evaluationCreateMetricResponseTwotwoTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline'])) - .default([`online`, `offline`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - reference: zod - .string() - .describe('The template for the ground truth reference to evaluate tool calling accuracy.'), - }) - .describe('Response type for ToolCallingMetric.'), - zod - .object({ - name: zod.string().default(evaluationCreateMetricResponseTwothreeNameDefault), - workspace: zod.string().optional().describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - id: zod.string().optional().describe('Entity name within the workspace'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - parent: zod.string().optional(), - type: zod - .enum(['system', 'system-retriever']) - .default(evaluationCreateMetricResponseTwothreeTypeDefault), - description: zod.string().optional().describe('Human-readable description of the metric.'), - labels: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Labels are key-value pairs that can be used for grouping and filtering.'), - supported_job_types: zod - .array(zod.enum(['online', 'offline', 'retriever'])) - .default([`online`]) - .describe( - 'A metric can evaluate model outputs for online evaluations or pre-generated outputs for offline evaluations.' - ), - required_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod.string().optional().describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe('List of required parameters for running an evaluation with the metric.'), - optional_params: zod - .array( - zod.object({ - name: zod.string().describe('Name of the parameter.'), - type: zod - .enum(['boolean', 'string', 'number', 'integer', 'object', 'secret']) - .describe('The value type of the parameter.'), - description: zod.string().optional().describe('Description of the parameter.'), - default: zod - .union([zod.boolean(), zod.string(), zod.number(), zod.number()]) - .optional() - .describe('The default value of the parameter.'), - schema: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The JSON schema for parameters with object type.'), - }) - ) - .optional() - .describe('List of optional parameters for running an evaluation with the metric.'), - }) - .describe('Response type for SystemMetric.'), -]); - -/** - * Delete a custom evaluation metric. Predefined metrics cannot be deleted. - * @summary Delete Metric - */ -export const EvaluationDeleteMetricParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const evaluationDeleteMetricResponseMessageDefault = `Resource deleted successfully.`; - -export const EvaluationDeleteMetricResponse = zod.object({ - message: zod.string().default(evaluationDeleteMetricResponseMessageDefault), - id: zod.string().optional().describe('The ID of the deleted resource.'), - deleted_at: zod - .string() - .datetime({}) - .optional() - .describe('The timestamp when the resource was deleted.'), -}); diff --git a/web/packages/sdk/generated/platform/zod/exports.ts b/web/packages/sdk/generated/platform/zod/exports.ts deleted file mode 100644 index bf266b3030..0000000000 --- a/web/packages/sdk/generated/platform/zod/exports.ts +++ /dev/null @@ -1,484 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import * as zod from 'zod'; - -/** - * List all export jobs with filtering capabilities. - -Use `workspace=-` for cross-workspace listing. - * @summary List Export Jobs - */ -export const ListExportJobsParams = zod.object({ - workspace: zod.string(), -}); - -export const listExportJobsQueryPageDefault = 1; -export const listExportJobsQueryPageSizeDefault = 10; -export const listExportJobsQuerySortDefault = `created_at`; - -export const ListExportJobsQueryParams = zod.object({ - page: zod.number().default(listExportJobsQueryPageDefault).describe('Page number.'), - page_size: zod.number().default(listExportJobsQueryPageSizeDefault).describe('Page size.'), - sort: zod - .enum(['created_at', '-created_at', 'updated_at', '-updated_at', 'status', '-status']) - .describe('Sort fields for ExportJobs.') - .default(listExportJobsQuerySortDefault) - .describe( - 'The field to sort by. To sort in decreasing order, use `-` in front of the field name.' - ), - filter: zod - .object({ - id: zod.string().optional().describe('Filter by export job ID.'), - workspace: zod.string().optional().describe('Filter by workspace id.'), - name: zod.string().optional().describe('Filter by export job name.'), - status: zod - .enum(['pending', 'running', 'completed', 'failed', 'cancelled']) - .describe('Job status enum.') - .optional() - .describe('Filter by job status.'), - output_file_url: zod.string().optional().describe('Filter by output file URL.'), - created_at: zod - .object({ - $gte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results greater than or equal to this datetime.'), - $lte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results less than or equal to this datetime.'), - }) - .optional() - .describe('Filter entities based on creation date.'), - updated_at: zod - .object({ - $gte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results greater than or equal to this datetime.'), - $lte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results less than or equal to this datetime.'), - }) - .optional() - .describe('Filter entities based on update date.'), - }) - .optional() - .describe('Filter export jobs by name, status, output_file_url, created_at, and updated_at.'), -}); - -export const listExportJobsResponseDataItemNameDefault = ``; -export const listExportJobsResponseDataItemWorkspaceRegExp = new RegExp('^[\\w\\-\\+.@:]+$'); -export const listExportJobsResponseDataItemStatusDefault = `pending`; -export const listExportJobsResponseDataItemConfigOneLimitDefault = 1000; -export const listExportJobsResponseDataItemStatusDetailsOneEntriesCountDefault = 0; - -export const ListExportJobsResponse = zod.object({ - data: zod.array( - zod - .object({ - name: zod - .string() - .default(listExportJobsResponseDataItemNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(listExportJobsResponseDataItemWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - status: zod - .enum(['pending', 'running', 'completed', 'failed', 'cancelled']) - .describe('Job status enum.') - .default(listExportJobsResponseDataItemStatusDefault) - .describe('Job status'), - config: zod - .object({ - filters: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Filter criteria for selecting entries (workspace, app, task, thread_id, external_id, has_thumb, has_rating, longest_per_thread, model, etc.)' - ), - search: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Search criteria for finding entries'), - limit: zod - .number() - .default(listExportJobsResponseDataItemConfigOneLimitDefault) - .describe('Maximum number of entries to export. None means no limit.'), - format_options: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Format options for the export (e.g., row_transformation)'), - }) - .describe( - 'Configuration for an export job.\n\nDefines what entries to export and how to format them.' - ) - .describe( - 'The export configuration defining filters, search criteria, and format options.' - ), - output_file_url: zod - .string() - .url() - .min(1) - .optional() - .describe( - 'The place where the exported file should be written (file:\/\/, hf:\/\/, nds:\/\/, etc.)' - ), - status_details: zod - .object({ - entries_count: zod - .number() - .default(listExportJobsResponseDataItemStatusDetailsOneEntriesCountDefault) - .describe('Number of entries exported'), - progress: zod.number().optional().describe('Progress percentage (0-100)'), - error_message: zod.string().optional().describe('Error message if the job failed'), - }) - .describe('Detailed status information for an export job.') - .optional() - .describe('Details about the status of the export job.'), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe( - 'Export job tracking entry exports to external datastores.\n\nExport jobs track the status of background export tasks.' - ) - ), - pagination: zod - .object({ - page: zod.number().describe('The current page number.'), - page_size: zod.number().describe('The page size used for the query.'), - current_page_size: zod.number().describe('The size for the current page.'), - total_pages: zod.number().describe('The total number of pages.'), - total_results: zod.number().describe('The total number of results.'), - }) - .optional() - .describe('Pagination information.'), - sort: zod.string().optional().describe('The field on which the results are sorted.'), - filter: zod.record(zod.string(), zod.unknown()).optional().describe('Filtering information.'), -}); - -/** - * Export entries to an external file. - -Use the `longest_per_thread` filter to export only the longest entry per thread, -which is useful for thread-based exports. - -Supported output file URLs: - -- NeMo Datastore: nds://workspace/dataset_name -- HuggingFace Dataset: hf://datasets/org/name/path/to/file -- Local filesystem: file:///path/to/export (for development) - * @summary Create Export Job - */ -export const CreateExportJobParams = zod.object({ - workspace: zod.string(), -}); - -export const createExportJobBodyConfigOneLimitDefault = 1000; - -export const CreateExportJobBody = zod - .object({ - config: zod - .object({ - filters: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Filter criteria for selecting entries (workspace, app, task, thread_id, external_id, has_thumb, has_rating, longest_per_thread, model, etc.)' - ), - search: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Search criteria for finding entries'), - limit: zod - .number() - .default(createExportJobBodyConfigOneLimitDefault) - .describe('Maximum number of entries to export. None means no limit.'), - format_options: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Format options for the export (e.g., row_transformation)'), - }) - .describe( - 'Input schema for export configuration.\n\nDefines what entries to export and how to format them.' - ) - .describe('Export configuration'), - output_file_url: zod - .string() - .url() - .min(1) - .describe( - 'The place where the exported file should be written (file:\/\/, hf:\/\/, nds:\/\/, etc.)' - ), - }) - .describe('Request payload for creating an export job.'); - -export const createExportJobResponseNameDefault = ``; -export const createExportJobResponseWorkspaceRegExp = new RegExp('^[\\w\\-\\+.@:]+$'); -export const createExportJobResponseStatusDefault = `pending`; -export const createExportJobResponseConfigOneLimitDefault = 1000; -export const createExportJobResponseStatusDetailsOneEntriesCountDefault = 0; - -export const CreateExportJobResponse = zod - .object({ - name: zod - .string() - .default(createExportJobResponseNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(createExportJobResponseWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - status: zod - .enum(['pending', 'running', 'completed', 'failed', 'cancelled']) - .describe('Job status enum.') - .default(createExportJobResponseStatusDefault) - .describe('Job status'), - config: zod - .object({ - filters: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Filter criteria for selecting entries (workspace, app, task, thread_id, external_id, has_thumb, has_rating, longest_per_thread, model, etc.)' - ), - search: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Search criteria for finding entries'), - limit: zod - .number() - .default(createExportJobResponseConfigOneLimitDefault) - .describe('Maximum number of entries to export. None means no limit.'), - format_options: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Format options for the export (e.g., row_transformation)'), - }) - .describe( - 'Configuration for an export job.\n\nDefines what entries to export and how to format them.' - ) - .describe('The export configuration defining filters, search criteria, and format options.'), - output_file_url: zod - .string() - .url() - .min(1) - .optional() - .describe( - 'The place where the exported file should be written (file:\/\/, hf:\/\/, nds:\/\/, etc.)' - ), - status_details: zod - .object({ - entries_count: zod - .number() - .default(createExportJobResponseStatusDetailsOneEntriesCountDefault) - .describe('Number of entries exported'), - progress: zod.number().optional().describe('Progress percentage (0-100)'), - error_message: zod.string().optional().describe('Error message if the job failed'), - }) - .describe('Detailed status information for an export job.') - .optional() - .describe('Details about the status of the export job.'), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe( - 'Export job tracking entry exports to external datastores.\n\nExport jobs track the status of background export tasks.' - ); - -/** - * Check the status of an export job. - * @summary Get Export Job Status - */ -export const GetExportJobStatusParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const getExportJobStatusResponseNameDefault = ``; -export const getExportJobStatusResponseWorkspaceRegExp = new RegExp('^[\\w\\-\\+.@:]+$'); -export const getExportJobStatusResponseStatusDefault = `pending`; -export const getExportJobStatusResponseConfigOneLimitDefault = 1000; -export const getExportJobStatusResponseStatusDetailsOneEntriesCountDefault = 0; - -export const GetExportJobStatusResponse = zod - .object({ - name: zod - .string() - .default(getExportJobStatusResponseNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(getExportJobStatusResponseWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - status: zod - .enum(['pending', 'running', 'completed', 'failed', 'cancelled']) - .describe('Job status enum.') - .default(getExportJobStatusResponseStatusDefault) - .describe('Job status'), - config: zod - .object({ - filters: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Filter criteria for selecting entries (workspace, app, task, thread_id, external_id, has_thumb, has_rating, longest_per_thread, model, etc.)' - ), - search: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Search criteria for finding entries'), - limit: zod - .number() - .default(getExportJobStatusResponseConfigOneLimitDefault) - .describe('Maximum number of entries to export. None means no limit.'), - format_options: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Format options for the export (e.g., row_transformation)'), - }) - .describe( - 'Configuration for an export job.\n\nDefines what entries to export and how to format them.' - ) - .describe('The export configuration defining filters, search criteria, and format options.'), - output_file_url: zod - .string() - .url() - .min(1) - .optional() - .describe( - 'The place where the exported file should be written (file:\/\/, hf:\/\/, nds:\/\/, etc.)' - ), - status_details: zod - .object({ - entries_count: zod - .number() - .default(getExportJobStatusResponseStatusDetailsOneEntriesCountDefault) - .describe('Number of entries exported'), - progress: zod.number().optional().describe('Progress percentage (0-100)'), - error_message: zod.string().optional().describe('Error message if the job failed'), - }) - .describe('Detailed status information for an export job.') - .optional() - .describe('Details about the status of the export job.'), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe( - 'Export job tracking entry exports to external datastores.\n\nExport jobs track the status of background export tasks.' - ); - -/** - * Preview export data without writing to a file (max 100 records). - * @summary Preview Export - */ -export const PreviewExportParams = zod.object({ - workspace: zod.string(), -}); - -export const previewExportBodyConfigOneLimitDefault = 1000; - -export const PreviewExportBody = zod - .object({ - config: zod - .object({ - filters: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Filter criteria for selecting entries (workspace, app, task, thread_id, external_id, has_thumb, has_rating, longest_per_thread, model, etc.)' - ), - search: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Search criteria for finding entries'), - limit: zod - .number() - .default(previewExportBodyConfigOneLimitDefault) - .describe('Maximum number of entries to export. None means no limit.'), - format_options: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Format options for the export (e.g., row_transformation)'), - }) - .describe( - 'Input schema for export configuration.\n\nDefines what entries to export and how to format them.' - ) - .describe('Export configuration for preview'), - }) - .describe('Request payload for previewing export data without writing to a file.'); - -export const previewExportResponseConfigOneLimitDefault = 1000; - -export const PreviewExportResponse = zod - .object({ - data: zod - .array(zod.record(zod.string(), zod.unknown())) - .describe('Preview data (max 100 records)'), - count: zod.number().describe('Number of records returned'), - config: zod - .object({ - filters: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Filter criteria for selecting entries (workspace, app, task, thread_id, external_id, has_thumb, has_rating, longest_per_thread, model, etc.)' - ), - search: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Search criteria for finding entries'), - limit: zod - .number() - .default(previewExportResponseConfigOneLimitDefault) - .describe('Maximum number of entries to export. None means no limit.'), - format_options: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Format options for the export (e.g., row_transformation)'), - }) - .describe( - 'Input schema for export configuration.\n\nDefines what entries to export and how to format them.' - ) - .describe('The configuration used for this preview'), - }) - .describe('Response containing preview data from the export configuration.'); diff --git a/web/packages/sdk/generated/platform/zod/files.ts b/web/packages/sdk/generated/platform/zod/files.ts deleted file mode 100644 index e09a546bc6..0000000000 --- a/web/packages/sdk/generated/platform/zod/files.ts +++ /dev/null @@ -1,1945 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import * as zod from 'zod'; - -/** - * Create a new fileset. - -If no storage configuration is provided, the default storage backend will be used. - * @summary Create Fileset - */ -export const FilesCreateFilesetParams = zod.object({ - workspace: zod.string(), -}); - -export const filesCreateFilesetBodyNameMax = 255; - -export const filesCreateFilesetBodyNameRegExp = new RegExp('^[\\w\\-.]+$'); -export const filesCreateFilesetBodyDescriptionMax = 255; - -export const filesCreateFilesetBodyStorageOneReadChunkSizeDefault = 1048576; -export const filesCreateFilesetBodyStorageOneTypeDefault = `local`; -export const filesCreateFilesetBodyStorageOneWriteBufferSizeDefault = 16777216; -export const filesCreateFilesetBodyStorageTwoReadChunkSizeDefault = 1048576; -export const filesCreateFilesetBodyStorageTwoTypeDefault = `ngc`; -export const filesCreateFilesetBodyStorageTwoTargetTypeDefault = `resource`; -export const filesCreateFilesetBodyStorageTwoApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const filesCreateFilesetBodyStorageTwoHostDefault = `https://api.ngc.nvidia.com`; -export const filesCreateFilesetBodyStorageThreeReadChunkSizeDefault = 1048576; -export const filesCreateFilesetBodyStorageThreeTypeDefault = `huggingface`; -export const filesCreateFilesetBodyStorageThreeRepoTypeDefault = `model`; -export const filesCreateFilesetBodyStorageThreeRevisionDefault = `main`; -export const filesCreateFilesetBodyStorageThreeTokenSecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const filesCreateFilesetBodyStorageThreeEndpointDefault = `https://huggingface.co`; -export const filesCreateFilesetBodyStorageFourReadChunkSizeDefault = 1048576; -export const filesCreateFilesetBodyStorageFourTypeDefault = `s3`; -export const filesCreateFilesetBodyStorageFourPrefixDefault = ``; -export const filesCreateFilesetBodyStorageFourUseSdkAuthDefault = false; -export const filesCreateFilesetBodyStorageFourAccessKeyIdSecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const filesCreateFilesetBodyStorageFourSecretAccessKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const filesCreateFilesetBodyStorageFourSignatureVersionDefault = `s3v4`; -export const filesCreateFilesetBodyPurposeDefault = `generic`; -export const filesCreateFilesetBodyCacheDefault = false; - -export const FilesCreateFilesetBody = zod.object({ - name: zod - .string() - .max(filesCreateFilesetBodyNameMax) - .regex(filesCreateFilesetBodyNameRegExp) - .describe( - 'The name of the fileset. Allowed characters: letters (a-z, A-Z), digits (0-9), underscores, hyphens, and dots.' - ), - description: zod - .string() - .max(filesCreateFilesetBodyDescriptionMax) - .optional() - .describe('The description of the fileset.'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this fileset.'), - storage: zod - .union([ - zod.object({ - read_chunk_size: zod - .number() - .default(filesCreateFilesetBodyStorageOneReadChunkSizeDefault) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod.literal('local').default(filesCreateFilesetBodyStorageOneTypeDefault), - path: zod.string(), - write_buffer_size: zod - .number() - .default(filesCreateFilesetBodyStorageOneWriteBufferSizeDefault) - .describe('How many bytes to buffer before flushing to disk'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default(filesCreateFilesetBodyStorageTwoReadChunkSizeDefault) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod.literal('ngc').default(filesCreateFilesetBodyStorageTwoTypeDefault), - org: zod.string().describe('NGC organization name'), - team: zod.string().describe('NGC team name'), - target: zod.string().describe('NGC asset name (model or resource)'), - target_type: zod - .enum(['resource', 'model']) - .default(filesCreateFilesetBodyStorageTwoTargetTypeDefault) - .describe("Type of NGC asset: 'resource' or 'model'"), - version: zod - .string() - .optional() - .describe('NGC asset version. If not provided, defaults to latest version'), - original_version: zod - .string() - .optional() - .describe( - "The original version requested by the user before resolution (e.g., 'latest' or None). The 'version' field contains the resolved version ID." - ), - api_key_secret: zod - .string() - .regex(filesCreateFilesetBodyStorageTwoApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .describe('NGC API key secret name'), - host: zod - .string() - .default(filesCreateFilesetBodyStorageTwoHostDefault) - .describe('NGC API host URL'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default(filesCreateFilesetBodyStorageThreeReadChunkSizeDefault) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod.literal('huggingface').default(filesCreateFilesetBodyStorageThreeTypeDefault), - repo_id: zod - .string() - .describe("Huggingface repository ID (e.g., 'meta-llama\/Llama-2-7b')"), - repo_type: zod - .enum(['model', 'dataset', 'space']) - .default(filesCreateFilesetBodyStorageThreeRepoTypeDefault) - .describe("Type of Huggingface repository: 'model', 'dataset', or 'space'"), - revision: zod - .string() - .default(filesCreateFilesetBodyStorageThreeRevisionDefault) - .describe("Branch, tag, or commit SHA. Defaults to 'main'"), - original_revision: zod - .string() - .optional() - .describe( - "The original revision requested by the user before resolution (e.g., 'main'). The 'revision' field contains the resolved commit SHA." - ), - token_secret: zod - .string() - .regex(filesCreateFilesetBodyStorageThreeTokenSecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe('Huggingface API `token` secret name for private repositories'), - endpoint: zod - .string() - .default(filesCreateFilesetBodyStorageThreeEndpointDefault) - .describe('Huggingface Hub endpoint URL. Use for self-hosted instances.'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default(filesCreateFilesetBodyStorageFourReadChunkSizeDefault) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod.literal('s3').default(filesCreateFilesetBodyStorageFourTypeDefault), - bucket: zod.string().describe('S3 bucket name'), - prefix: zod - .string() - .default(filesCreateFilesetBodyStorageFourPrefixDefault) - .describe( - 'Optional prefix (folder path) within the bucket. All operations will be relative to this prefix.' - ), - region: zod - .string() - .optional() - .describe( - 'AWS region. If not specified, uses SDK default (env vars, instance metadata, etc.)' - ), - endpoint_url: zod - .string() - .optional() - .describe( - 'Custom endpoint URL for S3-compatible storage (e.g., MinIO, Garage, RustFS). If not specified, uses AWS S3.' - ), - use_sdk_auth: zod - .boolean() - .default(filesCreateFilesetBodyStorageFourUseSdkAuthDefault) - .describe( - "Use AWS SDK credential chain for authentication (env vars like AWS_ACCESS_KEY_ID, IAM roles, instance profiles, etc.). This option is only available for the platform's default storage backend. User-provided S3 storage must use explicit credentials via access_key_id_secret and secret_access_key_secret." - ), - access_key_id_secret: zod - .string() - .regex(filesCreateFilesetBodyStorageFourAccessKeyIdSecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe('Secret reference for AWS access key ID. Requires use_sdk_auth=False.'), - secret_access_key_secret: zod - .string() - .regex(filesCreateFilesetBodyStorageFourSecretAccessKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe('Secret reference for AWS secret access key. Requires use_sdk_auth=False.'), - signature_version: zod - .enum(['s3v4', 's3']) - .default(filesCreateFilesetBodyStorageFourSignatureVersionDefault) - .describe( - "AWS signature version for request signing. Use 's3' for legacy systems that only support signature v2." - ), - }), - ]) - .optional() - .describe('The storage configuration for the fileset. If not provided, uses default storage.'), - purpose: zod - .enum(['dataset', 'generic', 'model']) - .default(filesCreateFilesetBodyPurposeDefault) - .describe('The purpose of the fileset.'), - metadata: zod - .object({ - dataset: zod - .object({ - schema: zod - .union([zod.record(zod.string(), zod.unknown()), zod.string()]) - .optional() - .describe( - 'Default row schema for files in this fileset, either inline JSON Schema or a schema_defs key.' - ), - schema_defs: zod - .record(zod.string(), zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'Reusable JSON Schema definitions keyed by name for deduplicating per-file dataset schemas.' - ), - schemas_by_path: zod - .record( - zod.string(), - zod.union([zod.record(zod.string(), zod.unknown()), zod.string()]) - ) - .optional() - .describe( - 'Optional per-file row schemas keyed by relative path within the fileset. Each value may be inline JSON Schema or a schema_defs key.' - ), - }) - .optional() - .describe('Content for dataset-type filesets.'), - model: zod - .object({ - tool_calling: zod - .object({ - chat_template: zod - .string() - .optional() - .describe('Jinja2 chat template for the model.'), - tool_call_parser: zod - .string() - .optional() - .describe( - "Name of the tool call parser (e.g., 'openai', 'hermes', 'pythonic', 'llama3_json', 'mistral')." - ), - tool_call_plugin: zod - .string() - .optional() - .describe( - "Reference to a fileset containing a custom tool call plugin Python file. Expected format: '{workspace}\/{fileset_name}'." - ), - auto_tool_choice: zod - .boolean() - .optional() - .describe('Whether to enable automatic tool choice.'), - }) - .optional() - .describe( - 'Content for tool-calling configuration on model filesets.\n\nStores chat template and tool calling settings that are merged into\nthe ModelSpec during checkpoint analysis.' - ), - }) - .optional() - .describe( - 'Content for model-type filesets.\n\nContains tool calling configuration that is merged into the ModelSpec\nduring checkpoint analysis.' - ), - }) - .describe( - 'Tagged metadata container - the key indicates the type.\n\nExample:\n metadata = FilesetMetadata(\n dataset=DatasetMetadataContent(\n schema={\"columns\": [\"id\", \"name\"]},\n )\n )' - ) - .optional() - .describe('Purpose-specific metadata. Use the purpose as the key (e.g., {dataset: {...}}).'), - custom_fields: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Custom fields for the fileset.'), - cache: zod - .boolean() - .default(filesCreateFilesetBodyCacheDefault) - .describe('Cache all files after creation. Only applies to external storage.'), -}); - -export const filesCreateFilesetResponseStorageOneReadChunkSizeDefault = 1048576; -export const filesCreateFilesetResponseStorageOneTypeDefault = `local`; -export const filesCreateFilesetResponseStorageOneWriteBufferSizeDefault = 16777216; -export const filesCreateFilesetResponseStorageTwoReadChunkSizeDefault = 1048576; -export const filesCreateFilesetResponseStorageTwoTypeDefault = `ngc`; -export const filesCreateFilesetResponseStorageTwoTargetTypeDefault = `resource`; -export const filesCreateFilesetResponseStorageTwoApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const filesCreateFilesetResponseStorageTwoHostDefault = `https://api.ngc.nvidia.com`; -export const filesCreateFilesetResponseStorageThreeReadChunkSizeDefault = 1048576; -export const filesCreateFilesetResponseStorageThreeTypeDefault = `huggingface`; -export const filesCreateFilesetResponseStorageThreeRepoTypeDefault = `model`; -export const filesCreateFilesetResponseStorageThreeRevisionDefault = `main`; -export const filesCreateFilesetResponseStorageThreeTokenSecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const filesCreateFilesetResponseStorageThreeEndpointDefault = `https://huggingface.co`; -export const filesCreateFilesetResponseStorageFourReadChunkSizeDefault = 1048576; -export const filesCreateFilesetResponseStorageFourTypeDefault = `s3`; -export const filesCreateFilesetResponseStorageFourPrefixDefault = ``; -export const filesCreateFilesetResponseStorageFourUseSdkAuthDefault = false; -export const filesCreateFilesetResponseStorageFourAccessKeyIdSecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const filesCreateFilesetResponseStorageFourSecretAccessKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const filesCreateFilesetResponseStorageFourSignatureVersionDefault = `s3v4`; - -export const FilesCreateFilesetResponse = zod - .object({ - id: zod.string(), - name: zod.string(), - workspace: zod.string(), - description: zod.string(), - purpose: zod.enum(['dataset', 'generic', 'model']), - storage: zod.union([ - zod.object({ - read_chunk_size: zod - .number() - .default(filesCreateFilesetResponseStorageOneReadChunkSizeDefault) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod.literal('local').default(filesCreateFilesetResponseStorageOneTypeDefault), - path: zod.string(), - write_buffer_size: zod - .number() - .default(filesCreateFilesetResponseStorageOneWriteBufferSizeDefault) - .describe('How many bytes to buffer before flushing to disk'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default(filesCreateFilesetResponseStorageTwoReadChunkSizeDefault) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod.literal('ngc').default(filesCreateFilesetResponseStorageTwoTypeDefault), - org: zod.string().describe('NGC organization name'), - team: zod.string().describe('NGC team name'), - target: zod.string().describe('NGC asset name (model or resource)'), - target_type: zod - .enum(['resource', 'model']) - .default(filesCreateFilesetResponseStorageTwoTargetTypeDefault) - .describe("Type of NGC asset: 'resource' or 'model'"), - version: zod - .string() - .optional() - .describe('NGC asset version. If not provided, defaults to latest version'), - original_version: zod - .string() - .optional() - .describe( - "The original version requested by the user before resolution (e.g., 'latest' or None). The 'version' field contains the resolved version ID." - ), - api_key_secret: zod - .string() - .regex(filesCreateFilesetResponseStorageTwoApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .describe('NGC API key secret name'), - host: zod - .string() - .default(filesCreateFilesetResponseStorageTwoHostDefault) - .describe('NGC API host URL'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default(filesCreateFilesetResponseStorageThreeReadChunkSizeDefault) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod.literal('huggingface').default(filesCreateFilesetResponseStorageThreeTypeDefault), - repo_id: zod - .string() - .describe("Huggingface repository ID (e.g., 'meta-llama\/Llama-2-7b')"), - repo_type: zod - .enum(['model', 'dataset', 'space']) - .default(filesCreateFilesetResponseStorageThreeRepoTypeDefault) - .describe("Type of Huggingface repository: 'model', 'dataset', or 'space'"), - revision: zod - .string() - .default(filesCreateFilesetResponseStorageThreeRevisionDefault) - .describe("Branch, tag, or commit SHA. Defaults to 'main'"), - original_revision: zod - .string() - .optional() - .describe( - "The original revision requested by the user before resolution (e.g., 'main'). The 'revision' field contains the resolved commit SHA." - ), - token_secret: zod - .string() - .regex(filesCreateFilesetResponseStorageThreeTokenSecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe('Huggingface API `token` secret name for private repositories'), - endpoint: zod - .string() - .default(filesCreateFilesetResponseStorageThreeEndpointDefault) - .describe('Huggingface Hub endpoint URL. Use for self-hosted instances.'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default(filesCreateFilesetResponseStorageFourReadChunkSizeDefault) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod.literal('s3').default(filesCreateFilesetResponseStorageFourTypeDefault), - bucket: zod.string().describe('S3 bucket name'), - prefix: zod - .string() - .default(filesCreateFilesetResponseStorageFourPrefixDefault) - .describe( - 'Optional prefix (folder path) within the bucket. All operations will be relative to this prefix.' - ), - region: zod - .string() - .optional() - .describe( - 'AWS region. If not specified, uses SDK default (env vars, instance metadata, etc.)' - ), - endpoint_url: zod - .string() - .optional() - .describe( - 'Custom endpoint URL for S3-compatible storage (e.g., MinIO, Garage, RustFS). If not specified, uses AWS S3.' - ), - use_sdk_auth: zod - .boolean() - .default(filesCreateFilesetResponseStorageFourUseSdkAuthDefault) - .describe( - "Use AWS SDK credential chain for authentication (env vars like AWS_ACCESS_KEY_ID, IAM roles, instance profiles, etc.). This option is only available for the platform's default storage backend. User-provided S3 storage must use explicit credentials via access_key_id_secret and secret_access_key_secret." - ), - access_key_id_secret: zod - .string() - .regex(filesCreateFilesetResponseStorageFourAccessKeyIdSecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe('Secret reference for AWS access key ID. Requires use_sdk_auth=False.'), - secret_access_key_secret: zod - .string() - .regex(filesCreateFilesetResponseStorageFourSecretAccessKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe('Secret reference for AWS secret access key. Requires use_sdk_auth=False.'), - signature_version: zod - .enum(['s3v4', 's3']) - .default(filesCreateFilesetResponseStorageFourSignatureVersionDefault) - .describe( - "AWS signature version for request signing. Use 's3' for legacy systems that only support signature v2." - ), - }), - ]), - metadata: zod - .object({ - dataset: zod - .object({ - schema: zod - .union([zod.record(zod.string(), zod.unknown()), zod.string()]) - .optional() - .describe( - 'Default row schema for files in this fileset, either inline JSON Schema or a schema_defs key.' - ), - schema_defs: zod - .record(zod.string(), zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'Reusable JSON Schema definitions keyed by name for deduplicating per-file dataset schemas.' - ), - schemas_by_path: zod - .record( - zod.string(), - zod.union([zod.record(zod.string(), zod.unknown()), zod.string()]) - ) - .optional() - .describe( - 'Optional per-file row schemas keyed by relative path within the fileset. Each value may be inline JSON Schema or a schema_defs key.' - ), - }) - .optional() - .describe('Content for dataset-type filesets.'), - model: zod - .object({ - tool_calling: zod - .object({ - chat_template: zod - .string() - .optional() - .describe('Jinja2 chat template for the model.'), - tool_call_parser: zod - .string() - .optional() - .describe( - "Name of the tool call parser (e.g., 'openai', 'hermes', 'pythonic', 'llama3_json', 'mistral')." - ), - tool_call_plugin: zod - .string() - .optional() - .describe( - "Reference to a fileset containing a custom tool call plugin Python file. Expected format: '{workspace}\/{fileset_name}'." - ), - auto_tool_choice: zod - .boolean() - .optional() - .describe('Whether to enable automatic tool choice.'), - }) - .optional() - .describe( - 'Content for tool-calling configuration on model filesets.\n\nStores chat template and tool calling settings that are merged into\nthe ModelSpec during checkpoint analysis.' - ), - }) - .optional() - .describe( - 'Content for model-type filesets.\n\nContains tool calling configuration that is merged into the ModelSpec\nduring checkpoint analysis.' - ), - }) - .describe( - 'Tagged metadata container - the key indicates the type.\n\nExample:\n metadata = FilesetMetadata(\n dataset=DatasetMetadataContent(\n schema={\"columns\": [\"id\", \"name\"]},\n )\n )' - ), - custom_fields: zod.record(zod.string(), zod.unknown()), - project: zod.string(), - created_at: zod.string(), - updated_at: zod.string(), - }) - .describe('Response DTO for fileset operations.'); - -/** - * List Filesets endpoint with filtering and pagination. - -Supports filtering by name, description, purpose, storage_type, created_at, and updated_at via query parameters. -Returns paginated results with sorting options. - * @summary List Filesets - */ -export const FilesListFilesetsParams = zod.object({ - workspace: zod.string(), -}); - -export const filesListFilesetsQueryPageDefault = 1; - -export const filesListFilesetsQueryPageSizeDefault = 10; -export const filesListFilesetsQueryPageSizeMax = 100; - -export const filesListFilesetsQuerySortDefault = `-created_at`; - -export const FilesListFilesetsQueryParams = zod.object({ - page: zod.number().min(1).default(filesListFilesetsQueryPageDefault).describe('Page number.'), - page_size: zod - .number() - .min(1) - .max(filesListFilesetsQueryPageSizeMax) - .default(filesListFilesetsQueryPageSizeDefault) - .describe('Page size.'), - sort: zod - .enum(['created_at', '-created_at', 'name', '-name']) - .default(filesListFilesetsQuerySortDefault) - .describe( - 'The field to sort by. To sort in decreasing order, use `-` in front of the field name.' - ), - filter: zod - .object({ - name: zod.string().optional().describe('Filter by fileset name.'), - description: zod.string().optional().describe('Filter by fileset description.'), - purpose: zod - .enum(['dataset', 'generic', 'model']) - .optional() - .describe("Filter by the purpose of the fileset (e.g., 'dataset', 'generic')."), - storage_type: zod - .enum(['local', 'ngc', 'huggingface', 's3']) - .optional() - .describe("Filter by the storage backend type (e.g., 'local', 'ngc')."), - created_at: zod - .object({ - $gte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results greater than or equal to this datetime.'), - $lte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results less than or equal to this datetime.'), - }) - .optional() - .describe( - "Filter by creation date. Supports '$gte' (on or after) and '$lte' (on or before) datetime filters." - ), - updated_at: zod - .object({ - $gte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results greater than or equal to this datetime.'), - $lte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results less than or equal to this datetime.'), - }) - .optional() - .describe( - "Filter by update date. Supports '$gte' (on or after) and '$lte' (on or before) datetime filters." - ), - }) - .optional() - .describe( - 'Filter filesets by name, description, purpose, storage_type, created_at, and updated_at.' - ), -}); - -export const filesListFilesetsResponseDataItemStorageOneReadChunkSizeDefault = 1048576; -export const filesListFilesetsResponseDataItemStorageOneTypeDefault = `local`; -export const filesListFilesetsResponseDataItemStorageOneWriteBufferSizeDefault = 16777216; -export const filesListFilesetsResponseDataItemStorageTwoReadChunkSizeDefault = 1048576; -export const filesListFilesetsResponseDataItemStorageTwoTypeDefault = `ngc`; -export const filesListFilesetsResponseDataItemStorageTwoTargetTypeDefault = `resource`; -export const filesListFilesetsResponseDataItemStorageTwoApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const filesListFilesetsResponseDataItemStorageTwoHostDefault = `https://api.ngc.nvidia.com`; -export const filesListFilesetsResponseDataItemStorageThreeReadChunkSizeDefault = 1048576; -export const filesListFilesetsResponseDataItemStorageThreeTypeDefault = `huggingface`; -export const filesListFilesetsResponseDataItemStorageThreeRepoTypeDefault = `model`; -export const filesListFilesetsResponseDataItemStorageThreeRevisionDefault = `main`; -export const filesListFilesetsResponseDataItemStorageThreeTokenSecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const filesListFilesetsResponseDataItemStorageThreeEndpointDefault = `https://huggingface.co`; -export const filesListFilesetsResponseDataItemStorageFourReadChunkSizeDefault = 1048576; -export const filesListFilesetsResponseDataItemStorageFourTypeDefault = `s3`; -export const filesListFilesetsResponseDataItemStorageFourPrefixDefault = ``; -export const filesListFilesetsResponseDataItemStorageFourUseSdkAuthDefault = false; -export const filesListFilesetsResponseDataItemStorageFourAccessKeyIdSecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const filesListFilesetsResponseDataItemStorageFourSecretAccessKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const filesListFilesetsResponseDataItemStorageFourSignatureVersionDefault = `s3v4`; - -export const FilesListFilesetsResponse = zod.object({ - data: zod.array( - zod - .object({ - id: zod.string(), - name: zod.string(), - workspace: zod.string(), - description: zod.string(), - purpose: zod.enum(['dataset', 'generic', 'model']), - storage: zod.union([ - zod.object({ - read_chunk_size: zod - .number() - .default(filesListFilesetsResponseDataItemStorageOneReadChunkSizeDefault) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('local') - .default(filesListFilesetsResponseDataItemStorageOneTypeDefault), - path: zod.string(), - write_buffer_size: zod - .number() - .default(filesListFilesetsResponseDataItemStorageOneWriteBufferSizeDefault) - .describe('How many bytes to buffer before flushing to disk'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default(filesListFilesetsResponseDataItemStorageTwoReadChunkSizeDefault) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('ngc') - .default(filesListFilesetsResponseDataItemStorageTwoTypeDefault), - org: zod.string().describe('NGC organization name'), - team: zod.string().describe('NGC team name'), - target: zod.string().describe('NGC asset name (model or resource)'), - target_type: zod - .enum(['resource', 'model']) - .default(filesListFilesetsResponseDataItemStorageTwoTargetTypeDefault) - .describe("Type of NGC asset: 'resource' or 'model'"), - version: zod - .string() - .optional() - .describe('NGC asset version. If not provided, defaults to latest version'), - original_version: zod - .string() - .optional() - .describe( - "The original version requested by the user before resolution (e.g., 'latest' or None). The 'version' field contains the resolved version ID." - ), - api_key_secret: zod - .string() - .regex(filesListFilesetsResponseDataItemStorageTwoApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .describe('NGC API key secret name'), - host: zod - .string() - .default(filesListFilesetsResponseDataItemStorageTwoHostDefault) - .describe('NGC API host URL'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default(filesListFilesetsResponseDataItemStorageThreeReadChunkSizeDefault) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('huggingface') - .default(filesListFilesetsResponseDataItemStorageThreeTypeDefault), - repo_id: zod - .string() - .describe("Huggingface repository ID (e.g., 'meta-llama\/Llama-2-7b')"), - repo_type: zod - .enum(['model', 'dataset', 'space']) - .default(filesListFilesetsResponseDataItemStorageThreeRepoTypeDefault) - .describe("Type of Huggingface repository: 'model', 'dataset', or 'space'"), - revision: zod - .string() - .default(filesListFilesetsResponseDataItemStorageThreeRevisionDefault) - .describe("Branch, tag, or commit SHA. Defaults to 'main'"), - original_revision: zod - .string() - .optional() - .describe( - "The original revision requested by the user before resolution (e.g., 'main'). The 'revision' field contains the resolved commit SHA." - ), - token_secret: zod - .string() - .regex(filesListFilesetsResponseDataItemStorageThreeTokenSecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe('Huggingface API `token` secret name for private repositories'), - endpoint: zod - .string() - .default(filesListFilesetsResponseDataItemStorageThreeEndpointDefault) - .describe('Huggingface Hub endpoint URL. Use for self-hosted instances.'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default(filesListFilesetsResponseDataItemStorageFourReadChunkSizeDefault) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('s3') - .default(filesListFilesetsResponseDataItemStorageFourTypeDefault), - bucket: zod.string().describe('S3 bucket name'), - prefix: zod - .string() - .default(filesListFilesetsResponseDataItemStorageFourPrefixDefault) - .describe( - 'Optional prefix (folder path) within the bucket. All operations will be relative to this prefix.' - ), - region: zod - .string() - .optional() - .describe( - 'AWS region. If not specified, uses SDK default (env vars, instance metadata, etc.)' - ), - endpoint_url: zod - .string() - .optional() - .describe( - 'Custom endpoint URL for S3-compatible storage (e.g., MinIO, Garage, RustFS). If not specified, uses AWS S3.' - ), - use_sdk_auth: zod - .boolean() - .default(filesListFilesetsResponseDataItemStorageFourUseSdkAuthDefault) - .describe( - "Use AWS SDK credential chain for authentication (env vars like AWS_ACCESS_KEY_ID, IAM roles, instance profiles, etc.). This option is only available for the platform's default storage backend. User-provided S3 storage must use explicit credentials via access_key_id_secret and secret_access_key_secret." - ), - access_key_id_secret: zod - .string() - .regex(filesListFilesetsResponseDataItemStorageFourAccessKeyIdSecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe('Secret reference for AWS access key ID. Requires use_sdk_auth=False.'), - secret_access_key_secret: zod - .string() - .regex(filesListFilesetsResponseDataItemStorageFourSecretAccessKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe('Secret reference for AWS secret access key. Requires use_sdk_auth=False.'), - signature_version: zod - .enum(['s3v4', 's3']) - .default(filesListFilesetsResponseDataItemStorageFourSignatureVersionDefault) - .describe( - "AWS signature version for request signing. Use 's3' for legacy systems that only support signature v2." - ), - }), - ]), - metadata: zod - .object({ - dataset: zod - .object({ - schema: zod - .union([zod.record(zod.string(), zod.unknown()), zod.string()]) - .optional() - .describe( - 'Default row schema for files in this fileset, either inline JSON Schema or a schema_defs key.' - ), - schema_defs: zod - .record(zod.string(), zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'Reusable JSON Schema definitions keyed by name for deduplicating per-file dataset schemas.' - ), - schemas_by_path: zod - .record( - zod.string(), - zod.union([zod.record(zod.string(), zod.unknown()), zod.string()]) - ) - .optional() - .describe( - 'Optional per-file row schemas keyed by relative path within the fileset. Each value may be inline JSON Schema or a schema_defs key.' - ), - }) - .optional() - .describe('Content for dataset-type filesets.'), - model: zod - .object({ - tool_calling: zod - .object({ - chat_template: zod - .string() - .optional() - .describe('Jinja2 chat template for the model.'), - tool_call_parser: zod - .string() - .optional() - .describe( - "Name of the tool call parser (e.g., 'openai', 'hermes', 'pythonic', 'llama3_json', 'mistral')." - ), - tool_call_plugin: zod - .string() - .optional() - .describe( - "Reference to a fileset containing a custom tool call plugin Python file. Expected format: '{workspace}\/{fileset_name}'." - ), - auto_tool_choice: zod - .boolean() - .optional() - .describe('Whether to enable automatic tool choice.'), - }) - .optional() - .describe( - 'Content for tool-calling configuration on model filesets.\n\nStores chat template and tool calling settings that are merged into\nthe ModelSpec during checkpoint analysis.' - ), - }) - .optional() - .describe( - 'Content for model-type filesets.\n\nContains tool calling configuration that is merged into the ModelSpec\nduring checkpoint analysis.' - ), - }) - .describe( - 'Tagged metadata container - the key indicates the type.\n\nExample:\n metadata = FilesetMetadata(\n dataset=DatasetMetadataContent(\n schema={\"columns\": [\"id\", \"name\"]},\n )\n )' - ), - custom_fields: zod.record(zod.string(), zod.unknown()), - project: zod.string(), - created_at: zod.string(), - updated_at: zod.string(), - }) - .describe('Response DTO for fileset operations.') - ), - pagination: zod - .object({ - page: zod.number().describe('The current page number.'), - page_size: zod.number().describe('The page size used for the query.'), - current_page_size: zod.number().describe('The size for the current page.'), - total_pages: zod.number().describe('The total number of pages.'), - total_results: zod.number().describe('The total number of results.'), - }) - .optional() - .describe('Pagination information.'), - sort: zod.string().optional().describe('The field on which the results are sorted.'), - filter: zod.record(zod.string(), zod.unknown()).optional().describe('Filtering information.'), -}); - -/** - * Get Fileset by Workspace and Name. - -Returns the details of a specific fileset identified by its workspace and name. - * @summary Get Fileset by Workspace and Name - */ -export const FilesRetrieveFilesetParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const filesRetrieveFilesetResponseStorageOneReadChunkSizeDefault = 1048576; -export const filesRetrieveFilesetResponseStorageOneTypeDefault = `local`; -export const filesRetrieveFilesetResponseStorageOneWriteBufferSizeDefault = 16777216; -export const filesRetrieveFilesetResponseStorageTwoReadChunkSizeDefault = 1048576; -export const filesRetrieveFilesetResponseStorageTwoTypeDefault = `ngc`; -export const filesRetrieveFilesetResponseStorageTwoTargetTypeDefault = `resource`; -export const filesRetrieveFilesetResponseStorageTwoApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const filesRetrieveFilesetResponseStorageTwoHostDefault = `https://api.ngc.nvidia.com`; -export const filesRetrieveFilesetResponseStorageThreeReadChunkSizeDefault = 1048576; -export const filesRetrieveFilesetResponseStorageThreeTypeDefault = `huggingface`; -export const filesRetrieveFilesetResponseStorageThreeRepoTypeDefault = `model`; -export const filesRetrieveFilesetResponseStorageThreeRevisionDefault = `main`; -export const filesRetrieveFilesetResponseStorageThreeTokenSecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const filesRetrieveFilesetResponseStorageThreeEndpointDefault = `https://huggingface.co`; -export const filesRetrieveFilesetResponseStorageFourReadChunkSizeDefault = 1048576; -export const filesRetrieveFilesetResponseStorageFourTypeDefault = `s3`; -export const filesRetrieveFilesetResponseStorageFourPrefixDefault = ``; -export const filesRetrieveFilesetResponseStorageFourUseSdkAuthDefault = false; -export const filesRetrieveFilesetResponseStorageFourAccessKeyIdSecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const filesRetrieveFilesetResponseStorageFourSecretAccessKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const filesRetrieveFilesetResponseStorageFourSignatureVersionDefault = `s3v4`; - -export const FilesRetrieveFilesetResponse = zod - .object({ - id: zod.string(), - name: zod.string(), - workspace: zod.string(), - description: zod.string(), - purpose: zod.enum(['dataset', 'generic', 'model']), - storage: zod.union([ - zod.object({ - read_chunk_size: zod - .number() - .default(filesRetrieveFilesetResponseStorageOneReadChunkSizeDefault) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod.literal('local').default(filesRetrieveFilesetResponseStorageOneTypeDefault), - path: zod.string(), - write_buffer_size: zod - .number() - .default(filesRetrieveFilesetResponseStorageOneWriteBufferSizeDefault) - .describe('How many bytes to buffer before flushing to disk'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default(filesRetrieveFilesetResponseStorageTwoReadChunkSizeDefault) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod.literal('ngc').default(filesRetrieveFilesetResponseStorageTwoTypeDefault), - org: zod.string().describe('NGC organization name'), - team: zod.string().describe('NGC team name'), - target: zod.string().describe('NGC asset name (model or resource)'), - target_type: zod - .enum(['resource', 'model']) - .default(filesRetrieveFilesetResponseStorageTwoTargetTypeDefault) - .describe("Type of NGC asset: 'resource' or 'model'"), - version: zod - .string() - .optional() - .describe('NGC asset version. If not provided, defaults to latest version'), - original_version: zod - .string() - .optional() - .describe( - "The original version requested by the user before resolution (e.g., 'latest' or None). The 'version' field contains the resolved version ID." - ), - api_key_secret: zod - .string() - .regex(filesRetrieveFilesetResponseStorageTwoApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .describe('NGC API key secret name'), - host: zod - .string() - .default(filesRetrieveFilesetResponseStorageTwoHostDefault) - .describe('NGC API host URL'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default(filesRetrieveFilesetResponseStorageThreeReadChunkSizeDefault) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('huggingface') - .default(filesRetrieveFilesetResponseStorageThreeTypeDefault), - repo_id: zod - .string() - .describe("Huggingface repository ID (e.g., 'meta-llama\/Llama-2-7b')"), - repo_type: zod - .enum(['model', 'dataset', 'space']) - .default(filesRetrieveFilesetResponseStorageThreeRepoTypeDefault) - .describe("Type of Huggingface repository: 'model', 'dataset', or 'space'"), - revision: zod - .string() - .default(filesRetrieveFilesetResponseStorageThreeRevisionDefault) - .describe("Branch, tag, or commit SHA. Defaults to 'main'"), - original_revision: zod - .string() - .optional() - .describe( - "The original revision requested by the user before resolution (e.g., 'main'). The 'revision' field contains the resolved commit SHA." - ), - token_secret: zod - .string() - .regex(filesRetrieveFilesetResponseStorageThreeTokenSecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe('Huggingface API `token` secret name for private repositories'), - endpoint: zod - .string() - .default(filesRetrieveFilesetResponseStorageThreeEndpointDefault) - .describe('Huggingface Hub endpoint URL. Use for self-hosted instances.'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default(filesRetrieveFilesetResponseStorageFourReadChunkSizeDefault) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod.literal('s3').default(filesRetrieveFilesetResponseStorageFourTypeDefault), - bucket: zod.string().describe('S3 bucket name'), - prefix: zod - .string() - .default(filesRetrieveFilesetResponseStorageFourPrefixDefault) - .describe( - 'Optional prefix (folder path) within the bucket. All operations will be relative to this prefix.' - ), - region: zod - .string() - .optional() - .describe( - 'AWS region. If not specified, uses SDK default (env vars, instance metadata, etc.)' - ), - endpoint_url: zod - .string() - .optional() - .describe( - 'Custom endpoint URL for S3-compatible storage (e.g., MinIO, Garage, RustFS). If not specified, uses AWS S3.' - ), - use_sdk_auth: zod - .boolean() - .default(filesRetrieveFilesetResponseStorageFourUseSdkAuthDefault) - .describe( - "Use AWS SDK credential chain for authentication (env vars like AWS_ACCESS_KEY_ID, IAM roles, instance profiles, etc.). This option is only available for the platform's default storage backend. User-provided S3 storage must use explicit credentials via access_key_id_secret and secret_access_key_secret." - ), - access_key_id_secret: zod - .string() - .regex(filesRetrieveFilesetResponseStorageFourAccessKeyIdSecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe('Secret reference for AWS access key ID. Requires use_sdk_auth=False.'), - secret_access_key_secret: zod - .string() - .regex(filesRetrieveFilesetResponseStorageFourSecretAccessKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe('Secret reference for AWS secret access key. Requires use_sdk_auth=False.'), - signature_version: zod - .enum(['s3v4', 's3']) - .default(filesRetrieveFilesetResponseStorageFourSignatureVersionDefault) - .describe( - "AWS signature version for request signing. Use 's3' for legacy systems that only support signature v2." - ), - }), - ]), - metadata: zod - .object({ - dataset: zod - .object({ - schema: zod - .union([zod.record(zod.string(), zod.unknown()), zod.string()]) - .optional() - .describe( - 'Default row schema for files in this fileset, either inline JSON Schema or a schema_defs key.' - ), - schema_defs: zod - .record(zod.string(), zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'Reusable JSON Schema definitions keyed by name for deduplicating per-file dataset schemas.' - ), - schemas_by_path: zod - .record( - zod.string(), - zod.union([zod.record(zod.string(), zod.unknown()), zod.string()]) - ) - .optional() - .describe( - 'Optional per-file row schemas keyed by relative path within the fileset. Each value may be inline JSON Schema or a schema_defs key.' - ), - }) - .optional() - .describe('Content for dataset-type filesets.'), - model: zod - .object({ - tool_calling: zod - .object({ - chat_template: zod - .string() - .optional() - .describe('Jinja2 chat template for the model.'), - tool_call_parser: zod - .string() - .optional() - .describe( - "Name of the tool call parser (e.g., 'openai', 'hermes', 'pythonic', 'llama3_json', 'mistral')." - ), - tool_call_plugin: zod - .string() - .optional() - .describe( - "Reference to a fileset containing a custom tool call plugin Python file. Expected format: '{workspace}\/{fileset_name}'." - ), - auto_tool_choice: zod - .boolean() - .optional() - .describe('Whether to enable automatic tool choice.'), - }) - .optional() - .describe( - 'Content for tool-calling configuration on model filesets.\n\nStores chat template and tool calling settings that are merged into\nthe ModelSpec during checkpoint analysis.' - ), - }) - .optional() - .describe( - 'Content for model-type filesets.\n\nContains tool calling configuration that is merged into the ModelSpec\nduring checkpoint analysis.' - ), - }) - .describe( - 'Tagged metadata container - the key indicates the type.\n\nExample:\n metadata = FilesetMetadata(\n dataset=DatasetMetadataContent(\n schema={\"columns\": [\"id\", \"name\"]},\n )\n )' - ), - custom_fields: zod.record(zod.string(), zod.unknown()), - project: zod.string(), - created_at: zod.string(), - updated_at: zod.string(), - }) - .describe('Response DTO for fileset operations.'); - -/** - * Delete Fileset. - -Permanently deletes a fileset from the platform. -Returns metadata about the deleted fileset. -For local storage backends, this also deletes the underlying files. - * @summary Delete Fileset - */ -export const FilesDeleteFilesetParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const filesDeleteFilesetResponseStorageOneReadChunkSizeDefault = 1048576; -export const filesDeleteFilesetResponseStorageOneTypeDefault = `local`; -export const filesDeleteFilesetResponseStorageOneWriteBufferSizeDefault = 16777216; -export const filesDeleteFilesetResponseStorageTwoReadChunkSizeDefault = 1048576; -export const filesDeleteFilesetResponseStorageTwoTypeDefault = `ngc`; -export const filesDeleteFilesetResponseStorageTwoTargetTypeDefault = `resource`; -export const filesDeleteFilesetResponseStorageTwoApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const filesDeleteFilesetResponseStorageTwoHostDefault = `https://api.ngc.nvidia.com`; -export const filesDeleteFilesetResponseStorageThreeReadChunkSizeDefault = 1048576; -export const filesDeleteFilesetResponseStorageThreeTypeDefault = `huggingface`; -export const filesDeleteFilesetResponseStorageThreeRepoTypeDefault = `model`; -export const filesDeleteFilesetResponseStorageThreeRevisionDefault = `main`; -export const filesDeleteFilesetResponseStorageThreeTokenSecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const filesDeleteFilesetResponseStorageThreeEndpointDefault = `https://huggingface.co`; -export const filesDeleteFilesetResponseStorageFourReadChunkSizeDefault = 1048576; -export const filesDeleteFilesetResponseStorageFourTypeDefault = `s3`; -export const filesDeleteFilesetResponseStorageFourPrefixDefault = ``; -export const filesDeleteFilesetResponseStorageFourUseSdkAuthDefault = false; -export const filesDeleteFilesetResponseStorageFourAccessKeyIdSecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const filesDeleteFilesetResponseStorageFourSecretAccessKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const filesDeleteFilesetResponseStorageFourSignatureVersionDefault = `s3v4`; - -export const FilesDeleteFilesetResponse = zod - .object({ - id: zod.string(), - name: zod.string(), - workspace: zod.string(), - description: zod.string(), - purpose: zod.enum(['dataset', 'generic', 'model']), - storage: zod.union([ - zod.object({ - read_chunk_size: zod - .number() - .default(filesDeleteFilesetResponseStorageOneReadChunkSizeDefault) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod.literal('local').default(filesDeleteFilesetResponseStorageOneTypeDefault), - path: zod.string(), - write_buffer_size: zod - .number() - .default(filesDeleteFilesetResponseStorageOneWriteBufferSizeDefault) - .describe('How many bytes to buffer before flushing to disk'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default(filesDeleteFilesetResponseStorageTwoReadChunkSizeDefault) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod.literal('ngc').default(filesDeleteFilesetResponseStorageTwoTypeDefault), - org: zod.string().describe('NGC organization name'), - team: zod.string().describe('NGC team name'), - target: zod.string().describe('NGC asset name (model or resource)'), - target_type: zod - .enum(['resource', 'model']) - .default(filesDeleteFilesetResponseStorageTwoTargetTypeDefault) - .describe("Type of NGC asset: 'resource' or 'model'"), - version: zod - .string() - .optional() - .describe('NGC asset version. If not provided, defaults to latest version'), - original_version: zod - .string() - .optional() - .describe( - "The original version requested by the user before resolution (e.g., 'latest' or None). The 'version' field contains the resolved version ID." - ), - api_key_secret: zod - .string() - .regex(filesDeleteFilesetResponseStorageTwoApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .describe('NGC API key secret name'), - host: zod - .string() - .default(filesDeleteFilesetResponseStorageTwoHostDefault) - .describe('NGC API host URL'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default(filesDeleteFilesetResponseStorageThreeReadChunkSizeDefault) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod.literal('huggingface').default(filesDeleteFilesetResponseStorageThreeTypeDefault), - repo_id: zod - .string() - .describe("Huggingface repository ID (e.g., 'meta-llama\/Llama-2-7b')"), - repo_type: zod - .enum(['model', 'dataset', 'space']) - .default(filesDeleteFilesetResponseStorageThreeRepoTypeDefault) - .describe("Type of Huggingface repository: 'model', 'dataset', or 'space'"), - revision: zod - .string() - .default(filesDeleteFilesetResponseStorageThreeRevisionDefault) - .describe("Branch, tag, or commit SHA. Defaults to 'main'"), - original_revision: zod - .string() - .optional() - .describe( - "The original revision requested by the user before resolution (e.g., 'main'). The 'revision' field contains the resolved commit SHA." - ), - token_secret: zod - .string() - .regex(filesDeleteFilesetResponseStorageThreeTokenSecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe('Huggingface API `token` secret name for private repositories'), - endpoint: zod - .string() - .default(filesDeleteFilesetResponseStorageThreeEndpointDefault) - .describe('Huggingface Hub endpoint URL. Use for self-hosted instances.'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default(filesDeleteFilesetResponseStorageFourReadChunkSizeDefault) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod.literal('s3').default(filesDeleteFilesetResponseStorageFourTypeDefault), - bucket: zod.string().describe('S3 bucket name'), - prefix: zod - .string() - .default(filesDeleteFilesetResponseStorageFourPrefixDefault) - .describe( - 'Optional prefix (folder path) within the bucket. All operations will be relative to this prefix.' - ), - region: zod - .string() - .optional() - .describe( - 'AWS region. If not specified, uses SDK default (env vars, instance metadata, etc.)' - ), - endpoint_url: zod - .string() - .optional() - .describe( - 'Custom endpoint URL for S3-compatible storage (e.g., MinIO, Garage, RustFS). If not specified, uses AWS S3.' - ), - use_sdk_auth: zod - .boolean() - .default(filesDeleteFilesetResponseStorageFourUseSdkAuthDefault) - .describe( - "Use AWS SDK credential chain for authentication (env vars like AWS_ACCESS_KEY_ID, IAM roles, instance profiles, etc.). This option is only available for the platform's default storage backend. User-provided S3 storage must use explicit credentials via access_key_id_secret and secret_access_key_secret." - ), - access_key_id_secret: zod - .string() - .regex(filesDeleteFilesetResponseStorageFourAccessKeyIdSecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe('Secret reference for AWS access key ID. Requires use_sdk_auth=False.'), - secret_access_key_secret: zod - .string() - .regex(filesDeleteFilesetResponseStorageFourSecretAccessKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe('Secret reference for AWS secret access key. Requires use_sdk_auth=False.'), - signature_version: zod - .enum(['s3v4', 's3']) - .default(filesDeleteFilesetResponseStorageFourSignatureVersionDefault) - .describe( - "AWS signature version for request signing. Use 's3' for legacy systems that only support signature v2." - ), - }), - ]), - metadata: zod - .object({ - dataset: zod - .object({ - schema: zod - .union([zod.record(zod.string(), zod.unknown()), zod.string()]) - .optional() - .describe( - 'Default row schema for files in this fileset, either inline JSON Schema or a schema_defs key.' - ), - schema_defs: zod - .record(zod.string(), zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'Reusable JSON Schema definitions keyed by name for deduplicating per-file dataset schemas.' - ), - schemas_by_path: zod - .record( - zod.string(), - zod.union([zod.record(zod.string(), zod.unknown()), zod.string()]) - ) - .optional() - .describe( - 'Optional per-file row schemas keyed by relative path within the fileset. Each value may be inline JSON Schema or a schema_defs key.' - ), - }) - .optional() - .describe('Content for dataset-type filesets.'), - model: zod - .object({ - tool_calling: zod - .object({ - chat_template: zod - .string() - .optional() - .describe('Jinja2 chat template for the model.'), - tool_call_parser: zod - .string() - .optional() - .describe( - "Name of the tool call parser (e.g., 'openai', 'hermes', 'pythonic', 'llama3_json', 'mistral')." - ), - tool_call_plugin: zod - .string() - .optional() - .describe( - "Reference to a fileset containing a custom tool call plugin Python file. Expected format: '{workspace}\/{fileset_name}'." - ), - auto_tool_choice: zod - .boolean() - .optional() - .describe('Whether to enable automatic tool choice.'), - }) - .optional() - .describe( - 'Content for tool-calling configuration on model filesets.\n\nStores chat template and tool calling settings that are merged into\nthe ModelSpec during checkpoint analysis.' - ), - }) - .optional() - .describe( - 'Content for model-type filesets.\n\nContains tool calling configuration that is merged into the ModelSpec\nduring checkpoint analysis.' - ), - }) - .describe( - 'Tagged metadata container - the key indicates the type.\n\nExample:\n metadata = FilesetMetadata(\n dataset=DatasetMetadataContent(\n schema={\"columns\": [\"id\", \"name\"]},\n )\n )' - ), - custom_fields: zod.record(zod.string(), zod.unknown()), - project: zod.string(), - created_at: zod.string(), - updated_at: zod.string(), - }) - .describe('Response DTO for fileset operations.'); - -/** - * Update Fileset Metadata. - * @summary Update Fileset Metadata - */ -export const FilesUpdateFilesetMetadataParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const filesUpdateFilesetMetadataBodyDescriptionMax = 255; - -export const FilesUpdateFilesetMetadataBody = zod.object({ - description: zod - .string() - .max(filesUpdateFilesetMetadataBodyDescriptionMax) - .optional() - .describe('The description of the fileset.'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this fileset.'), - purpose: zod - .enum(['dataset', 'generic', 'model']) - .optional() - .describe('The purpose of the fileset.'), - metadata: zod - .object({ - dataset: zod - .object({ - schema: zod - .union([zod.record(zod.string(), zod.unknown()), zod.string()]) - .optional() - .describe( - 'Default row schema for files in this fileset, either inline JSON Schema or a schema_defs key.' - ), - schema_defs: zod - .record(zod.string(), zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'Reusable JSON Schema definitions keyed by name for deduplicating per-file dataset schemas.' - ), - schemas_by_path: zod - .record( - zod.string(), - zod.union([zod.record(zod.string(), zod.unknown()), zod.string()]) - ) - .optional() - .describe( - 'Optional per-file row schemas keyed by relative path within the fileset. Each value may be inline JSON Schema or a schema_defs key.' - ), - }) - .optional() - .describe('Content for dataset-type filesets.'), - model: zod - .object({ - tool_calling: zod - .object({ - chat_template: zod - .string() - .optional() - .describe('Jinja2 chat template for the model.'), - tool_call_parser: zod - .string() - .optional() - .describe( - "Name of the tool call parser (e.g., 'openai', 'hermes', 'pythonic', 'llama3_json', 'mistral')." - ), - tool_call_plugin: zod - .string() - .optional() - .describe( - "Reference to a fileset containing a custom tool call plugin Python file. Expected format: '{workspace}\/{fileset_name}'." - ), - auto_tool_choice: zod - .boolean() - .optional() - .describe('Whether to enable automatic tool choice.'), - }) - .optional() - .describe( - 'Content for tool-calling configuration on model filesets.\n\nStores chat template and tool calling settings that are merged into\nthe ModelSpec during checkpoint analysis.' - ), - }) - .optional() - .describe( - 'Content for model-type filesets.\n\nContains tool calling configuration that is merged into the ModelSpec\nduring checkpoint analysis.' - ), - }) - .describe( - 'Tagged metadata container - the key indicates the type.\n\nExample:\n metadata = FilesetMetadata(\n dataset=DatasetMetadataContent(\n schema={\"columns\": [\"id\", \"name\"]},\n )\n )' - ) - .optional() - .describe('Purpose-specific metadata. Use the purpose as the key (e.g., {dataset: {...}}).'), - custom_fields: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Custom fields for the fileset.'), -}); - -export const filesUpdateFilesetMetadataResponseStorageOneReadChunkSizeDefault = 1048576; -export const filesUpdateFilesetMetadataResponseStorageOneTypeDefault = `local`; -export const filesUpdateFilesetMetadataResponseStorageOneWriteBufferSizeDefault = 16777216; -export const filesUpdateFilesetMetadataResponseStorageTwoReadChunkSizeDefault = 1048576; -export const filesUpdateFilesetMetadataResponseStorageTwoTypeDefault = `ngc`; -export const filesUpdateFilesetMetadataResponseStorageTwoTargetTypeDefault = `resource`; -export const filesUpdateFilesetMetadataResponseStorageTwoApiKeySecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const filesUpdateFilesetMetadataResponseStorageTwoHostDefault = `https://api.ngc.nvidia.com`; -export const filesUpdateFilesetMetadataResponseStorageThreeReadChunkSizeDefault = 1048576; -export const filesUpdateFilesetMetadataResponseStorageThreeTypeDefault = `huggingface`; -export const filesUpdateFilesetMetadataResponseStorageThreeRepoTypeDefault = `model`; -export const filesUpdateFilesetMetadataResponseStorageThreeRevisionDefault = `main`; -export const filesUpdateFilesetMetadataResponseStorageThreeTokenSecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const filesUpdateFilesetMetadataResponseStorageThreeEndpointDefault = `https://huggingface.co`; -export const filesUpdateFilesetMetadataResponseStorageFourReadChunkSizeDefault = 1048576; -export const filesUpdateFilesetMetadataResponseStorageFourTypeDefault = `s3`; -export const filesUpdateFilesetMetadataResponseStorageFourPrefixDefault = ``; -export const filesUpdateFilesetMetadataResponseStorageFourUseSdkAuthDefault = false; -export const filesUpdateFilesetMetadataResponseStorageFourAccessKeyIdSecretOneRegExp = new RegExp( - '^[a-z0-9_-]+(\/[a-z0-9_-]+)?$' -); -export const filesUpdateFilesetMetadataResponseStorageFourSecretAccessKeySecretOneRegExp = - new RegExp('^[a-z0-9_-]+(\/[a-z0-9_-]+)?$'); -export const filesUpdateFilesetMetadataResponseStorageFourSignatureVersionDefault = `s3v4`; - -export const FilesUpdateFilesetMetadataResponse = zod - .object({ - id: zod.string(), - name: zod.string(), - workspace: zod.string(), - description: zod.string(), - purpose: zod.enum(['dataset', 'generic', 'model']), - storage: zod.union([ - zod.object({ - read_chunk_size: zod - .number() - .default(filesUpdateFilesetMetadataResponseStorageOneReadChunkSizeDefault) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod.literal('local').default(filesUpdateFilesetMetadataResponseStorageOneTypeDefault), - path: zod.string(), - write_buffer_size: zod - .number() - .default(filesUpdateFilesetMetadataResponseStorageOneWriteBufferSizeDefault) - .describe('How many bytes to buffer before flushing to disk'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default(filesUpdateFilesetMetadataResponseStorageTwoReadChunkSizeDefault) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod.literal('ngc').default(filesUpdateFilesetMetadataResponseStorageTwoTypeDefault), - org: zod.string().describe('NGC organization name'), - team: zod.string().describe('NGC team name'), - target: zod.string().describe('NGC asset name (model or resource)'), - target_type: zod - .enum(['resource', 'model']) - .default(filesUpdateFilesetMetadataResponseStorageTwoTargetTypeDefault) - .describe("Type of NGC asset: 'resource' or 'model'"), - version: zod - .string() - .optional() - .describe('NGC asset version. If not provided, defaults to latest version'), - original_version: zod - .string() - .optional() - .describe( - "The original version requested by the user before resolution (e.g., 'latest' or None). The 'version' field contains the resolved version ID." - ), - api_key_secret: zod - .string() - .regex(filesUpdateFilesetMetadataResponseStorageTwoApiKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .describe('NGC API key secret name'), - host: zod - .string() - .default(filesUpdateFilesetMetadataResponseStorageTwoHostDefault) - .describe('NGC API host URL'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default(filesUpdateFilesetMetadataResponseStorageThreeReadChunkSizeDefault) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod - .literal('huggingface') - .default(filesUpdateFilesetMetadataResponseStorageThreeTypeDefault), - repo_id: zod - .string() - .describe("Huggingface repository ID (e.g., 'meta-llama\/Llama-2-7b')"), - repo_type: zod - .enum(['model', 'dataset', 'space']) - .default(filesUpdateFilesetMetadataResponseStorageThreeRepoTypeDefault) - .describe("Type of Huggingface repository: 'model', 'dataset', or 'space'"), - revision: zod - .string() - .default(filesUpdateFilesetMetadataResponseStorageThreeRevisionDefault) - .describe("Branch, tag, or commit SHA. Defaults to 'main'"), - original_revision: zod - .string() - .optional() - .describe( - "The original revision requested by the user before resolution (e.g., 'main'). The 'revision' field contains the resolved commit SHA." - ), - token_secret: zod - .string() - .regex(filesUpdateFilesetMetadataResponseStorageThreeTokenSecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe('Huggingface API `token` secret name for private repositories'), - endpoint: zod - .string() - .default(filesUpdateFilesetMetadataResponseStorageThreeEndpointDefault) - .describe('Huggingface Hub endpoint URL. Use for self-hosted instances.'), - }), - zod.object({ - read_chunk_size: zod - .number() - .default(filesUpdateFilesetMetadataResponseStorageFourReadChunkSizeDefault) - .describe( - 'Chunk size in bytes for reading\/streaming files. Larger chunks reduce async overhead but increase memory per concurrent download. Default: 1MB.' - ), - type: zod.literal('s3').default(filesUpdateFilesetMetadataResponseStorageFourTypeDefault), - bucket: zod.string().describe('S3 bucket name'), - prefix: zod - .string() - .default(filesUpdateFilesetMetadataResponseStorageFourPrefixDefault) - .describe( - 'Optional prefix (folder path) within the bucket. All operations will be relative to this prefix.' - ), - region: zod - .string() - .optional() - .describe( - 'AWS region. If not specified, uses SDK default (env vars, instance metadata, etc.)' - ), - endpoint_url: zod - .string() - .optional() - .describe( - 'Custom endpoint URL for S3-compatible storage (e.g., MinIO, Garage, RustFS). If not specified, uses AWS S3.' - ), - use_sdk_auth: zod - .boolean() - .default(filesUpdateFilesetMetadataResponseStorageFourUseSdkAuthDefault) - .describe( - "Use AWS SDK credential chain for authentication (env vars like AWS_ACCESS_KEY_ID, IAM roles, instance profiles, etc.). This option is only available for the platform's default storage backend. User-provided S3 storage must use explicit credentials via access_key_id_secret and secret_access_key_secret." - ), - access_key_id_secret: zod - .string() - .regex(filesUpdateFilesetMetadataResponseStorageFourAccessKeyIdSecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe('Secret reference for AWS access key ID. Requires use_sdk_auth=False.'), - secret_access_key_secret: zod - .string() - .regex(filesUpdateFilesetMetadataResponseStorageFourSecretAccessKeySecretOneRegExp) - .describe( - "Reference to a secret. Format: 'secret_name' (uses request workspace) or 'workspace\/secret_name' (explicit workspace)." - ) - .optional() - .describe('Secret reference for AWS secret access key. Requires use_sdk_auth=False.'), - signature_version: zod - .enum(['s3v4', 's3']) - .default(filesUpdateFilesetMetadataResponseStorageFourSignatureVersionDefault) - .describe( - "AWS signature version for request signing. Use 's3' for legacy systems that only support signature v2." - ), - }), - ]), - metadata: zod - .object({ - dataset: zod - .object({ - schema: zod - .union([zod.record(zod.string(), zod.unknown()), zod.string()]) - .optional() - .describe( - 'Default row schema for files in this fileset, either inline JSON Schema or a schema_defs key.' - ), - schema_defs: zod - .record(zod.string(), zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'Reusable JSON Schema definitions keyed by name for deduplicating per-file dataset schemas.' - ), - schemas_by_path: zod - .record( - zod.string(), - zod.union([zod.record(zod.string(), zod.unknown()), zod.string()]) - ) - .optional() - .describe( - 'Optional per-file row schemas keyed by relative path within the fileset. Each value may be inline JSON Schema or a schema_defs key.' - ), - }) - .optional() - .describe('Content for dataset-type filesets.'), - model: zod - .object({ - tool_calling: zod - .object({ - chat_template: zod - .string() - .optional() - .describe('Jinja2 chat template for the model.'), - tool_call_parser: zod - .string() - .optional() - .describe( - "Name of the tool call parser (e.g., 'openai', 'hermes', 'pythonic', 'llama3_json', 'mistral')." - ), - tool_call_plugin: zod - .string() - .optional() - .describe( - "Reference to a fileset containing a custom tool call plugin Python file. Expected format: '{workspace}\/{fileset_name}'." - ), - auto_tool_choice: zod - .boolean() - .optional() - .describe('Whether to enable automatic tool choice.'), - }) - .optional() - .describe( - 'Content for tool-calling configuration on model filesets.\n\nStores chat template and tool calling settings that are merged into\nthe ModelSpec during checkpoint analysis.' - ), - }) - .optional() - .describe( - 'Content for model-type filesets.\n\nContains tool calling configuration that is merged into the ModelSpec\nduring checkpoint analysis.' - ), - }) - .describe( - 'Tagged metadata container - the key indicates the type.\n\nExample:\n metadata = FilesetMetadata(\n dataset=DatasetMetadataContent(\n schema={\"columns\": [\"id\", \"name\"]},\n )\n )' - ), - custom_fields: zod.record(zod.string(), zod.unknown()), - project: zod.string(), - created_at: zod.string(), - updated_at: zod.string(), - }) - .describe('Response DTO for fileset operations.'); - -/** - * Get file metadata without downloading content. - -HEAD requests are often used before Range GETs to ensure the server -supports partial downloads (e.g., DuckDB's httpfs). -Returns Accept-Ranges, Content-Length, and Content-Type headers. - * @summary Get File Metadata - */ -export const FilesHeadFileParams = zod.object({ - workspace: zod.string(), - name: zod.string(), - path: zod.string(), -}); - -export const FilesHeadFileResponse = zod.unknown(); - -/** - * Download file content from a fileset. - -Supports HTTP Range requests for partial content retrieval (status 206). -Returns the full file content (status 200) if no Range header is provided. -For external resources (HuggingFace, NGC), content is cached locally on first access. - * @summary Download File Content - */ -export const FilesDownloadFileParams = zod.object({ - workspace: zod.string(), - name: zod.string(), - path: zod.string(), -}); - -/** - * Upload file content to a fileset. - * @summary Upload Fileset Content - */ -export const FilesUploadFileParams = zod.object({ - workspace: zod.string(), - name: zod.string(), - path: zod.string(), -}); - -export const FilesUploadFileResponse = zod.object({ - file_ref: zod.string(), - file_url: zod.string(), - path: zod.string(), - size: zod.number(), - cache_status: zod - .enum(['cached', 'caching', 'not_cached', 'not_cacheable']) - .optional() - .describe('Cache status for files in external storage backends.'), -}); - -/** - * Delete a specific file from a fileset. - -Permanently deletes the file from the storage backend. -Returns metadata about the deleted file. - * @summary Delete a specific file from a fileset - */ -export const FilesDeleteFileParams = zod.object({ - workspace: zod.string(), - name: zod.string(), - path: zod.string(), -}); - -export const FilesDeleteFileResponse = zod.object({ - file_ref: zod.string(), - file_url: zod.string(), - path: zod.string(), - size: zod.number(), - cache_status: zod - .enum(['cached', 'caching', 'not_cached', 'not_cacheable']) - .optional() - .describe('Cache status for files in external storage backends.'), -}); - -/** - * List Files in Fileset. - -Returns a list of files stored in the specified fileset. -Optionally filter by path prefix to list files under a specific directory. - -Each file includes a cache_status field: -- "not_cacheable": File is on default storage, caching not applicable -- "cached": File exists in cache storage -- "caching": File is currently being downloaded and cached -- "not_cached": File not in cache, will be cached on next download -- null: External storage, but cache status not checked (use include_cache_status=true) - * @summary List Fileset Files - */ -export const FilesListFilesetFilesParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const filesListFilesetFilesQueryIncludeCacheStatusDefault = false; - -export const FilesListFilesetFilesQueryParams = zod.object({ - path: zod.string().optional().describe('Filter files by path prefix'), - include_cache_status: zod - .boolean() - .default(filesListFilesetFilesQueryIncludeCacheStatusDefault) - .describe( - 'Check and return cache status for each file. When false, storage files return null for cache_status.' - ), -}); - -export const FilesListFilesetFilesResponse = zod.object({ - data: zod.array( - zod.object({ - file_ref: zod.string(), - file_url: zod.string(), - path: zod.string(), - size: zod.number(), - cache_status: zod - .enum(['cached', 'caching', 'not_cached', 'not_cacheable']) - .optional() - .describe('Cache status for files in external storage backends.'), - }) - ), -}); diff --git a/web/packages/sdk/generated/platform/zod/guardrails.ts b/web/packages/sdk/generated/platform/zod/guardrails.ts deleted file mode 100644 index cccc1fa9e9..0000000000 --- a/web/packages/sdk/generated/platform/zod/guardrails.ts +++ /dev/null @@ -1,6112 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import * as zod from 'zod'; - -/** - * Chat completion for the provided conversation. - * @summary Guardrail check request - */ -export const GuardrailsCheckParams = zod.object({ - workspace: zod.string(), -}); - -export const guardrailsCheckBodyStreamDefault = false; -export const guardrailsCheckBodyTemperatureMin = 0; -export const guardrailsCheckBodyTemperatureMax = 2; - -export const guardrailsCheckBodyTopPMin = 0; -export const guardrailsCheckBodyTopPMax = 1; - -export const guardrailsCheckBodyFrequencyPenaltyMin = -2; -export const guardrailsCheckBodyFrequencyPenaltyMax = 2; - -export const guardrailsCheckBodyPresencePenaltyMin = -2; -export const guardrailsCheckBodyPresencePenaltyMax = 2; - -export const guardrailsCheckBodyTopLogprobsMin = 0; -export const guardrailsCheckBodyTopLogprobsMax = 20; - -export const guardrailsCheckBodyGuardrailsOneConfigTwoModelsItemModeDefault = `chat`; -export const guardrailsCheckBodyGuardrailsOneConfigTwoModelsItemCacheOneEnabledDefault = false; -export const guardrailsCheckBodyGuardrailsOneConfigTwoModelsItemCacheOneMaxsizeDefault = 50000; -export const guardrailsCheckBodyGuardrailsOneConfigTwoModelsItemCacheOneStatsOneEnabledDefault = false; -export const guardrailsCheckBodyGuardrailsOneConfigTwoInstructionsDefault = [ - { - type: `general`, - content: `Below is a conversation between a helpful AI assistant and a user. The bot is designed to generate human-like text based on the input that it receives. The bot is talkative and provides lots of specific details. If the bot does not know the answer to a question, it truthfully says it does not know.`, - }, -]; -export const guardrailsCheckBodyGuardrailsOneConfigTwoSampleConversationDefault = `user "Hello there!" - express greeting -bot express greeting - "Hello! How can I assist you today?" -user "What can you do for me?" - ask about capabilities -bot respond about capabilities - "As an AI assistant, I can help you with a wide range of tasks. This includes question answering on various topics, generating text for various purposes and providing suggestions based on your preferences." -user "Tell me a bit about the history of NVIDIA." - ask general question -bot response for general question - "NVIDIA is a technology company that specializes in designing and manufacturing graphics processing units (GPUs) and other computer hardware. The company was founded in 1993 by Jen-Hsun Huang, Chris Malachowsky, and Curtis Priem." -user "tell me more" - request more information -bot provide more information - "Initially, the company focused on developing 3D graphics processing technology for the PC gaming market. In 1999, NVIDIA released the GeForce 256, the world\`s first GPU, which was a major breakthrough for the gaming industry. The company continued to innovate in the GPU space, releasing new products and expanding into other markets such as professional graphics, mobile devices, and artificial intelligence." -user "thanks" - express appreciation -bot express appreciation and offer additional help - "You\`re welcome. If you have any more questions or if there\`s anything else I can help you with, please don\`t hesitate to ask." -`; -export const guardrailsCheckBodyGuardrailsOneConfigTwoPromptsItemMaxLengthDefault = 16000; - -export const guardrailsCheckBodyGuardrailsOneConfigTwoPromptsItemModeDefault = `standard`; -export const guardrailsCheckBodyGuardrailsOneConfigTwoPromptingModeDefault = `standard`; -export const guardrailsCheckBodyGuardrailsOneConfigTwoLowestTemperatureDefault = 0.001; -export const guardrailsCheckBodyGuardrailsOneConfigTwoEnableMultiStepGenerationDefault = false; -export const guardrailsCheckBodyGuardrailsOneConfigTwoColangVersionDefault = `1.0`; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneFactCheckingOneFallbackToSelfCheckDefault = false; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOnePatronusOneInputOneEvaluateConfigOneSuccessStrategyDefault = `all_pass`; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOnePatronusOneOutputOneEvaluateConfigOneSuccessStrategyDefault = `all_pass`; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneSensitiveDataDetectionOneInputOneMaskTokenDefault = `*`; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneSensitiveDataDetectionOneInputOneScoreThresholdDefault = 0.2; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneSensitiveDataDetectionOneOutputOneMaskTokenDefault = `*`; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneSensitiveDataDetectionOneOutputOneScoreThresholdDefault = 0.2; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneSensitiveDataDetectionOneRetrievalOneMaskTokenDefault = `*`; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneSensitiveDataDetectionOneRetrievalOneScoreThresholdDefault = 0.2; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneRegexDetectionOneInputOneCaseInsensitiveDefault = false; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneRegexDetectionOneOutputOneCaseInsensitiveDefault = false; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneRegexDetectionOneRetrievalOneCaseInsensitiveDefault = false; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneJailbreakDetectionOneLengthPerPerplexityThresholdDefault = 89.79; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneJailbreakDetectionOneLengthPerPerplexityThresholdExclusiveMin = 0; - -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneJailbreakDetectionOnePrefixSuffixPerplexityThresholdDefault = 1845.65; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneJailbreakDetectionOnePrefixSuffixPerplexityThresholdExclusiveMin = 0; - -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneJailbreakDetectionOneNimServerEndpointDefault = `classify`; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneInjectionDetectionOneActionDefault = `reject`; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneInjectionDetectionOneActionRegExp = - new RegExp('^(reject|omit)$'); -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneGlinerOneServerEndpointDefault = `http://localhost:1235/v1/extract`; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneGlinerOneThresholdDefault = 0.5; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneGlinerOneChunkLengthDefault = 384; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneGlinerOneOverlapDefault = 128; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneGlinerOneFlatNerDefault = false; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneFiddlerOneFiddlerEndpointDefault = `http://localhost:8080/process/text`; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneFiddlerOneSafetyThresholdDefault = 0.1; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneFiddlerOneFaithfulnessThresholdDefault = 0.05; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneClavataOneServerEndpointDefault = `https://gateway.app.clavata.ai:8443`; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneClavataOneLabelMatchLogicDefault = `ANY`; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneCrowdstrikeAidrOneTimeoutDefault = 30; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneTrendMicroOneV1UrlDefault = `https://api.xdr.trendmicro.com/v3.0/aiSecurity/applyGuardrails`; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneTrendMicroOneApplicationNameDefault = `nemo-guardrails`; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneTrendMicroOneApplicationNameMax = 64; - -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneTrendMicroOneApplicationNameRegExp = - new RegExp('^[a-zA-Z0-9_-]+$'); -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneTrendMicroOneDetailedResponseDefault = false; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneAiDefenseOneTimeoutDefault = 30; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneAiDefenseOneFailOpenDefault = false; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneContentSafetyOneMultilingualEnabledDefault = false; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneContentSafetyOneReasoningEnabledDefault = false; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneInputOneParallelDefault = false; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneOutputOneParallelDefault = false; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneOutputOneStreamingOneEnabledDefault = true; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneOutputOneStreamingOneChunkSizeDefault = 200; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneOutputOneStreamingOneContextSizeDefault = 50; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneOutputOneStreamingOneStreamFirstDefault = true; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneOutputOneApplyToReasoningTracesDefault = false; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneDialogOneSingleCallOneEnabledDefault = false; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneDialogOneSingleCallOneFallbackToMultipleCallsDefault = true; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneDialogOneUserMessagesEmbeddingsOnlyDefault = false; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneDialogOneUserMessagesEmbeddingsOnlySimilarityThresholdMin = 0; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneDialogOneUserMessagesEmbeddingsOnlySimilarityThresholdMax = 1; - -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneToolOutputOneParallelDefault = false; -export const guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneToolInputOneParallelDefault = false; -export const guardrailsCheckBodyGuardrailsOneConfigTwoEnableRailsExceptionsDefault = false; -export const guardrailsCheckBodyGuardrailsOneConfigTwoTracingOneEnabledDefault = false; -export const guardrailsCheckBodyGuardrailsOneConfigTwoTracingOneAdaptersItemNameDefault = `FileSystem`; -export const guardrailsCheckBodyGuardrailsOneConfigTwoTracingOneSpanFormatDefault = `opentelemetry`; -export const guardrailsCheckBodyGuardrailsOneConfigTwoTracingOneEnableContentCaptureDefault = false; -export const guardrailsCheckBodyGuardrailsOneConfigDefault = `system/default`; -export const guardrailsCheckBodyGuardrailsOneConfigIdDefault = `system/default`; -export const guardrailsCheckBodyGuardrailsOneReturnChoiceDefault = false; -export const guardrailsCheckBodyGuardrailsOneStreamDefault = false; -export const guardrailsCheckBodyGuardrailsOneOptionsOneRailsOneInputDefault = true; -export const guardrailsCheckBodyGuardrailsOneOptionsOneRailsOneOutputDefault = true; -export const guardrailsCheckBodyGuardrailsOneOptionsOneRailsOneRetrievalDefault = true; -export const guardrailsCheckBodyGuardrailsOneOptionsOneRailsOneDialogDefault = true; -export const guardrailsCheckBodyGuardrailsOneOptionsOneLlmOutputDefault = false; -export const guardrailsCheckBodyGuardrailsOneOptionsOneLogOneActivatedRailsDefault = false; -export const guardrailsCheckBodyGuardrailsOneOptionsOneLogOneLlmCallsDefault = false; -export const guardrailsCheckBodyGuardrailsOneOptionsOneLogOneInternalEventsDefault = false; -export const guardrailsCheckBodyGuardrailsOneOptionsOneLogOneColangHistoryDefault = false; -export const guardrailsCheckBodyGuardrailsOneOptionsOneLogOneStatsDefault = false; - -export const GuardrailsCheckBody = zod - .object({ - model: zod - .string() - .describe('The model to use for completion. Must be one of the available models.'), - response_format: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - "Format of the response. Use {'type': 'json_object'} for JSON mode or {'type': 'json_schema', 'json_schema': {...}} for structured outputs." - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe('The maximum number of tokens that can be generated in the chat completion.'), - n: zod - .number() - .min(1) - .optional() - .describe('How many chat completion choices to generate for each input message.'), - stream: zod - .boolean() - .default(guardrailsCheckBodyStreamDefault) - .describe('If set, partial message deltas will be sent, like in ChatGPT.'), - temperature: zod - .number() - .min(guardrailsCheckBodyTemperatureMin) - .max(guardrailsCheckBodyTemperatureMax) - .optional() - .describe('What sampling temperature to use, between 0 and 2.'), - top_p: zod - .number() - .min(guardrailsCheckBodyTopPMin) - .max(guardrailsCheckBodyTopPMax) - .optional() - .describe('An alternative to sampling with temperature, called nucleus sampling.'), - stop: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Up to 4 sequences where the API will stop generating further tokens.'), - frequency_penalty: zod - .number() - .min(guardrailsCheckBodyFrequencyPenaltyMin) - .max(guardrailsCheckBodyFrequencyPenaltyMax) - .optional() - .describe( - 'Positive values penalize new tokens based on their existing frequency in the text.' - ), - presence_penalty: zod - .number() - .min(guardrailsCheckBodyPresencePenaltyMin) - .max(guardrailsCheckBodyPresencePenaltyMax) - .optional() - .describe( - 'Positive values penalize new tokens based on whether they appear in the text so far.' - ), - function_call: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .optional() - .describe( - "Deprecated in favor of tool_choice. 'none' means the model will not call a function and instead generates a message. 'auto' means the model can pick between generating a message or calling a function. Specifying a particular function via {'name': 'my_function'} forces the model to call that function." - ), - seed: zod.number().optional().describe('If specified, attempts to sample deterministically.'), - logit_bias: zod - .record(zod.string(), zod.number()) - .optional() - .describe( - 'Modify the likelihood of specified tokens appearing in the completion. Maps token IDs (as strings) to bias values from -100 to 100.' - ), - top_logprobs: zod - .number() - .min(guardrailsCheckBodyTopLogprobsMin) - .max(guardrailsCheckBodyTopLogprobsMax) - .optional() - .describe('The number of most likely tokens to return at each token position.'), - logprobs: zod - .boolean() - .optional() - .describe( - 'Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the content of message' - ), - tool_choice: zod - .union([zod.string(), zod.record(zod.string(), zod.unknown())]) - .optional() - .describe( - "Controls which (if any) tool is called by the model. 'none' means no tool is called, 'auto' lets the model decide, 'required' forces a tool call." - ), - user: zod - .string() - .optional() - .describe( - 'A unique identifier representing your end-user, used by some providers for abuse monitoring.' - ), - tools: zod - .array(zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - "A list of tools the model may call. Each tool is an object with a 'type' field and a 'function' definition." - ), - ignore_eos: zod.boolean().optional().describe('Ignore the eos when running'), - reasoning_effort: zod - .string() - .optional() - .describe( - 'Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.' - ), - max_completion_tokens: zod - .number() - .min(1) - .optional() - .describe( - 'An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. Preferred over max_tokens for reasoning models.' - ), - stream_options: zod - .record(zod.string(), zod.boolean()) - .optional() - .describe( - 'Options for streaming response. Only set this when stream=True. Supports include_usage to receive token usage in the final stream chunk.' - ), - messages: zod - .array( - zod.union([ - zod - .object({ - content: zod.string().describe('The contents of the system message.'), - role: zod - .literal('system') - .describe('The role of the messages author, in this case `system`.'), - name: zod.string().optional().describe('An optional name for the participant.'), - }) - .describe('System message parameter for chat completion.'), - zod - .object({ - content: zod - .union([ - zod.string(), - zod.array( - zod.union([ - zod - .object({ - text: zod.string().describe('The text content.'), - type: zod.literal('text').describe('The type of the content part.'), - }) - .describe('Text content part for chat messages.'), - zod - .object({ - image_url: zod - .object({ - url: zod - .string() - .describe( - 'Either a URL of the image or the base64 encoded image data.' - ), - detail: zod - .enum(['auto', 'low', 'high']) - .optional() - .describe('Specifies the detail level of the image.'), - }) - .describe('Image URL for vision requests.') - .describe('The image URL information.'), - type: zod.literal('image_url').describe('The type of the content part.'), - }) - .describe('Image content part for chat messages.'), - ]) - ), - ]) - .describe('The contents of the user message.'), - role: zod - .literal('user') - .describe('The role of the messages author, in this case `user`.'), - name: zod.string().optional().describe('An optional name for the participant.'), - }) - .describe('User message parameter for chat completion.'), - zod - .object({ - role: zod - .literal('assistant') - .describe('The role of the messages author, in this case `assistant`.'), - content: zod.string().optional().describe('The contents of the assistant message.'), - function_call: zod - .object({ - arguments: zod - .string() - .describe( - 'The arguments to call the function with, as generated by the model in JSON format.' - ), - name: zod.string().describe('The name of the function to call.'), - }) - .describe('Function call information.') - .optional() - .describe('Deprecated and replaced by `tool_calls`.'), - name: zod.string().optional().describe('An optional name for the participant.'), - tool_calls: zod - .array( - zod - .object({ - id: zod.string().describe('The ID of the tool call.'), - function: zod - .object({ - arguments: zod - .string() - .describe( - 'The arguments to call the function with, as generated by the model in JSON format.' - ), - name: zod.string().describe('The name of the function to call.'), - }) - .describe('Function definition for tool calls.') - .describe('The function that the model called.'), - type: zod - .literal('function') - .describe('The type of the tool. Currently, only `function` is supported.'), - }) - .describe('Tool call parameter for chat completion messages.') - ) - .optional() - .describe('The tool calls generated by the model, such as function calls.'), - }) - .describe('Assistant message parameter for chat completion.'), - zod - .object({ - content: zod.string().describe('The contents of the tool message.'), - role: zod - .literal('tool') - .describe('The role of the messages author, in this case `tool`.'), - tool_call_id: zod.string().describe('Tool call that this message is responding to.'), - }) - .describe('Tool message parameter for chat completion.'), - zod - .object({ - content: zod.string().describe('The contents of the function message.'), - name: zod.string().describe('The name of the function to call.'), - role: zod - .literal('function') - .describe('The role of the messages author, in this case `function`.'), - }) - .describe('Function message parameter for chat completion.'), - ]) - ) - .describe('A list of messages comprising the conversation so far'), - vision: zod - .boolean() - .optional() - .describe('Whether this is a vision-capable request with image inputs.'), - guardrails: zod - .object({ - config: zod - .union([ - zod.string().describe('A reference to RailsConfig.'), - zod - .object({ - models: zod - .array( - zod - .object({ - type: zod.string(), - engine: zod.string(), - model: zod - .string() - .optional() - .describe( - "The model name. If using Inference Gateway, this should be the Model Entity reference ('workspace\/model_name')." - ), - parameters: zod - .object({ - base_url: zod - .string() - .optional() - .describe('The URL to use for inference with this model.'), - default_headers: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Custom HTTP headers to include in requests to this model. Each key-value pair represents a header name (key) and its default value (value). You can override the default value for a header by populating it in the request headers.' - ), - }) - .describe( - 'Parameters for configuring how to interact with a model in a guardrails config.' - ) - .optional() - .describe( - 'Additional parameters to configure how to interact with the model.' - ), - mode: zod - .enum(['chat', 'text']) - .default(guardrailsCheckBodyGuardrailsOneConfigTwoModelsItemModeDefault) - .describe( - "Whether the mode is 'text' completion or 'chat' completion. Allowed values are 'chat' or 'text'." - ), - cache: zod - .object({ - enabled: zod - .boolean() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoModelsItemCacheOneEnabledDefault - ) - .describe('Whether caching is enabled (default: False - no caching)'), - maxsize: zod - .number() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoModelsItemCacheOneMaxsizeDefault - ) - .describe('Maximum number of entries in the cache per model'), - stats: zod - .object({ - enabled: zod - .boolean() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoModelsItemCacheOneStatsOneEnabledDefault - ) - .describe('Whether cache statistics tracking is enabled'), - log_interval: zod - .number() - .optional() - .describe( - 'Seconds between periodic cache stats logging to logs (None disables logging)' - ), - }) - .describe('Configuration for cache statistics tracking and logging.') - .optional() - .describe('Configuration for cache statistics tracking and logging'), - }) - .describe('Configuration for model caching.') - .optional() - .describe( - 'Cache configuration for this specific model (primarily used for content safety models)' - ), - }) - .describe( - "Configuration of a model used by the rails engine.\n\nIf using Inference Gateway, the `model` field should be a Model Entity reference ('workspace\/model_name')." - ) - ) - .optional() - .describe('The list of models used by the rails configuration.'), - instructions: zod - .array( - zod - .object({ - type: zod.string(), - content: zod.string(), - }) - .describe( - 'Configuration for instructions in natural language that should be passed to the LLM.' - ) - ) - .default(guardrailsCheckBodyGuardrailsOneConfigTwoInstructionsDefault) - .describe('List of instructions in natural language that the LLM should use.'), - actions_server_url: zod - .string() - .optional() - .describe('The URL of the actions server that should be used for the rails.'), - sample_conversation: zod - .string() - .default(guardrailsCheckBodyGuardrailsOneConfigTwoSampleConversationDefault) - .describe('The sample conversation that should be used inside the prompts.'), - prompts: zod - .array( - zod - .object({ - task: zod - .string() - .describe('The id of the task associated with this prompt.'), - content: zod - .string() - .optional() - .describe("The content of the prompt, if it's a string."), - messages: zod - .array( - zod.union([ - zod - .object({ - type: zod - .string() - .describe( - "The type of message, e.g., 'assistant', 'user', 'system'." - ), - content: zod.string().describe('The content of the message.'), - }) - .describe('Template for a message structure.'), - zod.string(), - ]) - ) - .optional() - .describe( - 'The list of messages included in the prompt. Used for chat models.' - ), - models: zod - .array(zod.string()) - .optional() - .describe( - 'If specified, the prompt will be used only for the given LLM engines\/models. The format is a list of strings with the format: or \/.' - ), - output_parser: zod - .string() - .optional() - .describe('The name of the output parser to use for this prompt.'), - max_length: zod - .number() - .min(1) - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoPromptsItemMaxLengthDefault - ) - .describe('The maximum length of the prompt in number of characters.'), - mode: zod - .string() - .default(guardrailsCheckBodyGuardrailsOneConfigTwoPromptsItemModeDefault) - .describe( - "Corresponds to the `prompting_mode` for which this prompt is fetched. Default is 'standard'." - ), - stop: zod - .array(zod.string()) - .optional() - .describe( - 'If specified, will be configure stop tokens for models that support this.' - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe( - 'The maximum number of tokens that can be generated in the chat completion.' - ), - }) - .describe('Configuration for prompts that will be used for a specific task.') - ) - .optional() - .describe('The prompts that should be used for the various LLM tasks.'), - prompting_mode: zod - .string() - .default(guardrailsCheckBodyGuardrailsOneConfigTwoPromptingModeDefault) - .describe('Allows choosing between different prompting strategies.'), - lowest_temperature: zod - .number() - .default(guardrailsCheckBodyGuardrailsOneConfigTwoLowestTemperatureDefault) - .describe('The lowest temperature that should be used for the LLM.'), - enable_multi_step_generation: zod - .boolean() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoEnableMultiStepGenerationDefault - ) - .describe('Whether to enable multi-step generation for the LLM.'), - colang_version: zod - .string() - .default(guardrailsCheckBodyGuardrailsOneConfigTwoColangVersionDefault) - .describe('The Colang version to use.'), - custom_data: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Any custom configuration data that might be needed.'), - rails: zod - .object({ - config: zod - .object({ - fact_checking: zod - .object({ - parameters: zod.record(zod.string(), zod.unknown()).optional(), - fallback_to_self_check: zod - .boolean() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneFactCheckingOneFallbackToSelfCheckDefault - ) - .describe( - 'Whether to fall back to self-check if another method fail.' - ), - }) - .describe('Configuration data for the fact-checking rail.') - .optional() - .describe('Configuration data for the fact-checking rail.'), - autoalign: zod - .object({ - parameters: zod.record(zod.string(), zod.unknown()).optional(), - input: zod - .object({ - guardrails_config: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'The guardrails configuration that is passed to the AutoAlign endpoint' - ), - }) - .describe('List of guardrails that are activated') - .optional() - .describe('Input configuration for AutoAlign guardrails'), - output: zod - .object({ - guardrails_config: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'The guardrails configuration that is passed to the AutoAlign endpoint' - ), - }) - .describe('List of guardrails that are activated') - .optional() - .describe('Output configuration for AutoAlign guardrails'), - }) - .describe('Configuration data for the AutoAlign API') - .optional() - .describe('Configuration data for the AutoAlign guardrails API.'), - patronus: zod - .object({ - input: zod - .object({ - evaluate_config: zod - .object({ - success_strategy: zod - .enum(['all_pass', 'any_pass']) - .describe( - 'Strategy for determining whether a Patronus Evaluation API\nrequest should pass, especially when multiple evaluators\nare called in a single request.\nALL_PASS requires all evaluators to pass for success.\nANY_PASS requires only one evaluator to pass for success.' - ) - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOnePatronusOneInputOneEvaluateConfigOneSuccessStrategyDefault - ) - .describe( - 'Strategy to determine whether the Patronus Evaluate API Guardrail passes or not.' - ), - params: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Parameters to the Patronus Evaluate API'), - }) - .describe('Config to parameterize the Patronus Evaluate API call') - .optional() - .describe('Configuration passed to the Patronus Evaluate API'), - }) - .describe('Config for the Patronus Evaluate API call') - .optional() - .describe( - 'Patronus Evaluate API configuration for an Input Guardrail' - ), - output: zod - .object({ - evaluate_config: zod - .object({ - success_strategy: zod - .enum(['all_pass', 'any_pass']) - .describe( - 'Strategy for determining whether a Patronus Evaluation API\nrequest should pass, especially when multiple evaluators\nare called in a single request.\nALL_PASS requires all evaluators to pass for success.\nANY_PASS requires only one evaluator to pass for success.' - ) - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOnePatronusOneOutputOneEvaluateConfigOneSuccessStrategyDefault - ) - .describe( - 'Strategy to determine whether the Patronus Evaluate API Guardrail passes or not.' - ), - params: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Parameters to the Patronus Evaluate API'), - }) - .describe('Config to parameterize the Patronus Evaluate API call') - .optional() - .describe('Configuration passed to the Patronus Evaluate API'), - }) - .describe('Config for the Patronus Evaluate API call') - .optional() - .describe( - 'Patronus Evaluate API configuration for an Output Guardrail' - ), - }) - .describe('Configuration data for the Patronus Evaluate API') - .optional() - .describe('Configuration data for the Patronus Evaluate API.'), - sensitive_data_detection: zod - .object({ - recognizers: zod - .array(zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'Additional custom recognizers. Check out https:\/\/microsoft.github.io\/presidio\/tutorial\/08_no_code\/ for more details.' - ), - input: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe( - 'The list of entities that should be detected. Check out https:\/\/microsoft.github.io\/presidio\/supported_entities\/ forthe list of supported entities.' - ), - mask_token: zod - .string() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneSensitiveDataDetectionOneInputOneMaskTokenDefault - ) - .describe( - 'The token that should be used to mask the sensitive data.' - ), - score_threshold: zod - .number() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneSensitiveDataDetectionOneInputOneScoreThresholdDefault - ) - .describe( - 'The score threshold that should be used to detect the sensitive data.' - ), - }) - .optional() - .describe( - 'Configuration of the entities to be detected on the user input.' - ), - output: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe( - 'The list of entities that should be detected. Check out https:\/\/microsoft.github.io\/presidio\/supported_entities\/ forthe list of supported entities.' - ), - mask_token: zod - .string() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneSensitiveDataDetectionOneOutputOneMaskTokenDefault - ) - .describe( - 'The token that should be used to mask the sensitive data.' - ), - score_threshold: zod - .number() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneSensitiveDataDetectionOneOutputOneScoreThresholdDefault - ) - .describe( - 'The score threshold that should be used to detect the sensitive data.' - ), - }) - .optional() - .describe( - 'Configuration of the entities to be detected on the bot output.' - ), - retrieval: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe( - 'The list of entities that should be detected. Check out https:\/\/microsoft.github.io\/presidio\/supported_entities\/ forthe list of supported entities.' - ), - mask_token: zod - .string() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneSensitiveDataDetectionOneRetrievalOneMaskTokenDefault - ) - .describe( - 'The token that should be used to mask the sensitive data.' - ), - score_threshold: zod - .number() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneSensitiveDataDetectionOneRetrievalOneScoreThresholdDefault - ) - .describe( - 'The score threshold that should be used to detect the sensitive data.' - ), - }) - .optional() - .describe( - 'Configuration of the entities to be detected on retrieved relevant chunks.' - ), - }) - .describe('Configuration of what sensitive data should be detected.') - .optional() - .describe('Configuration for detecting sensitive data.'), - regex_detection: zod - .object({ - input: zod - .object({ - patterns: zod - .array(zod.string()) - .optional() - .describe('List of regex patterns to match against the text.'), - case_insensitive: zod - .boolean() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneRegexDetectionOneInputOneCaseInsensitiveDefault - ) - .describe('Whether to perform case-insensitive matching.'), - }) - .describe( - 'Configuration options for regex pattern detection on a specific source.' - ) - .optional() - .describe( - 'Configuration for regex patterns to detect on user input.' - ), - output: zod - .object({ - patterns: zod - .array(zod.string()) - .optional() - .describe('List of regex patterns to match against the text.'), - case_insensitive: zod - .boolean() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneRegexDetectionOneOutputOneCaseInsensitiveDefault - ) - .describe('Whether to perform case-insensitive matching.'), - }) - .describe( - 'Configuration options for regex pattern detection on a specific source.' - ) - .optional() - .describe( - 'Configuration for regex patterns to detect on bot output.' - ), - retrieval: zod - .object({ - patterns: zod - .array(zod.string()) - .optional() - .describe('List of regex patterns to match against the text.'), - case_insensitive: zod - .boolean() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneRegexDetectionOneRetrievalOneCaseInsensitiveDefault - ) - .describe('Whether to perform case-insensitive matching.'), - }) - .describe( - 'Configuration options for regex pattern detection on a specific source.' - ) - .optional() - .describe( - 'Configuration for regex patterns to detect on retrieved relevant chunks.' - ), - }) - .describe('Configuration for regex pattern detection.') - .optional() - .describe('Configuration for regex pattern detection.'), - jailbreak_detection: zod - .object({ - server_endpoint: zod - .string() - .optional() - .describe( - 'The endpoint for the jailbreak detection heuristics\/model container.' - ), - length_per_perplexity_threshold: zod - .number() - .gt( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneJailbreakDetectionOneLengthPerPerplexityThresholdExclusiveMin - ) - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneJailbreakDetectionOneLengthPerPerplexityThresholdDefault - ) - .describe('The length\/perplexity threshold.'), - prefix_suffix_perplexity_threshold: zod - .number() - .gt( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneJailbreakDetectionOnePrefixSuffixPerplexityThresholdExclusiveMin - ) - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneJailbreakDetectionOnePrefixSuffixPerplexityThresholdDefault - ) - .describe('The prefix\/suffix perplexity threshold.'), - nim_base_url: zod - .string() - .optional() - .describe( - 'Base URL for jailbreak detection model. Example: http:\/\/localhost:8000\/v1' - ), - nim_server_endpoint: zod - .string() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneJailbreakDetectionOneNimServerEndpointDefault - ) - .describe( - "Classification path uri. Defaults to 'classify' for NemoGuard JailbreakDetect." - ), - api_key: zod - .string() - .optional() - .describe( - 'Secret String with API key for use in Jailbreak requests. Takes precedence over api_key_env_var' - ), - api_key_env_var: zod - .string() - .optional() - .describe( - 'Environment variable containing API key for jailbreak detection model' - ), - nim_url: zod - .string() - .optional() - .describe('DEPRECATED: Use nim_base_url instead'), - nim_port: zod - .number() - .optional() - .describe('DEPRECATED: Include port in nim_base_url instead'), - embedding: zod.string().optional(), - }) - .describe('Configuration data for jailbreak detection.') - .optional() - .describe('Configuration for jailbreak detection.'), - injection_detection: zod - .object({ - injections: zod - .array(zod.string()) - .optional() - .describe( - "The list of injection types to detect. Options are 'sqli', 'template', 'code', 'xss'.Currently, only SQL injection, template injection, code injection, and markdown cross-site scripting are supported. Custom rules can be added, provided they are in the `yara_path` and have a `.yara` file extension." - ), - action: zod - .string() - .regex( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneInjectionDetectionOneActionRegExp - ) - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneInjectionDetectionOneActionDefault - ) - .describe( - "Action to take. Options are 'reject' to offer a rejection message, 'omit' to mask the offending content, and 'sanitize' to pass the content as-is in the safest way. These options are listed in descending order of relative safety. 'sanitize' is not implemented at this time." - ), - yara_rules: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Dictionary mapping rule names to YARA rule strings. If provided, these rules will be used instead of loading rules from yara_path. Each rule should be a valid YARA rule string.' - ), - }) - .optional() - .describe('Configuration for injection detection.'), - privateai: zod - .object({ - server_endpoint: zod - .string() - .optional() - .describe('The endpoint for the private AI detection server.'), - input: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe('The list of entities that should be detected.'), - }) - .describe('Configuration options for Private AI.') - .optional() - .describe( - 'Configuration of the entities to be detected on the user input.' - ), - output: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe('The list of entities that should be detected.'), - }) - .describe('Configuration options for Private AI.') - .optional() - .describe( - 'Configuration of the entities to be detected on the bot output.' - ), - retrieval: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe('The list of entities that should be detected.'), - }) - .describe('Configuration options for Private AI.') - .optional() - .describe( - 'Configuration of the entities to be detected on retrieved relevant chunks.' - ), - }) - .describe('Configuration for Private AI.') - .optional() - .describe('Configuration for Private AI.'), - gliner: zod - .object({ - server_endpoint: zod - .string() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneGlinerOneServerEndpointDefault - ) - .describe('The endpoint for the GLiNER detection server.'), - threshold: zod - .number() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneGlinerOneThresholdDefault - ) - .describe('Confidence threshold for entity detection (0.0 to 1.0).'), - chunk_length: zod - .number() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneGlinerOneChunkLengthDefault - ) - .describe('Length of text chunks for processing.'), - overlap: zod - .number() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneGlinerOneOverlapDefault - ) - .describe('Overlap between chunks.'), - flat_ner: zod - .boolean() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneGlinerOneFlatNerDefault - ) - .describe( - 'Whether to use flat NER mode. Setting to False allows for nested entities.' - ), - input: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe( - "The list of entity labels to detect (e.g., 'email', 'phone_number', 'ssn')." - ), - }) - .describe('Configuration options for GLiNER.') - .optional() - .describe( - 'Configuration of the entities to be detected on the user input.' - ), - output: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe( - "The list of entity labels to detect (e.g., 'email', 'phone_number', 'ssn')." - ), - }) - .describe('Configuration options for GLiNER.') - .optional() - .describe( - 'Configuration of the entities to be detected on the bot output.' - ), - retrieval: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe( - "The list of entity labels to detect (e.g., 'email', 'phone_number', 'ssn')." - ), - }) - .describe('Configuration options for GLiNER.') - .optional() - .describe( - 'Configuration of the entities to be detected on retrieved relevant chunks.' - ), - }) - .describe('Configuration for GLiNER PII detection.') - .optional() - .describe('Configuration for GLiNER PII detection.'), - fiddler: zod - .object({ - fiddler_endpoint: zod - .string() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneFiddlerOneFiddlerEndpointDefault - ) - .describe('The global endpoint for Fiddler Guardrails requests.'), - safety_threshold: zod - .number() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneFiddlerOneSafetyThresholdDefault - ) - .describe('Fiddler Guardrails safety detection threshold.'), - faithfulness_threshold: zod - .number() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneFiddlerOneFaithfulnessThresholdDefault - ) - .describe('Fiddler Guardrails faithfulness detection threshold.'), - }) - .describe('Configuration for Fiddler Guardrails.') - .optional() - .describe('Configuration for Fiddler Guardrails.'), - clavata: zod - .object({ - server_endpoint: zod - .string() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneClavataOneServerEndpointDefault - ) - .describe('The endpoint for the Clavata API'), - policies: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'A dictionary of policy aliases and their corresponding IDs.' - ), - label_match_logic: zod - .enum(['ANY', 'ALL']) - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneClavataOneLabelMatchLogicDefault - ) - .describe( - 'The logic to use when deciding whether the evaluation matched.\n If ANY, only one of the configured labels needs to be found in the input or output.\n If ALL, all configured labels must be found in the input or output.' - ), - input: zod - .object({ - policy: zod - .string() - .describe( - 'The policy alias to use when evaluating inputs or outputs.' - ), - labels: zod - .array(zod.string()) - .optional() - .describe( - 'A list of labels to match against the policy.\n If no labels are provided, the overall policy result will be returned.\n If labels are provided, only hits on the provided labels will be considered a hit.' - ), - }) - .describe('Configuration data for the Clavata API') - .optional() - .describe('Clavata configuration for an Input Guardrail'), - output: zod - .object({ - policy: zod - .string() - .describe( - 'The policy alias to use when evaluating inputs or outputs.' - ), - labels: zod - .array(zod.string()) - .optional() - .describe( - 'A list of labels to match against the policy.\n If no labels are provided, the overall policy result will be returned.\n If labels are provided, only hits on the provided labels will be considered a hit.' - ), - }) - .describe('Configuration data for the Clavata API') - .optional() - .describe('Clavata configuration for an Output Guardrail'), - }) - .describe('Configuration data for the Clavata API') - .optional() - .describe('Configuration for Clavata.'), - crowdstrike_aidr: zod - .object({ - timeout: zod - .number() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneCrowdstrikeAidrOneTimeoutDefault - ) - .describe('Timeout in seconds for API requests to CrowdStrike AIDR'), - }) - .describe('Configuration data for the CrowdStrike AIDR API') - .optional() - .describe('Configuration for CrowdStrike AIDR.'), - pangea: zod - .object({ - input: zod - .object({ - recipe: zod - .string() - .describe( - 'Recipe key of a configuration of data types and settings defined in the Pangea User Console. It\n specifies the rules that are to be applied to the text, such as defang malicious URLs.' - ), - }) - .describe('Configuration data for the Pangea AI Guard API') - .optional() - .describe('Pangea configuration for an Input Guardrail'), - output: zod - .object({ - recipe: zod - .string() - .describe( - 'Recipe key of a configuration of data types and settings defined in the Pangea User Console. It\n specifies the rules that are to be applied to the text, such as defang malicious URLs.' - ), - }) - .describe('Configuration data for the Pangea AI Guard API') - .optional() - .describe('Pangea configuration for an Output Guardrail'), - }) - .describe('Configuration data for the Pangea AI Guard API') - .optional() - .describe('Configuration for Pangea.'), - guardrails_ai: zod - .object({ - validators: zod - .array( - zod - .object({ - name: zod - .string() - .describe( - "Unique identifier or import path for the Guardrails AI validator (e.g., 'toxic_language', 'pii', 'regex_match', or 'guardrails\/competitor_check')." - ), - parameters: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Parameters to pass to the validator during initialization (e.g., threshold, regex pattern).' - ), - metadata: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Metadata to pass to the validator during validation (e.g., valid_topics, context).' - ), - }) - .describe('Configuration for a single Guardrails AI validator.') - ) - .optional() - .describe( - 'List of Guardrails AI validators to apply. Each validator can have its own parameters and metadata.' - ), - }) - .describe('Configuration data for Guardrails AI integration.') - .optional() - .describe('Configuration for Guardrails AI validators.'), - trend_micro: zod - .object({ - v1_url: zod - .string() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneTrendMicroOneV1UrlDefault - ) - .describe( - 'The endpoint for the Trend Micro AI Guard API. For other regions, use: https:\/\/api.{region}.xdr.trendmicro.com\/v3.0\/aiSecurity\/applyGuardrails where region is eu, jp, au, in, sg, or mea.' - ), - api_key_env_var: zod - .string() - .optional() - .describe( - 'Environment variable containing API key for Trend Micro AI Guard' - ), - application_name: zod - .string() - .max( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneTrendMicroOneApplicationNameMax - ) - .regex( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneTrendMicroOneApplicationNameRegExp - ) - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneTrendMicroOneApplicationNameDefault - ) - .describe( - 'Application name for TMV1-Application-Name header (REQUIRED). Must contain only letters, numbers, hyphens, and underscores, with a maximum length of 64 characters.' - ), - detailed_response: zod - .boolean() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneTrendMicroOneDetailedResponseDefault - ) - .describe( - 'If True, returns detailed AI Guard results with confidence scores (Prefer: return=representation). If False, returns minimal response with only action and reasons (Prefer: return=minimal).' - ), - }) - .describe('Configuration data for the Trend Micro AI Guard API') - .optional() - .describe('Configuration for Trend Micro.'), - ai_defense: zod - .object({ - timeout: zod - .number() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneAiDefenseOneTimeoutDefault - ) - .describe( - 'Timeout in seconds for API requests to AI Defense service' - ), - fail_open: zod - .boolean() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneAiDefenseOneFailOpenDefault - ) - .describe( - 'If True, allow content when AI Defense API call fails (fail open). If False, block content when API call fails (fail closed). Does not affect missing configuration validation.' - ), - }) - .describe('Configuration data for the Cisco AI Defense API') - .optional() - .describe('Configuration for Cisco AI Defense.'), - content_safety: zod - .object({ - multilingual: zod - .object({ - enabled: zod - .boolean() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneContentSafetyOneMultilingualEnabledDefault - ) - .describe( - 'If True, detect the language of user input and return refusal messages in the same language. Supported languages: en (English), es (Spanish), zh (Chinese), de (German), fr (French), hi (Hindi), ja (Japanese), ar (Arabic), th (Thai).' - ), - refusal_messages: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - "Custom refusal messages per language code. If not specified, built-in defaults are used. Example: {'en': 'Sorry, I cannot help.', 'es': 'Lo siento, no puedo ayudar.'}" - ), - }) - .optional() - .describe('Configuration for multilingual refusal messages.'), - reasoning: zod - .object({ - enabled: zod - .boolean() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneConfigOneContentSafetyOneReasoningEnabledDefault - ) - .describe( - 'If True, enable reasoning mode (with traces) for content safety models. If False, use low-latency mode without reasoning traces.' - ), - }) - .optional() - .describe( - 'Configuration for reasoning mode in content safety models.' - ), - }) - .describe('Configuration data for content safety rails.') - .optional() - .describe('Configuration for content safety rails.'), - }) - .describe( - 'Configuration data for specific rails that are supported out-of-the-box.' - ) - .optional() - .describe( - 'Configuration data for specific rails that are supported out-of-the-box.' - ), - input: zod - .object({ - parallel: zod - .boolean() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneInputOneParallelDefault - ) - .describe('If True, the input rails are executed in parallel.'), - flows: zod - .array(zod.string()) - .optional() - .describe('The names of all the flows that implement input rails.'), - }) - .describe('Configuration of input rails.') - .optional() - .describe('Configuration of the input rails.'), - output: zod - .object({ - parallel: zod - .boolean() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneOutputOneParallelDefault - ) - .describe('If True, the output rails are executed in parallel.'), - flows: zod - .array(zod.string()) - .optional() - .describe('The names of all the flows that implement output rails.'), - streaming: zod - .object({ - enabled: zod - .boolean() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneOutputOneStreamingOneEnabledDefault - ) - .describe('Enables streaming mode when True.'), - chunk_size: zod - .number() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneOutputOneStreamingOneChunkSizeDefault - ) - .describe( - 'The number of tokens in each processing chunk. This is the size of the token block on which output rails are applied.' - ), - context_size: zod - .number() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneOutputOneStreamingOneContextSizeDefault - ) - .describe( - 'The number of tokens carried over from the previous chunk to provide context for continuity in processing.' - ), - stream_first: zod - .boolean() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneOutputOneStreamingOneStreamFirstDefault - ) - .describe( - 'If True, token chunks are streamed immediately before output rails are applied.' - ), - }) - .describe('Configuration for managing streaming output of LLM tokens.') - .optional() - .describe('Configuration for streaming output rails.'), - apply_to_reasoning_traces: zod - .boolean() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneOutputOneApplyToReasoningTracesDefault - ) - .describe( - 'If True, output rails will apply guardrails to both reasoning traces and output response. If False, output rails will only apply guardrails to the output response excluding the reasoning traces, thus keeping reasoning traces unaltered.' - ), - }) - .describe('Configuration of output rails.') - .optional() - .describe('Configuration of the output rails.'), - retrieval: zod - .object({ - flows: zod - .array(zod.string()) - .optional() - .describe('The names of all the flows that implement retrieval rails.'), - }) - .describe('Configuration of retrieval rails.') - .optional() - .describe('Configuration of the retrieval rails.'), - dialog: zod - .object({ - single_call: zod - .object({ - enabled: zod - .boolean() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneDialogOneSingleCallOneEnabledDefault - ), - fallback_to_multiple_calls: zod - .boolean() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneDialogOneSingleCallOneFallbackToMultipleCallsDefault - ) - .describe( - 'Whether to fall back to multiple calls if a single call is not possible.' - ), - }) - .describe( - 'Configuration for the single LLM call option for topical rails.' - ) - .optional() - .describe('Configuration for the single LLM call option.'), - user_messages: zod - .object({ - embeddings_only: zod - .boolean() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneDialogOneUserMessagesEmbeddingsOnlyDefault - ) - .describe( - 'Whether to use only embeddings for computing the user canonical form messages.' - ), - embeddings_only_similarity_threshold: zod - .number() - .min( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneDialogOneUserMessagesEmbeddingsOnlySimilarityThresholdMin - ) - .max( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneDialogOneUserMessagesEmbeddingsOnlySimilarityThresholdMax - ) - .optional() - .describe( - 'The similarity threshold to use when using only embeddings for computing the user canonical form messages.' - ), - embeddings_only_fallback_intent: zod - .string() - .optional() - .describe( - 'Defines the fallback intent when the similarity is below the threshold. If set to None, the user intent is computed normally using the LLM. If set to a string value, that string is used as the intent.' - ), - }) - .optional() - .describe('Configuration for how the user messages are interpreted.'), - }) - .describe('Configuration of topical rails.') - .optional() - .describe('Configuration of the dialog rails.'), - actions: zod - .object({ - instant_actions: zod - .array(zod.string()) - .optional() - .describe('The names of all actions which should finish instantly.'), - }) - .describe( - 'Configuration of action rails.\n\nAction rails control various options related to the execution of actions.\nCurrently, only\n\nIn the future multiple options will be added, e.g., what input validation should be\nperformed per action, output validation, throttling, disabling, etc.' - ) - .optional() - .describe('Configuration of action rails.'), - tool_output: zod - .object({ - flows: zod - .array(zod.string()) - .optional() - .describe('The names of all the flows that implement tool output rails.'), - parallel: zod - .boolean() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneToolOutputOneParallelDefault - ) - .describe('If True, the tool output rails are executed in parallel.'), - }) - .describe( - 'Configuration of tool output rails.\nTool output rails are applied to tool calls before they are executed.\nThey can validate tool names, parameters, and context to ensure safe tool usage.' - ) - .optional() - .describe('Configuration of tool output rails.'), - tool_input: zod - .object({ - flows: zod - .array(zod.string()) - .optional() - .describe('The names of all the flows that implement tool input rails.'), - parallel: zod - .boolean() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoRailsOneToolInputOneParallelDefault - ) - .describe('If True, the tool input rails are executed in parallel.'), - }) - .describe( - 'Configuration of tool input rails.\nTool input rails are applied to tool results before they are processed.\nThey can validate, filter, or transform tool outputs for security and safety.' - ) - .optional() - .describe('Configuration of tool input rails.'), - }) - .describe('Configuration of specific rails.') - .optional() - .describe('Configuration for the various rails (input, output, etc.).'), - enable_rails_exceptions: zod - .boolean() - .default(guardrailsCheckBodyGuardrailsOneConfigTwoEnableRailsExceptionsDefault) - .describe( - 'If set, the pre-defined guardrails raise exceptions instead of returning pre-defined messages.' - ), - passthrough: zod - .boolean() - .optional() - .describe( - 'Whether the original prompt should pass through the guardrails configuration as is. This means it will not be altered in any way. ' - ), - tracing: zod - .object({ - enabled: zod - .boolean() - .default(guardrailsCheckBodyGuardrailsOneConfigTwoTracingOneEnabledDefault), - adapters: zod - .array( - zod.object({ - name: zod - .string() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoTracingOneAdaptersItemNameDefault - ) - .describe('The name of the adapter.'), - }) - ) - .optional() - .describe( - 'The list of tracing adapters to use. If not specified, the default adapters are used.' - ), - span_format: zod - .string() - .default(guardrailsCheckBodyGuardrailsOneConfigTwoTracingOneSpanFormatDefault) - .describe( - "The span format to use. Options are 'legacy' (simple metrics) or 'opentelemetry' (OpenTelemetry semantic conventions)." - ), - enable_content_capture: zod - .boolean() - .default( - guardrailsCheckBodyGuardrailsOneConfigTwoTracingOneEnableContentCaptureDefault - ) - .describe( - 'Capture prompts and responses (user\/assistant\/tool message content) in tracing\/telemetry events. Disabled by default for privacy and alignment with OpenTelemetry GenAI semantic conventions. WARNING: Enabling this may include PII and sensitive data in your telemetry backend.' - ), - }) - .optional() - .describe('Configuration for tracing.'), - }) - .describe('Configuration object for the models and the rails.'), - ]) - .default(guardrailsCheckBodyGuardrailsOneConfigDefault) - .describe('The id of the configuration or its dict representation to be used.'), - config_id: zod - .string() - .default(guardrailsCheckBodyGuardrailsOneConfigIdDefault) - .describe('The id of the configuration to be used.'), - config_ids: zod - .array(zod.string()) - .optional() - .describe( - 'The list of configuration ids to be used. If set, the configurations will be combined.' - ), - return_choice: zod - .boolean() - .default(guardrailsCheckBodyGuardrailsOneReturnChoiceDefault) - .describe('If set, guardrails data will be included as a JSON in the choices array.'), - context: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Additional context data to be added to the conversation.'), - stream: zod - .boolean() - .default(guardrailsCheckBodyGuardrailsOneStreamDefault) - .describe( - 'If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message.' - ), - options: zod - .object({ - rails: zod - .object({ - input: zod - .union([zod.boolean(), zod.array(zod.string())]) - .default(guardrailsCheckBodyGuardrailsOneOptionsOneRailsOneInputDefault) - .describe( - 'Whether the input rails are enabled or not. If a list of names is specified, then only the specified input rails will be applied.' - ), - output: zod - .union([zod.boolean(), zod.array(zod.string())]) - .default(guardrailsCheckBodyGuardrailsOneOptionsOneRailsOneOutputDefault) - .describe( - 'Whether the output rails are enabled or not. If a list of names is specified, then only the specified output rails will be applied.' - ), - retrieval: zod - .union([zod.boolean(), zod.array(zod.string())]) - .default(guardrailsCheckBodyGuardrailsOneOptionsOneRailsOneRetrievalDefault) - .describe( - 'Whether the retrieval rails are enabled or not. If a list of names is specified, then only the specified retrieval rails will be applied.' - ), - dialog: zod - .boolean() - .default(guardrailsCheckBodyGuardrailsOneOptionsOneRailsOneDialogDefault) - .describe('Whether the dialog rails are enabled or not.'), - }) - .describe('Options for what rails should be used during the generation.') - .optional() - .describe( - 'Options for which rails should be applied for the generation. By default, all rails are enabled.' - ), - llm_params: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Additional parameters that should be used for the LLM call'), - llm_output: zod - .boolean() - .default(guardrailsCheckBodyGuardrailsOneOptionsOneLlmOutputDefault) - .describe('Whether the response should also include any custom LLM output.'), - output_vars: zod - .union([zod.boolean(), zod.array(zod.string())]) - .optional() - .describe( - 'Whether additional context information should be returned. When True is specified, the whole context is returned. Otherwise, a list of key names can be specified.' - ), - log: zod - .object({ - activated_rails: zod - .boolean() - .default(guardrailsCheckBodyGuardrailsOneOptionsOneLogOneActivatedRailsDefault) - .describe( - 'Include detailed information about the rails that were activated during generation.' - ), - llm_calls: zod - .boolean() - .default(guardrailsCheckBodyGuardrailsOneOptionsOneLogOneLlmCallsDefault) - .describe( - 'Include information about all the LLM calls that were made. This includes: prompt, completion, token usage, raw response, etc.' - ), - internal_events: zod - .boolean() - .default(guardrailsCheckBodyGuardrailsOneOptionsOneLogOneInternalEventsDefault) - .describe('Include the array of internal generated events.'), - colang_history: zod - .boolean() - .default(guardrailsCheckBodyGuardrailsOneOptionsOneLogOneColangHistoryDefault) - .describe('Include the history of the conversation in Colang format.'), - stats: zod - .boolean() - .default(guardrailsCheckBodyGuardrailsOneOptionsOneLogOneStatsDefault) - .describe( - 'Include generation statistics — rail durations, LLM call counts, and token usage.' - ), - }) - .describe('Options for what should be included in the generation log.') - .optional() - .describe( - 'Options about what to include in the log. By default, nothing is included. ' - ), - }) - .describe( - 'A set of options that should be applied during a generation.\n\nThe GenerationOptions control various things such as what rails are enabled,\nadditional parameters for the main LLM, whether the rails should be enforced or\nran in parallel, what to be included in the generation log, etc.' - ) - .optional() - .describe('Additional options for controlling the generation.'), - state: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('A state object that should be used to continue the interaction.'), - }) - .optional() - .describe('Guardrails specific options for the request.'), - }) - .describe('Currently only inherits, in the future we might add new fields.'); - -export const guardrailsCheckResponseGuardrailsDataOneLogOneActivatedRailsItemExecutedActionsItemLlmCallsItemStartedAtDefault = 0; -export const guardrailsCheckResponseGuardrailsDataOneLogOneActivatedRailsItemExecutedActionsItemLlmCallsItemFinishedAtDefault = 0; -export const guardrailsCheckResponseGuardrailsDataOneLogOneActivatedRailsItemExecutedActionsItemLlmCallsItemLlmModelNameDefault = `unknown`; -export const guardrailsCheckResponseGuardrailsDataOneLogOneActivatedRailsItemStopDefault = false; -export const guardrailsCheckResponseGuardrailsDataOneLogOneStatsOneLlmCallsDurationDefault = 0; -export const guardrailsCheckResponseGuardrailsDataOneLogOneStatsOneLlmCallsCountDefault = 0; -export const guardrailsCheckResponseGuardrailsDataOneLogOneStatsOneLlmCallsTotalPromptTokensDefault = 0; -export const guardrailsCheckResponseGuardrailsDataOneLogOneStatsOneLlmCallsTotalCompletionTokensDefault = 0; -export const guardrailsCheckResponseGuardrailsDataOneLogOneStatsOneLlmCallsTotalTokensDefault = 0; -export const guardrailsCheckResponseGuardrailsDataOneLogOneLlmCallsItemStartedAtDefault = 0; -export const guardrailsCheckResponseGuardrailsDataOneLogOneLlmCallsItemFinishedAtDefault = 0; -export const guardrailsCheckResponseGuardrailsDataOneLogOneLlmCallsItemLlmModelNameDefault = `unknown`; - -export const GuardrailsCheckResponse = zod.object({ - status: zod - .enum(['blocked', 'success', 'unknown']) - .describe('Overall status indicating if all rails passed or if any failed.'), - rails_status: zod - .record( - zod.string(), - zod.object({ - status: zod - .enum(['blocked', 'success', 'unknown']) - .describe('Status of the individual rail.'), - }) - ) - .describe('Dictionary mapping each rail to its status.'), - guardrails_data: zod - .object({ - llm_output: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Contains any additional output coming from the LLM.'), - config_ids: zod - .array(zod.string()) - .optional() - .describe('The list of configuration ids that were used.'), - output_data: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'The output data, i.e. a dict with the values corresponding to the `output_vars`.' - ), - log: zod - .object({ - activated_rails: zod - .array( - zod - .object({ - type: zod - .string() - .describe( - 'The type of the rail that was activated, e.g., input, output, dialog.' - ), - name: zod - .string() - .describe( - 'The name of the rail, i.e., the name of the flow implementing the rail.' - ), - decisions: zod - .array(zod.string()) - .optional() - .describe( - "A sequence of decisions made by the rail, e.g., 'bot refuse to respond', 'stop', 'continue'." - ), - executed_actions: zod - .array( - zod - .object({ - action_name: zod - .string() - .describe('The name of the action that was executed.'), - action_params: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('The parameters for the action.'), - return_value: zod - .unknown() - .optional() - .describe('The value returned by the action.'), - llm_calls: zod - .array( - zod.object({ - task: zod - .string() - .optional() - .describe('The internal task that made the call.'), - duration: zod - .number() - .optional() - .describe('The duration in seconds.'), - total_tokens: zod - .number() - .optional() - .describe('The total number of used tokens.'), - prompt_tokens: zod - .number() - .optional() - .describe('The number of input tokens.'), - completion_tokens: zod - .number() - .optional() - .describe('The number of output tokens.'), - started_at: zod - .number() - .default( - guardrailsCheckResponseGuardrailsDataOneLogOneActivatedRailsItemExecutedActionsItemLlmCallsItemStartedAtDefault - ) - .describe('The timestamp for when the LLM call started.'), - finished_at: zod - .number() - .default( - guardrailsCheckResponseGuardrailsDataOneLogOneActivatedRailsItemExecutedActionsItemLlmCallsItemFinishedAtDefault - ) - .describe('The timestamp for when the LLM call finished.'), - id: zod - .string() - .optional() - .describe('The unique prompt identifier.'), - prompt: zod - .string() - .optional() - .describe('The prompt that was used for the LLM call.'), - completion: zod - .string() - .optional() - .describe('The completion generated by the LLM.'), - raw_response: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'The raw response received from the LLM. May contain additional information, e.g. logprobs.' - ), - llm_model_name: zod - .string() - .default( - guardrailsCheckResponseGuardrailsDataOneLogOneActivatedRailsItemExecutedActionsItemLlmCallsItemLlmModelNameDefault - ) - .describe('The name of the model use for the LLM call.'), - }) - ) - .optional() - .describe('Information about the LLM calls made by the action.'), - started_at: zod - .number() - .optional() - .describe('Timestamp for when the action started.'), - finished_at: zod - .number() - .optional() - .describe('Timestamp for when the action finished.'), - duration: zod - .number() - .optional() - .describe('How long the action took to execute, in seconds.'), - }) - .describe('Information about an action that was executed.') - ) - .optional() - .describe('The list of actions executed by the rail.'), - stop: zod - .boolean() - .default( - guardrailsCheckResponseGuardrailsDataOneLogOneActivatedRailsItemStopDefault - ) - .describe('Whether the rail decided to stop any further processing.'), - additional_info: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Additional information coming from rail.'), - started_at: zod - .number() - .optional() - .describe('Timestamp for when the rail started.'), - finished_at: zod - .number() - .optional() - .describe('Timestamp for when the rail finished.'), - duration: zod - .number() - .optional() - .describe( - "The duration in seconds for applying the rail. Some rails are applied instantly, e.g., dialog rails, so they don't have a duration." - ), - }) - .describe('A rail that was activated during the generation.') - ) - .optional() - .describe('The list of rails that were activated during generation.'), - stats: zod - .object({ - input_rails_duration: zod - .number() - .optional() - .describe('The time in seconds spent in processing the input rails.'), - dialog_rails_duration: zod - .number() - .optional() - .describe('The time in seconds spent in processing the dialog rails.'), - generation_rails_duration: zod - .number() - .optional() - .describe('The time in seconds spent in generation rails.'), - output_rails_duration: zod - .number() - .optional() - .describe('The time in seconds spent in processing the output rails.'), - total_duration: zod.number().optional().describe('The total time in seconds.'), - llm_calls_duration: zod - .number() - .default( - guardrailsCheckResponseGuardrailsDataOneLogOneStatsOneLlmCallsDurationDefault - ) - .describe('The time in seconds spent in LLM calls.'), - llm_calls_count: zod - .number() - .default(guardrailsCheckResponseGuardrailsDataOneLogOneStatsOneLlmCallsCountDefault) - .describe('The number of LLM calls in total.'), - llm_calls_total_prompt_tokens: zod - .number() - .default( - guardrailsCheckResponseGuardrailsDataOneLogOneStatsOneLlmCallsTotalPromptTokensDefault - ) - .describe('The total number of prompt tokens.'), - llm_calls_total_completion_tokens: zod - .number() - .default( - guardrailsCheckResponseGuardrailsDataOneLogOneStatsOneLlmCallsTotalCompletionTokensDefault - ) - .describe('The total number of completion tokens.'), - llm_calls_total_tokens: zod - .number() - .default( - guardrailsCheckResponseGuardrailsDataOneLogOneStatsOneLlmCallsTotalTokensDefault - ) - .describe('The total number of tokens.'), - }) - .describe('General stats about the generation.') - .optional() - .describe('General stats about the generation process.'), - llm_calls: zod - .array( - zod.object({ - task: zod.string().optional().describe('The internal task that made the call.'), - duration: zod.number().optional().describe('The duration in seconds.'), - total_tokens: zod.number().optional().describe('The total number of used tokens.'), - prompt_tokens: zod.number().optional().describe('The number of input tokens.'), - completion_tokens: zod.number().optional().describe('The number of output tokens.'), - started_at: zod - .number() - .default( - guardrailsCheckResponseGuardrailsDataOneLogOneLlmCallsItemStartedAtDefault - ) - .describe('The timestamp for when the LLM call started.'), - finished_at: zod - .number() - .default( - guardrailsCheckResponseGuardrailsDataOneLogOneLlmCallsItemFinishedAtDefault - ) - .describe('The timestamp for when the LLM call finished.'), - id: zod.string().optional().describe('The unique prompt identifier.'), - prompt: zod - .string() - .optional() - .describe('The prompt that was used for the LLM call.'), - completion: zod - .string() - .optional() - .describe('The completion generated by the LLM.'), - raw_response: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'The raw response received from the LLM. May contain additional information, e.g. logprobs.' - ), - llm_model_name: zod - .string() - .default( - guardrailsCheckResponseGuardrailsDataOneLogOneLlmCallsItemLlmModelNameDefault - ) - .describe('The name of the model use for the LLM call.'), - }) - ) - .optional() - .describe( - 'The list of LLM calls that have been made to fulfill the generation request. ' - ), - internal_events: zod - .array(zod.record(zod.string(), zod.unknown())) - .optional() - .describe('The complete sequence of internal events generated.'), - colang_history: zod - .string() - .optional() - .describe('The Colang history associated with the generation.'), - }) - .describe('Contains additional logging information associated with a generation call.') - .optional() - .describe('Additional logging information.'), - }) - .optional() - .describe('Additional data related to guardrails.'), -}); - -/** - * List available guardrail configs. - -Lists guardrail configs for a specific workspace. - * @summary List Guardrail Configs - */ -export const GuardrailsListGuardrailConfigsParams = zod.object({ - workspace: zod.string(), -}); - -export const guardrailsListGuardrailConfigsQueryPageDefault = 1; -export const guardrailsListGuardrailConfigsQueryPageSizeDefault = 10; -export const guardrailsListGuardrailConfigsQuerySortDefault = `created_at`; - -export const GuardrailsListGuardrailConfigsQueryParams = zod.object({ - page: zod - .number() - .default(guardrailsListGuardrailConfigsQueryPageDefault) - .describe('Page number.'), - page_size: zod - .number() - .default(guardrailsListGuardrailConfigsQueryPageSizeDefault) - .describe('Page size.'), - sort: zod - .enum(['created_at', '-created_at', 'name', '-name']) - .default(guardrailsListGuardrailConfigsQuerySortDefault) - .describe( - 'The field to sort by. To sort in decreasing order, use `-` in front of the field name.' - ), - filter: zod - .object({ - name: zod.string().optional().describe('Filter by config name.'), - description: zod.string().optional().describe('Filter by config description.'), - project: zod.string().optional().describe('Filter by project name.'), - created_at: zod - .object({ - $gte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results greater than or equal to this datetime.'), - $lte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results less than or equal to this datetime.'), - }) - .optional() - .describe( - "Filter by creation date. Supports '$gte' (on or after) and '$lte' (on or before) datetime filters." - ), - updated_at: zod - .object({ - $gte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results greater than or equal to this datetime.'), - $lte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results less than or equal to this datetime.'), - }) - .optional() - .describe( - "Filter by update date. Supports '$gte' (on or after) and '$lte' (on or before) datetime filters." - ), - }) - .optional() - .describe( - 'Filter guardrail configs by name, description, project, created_at, and updated_at.' - ), -}); - -export const guardrailsListGuardrailConfigsResponseDataItemNameDefault = ``; -export const guardrailsListGuardrailConfigsResponseDataItemWorkspaceRegExp = new RegExp( - '^[\\w\\-\\+.@:]+$' -); -export const guardrailsListGuardrailConfigsResponseDataItemDataOneModelsItemModeDefault = `chat`; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneModelsItemCacheOneEnabledDefault = false; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneModelsItemCacheOneMaxsizeDefault = 50000; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneModelsItemCacheOneStatsOneEnabledDefault = false; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneInstructionsDefault = [ - { - type: `general`, - content: `Below is a conversation between a helpful AI assistant and a user. The bot is designed to generate human-like text based on the input that it receives. The bot is talkative and provides lots of specific details. If the bot does not know the answer to a question, it truthfully says it does not know.`, - }, -]; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneSampleConversationDefault = `user "Hello there!" - express greeting -bot express greeting - "Hello! How can I assist you today?" -user "What can you do for me?" - ask about capabilities -bot respond about capabilities - "As an AI assistant, I can help you with a wide range of tasks. This includes question answering on various topics, generating text for various purposes and providing suggestions based on your preferences." -user "Tell me a bit about the history of NVIDIA." - ask general question -bot response for general question - "NVIDIA is a technology company that specializes in designing and manufacturing graphics processing units (GPUs) and other computer hardware. The company was founded in 1993 by Jen-Hsun Huang, Chris Malachowsky, and Curtis Priem." -user "tell me more" - request more information -bot provide more information - "Initially, the company focused on developing 3D graphics processing technology for the PC gaming market. In 1999, NVIDIA released the GeForce 256, the world\`s first GPU, which was a major breakthrough for the gaming industry. The company continued to innovate in the GPU space, releasing new products and expanding into other markets such as professional graphics, mobile devices, and artificial intelligence." -user "thanks" - express appreciation -bot express appreciation and offer additional help - "You\`re welcome. If you have any more questions or if there\`s anything else I can help you with, please don\`t hesitate to ask." -`; -export const guardrailsListGuardrailConfigsResponseDataItemDataOnePromptsItemMaxLengthDefault = 16000; - -export const guardrailsListGuardrailConfigsResponseDataItemDataOnePromptsItemModeDefault = `standard`; -export const guardrailsListGuardrailConfigsResponseDataItemDataOnePromptingModeDefault = `standard`; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneLowestTemperatureDefault = 0.001; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneEnableMultiStepGenerationDefault = false; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneColangVersionDefault = `1.0`; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneFactCheckingOneFallbackToSelfCheckDefault = false; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOnePatronusOneInputOneEvaluateConfigOneSuccessStrategyDefault = `all_pass`; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOnePatronusOneOutputOneEvaluateConfigOneSuccessStrategyDefault = `all_pass`; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneSensitiveDataDetectionOneInputOneMaskTokenDefault = `*`; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneSensitiveDataDetectionOneInputOneScoreThresholdDefault = 0.2; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneSensitiveDataDetectionOneOutputOneMaskTokenDefault = `*`; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneSensitiveDataDetectionOneOutputOneScoreThresholdDefault = 0.2; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneSensitiveDataDetectionOneRetrievalOneMaskTokenDefault = `*`; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneSensitiveDataDetectionOneRetrievalOneScoreThresholdDefault = 0.2; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneRegexDetectionOneInputOneCaseInsensitiveDefault = false; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneRegexDetectionOneOutputOneCaseInsensitiveDefault = false; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneRegexDetectionOneRetrievalOneCaseInsensitiveDefault = false; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneJailbreakDetectionOneLengthPerPerplexityThresholdDefault = 89.79; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneJailbreakDetectionOneLengthPerPerplexityThresholdExclusiveMin = 0; - -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneJailbreakDetectionOnePrefixSuffixPerplexityThresholdDefault = 1845.65; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneJailbreakDetectionOnePrefixSuffixPerplexityThresholdExclusiveMin = 0; - -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneJailbreakDetectionOneNimServerEndpointDefault = `classify`; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneInjectionDetectionOneActionDefault = `reject`; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneInjectionDetectionOneActionRegExp = - new RegExp('^(reject|omit)$'); -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneGlinerOneServerEndpointDefault = `http://localhost:1235/v1/extract`; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneGlinerOneThresholdDefault = 0.5; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneGlinerOneChunkLengthDefault = 384; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneGlinerOneOverlapDefault = 128; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneGlinerOneFlatNerDefault = false; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneFiddlerOneFiddlerEndpointDefault = `http://localhost:8080/process/text`; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneFiddlerOneSafetyThresholdDefault = 0.1; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneFiddlerOneFaithfulnessThresholdDefault = 0.05; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneClavataOneServerEndpointDefault = `https://gateway.app.clavata.ai:8443`; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneClavataOneLabelMatchLogicDefault = `ANY`; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneCrowdstrikeAidrOneTimeoutDefault = 30; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneTrendMicroOneV1UrlDefault = `https://api.xdr.trendmicro.com/v3.0/aiSecurity/applyGuardrails`; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneTrendMicroOneApplicationNameDefault = `nemo-guardrails`; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneTrendMicroOneApplicationNameMax = 64; - -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneTrendMicroOneApplicationNameRegExp = - new RegExp('^[a-zA-Z0-9_-]+$'); -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneTrendMicroOneDetailedResponseDefault = false; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneAiDefenseOneTimeoutDefault = 30; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneAiDefenseOneFailOpenDefault = false; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneContentSafetyOneMultilingualEnabledDefault = false; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneContentSafetyOneReasoningEnabledDefault = false; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneInputOneParallelDefault = false; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneOutputOneParallelDefault = false; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneOutputOneStreamingOneEnabledDefault = true; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneOutputOneStreamingOneChunkSizeDefault = 200; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneOutputOneStreamingOneContextSizeDefault = 50; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneOutputOneStreamingOneStreamFirstDefault = true; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneOutputOneApplyToReasoningTracesDefault = false; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneDialogOneSingleCallOneEnabledDefault = false; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneDialogOneSingleCallOneFallbackToMultipleCallsDefault = true; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneDialogOneUserMessagesEmbeddingsOnlyDefault = false; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneDialogOneUserMessagesEmbeddingsOnlySimilarityThresholdMin = 0; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneDialogOneUserMessagesEmbeddingsOnlySimilarityThresholdMax = 1; - -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneToolOutputOneParallelDefault = false; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneToolInputOneParallelDefault = false; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneEnableRailsExceptionsDefault = false; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneTracingOneEnabledDefault = false; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneTracingOneAdaptersItemNameDefault = `FileSystem`; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneTracingOneSpanFormatDefault = `opentelemetry`; -export const guardrailsListGuardrailConfigsResponseDataItemDataOneTracingOneEnableContentCaptureDefault = false; - -export const GuardrailsListGuardrailConfigsResponse = zod.object({ - data: zod.array( - zod - .object({ - name: zod - .string() - .default(guardrailsListGuardrailConfigsResponseDataItemNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(guardrailsListGuardrailConfigsResponseDataItemWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - description: zod.string().optional().describe('Description of the guardrail config'), - data: zod - .object({ - models: zod - .array( - zod - .object({ - type: zod.string(), - engine: zod.string(), - model: zod - .string() - .optional() - .describe( - "The model name. If using Inference Gateway, this should be the Model Entity reference ('workspace\/model_name')." - ), - parameters: zod - .object({ - base_url: zod - .string() - .optional() - .describe('The URL to use for inference with this model.'), - default_headers: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Custom HTTP headers to include in requests to this model. Each key-value pair represents a header name (key) and its default value (value). You can override the default value for a header by populating it in the request headers.' - ), - }) - .describe( - 'Parameters for configuring how to interact with a model in a guardrails config.' - ) - .optional() - .describe( - 'Additional parameters to configure how to interact with the model.' - ), - mode: zod - .enum(['chat', 'text']) - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneModelsItemModeDefault - ) - .describe( - "Whether the mode is 'text' completion or 'chat' completion. Allowed values are 'chat' or 'text'." - ), - cache: zod - .object({ - enabled: zod - .boolean() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneModelsItemCacheOneEnabledDefault - ) - .describe('Whether caching is enabled (default: False - no caching)'), - maxsize: zod - .number() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneModelsItemCacheOneMaxsizeDefault - ) - .describe('Maximum number of entries in the cache per model'), - stats: zod - .object({ - enabled: zod - .boolean() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneModelsItemCacheOneStatsOneEnabledDefault - ) - .describe('Whether cache statistics tracking is enabled'), - log_interval: zod - .number() - .optional() - .describe( - 'Seconds between periodic cache stats logging to logs (None disables logging)' - ), - }) - .describe('Configuration for cache statistics tracking and logging.') - .optional() - .describe('Configuration for cache statistics tracking and logging'), - }) - .describe('Configuration for model caching.') - .optional() - .describe( - 'Cache configuration for this specific model (primarily used for content safety models)' - ), - }) - .describe( - "Configuration of a model used by the rails engine.\n\nIf using Inference Gateway, the `model` field should be a Model Entity reference ('workspace\/model_name')." - ) - ) - .optional() - .describe('The list of models used by the rails configuration.'), - instructions: zod - .array( - zod - .object({ - type: zod.string(), - content: zod.string(), - }) - .describe( - 'Configuration for instructions in natural language that should be passed to the LLM.' - ) - ) - .default(guardrailsListGuardrailConfigsResponseDataItemDataOneInstructionsDefault) - .describe('List of instructions in natural language that the LLM should use.'), - actions_server_url: zod - .string() - .optional() - .describe('The URL of the actions server that should be used for the rails.'), - sample_conversation: zod - .string() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneSampleConversationDefault - ) - .describe('The sample conversation that should be used inside the prompts.'), - prompts: zod - .array( - zod - .object({ - task: zod.string().describe('The id of the task associated with this prompt.'), - content: zod - .string() - .optional() - .describe("The content of the prompt, if it's a string."), - messages: zod - .array( - zod.union([ - zod - .object({ - type: zod - .string() - .describe( - "The type of message, e.g., 'assistant', 'user', 'system'." - ), - content: zod.string().describe('The content of the message.'), - }) - .describe('Template for a message structure.'), - zod.string(), - ]) - ) - .optional() - .describe( - 'The list of messages included in the prompt. Used for chat models.' - ), - models: zod - .array(zod.string()) - .optional() - .describe( - 'If specified, the prompt will be used only for the given LLM engines\/models. The format is a list of strings with the format: or \/.' - ), - output_parser: zod - .string() - .optional() - .describe('The name of the output parser to use for this prompt.'), - max_length: zod - .number() - .min(1) - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOnePromptsItemMaxLengthDefault - ) - .describe('The maximum length of the prompt in number of characters.'), - mode: zod - .string() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOnePromptsItemModeDefault - ) - .describe( - "Corresponds to the `prompting_mode` for which this prompt is fetched. Default is 'standard'." - ), - stop: zod - .array(zod.string()) - .optional() - .describe( - 'If specified, will be configure stop tokens for models that support this.' - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe( - 'The maximum number of tokens that can be generated in the chat completion.' - ), - }) - .describe('Configuration for prompts that will be used for a specific task.') - ) - .optional() - .describe('The prompts that should be used for the various LLM tasks.'), - prompting_mode: zod - .string() - .default(guardrailsListGuardrailConfigsResponseDataItemDataOnePromptingModeDefault) - .describe('Allows choosing between different prompting strategies.'), - lowest_temperature: zod - .number() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneLowestTemperatureDefault - ) - .describe('The lowest temperature that should be used for the LLM.'), - enable_multi_step_generation: zod - .boolean() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneEnableMultiStepGenerationDefault - ) - .describe('Whether to enable multi-step generation for the LLM.'), - colang_version: zod - .string() - .default(guardrailsListGuardrailConfigsResponseDataItemDataOneColangVersionDefault) - .describe('The Colang version to use.'), - custom_data: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Any custom configuration data that might be needed.'), - rails: zod - .object({ - config: zod - .object({ - fact_checking: zod - .object({ - parameters: zod.record(zod.string(), zod.unknown()).optional(), - fallback_to_self_check: zod - .boolean() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneFactCheckingOneFallbackToSelfCheckDefault - ) - .describe('Whether to fall back to self-check if another method fail.'), - }) - .describe('Configuration data for the fact-checking rail.') - .optional() - .describe('Configuration data for the fact-checking rail.'), - autoalign: zod - .object({ - parameters: zod.record(zod.string(), zod.unknown()).optional(), - input: zod - .object({ - guardrails_config: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'The guardrails configuration that is passed to the AutoAlign endpoint' - ), - }) - .describe('List of guardrails that are activated') - .optional() - .describe('Input configuration for AutoAlign guardrails'), - output: zod - .object({ - guardrails_config: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'The guardrails configuration that is passed to the AutoAlign endpoint' - ), - }) - .describe('List of guardrails that are activated') - .optional() - .describe('Output configuration for AutoAlign guardrails'), - }) - .describe('Configuration data for the AutoAlign API') - .optional() - .describe('Configuration data for the AutoAlign guardrails API.'), - patronus: zod - .object({ - input: zod - .object({ - evaluate_config: zod - .object({ - success_strategy: zod - .enum(['all_pass', 'any_pass']) - .describe( - 'Strategy for determining whether a Patronus Evaluation API\nrequest should pass, especially when multiple evaluators\nare called in a single request.\nALL_PASS requires all evaluators to pass for success.\nANY_PASS requires only one evaluator to pass for success.' - ) - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOnePatronusOneInputOneEvaluateConfigOneSuccessStrategyDefault - ) - .describe( - 'Strategy to determine whether the Patronus Evaluate API Guardrail passes or not.' - ), - params: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Parameters to the Patronus Evaluate API'), - }) - .describe('Config to parameterize the Patronus Evaluate API call') - .optional() - .describe('Configuration passed to the Patronus Evaluate API'), - }) - .describe('Config for the Patronus Evaluate API call') - .optional() - .describe('Patronus Evaluate API configuration for an Input Guardrail'), - output: zod - .object({ - evaluate_config: zod - .object({ - success_strategy: zod - .enum(['all_pass', 'any_pass']) - .describe( - 'Strategy for determining whether a Patronus Evaluation API\nrequest should pass, especially when multiple evaluators\nare called in a single request.\nALL_PASS requires all evaluators to pass for success.\nANY_PASS requires only one evaluator to pass for success.' - ) - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOnePatronusOneOutputOneEvaluateConfigOneSuccessStrategyDefault - ) - .describe( - 'Strategy to determine whether the Patronus Evaluate API Guardrail passes or not.' - ), - params: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Parameters to the Patronus Evaluate API'), - }) - .describe('Config to parameterize the Patronus Evaluate API call') - .optional() - .describe('Configuration passed to the Patronus Evaluate API'), - }) - .describe('Config for the Patronus Evaluate API call') - .optional() - .describe('Patronus Evaluate API configuration for an Output Guardrail'), - }) - .describe('Configuration data for the Patronus Evaluate API') - .optional() - .describe('Configuration data for the Patronus Evaluate API.'), - sensitive_data_detection: zod - .object({ - recognizers: zod - .array(zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'Additional custom recognizers. Check out https:\/\/microsoft.github.io\/presidio\/tutorial\/08_no_code\/ for more details.' - ), - input: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe( - 'The list of entities that should be detected. Check out https:\/\/microsoft.github.io\/presidio\/supported_entities\/ forthe list of supported entities.' - ), - mask_token: zod - .string() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneSensitiveDataDetectionOneInputOneMaskTokenDefault - ) - .describe( - 'The token that should be used to mask the sensitive data.' - ), - score_threshold: zod - .number() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneSensitiveDataDetectionOneInputOneScoreThresholdDefault - ) - .describe( - 'The score threshold that should be used to detect the sensitive data.' - ), - }) - .optional() - .describe( - 'Configuration of the entities to be detected on the user input.' - ), - output: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe( - 'The list of entities that should be detected. Check out https:\/\/microsoft.github.io\/presidio\/supported_entities\/ forthe list of supported entities.' - ), - mask_token: zod - .string() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneSensitiveDataDetectionOneOutputOneMaskTokenDefault - ) - .describe( - 'The token that should be used to mask the sensitive data.' - ), - score_threshold: zod - .number() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneSensitiveDataDetectionOneOutputOneScoreThresholdDefault - ) - .describe( - 'The score threshold that should be used to detect the sensitive data.' - ), - }) - .optional() - .describe( - 'Configuration of the entities to be detected on the bot output.' - ), - retrieval: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe( - 'The list of entities that should be detected. Check out https:\/\/microsoft.github.io\/presidio\/supported_entities\/ forthe list of supported entities.' - ), - mask_token: zod - .string() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneSensitiveDataDetectionOneRetrievalOneMaskTokenDefault - ) - .describe( - 'The token that should be used to mask the sensitive data.' - ), - score_threshold: zod - .number() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneSensitiveDataDetectionOneRetrievalOneScoreThresholdDefault - ) - .describe( - 'The score threshold that should be used to detect the sensitive data.' - ), - }) - .optional() - .describe( - 'Configuration of the entities to be detected on retrieved relevant chunks.' - ), - }) - .describe('Configuration of what sensitive data should be detected.') - .optional() - .describe('Configuration for detecting sensitive data.'), - regex_detection: zod - .object({ - input: zod - .object({ - patterns: zod - .array(zod.string()) - .optional() - .describe('List of regex patterns to match against the text.'), - case_insensitive: zod - .boolean() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneRegexDetectionOneInputOneCaseInsensitiveDefault - ) - .describe('Whether to perform case-insensitive matching.'), - }) - .describe( - 'Configuration options for regex pattern detection on a specific source.' - ) - .optional() - .describe('Configuration for regex patterns to detect on user input.'), - output: zod - .object({ - patterns: zod - .array(zod.string()) - .optional() - .describe('List of regex patterns to match against the text.'), - case_insensitive: zod - .boolean() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneRegexDetectionOneOutputOneCaseInsensitiveDefault - ) - .describe('Whether to perform case-insensitive matching.'), - }) - .describe( - 'Configuration options for regex pattern detection on a specific source.' - ) - .optional() - .describe('Configuration for regex patterns to detect on bot output.'), - retrieval: zod - .object({ - patterns: zod - .array(zod.string()) - .optional() - .describe('List of regex patterns to match against the text.'), - case_insensitive: zod - .boolean() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneRegexDetectionOneRetrievalOneCaseInsensitiveDefault - ) - .describe('Whether to perform case-insensitive matching.'), - }) - .describe( - 'Configuration options for regex pattern detection on a specific source.' - ) - .optional() - .describe( - 'Configuration for regex patterns to detect on retrieved relevant chunks.' - ), - }) - .describe('Configuration for regex pattern detection.') - .optional() - .describe('Configuration for regex pattern detection.'), - jailbreak_detection: zod - .object({ - server_endpoint: zod - .string() - .optional() - .describe( - 'The endpoint for the jailbreak detection heuristics\/model container.' - ), - length_per_perplexity_threshold: zod - .number() - .gt( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneJailbreakDetectionOneLengthPerPerplexityThresholdExclusiveMin - ) - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneJailbreakDetectionOneLengthPerPerplexityThresholdDefault - ) - .describe('The length\/perplexity threshold.'), - prefix_suffix_perplexity_threshold: zod - .number() - .gt( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneJailbreakDetectionOnePrefixSuffixPerplexityThresholdExclusiveMin - ) - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneJailbreakDetectionOnePrefixSuffixPerplexityThresholdDefault - ) - .describe('The prefix\/suffix perplexity threshold.'), - nim_base_url: zod - .string() - .optional() - .describe( - 'Base URL for jailbreak detection model. Example: http:\/\/localhost:8000\/v1' - ), - nim_server_endpoint: zod - .string() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneJailbreakDetectionOneNimServerEndpointDefault - ) - .describe( - "Classification path uri. Defaults to 'classify' for NemoGuard JailbreakDetect." - ), - api_key: zod - .string() - .optional() - .describe( - 'Secret String with API key for use in Jailbreak requests. Takes precedence over api_key_env_var' - ), - api_key_env_var: zod - .string() - .optional() - .describe( - 'Environment variable containing API key for jailbreak detection model' - ), - nim_url: zod - .string() - .optional() - .describe('DEPRECATED: Use nim_base_url instead'), - nim_port: zod - .number() - .optional() - .describe('DEPRECATED: Include port in nim_base_url instead'), - embedding: zod.string().optional(), - }) - .describe('Configuration data for jailbreak detection.') - .optional() - .describe('Configuration for jailbreak detection.'), - injection_detection: zod - .object({ - injections: zod - .array(zod.string()) - .optional() - .describe( - "The list of injection types to detect. Options are 'sqli', 'template', 'code', 'xss'.Currently, only SQL injection, template injection, code injection, and markdown cross-site scripting are supported. Custom rules can be added, provided they are in the `yara_path` and have a `.yara` file extension." - ), - action: zod - .string() - .regex( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneInjectionDetectionOneActionRegExp - ) - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneInjectionDetectionOneActionDefault - ) - .describe( - "Action to take. Options are 'reject' to offer a rejection message, 'omit' to mask the offending content, and 'sanitize' to pass the content as-is in the safest way. These options are listed in descending order of relative safety. 'sanitize' is not implemented at this time." - ), - yara_rules: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Dictionary mapping rule names to YARA rule strings. If provided, these rules will be used instead of loading rules from yara_path. Each rule should be a valid YARA rule string.' - ), - }) - .optional() - .describe('Configuration for injection detection.'), - privateai: zod - .object({ - server_endpoint: zod - .string() - .optional() - .describe('The endpoint for the private AI detection server.'), - input: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe('The list of entities that should be detected.'), - }) - .describe('Configuration options for Private AI.') - .optional() - .describe( - 'Configuration of the entities to be detected on the user input.' - ), - output: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe('The list of entities that should be detected.'), - }) - .describe('Configuration options for Private AI.') - .optional() - .describe( - 'Configuration of the entities to be detected on the bot output.' - ), - retrieval: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe('The list of entities that should be detected.'), - }) - .describe('Configuration options for Private AI.') - .optional() - .describe( - 'Configuration of the entities to be detected on retrieved relevant chunks.' - ), - }) - .describe('Configuration for Private AI.') - .optional() - .describe('Configuration for Private AI.'), - gliner: zod - .object({ - server_endpoint: zod - .string() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneGlinerOneServerEndpointDefault - ) - .describe('The endpoint for the GLiNER detection server.'), - threshold: zod - .number() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneGlinerOneThresholdDefault - ) - .describe('Confidence threshold for entity detection (0.0 to 1.0).'), - chunk_length: zod - .number() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneGlinerOneChunkLengthDefault - ) - .describe('Length of text chunks for processing.'), - overlap: zod - .number() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneGlinerOneOverlapDefault - ) - .describe('Overlap between chunks.'), - flat_ner: zod - .boolean() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneGlinerOneFlatNerDefault - ) - .describe( - 'Whether to use flat NER mode. Setting to False allows for nested entities.' - ), - input: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe( - "The list of entity labels to detect (e.g., 'email', 'phone_number', 'ssn')." - ), - }) - .describe('Configuration options for GLiNER.') - .optional() - .describe( - 'Configuration of the entities to be detected on the user input.' - ), - output: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe( - "The list of entity labels to detect (e.g., 'email', 'phone_number', 'ssn')." - ), - }) - .describe('Configuration options for GLiNER.') - .optional() - .describe( - 'Configuration of the entities to be detected on the bot output.' - ), - retrieval: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe( - "The list of entity labels to detect (e.g., 'email', 'phone_number', 'ssn')." - ), - }) - .describe('Configuration options for GLiNER.') - .optional() - .describe( - 'Configuration of the entities to be detected on retrieved relevant chunks.' - ), - }) - .describe('Configuration for GLiNER PII detection.') - .optional() - .describe('Configuration for GLiNER PII detection.'), - fiddler: zod - .object({ - fiddler_endpoint: zod - .string() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneFiddlerOneFiddlerEndpointDefault - ) - .describe('The global endpoint for Fiddler Guardrails requests.'), - safety_threshold: zod - .number() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneFiddlerOneSafetyThresholdDefault - ) - .describe('Fiddler Guardrails safety detection threshold.'), - faithfulness_threshold: zod - .number() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneFiddlerOneFaithfulnessThresholdDefault - ) - .describe('Fiddler Guardrails faithfulness detection threshold.'), - }) - .describe('Configuration for Fiddler Guardrails.') - .optional() - .describe('Configuration for Fiddler Guardrails.'), - clavata: zod - .object({ - server_endpoint: zod - .string() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneClavataOneServerEndpointDefault - ) - .describe('The endpoint for the Clavata API'), - policies: zod - .record(zod.string(), zod.string()) - .optional() - .describe('A dictionary of policy aliases and their corresponding IDs.'), - label_match_logic: zod - .enum(['ANY', 'ALL']) - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneClavataOneLabelMatchLogicDefault - ) - .describe( - 'The logic to use when deciding whether the evaluation matched.\n If ANY, only one of the configured labels needs to be found in the input or output.\n If ALL, all configured labels must be found in the input or output.' - ), - input: zod - .object({ - policy: zod - .string() - .describe( - 'The policy alias to use when evaluating inputs or outputs.' - ), - labels: zod - .array(zod.string()) - .optional() - .describe( - 'A list of labels to match against the policy.\n If no labels are provided, the overall policy result will be returned.\n If labels are provided, only hits on the provided labels will be considered a hit.' - ), - }) - .describe('Configuration data for the Clavata API') - .optional() - .describe('Clavata configuration for an Input Guardrail'), - output: zod - .object({ - policy: zod - .string() - .describe( - 'The policy alias to use when evaluating inputs or outputs.' - ), - labels: zod - .array(zod.string()) - .optional() - .describe( - 'A list of labels to match against the policy.\n If no labels are provided, the overall policy result will be returned.\n If labels are provided, only hits on the provided labels will be considered a hit.' - ), - }) - .describe('Configuration data for the Clavata API') - .optional() - .describe('Clavata configuration for an Output Guardrail'), - }) - .describe('Configuration data for the Clavata API') - .optional() - .describe('Configuration for Clavata.'), - crowdstrike_aidr: zod - .object({ - timeout: zod - .number() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneCrowdstrikeAidrOneTimeoutDefault - ) - .describe('Timeout in seconds for API requests to CrowdStrike AIDR'), - }) - .describe('Configuration data for the CrowdStrike AIDR API') - .optional() - .describe('Configuration for CrowdStrike AIDR.'), - pangea: zod - .object({ - input: zod - .object({ - recipe: zod - .string() - .describe( - 'Recipe key of a configuration of data types and settings defined in the Pangea User Console. It\n specifies the rules that are to be applied to the text, such as defang malicious URLs.' - ), - }) - .describe('Configuration data for the Pangea AI Guard API') - .optional() - .describe('Pangea configuration for an Input Guardrail'), - output: zod - .object({ - recipe: zod - .string() - .describe( - 'Recipe key of a configuration of data types and settings defined in the Pangea User Console. It\n specifies the rules that are to be applied to the text, such as defang malicious URLs.' - ), - }) - .describe('Configuration data for the Pangea AI Guard API') - .optional() - .describe('Pangea configuration for an Output Guardrail'), - }) - .describe('Configuration data for the Pangea AI Guard API') - .optional() - .describe('Configuration for Pangea.'), - guardrails_ai: zod - .object({ - validators: zod - .array( - zod - .object({ - name: zod - .string() - .describe( - "Unique identifier or import path for the Guardrails AI validator (e.g., 'toxic_language', 'pii', 'regex_match', or 'guardrails\/competitor_check')." - ), - parameters: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Parameters to pass to the validator during initialization (e.g., threshold, regex pattern).' - ), - metadata: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Metadata to pass to the validator during validation (e.g., valid_topics, context).' - ), - }) - .describe('Configuration for a single Guardrails AI validator.') - ) - .optional() - .describe( - 'List of Guardrails AI validators to apply. Each validator can have its own parameters and metadata.' - ), - }) - .describe('Configuration data for Guardrails AI integration.') - .optional() - .describe('Configuration for Guardrails AI validators.'), - trend_micro: zod - .object({ - v1_url: zod - .string() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneTrendMicroOneV1UrlDefault - ) - .describe( - 'The endpoint for the Trend Micro AI Guard API. For other regions, use: https:\/\/api.{region}.xdr.trendmicro.com\/v3.0\/aiSecurity\/applyGuardrails where region is eu, jp, au, in, sg, or mea.' - ), - api_key_env_var: zod - .string() - .optional() - .describe( - 'Environment variable containing API key for Trend Micro AI Guard' - ), - application_name: zod - .string() - .max( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneTrendMicroOneApplicationNameMax - ) - .regex( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneTrendMicroOneApplicationNameRegExp - ) - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneTrendMicroOneApplicationNameDefault - ) - .describe( - 'Application name for TMV1-Application-Name header (REQUIRED). Must contain only letters, numbers, hyphens, and underscores, with a maximum length of 64 characters.' - ), - detailed_response: zod - .boolean() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneTrendMicroOneDetailedResponseDefault - ) - .describe( - 'If True, returns detailed AI Guard results with confidence scores (Prefer: return=representation). If False, returns minimal response with only action and reasons (Prefer: return=minimal).' - ), - }) - .describe('Configuration data for the Trend Micro AI Guard API') - .optional() - .describe('Configuration for Trend Micro.'), - ai_defense: zod - .object({ - timeout: zod - .number() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneAiDefenseOneTimeoutDefault - ) - .describe('Timeout in seconds for API requests to AI Defense service'), - fail_open: zod - .boolean() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneAiDefenseOneFailOpenDefault - ) - .describe( - 'If True, allow content when AI Defense API call fails (fail open). If False, block content when API call fails (fail closed). Does not affect missing configuration validation.' - ), - }) - .describe('Configuration data for the Cisco AI Defense API') - .optional() - .describe('Configuration for Cisco AI Defense.'), - content_safety: zod - .object({ - multilingual: zod - .object({ - enabled: zod - .boolean() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneContentSafetyOneMultilingualEnabledDefault - ) - .describe( - 'If True, detect the language of user input and return refusal messages in the same language. Supported languages: en (English), es (Spanish), zh (Chinese), de (German), fr (French), hi (Hindi), ja (Japanese), ar (Arabic), th (Thai).' - ), - refusal_messages: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - "Custom refusal messages per language code. If not specified, built-in defaults are used. Example: {'en': 'Sorry, I cannot help.', 'es': 'Lo siento, no puedo ayudar.'}" - ), - }) - .optional() - .describe('Configuration for multilingual refusal messages.'), - reasoning: zod - .object({ - enabled: zod - .boolean() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneConfigOneContentSafetyOneReasoningEnabledDefault - ) - .describe( - 'If True, enable reasoning mode (with traces) for content safety models. If False, use low-latency mode without reasoning traces.' - ), - }) - .optional() - .describe('Configuration for reasoning mode in content safety models.'), - }) - .describe('Configuration data for content safety rails.') - .optional() - .describe('Configuration for content safety rails.'), - }) - .describe( - 'Configuration data for specific rails that are supported out-of-the-box.' - ) - .optional() - .describe( - 'Configuration data for specific rails that are supported out-of-the-box.' - ), - input: zod - .object({ - parallel: zod - .boolean() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneInputOneParallelDefault - ) - .describe('If True, the input rails are executed in parallel.'), - flows: zod - .array(zod.string()) - .optional() - .describe('The names of all the flows that implement input rails.'), - }) - .describe('Configuration of input rails.') - .optional() - .describe('Configuration of the input rails.'), - output: zod - .object({ - parallel: zod - .boolean() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneOutputOneParallelDefault - ) - .describe('If True, the output rails are executed in parallel.'), - flows: zod - .array(zod.string()) - .optional() - .describe('The names of all the flows that implement output rails.'), - streaming: zod - .object({ - enabled: zod - .boolean() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneOutputOneStreamingOneEnabledDefault - ) - .describe('Enables streaming mode when True.'), - chunk_size: zod - .number() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneOutputOneStreamingOneChunkSizeDefault - ) - .describe( - 'The number of tokens in each processing chunk. This is the size of the token block on which output rails are applied.' - ), - context_size: zod - .number() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneOutputOneStreamingOneContextSizeDefault - ) - .describe( - 'The number of tokens carried over from the previous chunk to provide context for continuity in processing.' - ), - stream_first: zod - .boolean() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneOutputOneStreamingOneStreamFirstDefault - ) - .describe( - 'If True, token chunks are streamed immediately before output rails are applied.' - ), - }) - .describe('Configuration for managing streaming output of LLM tokens.') - .optional() - .describe('Configuration for streaming output rails.'), - apply_to_reasoning_traces: zod - .boolean() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneOutputOneApplyToReasoningTracesDefault - ) - .describe( - 'If True, output rails will apply guardrails to both reasoning traces and output response. If False, output rails will only apply guardrails to the output response excluding the reasoning traces, thus keeping reasoning traces unaltered.' - ), - }) - .describe('Configuration of output rails.') - .optional() - .describe('Configuration of the output rails.'), - retrieval: zod - .object({ - flows: zod - .array(zod.string()) - .optional() - .describe('The names of all the flows that implement retrieval rails.'), - }) - .describe('Configuration of retrieval rails.') - .optional() - .describe('Configuration of the retrieval rails.'), - dialog: zod - .object({ - single_call: zod - .object({ - enabled: zod - .boolean() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneDialogOneSingleCallOneEnabledDefault - ), - fallback_to_multiple_calls: zod - .boolean() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneDialogOneSingleCallOneFallbackToMultipleCallsDefault - ) - .describe( - 'Whether to fall back to multiple calls if a single call is not possible.' - ), - }) - .describe('Configuration for the single LLM call option for topical rails.') - .optional() - .describe('Configuration for the single LLM call option.'), - user_messages: zod - .object({ - embeddings_only: zod - .boolean() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneDialogOneUserMessagesEmbeddingsOnlyDefault - ) - .describe( - 'Whether to use only embeddings for computing the user canonical form messages.' - ), - embeddings_only_similarity_threshold: zod - .number() - .min( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneDialogOneUserMessagesEmbeddingsOnlySimilarityThresholdMin - ) - .max( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneDialogOneUserMessagesEmbeddingsOnlySimilarityThresholdMax - ) - .optional() - .describe( - 'The similarity threshold to use when using only embeddings for computing the user canonical form messages.' - ), - embeddings_only_fallback_intent: zod - .string() - .optional() - .describe( - 'Defines the fallback intent when the similarity is below the threshold. If set to None, the user intent is computed normally using the LLM. If set to a string value, that string is used as the intent.' - ), - }) - .optional() - .describe('Configuration for how the user messages are interpreted.'), - }) - .describe('Configuration of topical rails.') - .optional() - .describe('Configuration of the dialog rails.'), - actions: zod - .object({ - instant_actions: zod - .array(zod.string()) - .optional() - .describe('The names of all actions which should finish instantly.'), - }) - .describe( - 'Configuration of action rails.\n\nAction rails control various options related to the execution of actions.\nCurrently, only\n\nIn the future multiple options will be added, e.g., what input validation should be\nperformed per action, output validation, throttling, disabling, etc.' - ) - .optional() - .describe('Configuration of action rails.'), - tool_output: zod - .object({ - flows: zod - .array(zod.string()) - .optional() - .describe('The names of all the flows that implement tool output rails.'), - parallel: zod - .boolean() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneToolOutputOneParallelDefault - ) - .describe('If True, the tool output rails are executed in parallel.'), - }) - .describe( - 'Configuration of tool output rails.\nTool output rails are applied to tool calls before they are executed.\nThey can validate tool names, parameters, and context to ensure safe tool usage.' - ) - .optional() - .describe('Configuration of tool output rails.'), - tool_input: zod - .object({ - flows: zod - .array(zod.string()) - .optional() - .describe('The names of all the flows that implement tool input rails.'), - parallel: zod - .boolean() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneRailsOneToolInputOneParallelDefault - ) - .describe('If True, the tool input rails are executed in parallel.'), - }) - .describe( - 'Configuration of tool input rails.\nTool input rails are applied to tool results before they are processed.\nThey can validate, filter, or transform tool outputs for security and safety.' - ) - .optional() - .describe('Configuration of tool input rails.'), - }) - .describe('Configuration of specific rails.') - .optional() - .describe('Configuration for the various rails (input, output, etc.).'), - enable_rails_exceptions: zod - .boolean() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneEnableRailsExceptionsDefault - ) - .describe( - 'If set, the pre-defined guardrails raise exceptions instead of returning pre-defined messages.' - ), - passthrough: zod - .boolean() - .optional() - .describe( - 'Whether the original prompt should pass through the guardrails configuration as is. This means it will not be altered in any way. ' - ), - tracing: zod - .object({ - enabled: zod - .boolean() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneTracingOneEnabledDefault - ), - adapters: zod - .array( - zod.object({ - name: zod - .string() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneTracingOneAdaptersItemNameDefault - ) - .describe('The name of the adapter.'), - }) - ) - .optional() - .describe( - 'The list of tracing adapters to use. If not specified, the default adapters are used.' - ), - span_format: zod - .string() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneTracingOneSpanFormatDefault - ) - .describe( - "The span format to use. Options are 'legacy' (simple metrics) or 'opentelemetry' (OpenTelemetry semantic conventions)." - ), - enable_content_capture: zod - .boolean() - .default( - guardrailsListGuardrailConfigsResponseDataItemDataOneTracingOneEnableContentCaptureDefault - ) - .describe( - 'Capture prompts and responses (user\/assistant\/tool message content) in tracing\/telemetry events. Disabled by default for privacy and alignment with OpenTelemetry GenAI semantic conventions. WARNING: Enabling this may include PII and sensitive data in your telemetry backend.' - ), - }) - .optional() - .describe('Configuration for tracing.'), - }) - .describe('Configuration object for the models and the rails.') - .optional() - .describe('Guardrail configuration data'), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('A guardrail configuration entity.') - ), - pagination: zod - .object({ - page: zod.number().describe('The current page number.'), - page_size: zod.number().describe('The page size used for the query.'), - current_page_size: zod.number().describe('The size for the current page.'), - total_pages: zod.number().describe('The total number of pages.'), - total_results: zod.number().describe('The total number of results.'), - }) - .optional() - .describe('Pagination information.'), - sort: zod.string().optional().describe('The field on which the results are sorted.'), - filter: zod.record(zod.string(), zod.unknown()).optional().describe('Filtering information.'), -}); - -/** - * Create a new guardrail config. - * @summary Create Config - */ -export const GuardrailsCreateConfigParams = zod.object({ - workspace: zod.string(), -}); - -export const GuardrailsCreateConfigBody = zod - .object({ - name: zod.string().describe('The name of the guardrail config'), - description: zod.string().optional().describe('Description of the guardrail config'), - data: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Guardrail configuration data'), - }) - .describe('Input schema for creating a guardrail config.'); - -/** - * Get info about a guardrail configuration. - * @summary Get Guardrail Config - */ -export const GuardrailsGetGuardrailConfigParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const guardrailsGetGuardrailConfigResponseNameDefault = ``; -export const guardrailsGetGuardrailConfigResponseWorkspaceRegExp = new RegExp('^[\\w\\-\\+.@:]+$'); -export const guardrailsGetGuardrailConfigResponseDataOneModelsItemModeDefault = `chat`; -export const guardrailsGetGuardrailConfigResponseDataOneModelsItemCacheOneEnabledDefault = false; -export const guardrailsGetGuardrailConfigResponseDataOneModelsItemCacheOneMaxsizeDefault = 50000; -export const guardrailsGetGuardrailConfigResponseDataOneModelsItemCacheOneStatsOneEnabledDefault = false; -export const guardrailsGetGuardrailConfigResponseDataOneInstructionsDefault = [ - { - type: `general`, - content: `Below is a conversation between a helpful AI assistant and a user. The bot is designed to generate human-like text based on the input that it receives. The bot is talkative and provides lots of specific details. If the bot does not know the answer to a question, it truthfully says it does not know.`, - }, -]; -export const guardrailsGetGuardrailConfigResponseDataOneSampleConversationDefault = `user "Hello there!" - express greeting -bot express greeting - "Hello! How can I assist you today?" -user "What can you do for me?" - ask about capabilities -bot respond about capabilities - "As an AI assistant, I can help you with a wide range of tasks. This includes question answering on various topics, generating text for various purposes and providing suggestions based on your preferences." -user "Tell me a bit about the history of NVIDIA." - ask general question -bot response for general question - "NVIDIA is a technology company that specializes in designing and manufacturing graphics processing units (GPUs) and other computer hardware. The company was founded in 1993 by Jen-Hsun Huang, Chris Malachowsky, and Curtis Priem." -user "tell me more" - request more information -bot provide more information - "Initially, the company focused on developing 3D graphics processing technology for the PC gaming market. In 1999, NVIDIA released the GeForce 256, the world\`s first GPU, which was a major breakthrough for the gaming industry. The company continued to innovate in the GPU space, releasing new products and expanding into other markets such as professional graphics, mobile devices, and artificial intelligence." -user "thanks" - express appreciation -bot express appreciation and offer additional help - "You\`re welcome. If you have any more questions or if there\`s anything else I can help you with, please don\`t hesitate to ask." -`; -export const guardrailsGetGuardrailConfigResponseDataOnePromptsItemMaxLengthDefault = 16000; - -export const guardrailsGetGuardrailConfigResponseDataOnePromptsItemModeDefault = `standard`; -export const guardrailsGetGuardrailConfigResponseDataOnePromptingModeDefault = `standard`; -export const guardrailsGetGuardrailConfigResponseDataOneLowestTemperatureDefault = 0.001; -export const guardrailsGetGuardrailConfigResponseDataOneEnableMultiStepGenerationDefault = false; -export const guardrailsGetGuardrailConfigResponseDataOneColangVersionDefault = `1.0`; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneFactCheckingOneFallbackToSelfCheckDefault = false; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOnePatronusOneInputOneEvaluateConfigOneSuccessStrategyDefault = `all_pass`; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOnePatronusOneOutputOneEvaluateConfigOneSuccessStrategyDefault = `all_pass`; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneSensitiveDataDetectionOneInputOneMaskTokenDefault = `*`; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneSensitiveDataDetectionOneInputOneScoreThresholdDefault = 0.2; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneSensitiveDataDetectionOneOutputOneMaskTokenDefault = `*`; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneSensitiveDataDetectionOneOutputOneScoreThresholdDefault = 0.2; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneSensitiveDataDetectionOneRetrievalOneMaskTokenDefault = `*`; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneSensitiveDataDetectionOneRetrievalOneScoreThresholdDefault = 0.2; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneRegexDetectionOneInputOneCaseInsensitiveDefault = false; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneRegexDetectionOneOutputOneCaseInsensitiveDefault = false; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneRegexDetectionOneRetrievalOneCaseInsensitiveDefault = false; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneJailbreakDetectionOneLengthPerPerplexityThresholdDefault = 89.79; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneJailbreakDetectionOneLengthPerPerplexityThresholdExclusiveMin = 0; - -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneJailbreakDetectionOnePrefixSuffixPerplexityThresholdDefault = 1845.65; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneJailbreakDetectionOnePrefixSuffixPerplexityThresholdExclusiveMin = 0; - -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneJailbreakDetectionOneNimServerEndpointDefault = `classify`; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneInjectionDetectionOneActionDefault = `reject`; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneInjectionDetectionOneActionRegExp = - new RegExp('^(reject|omit)$'); -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneGlinerOneServerEndpointDefault = `http://localhost:1235/v1/extract`; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneGlinerOneThresholdDefault = 0.5; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneGlinerOneChunkLengthDefault = 384; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneGlinerOneOverlapDefault = 128; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneGlinerOneFlatNerDefault = false; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneFiddlerOneFiddlerEndpointDefault = `http://localhost:8080/process/text`; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneFiddlerOneSafetyThresholdDefault = 0.1; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneFiddlerOneFaithfulnessThresholdDefault = 0.05; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneClavataOneServerEndpointDefault = `https://gateway.app.clavata.ai:8443`; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneClavataOneLabelMatchLogicDefault = `ANY`; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneCrowdstrikeAidrOneTimeoutDefault = 30; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneTrendMicroOneV1UrlDefault = `https://api.xdr.trendmicro.com/v3.0/aiSecurity/applyGuardrails`; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneTrendMicroOneApplicationNameDefault = `nemo-guardrails`; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneTrendMicroOneApplicationNameMax = 64; - -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneTrendMicroOneApplicationNameRegExp = - new RegExp('^[a-zA-Z0-9_-]+$'); -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneTrendMicroOneDetailedResponseDefault = false; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneAiDefenseOneTimeoutDefault = 30; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneAiDefenseOneFailOpenDefault = false; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneContentSafetyOneMultilingualEnabledDefault = false; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneContentSafetyOneReasoningEnabledDefault = false; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneInputOneParallelDefault = false; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneOutputOneParallelDefault = false; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneOutputOneStreamingOneEnabledDefault = true; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneOutputOneStreamingOneChunkSizeDefault = 200; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneOutputOneStreamingOneContextSizeDefault = 50; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneOutputOneStreamingOneStreamFirstDefault = true; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneOutputOneApplyToReasoningTracesDefault = false; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneDialogOneSingleCallOneEnabledDefault = false; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneDialogOneSingleCallOneFallbackToMultipleCallsDefault = true; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneDialogOneUserMessagesEmbeddingsOnlyDefault = false; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneDialogOneUserMessagesEmbeddingsOnlySimilarityThresholdMin = 0; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneDialogOneUserMessagesEmbeddingsOnlySimilarityThresholdMax = 1; - -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneToolOutputOneParallelDefault = false; -export const guardrailsGetGuardrailConfigResponseDataOneRailsOneToolInputOneParallelDefault = false; -export const guardrailsGetGuardrailConfigResponseDataOneEnableRailsExceptionsDefault = false; -export const guardrailsGetGuardrailConfigResponseDataOneTracingOneEnabledDefault = false; -export const guardrailsGetGuardrailConfigResponseDataOneTracingOneAdaptersItemNameDefault = `FileSystem`; -export const guardrailsGetGuardrailConfigResponseDataOneTracingOneSpanFormatDefault = `opentelemetry`; -export const guardrailsGetGuardrailConfigResponseDataOneTracingOneEnableContentCaptureDefault = false; - -export const GuardrailsGetGuardrailConfigResponse = zod - .object({ - name: zod - .string() - .default(guardrailsGetGuardrailConfigResponseNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(guardrailsGetGuardrailConfigResponseWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - description: zod.string().optional().describe('Description of the guardrail config'), - data: zod - .object({ - models: zod - .array( - zod - .object({ - type: zod.string(), - engine: zod.string(), - model: zod - .string() - .optional() - .describe( - "The model name. If using Inference Gateway, this should be the Model Entity reference ('workspace\/model_name')." - ), - parameters: zod - .object({ - base_url: zod - .string() - .optional() - .describe('The URL to use for inference with this model.'), - default_headers: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Custom HTTP headers to include in requests to this model. Each key-value pair represents a header name (key) and its default value (value). You can override the default value for a header by populating it in the request headers.' - ), - }) - .describe( - 'Parameters for configuring how to interact with a model in a guardrails config.' - ) - .optional() - .describe('Additional parameters to configure how to interact with the model.'), - mode: zod - .enum(['chat', 'text']) - .default(guardrailsGetGuardrailConfigResponseDataOneModelsItemModeDefault) - .describe( - "Whether the mode is 'text' completion or 'chat' completion. Allowed values are 'chat' or 'text'." - ), - cache: zod - .object({ - enabled: zod - .boolean() - .default( - guardrailsGetGuardrailConfigResponseDataOneModelsItemCacheOneEnabledDefault - ) - .describe('Whether caching is enabled (default: False - no caching)'), - maxsize: zod - .number() - .default( - guardrailsGetGuardrailConfigResponseDataOneModelsItemCacheOneMaxsizeDefault - ) - .describe('Maximum number of entries in the cache per model'), - stats: zod - .object({ - enabled: zod - .boolean() - .default( - guardrailsGetGuardrailConfigResponseDataOneModelsItemCacheOneStatsOneEnabledDefault - ) - .describe('Whether cache statistics tracking is enabled'), - log_interval: zod - .number() - .optional() - .describe( - 'Seconds between periodic cache stats logging to logs (None disables logging)' - ), - }) - .describe('Configuration for cache statistics tracking and logging.') - .optional() - .describe('Configuration for cache statistics tracking and logging'), - }) - .describe('Configuration for model caching.') - .optional() - .describe( - 'Cache configuration for this specific model (primarily used for content safety models)' - ), - }) - .describe( - "Configuration of a model used by the rails engine.\n\nIf using Inference Gateway, the `model` field should be a Model Entity reference ('workspace\/model_name')." - ) - ) - .optional() - .describe('The list of models used by the rails configuration.'), - instructions: zod - .array( - zod - .object({ - type: zod.string(), - content: zod.string(), - }) - .describe( - 'Configuration for instructions in natural language that should be passed to the LLM.' - ) - ) - .default(guardrailsGetGuardrailConfigResponseDataOneInstructionsDefault) - .describe('List of instructions in natural language that the LLM should use.'), - actions_server_url: zod - .string() - .optional() - .describe('The URL of the actions server that should be used for the rails.'), - sample_conversation: zod - .string() - .default(guardrailsGetGuardrailConfigResponseDataOneSampleConversationDefault) - .describe('The sample conversation that should be used inside the prompts.'), - prompts: zod - .array( - zod - .object({ - task: zod.string().describe('The id of the task associated with this prompt.'), - content: zod - .string() - .optional() - .describe("The content of the prompt, if it's a string."), - messages: zod - .array( - zod.union([ - zod - .object({ - type: zod - .string() - .describe("The type of message, e.g., 'assistant', 'user', 'system'."), - content: zod.string().describe('The content of the message.'), - }) - .describe('Template for a message structure.'), - zod.string(), - ]) - ) - .optional() - .describe('The list of messages included in the prompt. Used for chat models.'), - models: zod - .array(zod.string()) - .optional() - .describe( - 'If specified, the prompt will be used only for the given LLM engines\/models. The format is a list of strings with the format: or \/.' - ), - output_parser: zod - .string() - .optional() - .describe('The name of the output parser to use for this prompt.'), - max_length: zod - .number() - .min(1) - .default(guardrailsGetGuardrailConfigResponseDataOnePromptsItemMaxLengthDefault) - .describe('The maximum length of the prompt in number of characters.'), - mode: zod - .string() - .default(guardrailsGetGuardrailConfigResponseDataOnePromptsItemModeDefault) - .describe( - "Corresponds to the `prompting_mode` for which this prompt is fetched. Default is 'standard'." - ), - stop: zod - .array(zod.string()) - .optional() - .describe( - 'If specified, will be configure stop tokens for models that support this.' - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe( - 'The maximum number of tokens that can be generated in the chat completion.' - ), - }) - .describe('Configuration for prompts that will be used for a specific task.') - ) - .optional() - .describe('The prompts that should be used for the various LLM tasks.'), - prompting_mode: zod - .string() - .default(guardrailsGetGuardrailConfigResponseDataOnePromptingModeDefault) - .describe('Allows choosing between different prompting strategies.'), - lowest_temperature: zod - .number() - .default(guardrailsGetGuardrailConfigResponseDataOneLowestTemperatureDefault) - .describe('The lowest temperature that should be used for the LLM.'), - enable_multi_step_generation: zod - .boolean() - .default(guardrailsGetGuardrailConfigResponseDataOneEnableMultiStepGenerationDefault) - .describe('Whether to enable multi-step generation for the LLM.'), - colang_version: zod - .string() - .default(guardrailsGetGuardrailConfigResponseDataOneColangVersionDefault) - .describe('The Colang version to use.'), - custom_data: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Any custom configuration data that might be needed.'), - rails: zod - .object({ - config: zod - .object({ - fact_checking: zod - .object({ - parameters: zod.record(zod.string(), zod.unknown()).optional(), - fallback_to_self_check: zod - .boolean() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneFactCheckingOneFallbackToSelfCheckDefault - ) - .describe('Whether to fall back to self-check if another method fail.'), - }) - .describe('Configuration data for the fact-checking rail.') - .optional() - .describe('Configuration data for the fact-checking rail.'), - autoalign: zod - .object({ - parameters: zod.record(zod.string(), zod.unknown()).optional(), - input: zod - .object({ - guardrails_config: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'The guardrails configuration that is passed to the AutoAlign endpoint' - ), - }) - .describe('List of guardrails that are activated') - .optional() - .describe('Input configuration for AutoAlign guardrails'), - output: zod - .object({ - guardrails_config: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'The guardrails configuration that is passed to the AutoAlign endpoint' - ), - }) - .describe('List of guardrails that are activated') - .optional() - .describe('Output configuration for AutoAlign guardrails'), - }) - .describe('Configuration data for the AutoAlign API') - .optional() - .describe('Configuration data for the AutoAlign guardrails API.'), - patronus: zod - .object({ - input: zod - .object({ - evaluate_config: zod - .object({ - success_strategy: zod - .enum(['all_pass', 'any_pass']) - .describe( - 'Strategy for determining whether a Patronus Evaluation API\nrequest should pass, especially when multiple evaluators\nare called in a single request.\nALL_PASS requires all evaluators to pass for success.\nANY_PASS requires only one evaluator to pass for success.' - ) - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOnePatronusOneInputOneEvaluateConfigOneSuccessStrategyDefault - ) - .describe( - 'Strategy to determine whether the Patronus Evaluate API Guardrail passes or not.' - ), - params: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Parameters to the Patronus Evaluate API'), - }) - .describe('Config to parameterize the Patronus Evaluate API call') - .optional() - .describe('Configuration passed to the Patronus Evaluate API'), - }) - .describe('Config for the Patronus Evaluate API call') - .optional() - .describe('Patronus Evaluate API configuration for an Input Guardrail'), - output: zod - .object({ - evaluate_config: zod - .object({ - success_strategy: zod - .enum(['all_pass', 'any_pass']) - .describe( - 'Strategy for determining whether a Patronus Evaluation API\nrequest should pass, especially when multiple evaluators\nare called in a single request.\nALL_PASS requires all evaluators to pass for success.\nANY_PASS requires only one evaluator to pass for success.' - ) - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOnePatronusOneOutputOneEvaluateConfigOneSuccessStrategyDefault - ) - .describe( - 'Strategy to determine whether the Patronus Evaluate API Guardrail passes or not.' - ), - params: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Parameters to the Patronus Evaluate API'), - }) - .describe('Config to parameterize the Patronus Evaluate API call') - .optional() - .describe('Configuration passed to the Patronus Evaluate API'), - }) - .describe('Config for the Patronus Evaluate API call') - .optional() - .describe('Patronus Evaluate API configuration for an Output Guardrail'), - }) - .describe('Configuration data for the Patronus Evaluate API') - .optional() - .describe('Configuration data for the Patronus Evaluate API.'), - sensitive_data_detection: zod - .object({ - recognizers: zod - .array(zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'Additional custom recognizers. Check out https:\/\/microsoft.github.io\/presidio\/tutorial\/08_no_code\/ for more details.' - ), - input: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe( - 'The list of entities that should be detected. Check out https:\/\/microsoft.github.io\/presidio\/supported_entities\/ forthe list of supported entities.' - ), - mask_token: zod - .string() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneSensitiveDataDetectionOneInputOneMaskTokenDefault - ) - .describe('The token that should be used to mask the sensitive data.'), - score_threshold: zod - .number() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneSensitiveDataDetectionOneInputOneScoreThresholdDefault - ) - .describe( - 'The score threshold that should be used to detect the sensitive data.' - ), - }) - .optional() - .describe('Configuration of the entities to be detected on the user input.'), - output: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe( - 'The list of entities that should be detected. Check out https:\/\/microsoft.github.io\/presidio\/supported_entities\/ forthe list of supported entities.' - ), - mask_token: zod - .string() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneSensitiveDataDetectionOneOutputOneMaskTokenDefault - ) - .describe('The token that should be used to mask the sensitive data.'), - score_threshold: zod - .number() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneSensitiveDataDetectionOneOutputOneScoreThresholdDefault - ) - .describe( - 'The score threshold that should be used to detect the sensitive data.' - ), - }) - .optional() - .describe('Configuration of the entities to be detected on the bot output.'), - retrieval: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe( - 'The list of entities that should be detected. Check out https:\/\/microsoft.github.io\/presidio\/supported_entities\/ forthe list of supported entities.' - ), - mask_token: zod - .string() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneSensitiveDataDetectionOneRetrievalOneMaskTokenDefault - ) - .describe('The token that should be used to mask the sensitive data.'), - score_threshold: zod - .number() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneSensitiveDataDetectionOneRetrievalOneScoreThresholdDefault - ) - .describe( - 'The score threshold that should be used to detect the sensitive data.' - ), - }) - .optional() - .describe( - 'Configuration of the entities to be detected on retrieved relevant chunks.' - ), - }) - .describe('Configuration of what sensitive data should be detected.') - .optional() - .describe('Configuration for detecting sensitive data.'), - regex_detection: zod - .object({ - input: zod - .object({ - patterns: zod - .array(zod.string()) - .optional() - .describe('List of regex patterns to match against the text.'), - case_insensitive: zod - .boolean() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneRegexDetectionOneInputOneCaseInsensitiveDefault - ) - .describe('Whether to perform case-insensitive matching.'), - }) - .describe( - 'Configuration options for regex pattern detection on a specific source.' - ) - .optional() - .describe('Configuration for regex patterns to detect on user input.'), - output: zod - .object({ - patterns: zod - .array(zod.string()) - .optional() - .describe('List of regex patterns to match against the text.'), - case_insensitive: zod - .boolean() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneRegexDetectionOneOutputOneCaseInsensitiveDefault - ) - .describe('Whether to perform case-insensitive matching.'), - }) - .describe( - 'Configuration options for regex pattern detection on a specific source.' - ) - .optional() - .describe('Configuration for regex patterns to detect on bot output.'), - retrieval: zod - .object({ - patterns: zod - .array(zod.string()) - .optional() - .describe('List of regex patterns to match against the text.'), - case_insensitive: zod - .boolean() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneRegexDetectionOneRetrievalOneCaseInsensitiveDefault - ) - .describe('Whether to perform case-insensitive matching.'), - }) - .describe( - 'Configuration options for regex pattern detection on a specific source.' - ) - .optional() - .describe( - 'Configuration for regex patterns to detect on retrieved relevant chunks.' - ), - }) - .describe('Configuration for regex pattern detection.') - .optional() - .describe('Configuration for regex pattern detection.'), - jailbreak_detection: zod - .object({ - server_endpoint: zod - .string() - .optional() - .describe( - 'The endpoint for the jailbreak detection heuristics\/model container.' - ), - length_per_perplexity_threshold: zod - .number() - .gt( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneJailbreakDetectionOneLengthPerPerplexityThresholdExclusiveMin - ) - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneJailbreakDetectionOneLengthPerPerplexityThresholdDefault - ) - .describe('The length\/perplexity threshold.'), - prefix_suffix_perplexity_threshold: zod - .number() - .gt( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneJailbreakDetectionOnePrefixSuffixPerplexityThresholdExclusiveMin - ) - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneJailbreakDetectionOnePrefixSuffixPerplexityThresholdDefault - ) - .describe('The prefix\/suffix perplexity threshold.'), - nim_base_url: zod - .string() - .optional() - .describe( - 'Base URL for jailbreak detection model. Example: http:\/\/localhost:8000\/v1' - ), - nim_server_endpoint: zod - .string() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneJailbreakDetectionOneNimServerEndpointDefault - ) - .describe( - "Classification path uri. Defaults to 'classify' for NemoGuard JailbreakDetect." - ), - api_key: zod - .string() - .optional() - .describe( - 'Secret String with API key for use in Jailbreak requests. Takes precedence over api_key_env_var' - ), - api_key_env_var: zod - .string() - .optional() - .describe( - 'Environment variable containing API key for jailbreak detection model' - ), - nim_url: zod - .string() - .optional() - .describe('DEPRECATED: Use nim_base_url instead'), - nim_port: zod - .number() - .optional() - .describe('DEPRECATED: Include port in nim_base_url instead'), - embedding: zod.string().optional(), - }) - .describe('Configuration data for jailbreak detection.') - .optional() - .describe('Configuration for jailbreak detection.'), - injection_detection: zod - .object({ - injections: zod - .array(zod.string()) - .optional() - .describe( - "The list of injection types to detect. Options are 'sqli', 'template', 'code', 'xss'.Currently, only SQL injection, template injection, code injection, and markdown cross-site scripting are supported. Custom rules can be added, provided they are in the `yara_path` and have a `.yara` file extension." - ), - action: zod - .string() - .regex( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneInjectionDetectionOneActionRegExp - ) - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneInjectionDetectionOneActionDefault - ) - .describe( - "Action to take. Options are 'reject' to offer a rejection message, 'omit' to mask the offending content, and 'sanitize' to pass the content as-is in the safest way. These options are listed in descending order of relative safety. 'sanitize' is not implemented at this time." - ), - yara_rules: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Dictionary mapping rule names to YARA rule strings. If provided, these rules will be used instead of loading rules from yara_path. Each rule should be a valid YARA rule string.' - ), - }) - .optional() - .describe('Configuration for injection detection.'), - privateai: zod - .object({ - server_endpoint: zod - .string() - .optional() - .describe('The endpoint for the private AI detection server.'), - input: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe('The list of entities that should be detected.'), - }) - .describe('Configuration options for Private AI.') - .optional() - .describe('Configuration of the entities to be detected on the user input.'), - output: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe('The list of entities that should be detected.'), - }) - .describe('Configuration options for Private AI.') - .optional() - .describe('Configuration of the entities to be detected on the bot output.'), - retrieval: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe('The list of entities that should be detected.'), - }) - .describe('Configuration options for Private AI.') - .optional() - .describe( - 'Configuration of the entities to be detected on retrieved relevant chunks.' - ), - }) - .describe('Configuration for Private AI.') - .optional() - .describe('Configuration for Private AI.'), - gliner: zod - .object({ - server_endpoint: zod - .string() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneGlinerOneServerEndpointDefault - ) - .describe('The endpoint for the GLiNER detection server.'), - threshold: zod - .number() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneGlinerOneThresholdDefault - ) - .describe('Confidence threshold for entity detection (0.0 to 1.0).'), - chunk_length: zod - .number() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneGlinerOneChunkLengthDefault - ) - .describe('Length of text chunks for processing.'), - overlap: zod - .number() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneGlinerOneOverlapDefault - ) - .describe('Overlap between chunks.'), - flat_ner: zod - .boolean() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneGlinerOneFlatNerDefault - ) - .describe( - 'Whether to use flat NER mode. Setting to False allows for nested entities.' - ), - input: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe( - "The list of entity labels to detect (e.g., 'email', 'phone_number', 'ssn')." - ), - }) - .describe('Configuration options for GLiNER.') - .optional() - .describe('Configuration of the entities to be detected on the user input.'), - output: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe( - "The list of entity labels to detect (e.g., 'email', 'phone_number', 'ssn')." - ), - }) - .describe('Configuration options for GLiNER.') - .optional() - .describe('Configuration of the entities to be detected on the bot output.'), - retrieval: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe( - "The list of entity labels to detect (e.g., 'email', 'phone_number', 'ssn')." - ), - }) - .describe('Configuration options for GLiNER.') - .optional() - .describe( - 'Configuration of the entities to be detected on retrieved relevant chunks.' - ), - }) - .describe('Configuration for GLiNER PII detection.') - .optional() - .describe('Configuration for GLiNER PII detection.'), - fiddler: zod - .object({ - fiddler_endpoint: zod - .string() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneFiddlerOneFiddlerEndpointDefault - ) - .describe('The global endpoint for Fiddler Guardrails requests.'), - safety_threshold: zod - .number() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneFiddlerOneSafetyThresholdDefault - ) - .describe('Fiddler Guardrails safety detection threshold.'), - faithfulness_threshold: zod - .number() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneFiddlerOneFaithfulnessThresholdDefault - ) - .describe('Fiddler Guardrails faithfulness detection threshold.'), - }) - .describe('Configuration for Fiddler Guardrails.') - .optional() - .describe('Configuration for Fiddler Guardrails.'), - clavata: zod - .object({ - server_endpoint: zod - .string() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneClavataOneServerEndpointDefault - ) - .describe('The endpoint for the Clavata API'), - policies: zod - .record(zod.string(), zod.string()) - .optional() - .describe('A dictionary of policy aliases and their corresponding IDs.'), - label_match_logic: zod - .enum(['ANY', 'ALL']) - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneClavataOneLabelMatchLogicDefault - ) - .describe( - 'The logic to use when deciding whether the evaluation matched.\n If ANY, only one of the configured labels needs to be found in the input or output.\n If ALL, all configured labels must be found in the input or output.' - ), - input: zod - .object({ - policy: zod - .string() - .describe('The policy alias to use when evaluating inputs or outputs.'), - labels: zod - .array(zod.string()) - .optional() - .describe( - 'A list of labels to match against the policy.\n If no labels are provided, the overall policy result will be returned.\n If labels are provided, only hits on the provided labels will be considered a hit.' - ), - }) - .describe('Configuration data for the Clavata API') - .optional() - .describe('Clavata configuration for an Input Guardrail'), - output: zod - .object({ - policy: zod - .string() - .describe('The policy alias to use when evaluating inputs or outputs.'), - labels: zod - .array(zod.string()) - .optional() - .describe( - 'A list of labels to match against the policy.\n If no labels are provided, the overall policy result will be returned.\n If labels are provided, only hits on the provided labels will be considered a hit.' - ), - }) - .describe('Configuration data for the Clavata API') - .optional() - .describe('Clavata configuration for an Output Guardrail'), - }) - .describe('Configuration data for the Clavata API') - .optional() - .describe('Configuration for Clavata.'), - crowdstrike_aidr: zod - .object({ - timeout: zod - .number() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneCrowdstrikeAidrOneTimeoutDefault - ) - .describe('Timeout in seconds for API requests to CrowdStrike AIDR'), - }) - .describe('Configuration data for the CrowdStrike AIDR API') - .optional() - .describe('Configuration for CrowdStrike AIDR.'), - pangea: zod - .object({ - input: zod - .object({ - recipe: zod - .string() - .describe( - 'Recipe key of a configuration of data types and settings defined in the Pangea User Console. It\n specifies the rules that are to be applied to the text, such as defang malicious URLs.' - ), - }) - .describe('Configuration data for the Pangea AI Guard API') - .optional() - .describe('Pangea configuration for an Input Guardrail'), - output: zod - .object({ - recipe: zod - .string() - .describe( - 'Recipe key of a configuration of data types and settings defined in the Pangea User Console. It\n specifies the rules that are to be applied to the text, such as defang malicious URLs.' - ), - }) - .describe('Configuration data for the Pangea AI Guard API') - .optional() - .describe('Pangea configuration for an Output Guardrail'), - }) - .describe('Configuration data for the Pangea AI Guard API') - .optional() - .describe('Configuration for Pangea.'), - guardrails_ai: zod - .object({ - validators: zod - .array( - zod - .object({ - name: zod - .string() - .describe( - "Unique identifier or import path for the Guardrails AI validator (e.g., 'toxic_language', 'pii', 'regex_match', or 'guardrails\/competitor_check')." - ), - parameters: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Parameters to pass to the validator during initialization (e.g., threshold, regex pattern).' - ), - metadata: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Metadata to pass to the validator during validation (e.g., valid_topics, context).' - ), - }) - .describe('Configuration for a single Guardrails AI validator.') - ) - .optional() - .describe( - 'List of Guardrails AI validators to apply. Each validator can have its own parameters and metadata.' - ), - }) - .describe('Configuration data for Guardrails AI integration.') - .optional() - .describe('Configuration for Guardrails AI validators.'), - trend_micro: zod - .object({ - v1_url: zod - .string() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneTrendMicroOneV1UrlDefault - ) - .describe( - 'The endpoint for the Trend Micro AI Guard API. For other regions, use: https:\/\/api.{region}.xdr.trendmicro.com\/v3.0\/aiSecurity\/applyGuardrails where region is eu, jp, au, in, sg, or mea.' - ), - api_key_env_var: zod - .string() - .optional() - .describe('Environment variable containing API key for Trend Micro AI Guard'), - application_name: zod - .string() - .max( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneTrendMicroOneApplicationNameMax - ) - .regex( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneTrendMicroOneApplicationNameRegExp - ) - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneTrendMicroOneApplicationNameDefault - ) - .describe( - 'Application name for TMV1-Application-Name header (REQUIRED). Must contain only letters, numbers, hyphens, and underscores, with a maximum length of 64 characters.' - ), - detailed_response: zod - .boolean() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneTrendMicroOneDetailedResponseDefault - ) - .describe( - 'If True, returns detailed AI Guard results with confidence scores (Prefer: return=representation). If False, returns minimal response with only action and reasons (Prefer: return=minimal).' - ), - }) - .describe('Configuration data for the Trend Micro AI Guard API') - .optional() - .describe('Configuration for Trend Micro.'), - ai_defense: zod - .object({ - timeout: zod - .number() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneAiDefenseOneTimeoutDefault - ) - .describe('Timeout in seconds for API requests to AI Defense service'), - fail_open: zod - .boolean() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneAiDefenseOneFailOpenDefault - ) - .describe( - 'If True, allow content when AI Defense API call fails (fail open). If False, block content when API call fails (fail closed). Does not affect missing configuration validation.' - ), - }) - .describe('Configuration data for the Cisco AI Defense API') - .optional() - .describe('Configuration for Cisco AI Defense.'), - content_safety: zod - .object({ - multilingual: zod - .object({ - enabled: zod - .boolean() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneContentSafetyOneMultilingualEnabledDefault - ) - .describe( - 'If True, detect the language of user input and return refusal messages in the same language. Supported languages: en (English), es (Spanish), zh (Chinese), de (German), fr (French), hi (Hindi), ja (Japanese), ar (Arabic), th (Thai).' - ), - refusal_messages: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - "Custom refusal messages per language code. If not specified, built-in defaults are used. Example: {'en': 'Sorry, I cannot help.', 'es': 'Lo siento, no puedo ayudar.'}" - ), - }) - .optional() - .describe('Configuration for multilingual refusal messages.'), - reasoning: zod - .object({ - enabled: zod - .boolean() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneConfigOneContentSafetyOneReasoningEnabledDefault - ) - .describe( - 'If True, enable reasoning mode (with traces) for content safety models. If False, use low-latency mode without reasoning traces.' - ), - }) - .optional() - .describe('Configuration for reasoning mode in content safety models.'), - }) - .describe('Configuration data for content safety rails.') - .optional() - .describe('Configuration for content safety rails.'), - }) - .describe('Configuration data for specific rails that are supported out-of-the-box.') - .optional() - .describe('Configuration data for specific rails that are supported out-of-the-box.'), - input: zod - .object({ - parallel: zod - .boolean() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneInputOneParallelDefault - ) - .describe('If True, the input rails are executed in parallel.'), - flows: zod - .array(zod.string()) - .optional() - .describe('The names of all the flows that implement input rails.'), - }) - .describe('Configuration of input rails.') - .optional() - .describe('Configuration of the input rails.'), - output: zod - .object({ - parallel: zod - .boolean() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneOutputOneParallelDefault - ) - .describe('If True, the output rails are executed in parallel.'), - flows: zod - .array(zod.string()) - .optional() - .describe('The names of all the flows that implement output rails.'), - streaming: zod - .object({ - enabled: zod - .boolean() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneOutputOneStreamingOneEnabledDefault - ) - .describe('Enables streaming mode when True.'), - chunk_size: zod - .number() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneOutputOneStreamingOneChunkSizeDefault - ) - .describe( - 'The number of tokens in each processing chunk. This is the size of the token block on which output rails are applied.' - ), - context_size: zod - .number() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneOutputOneStreamingOneContextSizeDefault - ) - .describe( - 'The number of tokens carried over from the previous chunk to provide context for continuity in processing.' - ), - stream_first: zod - .boolean() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneOutputOneStreamingOneStreamFirstDefault - ) - .describe( - 'If True, token chunks are streamed immediately before output rails are applied.' - ), - }) - .describe('Configuration for managing streaming output of LLM tokens.') - .optional() - .describe('Configuration for streaming output rails.'), - apply_to_reasoning_traces: zod - .boolean() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneOutputOneApplyToReasoningTracesDefault - ) - .describe( - 'If True, output rails will apply guardrails to both reasoning traces and output response. If False, output rails will only apply guardrails to the output response excluding the reasoning traces, thus keeping reasoning traces unaltered.' - ), - }) - .describe('Configuration of output rails.') - .optional() - .describe('Configuration of the output rails.'), - retrieval: zod - .object({ - flows: zod - .array(zod.string()) - .optional() - .describe('The names of all the flows that implement retrieval rails.'), - }) - .describe('Configuration of retrieval rails.') - .optional() - .describe('Configuration of the retrieval rails.'), - dialog: zod - .object({ - single_call: zod - .object({ - enabled: zod - .boolean() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneDialogOneSingleCallOneEnabledDefault - ), - fallback_to_multiple_calls: zod - .boolean() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneDialogOneSingleCallOneFallbackToMultipleCallsDefault - ) - .describe( - 'Whether to fall back to multiple calls if a single call is not possible.' - ), - }) - .describe('Configuration for the single LLM call option for topical rails.') - .optional() - .describe('Configuration for the single LLM call option.'), - user_messages: zod - .object({ - embeddings_only: zod - .boolean() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneDialogOneUserMessagesEmbeddingsOnlyDefault - ) - .describe( - 'Whether to use only embeddings for computing the user canonical form messages.' - ), - embeddings_only_similarity_threshold: zod - .number() - .min( - guardrailsGetGuardrailConfigResponseDataOneRailsOneDialogOneUserMessagesEmbeddingsOnlySimilarityThresholdMin - ) - .max( - guardrailsGetGuardrailConfigResponseDataOneRailsOneDialogOneUserMessagesEmbeddingsOnlySimilarityThresholdMax - ) - .optional() - .describe( - 'The similarity threshold to use when using only embeddings for computing the user canonical form messages.' - ), - embeddings_only_fallback_intent: zod - .string() - .optional() - .describe( - 'Defines the fallback intent when the similarity is below the threshold. If set to None, the user intent is computed normally using the LLM. If set to a string value, that string is used as the intent.' - ), - }) - .optional() - .describe('Configuration for how the user messages are interpreted.'), - }) - .describe('Configuration of topical rails.') - .optional() - .describe('Configuration of the dialog rails.'), - actions: zod - .object({ - instant_actions: zod - .array(zod.string()) - .optional() - .describe('The names of all actions which should finish instantly.'), - }) - .describe( - 'Configuration of action rails.\n\nAction rails control various options related to the execution of actions.\nCurrently, only\n\nIn the future multiple options will be added, e.g., what input validation should be\nperformed per action, output validation, throttling, disabling, etc.' - ) - .optional() - .describe('Configuration of action rails.'), - tool_output: zod - .object({ - flows: zod - .array(zod.string()) - .optional() - .describe('The names of all the flows that implement tool output rails.'), - parallel: zod - .boolean() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneToolOutputOneParallelDefault - ) - .describe('If True, the tool output rails are executed in parallel.'), - }) - .describe( - 'Configuration of tool output rails.\nTool output rails are applied to tool calls before they are executed.\nThey can validate tool names, parameters, and context to ensure safe tool usage.' - ) - .optional() - .describe('Configuration of tool output rails.'), - tool_input: zod - .object({ - flows: zod - .array(zod.string()) - .optional() - .describe('The names of all the flows that implement tool input rails.'), - parallel: zod - .boolean() - .default( - guardrailsGetGuardrailConfigResponseDataOneRailsOneToolInputOneParallelDefault - ) - .describe('If True, the tool input rails are executed in parallel.'), - }) - .describe( - 'Configuration of tool input rails.\nTool input rails are applied to tool results before they are processed.\nThey can validate, filter, or transform tool outputs for security and safety.' - ) - .optional() - .describe('Configuration of tool input rails.'), - }) - .describe('Configuration of specific rails.') - .optional() - .describe('Configuration for the various rails (input, output, etc.).'), - enable_rails_exceptions: zod - .boolean() - .default(guardrailsGetGuardrailConfigResponseDataOneEnableRailsExceptionsDefault) - .describe( - 'If set, the pre-defined guardrails raise exceptions instead of returning pre-defined messages.' - ), - passthrough: zod - .boolean() - .optional() - .describe( - 'Whether the original prompt should pass through the guardrails configuration as is. This means it will not be altered in any way. ' - ), - tracing: zod - .object({ - enabled: zod - .boolean() - .default(guardrailsGetGuardrailConfigResponseDataOneTracingOneEnabledDefault), - adapters: zod - .array( - zod.object({ - name: zod - .string() - .default( - guardrailsGetGuardrailConfigResponseDataOneTracingOneAdaptersItemNameDefault - ) - .describe('The name of the adapter.'), - }) - ) - .optional() - .describe( - 'The list of tracing adapters to use. If not specified, the default adapters are used.' - ), - span_format: zod - .string() - .default(guardrailsGetGuardrailConfigResponseDataOneTracingOneSpanFormatDefault) - .describe( - "The span format to use. Options are 'legacy' (simple metrics) or 'opentelemetry' (OpenTelemetry semantic conventions)." - ), - enable_content_capture: zod - .boolean() - .default( - guardrailsGetGuardrailConfigResponseDataOneTracingOneEnableContentCaptureDefault - ) - .describe( - 'Capture prompts and responses (user\/assistant\/tool message content) in tracing\/telemetry events. Disabled by default for privacy and alignment with OpenTelemetry GenAI semantic conventions. WARNING: Enabling this may include PII and sensitive data in your telemetry backend.' - ), - }) - .optional() - .describe('Configuration for tracing.'), - }) - .describe('Configuration object for the models and the rails.') - .optional() - .describe('Guardrail configuration data'), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('A guardrail configuration entity.'); - -/** - * Update model metadata. If the request body has an empty field, -keep the old value. - * @summary Update Config - */ -export const GuardrailsUpdateConfigParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const GuardrailsUpdateConfigBody = zod - .object({ - description: zod.string().optional().describe('Description of the guardrail config'), - data: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Guardrail configuration data'), - }) - .describe('Input schema for updating a guardrail config.'); - -export const guardrailsUpdateConfigResponseNameDefault = ``; -export const guardrailsUpdateConfigResponseWorkspaceRegExp = new RegExp('^[\\w\\-\\+.@:]+$'); -export const guardrailsUpdateConfigResponseDataOneModelsItemModeDefault = `chat`; -export const guardrailsUpdateConfigResponseDataOneModelsItemCacheOneEnabledDefault = false; -export const guardrailsUpdateConfigResponseDataOneModelsItemCacheOneMaxsizeDefault = 50000; -export const guardrailsUpdateConfigResponseDataOneModelsItemCacheOneStatsOneEnabledDefault = false; -export const guardrailsUpdateConfigResponseDataOneInstructionsDefault = [ - { - type: `general`, - content: `Below is a conversation between a helpful AI assistant and a user. The bot is designed to generate human-like text based on the input that it receives. The bot is talkative and provides lots of specific details. If the bot does not know the answer to a question, it truthfully says it does not know.`, - }, -]; -export const guardrailsUpdateConfigResponseDataOneSampleConversationDefault = `user "Hello there!" - express greeting -bot express greeting - "Hello! How can I assist you today?" -user "What can you do for me?" - ask about capabilities -bot respond about capabilities - "As an AI assistant, I can help you with a wide range of tasks. This includes question answering on various topics, generating text for various purposes and providing suggestions based on your preferences." -user "Tell me a bit about the history of NVIDIA." - ask general question -bot response for general question - "NVIDIA is a technology company that specializes in designing and manufacturing graphics processing units (GPUs) and other computer hardware. The company was founded in 1993 by Jen-Hsun Huang, Chris Malachowsky, and Curtis Priem." -user "tell me more" - request more information -bot provide more information - "Initially, the company focused on developing 3D graphics processing technology for the PC gaming market. In 1999, NVIDIA released the GeForce 256, the world\`s first GPU, which was a major breakthrough for the gaming industry. The company continued to innovate in the GPU space, releasing new products and expanding into other markets such as professional graphics, mobile devices, and artificial intelligence." -user "thanks" - express appreciation -bot express appreciation and offer additional help - "You\`re welcome. If you have any more questions or if there\`s anything else I can help you with, please don\`t hesitate to ask." -`; -export const guardrailsUpdateConfigResponseDataOnePromptsItemMaxLengthDefault = 16000; - -export const guardrailsUpdateConfigResponseDataOnePromptsItemModeDefault = `standard`; -export const guardrailsUpdateConfigResponseDataOnePromptingModeDefault = `standard`; -export const guardrailsUpdateConfigResponseDataOneLowestTemperatureDefault = 0.001; -export const guardrailsUpdateConfigResponseDataOneEnableMultiStepGenerationDefault = false; -export const guardrailsUpdateConfigResponseDataOneColangVersionDefault = `1.0`; -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneFactCheckingOneFallbackToSelfCheckDefault = false; -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOnePatronusOneInputOneEvaluateConfigOneSuccessStrategyDefault = `all_pass`; -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOnePatronusOneOutputOneEvaluateConfigOneSuccessStrategyDefault = `all_pass`; -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneSensitiveDataDetectionOneInputOneMaskTokenDefault = `*`; -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneSensitiveDataDetectionOneInputOneScoreThresholdDefault = 0.2; -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneSensitiveDataDetectionOneOutputOneMaskTokenDefault = `*`; -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneSensitiveDataDetectionOneOutputOneScoreThresholdDefault = 0.2; -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneSensitiveDataDetectionOneRetrievalOneMaskTokenDefault = `*`; -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneSensitiveDataDetectionOneRetrievalOneScoreThresholdDefault = 0.2; -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneRegexDetectionOneInputOneCaseInsensitiveDefault = false; -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneRegexDetectionOneOutputOneCaseInsensitiveDefault = false; -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneRegexDetectionOneRetrievalOneCaseInsensitiveDefault = false; -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneJailbreakDetectionOneLengthPerPerplexityThresholdDefault = 89.79; -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneJailbreakDetectionOneLengthPerPerplexityThresholdExclusiveMin = 0; - -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneJailbreakDetectionOnePrefixSuffixPerplexityThresholdDefault = 1845.65; -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneJailbreakDetectionOnePrefixSuffixPerplexityThresholdExclusiveMin = 0; - -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneJailbreakDetectionOneNimServerEndpointDefault = `classify`; -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneInjectionDetectionOneActionDefault = `reject`; -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneInjectionDetectionOneActionRegExp = - new RegExp('^(reject|omit)$'); -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneGlinerOneServerEndpointDefault = `http://localhost:1235/v1/extract`; -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneGlinerOneThresholdDefault = 0.5; -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneGlinerOneChunkLengthDefault = 384; -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneGlinerOneOverlapDefault = 128; -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneGlinerOneFlatNerDefault = false; -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneFiddlerOneFiddlerEndpointDefault = `http://localhost:8080/process/text`; -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneFiddlerOneSafetyThresholdDefault = 0.1; -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneFiddlerOneFaithfulnessThresholdDefault = 0.05; -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneClavataOneServerEndpointDefault = `https://gateway.app.clavata.ai:8443`; -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneClavataOneLabelMatchLogicDefault = `ANY`; -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneCrowdstrikeAidrOneTimeoutDefault = 30; -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneTrendMicroOneV1UrlDefault = `https://api.xdr.trendmicro.com/v3.0/aiSecurity/applyGuardrails`; -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneTrendMicroOneApplicationNameDefault = `nemo-guardrails`; -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneTrendMicroOneApplicationNameMax = 64; - -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneTrendMicroOneApplicationNameRegExp = - new RegExp('^[a-zA-Z0-9_-]+$'); -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneTrendMicroOneDetailedResponseDefault = false; -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneAiDefenseOneTimeoutDefault = 30; -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneAiDefenseOneFailOpenDefault = false; -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneContentSafetyOneMultilingualEnabledDefault = false; -export const guardrailsUpdateConfigResponseDataOneRailsOneConfigOneContentSafetyOneReasoningEnabledDefault = false; -export const guardrailsUpdateConfigResponseDataOneRailsOneInputOneParallelDefault = false; -export const guardrailsUpdateConfigResponseDataOneRailsOneOutputOneParallelDefault = false; -export const guardrailsUpdateConfigResponseDataOneRailsOneOutputOneStreamingOneEnabledDefault = true; -export const guardrailsUpdateConfigResponseDataOneRailsOneOutputOneStreamingOneChunkSizeDefault = 200; -export const guardrailsUpdateConfigResponseDataOneRailsOneOutputOneStreamingOneContextSizeDefault = 50; -export const guardrailsUpdateConfigResponseDataOneRailsOneOutputOneStreamingOneStreamFirstDefault = true; -export const guardrailsUpdateConfigResponseDataOneRailsOneOutputOneApplyToReasoningTracesDefault = false; -export const guardrailsUpdateConfigResponseDataOneRailsOneDialogOneSingleCallOneEnabledDefault = false; -export const guardrailsUpdateConfigResponseDataOneRailsOneDialogOneSingleCallOneFallbackToMultipleCallsDefault = true; -export const guardrailsUpdateConfigResponseDataOneRailsOneDialogOneUserMessagesEmbeddingsOnlyDefault = false; -export const guardrailsUpdateConfigResponseDataOneRailsOneDialogOneUserMessagesEmbeddingsOnlySimilarityThresholdMin = 0; -export const guardrailsUpdateConfigResponseDataOneRailsOneDialogOneUserMessagesEmbeddingsOnlySimilarityThresholdMax = 1; - -export const guardrailsUpdateConfigResponseDataOneRailsOneToolOutputOneParallelDefault = false; -export const guardrailsUpdateConfigResponseDataOneRailsOneToolInputOneParallelDefault = false; -export const guardrailsUpdateConfigResponseDataOneEnableRailsExceptionsDefault = false; -export const guardrailsUpdateConfigResponseDataOneTracingOneEnabledDefault = false; -export const guardrailsUpdateConfigResponseDataOneTracingOneAdaptersItemNameDefault = `FileSystem`; -export const guardrailsUpdateConfigResponseDataOneTracingOneSpanFormatDefault = `opentelemetry`; -export const guardrailsUpdateConfigResponseDataOneTracingOneEnableContentCaptureDefault = false; - -export const GuardrailsUpdateConfigResponse = zod - .object({ - name: zod - .string() - .default(guardrailsUpdateConfigResponseNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(guardrailsUpdateConfigResponseWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - description: zod.string().optional().describe('Description of the guardrail config'), - data: zod - .object({ - models: zod - .array( - zod - .object({ - type: zod.string(), - engine: zod.string(), - model: zod - .string() - .optional() - .describe( - "The model name. If using Inference Gateway, this should be the Model Entity reference ('workspace\/model_name')." - ), - parameters: zod - .object({ - base_url: zod - .string() - .optional() - .describe('The URL to use for inference with this model.'), - default_headers: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Custom HTTP headers to include in requests to this model. Each key-value pair represents a header name (key) and its default value (value). You can override the default value for a header by populating it in the request headers.' - ), - }) - .describe( - 'Parameters for configuring how to interact with a model in a guardrails config.' - ) - .optional() - .describe('Additional parameters to configure how to interact with the model.'), - mode: zod - .enum(['chat', 'text']) - .default(guardrailsUpdateConfigResponseDataOneModelsItemModeDefault) - .describe( - "Whether the mode is 'text' completion or 'chat' completion. Allowed values are 'chat' or 'text'." - ), - cache: zod - .object({ - enabled: zod - .boolean() - .default( - guardrailsUpdateConfigResponseDataOneModelsItemCacheOneEnabledDefault - ) - .describe('Whether caching is enabled (default: False - no caching)'), - maxsize: zod - .number() - .default( - guardrailsUpdateConfigResponseDataOneModelsItemCacheOneMaxsizeDefault - ) - .describe('Maximum number of entries in the cache per model'), - stats: zod - .object({ - enabled: zod - .boolean() - .default( - guardrailsUpdateConfigResponseDataOneModelsItemCacheOneStatsOneEnabledDefault - ) - .describe('Whether cache statistics tracking is enabled'), - log_interval: zod - .number() - .optional() - .describe( - 'Seconds between periodic cache stats logging to logs (None disables logging)' - ), - }) - .describe('Configuration for cache statistics tracking and logging.') - .optional() - .describe('Configuration for cache statistics tracking and logging'), - }) - .describe('Configuration for model caching.') - .optional() - .describe( - 'Cache configuration for this specific model (primarily used for content safety models)' - ), - }) - .describe( - "Configuration of a model used by the rails engine.\n\nIf using Inference Gateway, the `model` field should be a Model Entity reference ('workspace\/model_name')." - ) - ) - .optional() - .describe('The list of models used by the rails configuration.'), - instructions: zod - .array( - zod - .object({ - type: zod.string(), - content: zod.string(), - }) - .describe( - 'Configuration for instructions in natural language that should be passed to the LLM.' - ) - ) - .default(guardrailsUpdateConfigResponseDataOneInstructionsDefault) - .describe('List of instructions in natural language that the LLM should use.'), - actions_server_url: zod - .string() - .optional() - .describe('The URL of the actions server that should be used for the rails.'), - sample_conversation: zod - .string() - .default(guardrailsUpdateConfigResponseDataOneSampleConversationDefault) - .describe('The sample conversation that should be used inside the prompts.'), - prompts: zod - .array( - zod - .object({ - task: zod.string().describe('The id of the task associated with this prompt.'), - content: zod - .string() - .optional() - .describe("The content of the prompt, if it's a string."), - messages: zod - .array( - zod.union([ - zod - .object({ - type: zod - .string() - .describe("The type of message, e.g., 'assistant', 'user', 'system'."), - content: zod.string().describe('The content of the message.'), - }) - .describe('Template for a message structure.'), - zod.string(), - ]) - ) - .optional() - .describe('The list of messages included in the prompt. Used for chat models.'), - models: zod - .array(zod.string()) - .optional() - .describe( - 'If specified, the prompt will be used only for the given LLM engines\/models. The format is a list of strings with the format: or \/.' - ), - output_parser: zod - .string() - .optional() - .describe('The name of the output parser to use for this prompt.'), - max_length: zod - .number() - .min(1) - .default(guardrailsUpdateConfigResponseDataOnePromptsItemMaxLengthDefault) - .describe('The maximum length of the prompt in number of characters.'), - mode: zod - .string() - .default(guardrailsUpdateConfigResponseDataOnePromptsItemModeDefault) - .describe( - "Corresponds to the `prompting_mode` for which this prompt is fetched. Default is 'standard'." - ), - stop: zod - .array(zod.string()) - .optional() - .describe( - 'If specified, will be configure stop tokens for models that support this.' - ), - max_tokens: zod - .number() - .min(1) - .optional() - .describe( - 'The maximum number of tokens that can be generated in the chat completion.' - ), - }) - .describe('Configuration for prompts that will be used for a specific task.') - ) - .optional() - .describe('The prompts that should be used for the various LLM tasks.'), - prompting_mode: zod - .string() - .default(guardrailsUpdateConfigResponseDataOnePromptingModeDefault) - .describe('Allows choosing between different prompting strategies.'), - lowest_temperature: zod - .number() - .default(guardrailsUpdateConfigResponseDataOneLowestTemperatureDefault) - .describe('The lowest temperature that should be used for the LLM.'), - enable_multi_step_generation: zod - .boolean() - .default(guardrailsUpdateConfigResponseDataOneEnableMultiStepGenerationDefault) - .describe('Whether to enable multi-step generation for the LLM.'), - colang_version: zod - .string() - .default(guardrailsUpdateConfigResponseDataOneColangVersionDefault) - .describe('The Colang version to use.'), - custom_data: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Any custom configuration data that might be needed.'), - rails: zod - .object({ - config: zod - .object({ - fact_checking: zod - .object({ - parameters: zod.record(zod.string(), zod.unknown()).optional(), - fallback_to_self_check: zod - .boolean() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneFactCheckingOneFallbackToSelfCheckDefault - ) - .describe('Whether to fall back to self-check if another method fail.'), - }) - .describe('Configuration data for the fact-checking rail.') - .optional() - .describe('Configuration data for the fact-checking rail.'), - autoalign: zod - .object({ - parameters: zod.record(zod.string(), zod.unknown()).optional(), - input: zod - .object({ - guardrails_config: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'The guardrails configuration that is passed to the AutoAlign endpoint' - ), - }) - .describe('List of guardrails that are activated') - .optional() - .describe('Input configuration for AutoAlign guardrails'), - output: zod - .object({ - guardrails_config: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'The guardrails configuration that is passed to the AutoAlign endpoint' - ), - }) - .describe('List of guardrails that are activated') - .optional() - .describe('Output configuration for AutoAlign guardrails'), - }) - .describe('Configuration data for the AutoAlign API') - .optional() - .describe('Configuration data for the AutoAlign guardrails API.'), - patronus: zod - .object({ - input: zod - .object({ - evaluate_config: zod - .object({ - success_strategy: zod - .enum(['all_pass', 'any_pass']) - .describe( - 'Strategy for determining whether a Patronus Evaluation API\nrequest should pass, especially when multiple evaluators\nare called in a single request.\nALL_PASS requires all evaluators to pass for success.\nANY_PASS requires only one evaluator to pass for success.' - ) - .default( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOnePatronusOneInputOneEvaluateConfigOneSuccessStrategyDefault - ) - .describe( - 'Strategy to determine whether the Patronus Evaluate API Guardrail passes or not.' - ), - params: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Parameters to the Patronus Evaluate API'), - }) - .describe('Config to parameterize the Patronus Evaluate API call') - .optional() - .describe('Configuration passed to the Patronus Evaluate API'), - }) - .describe('Config for the Patronus Evaluate API call') - .optional() - .describe('Patronus Evaluate API configuration for an Input Guardrail'), - output: zod - .object({ - evaluate_config: zod - .object({ - success_strategy: zod - .enum(['all_pass', 'any_pass']) - .describe( - 'Strategy for determining whether a Patronus Evaluation API\nrequest should pass, especially when multiple evaluators\nare called in a single request.\nALL_PASS requires all evaluators to pass for success.\nANY_PASS requires only one evaluator to pass for success.' - ) - .default( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOnePatronusOneOutputOneEvaluateConfigOneSuccessStrategyDefault - ) - .describe( - 'Strategy to determine whether the Patronus Evaluate API Guardrail passes or not.' - ), - params: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Parameters to the Patronus Evaluate API'), - }) - .describe('Config to parameterize the Patronus Evaluate API call') - .optional() - .describe('Configuration passed to the Patronus Evaluate API'), - }) - .describe('Config for the Patronus Evaluate API call') - .optional() - .describe('Patronus Evaluate API configuration for an Output Guardrail'), - }) - .describe('Configuration data for the Patronus Evaluate API') - .optional() - .describe('Configuration data for the Patronus Evaluate API.'), - sensitive_data_detection: zod - .object({ - recognizers: zod - .array(zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'Additional custom recognizers. Check out https:\/\/microsoft.github.io\/presidio\/tutorial\/08_no_code\/ for more details.' - ), - input: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe( - 'The list of entities that should be detected. Check out https:\/\/microsoft.github.io\/presidio\/supported_entities\/ forthe list of supported entities.' - ), - mask_token: zod - .string() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneSensitiveDataDetectionOneInputOneMaskTokenDefault - ) - .describe('The token that should be used to mask the sensitive data.'), - score_threshold: zod - .number() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneSensitiveDataDetectionOneInputOneScoreThresholdDefault - ) - .describe( - 'The score threshold that should be used to detect the sensitive data.' - ), - }) - .optional() - .describe('Configuration of the entities to be detected on the user input.'), - output: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe( - 'The list of entities that should be detected. Check out https:\/\/microsoft.github.io\/presidio\/supported_entities\/ forthe list of supported entities.' - ), - mask_token: zod - .string() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneSensitiveDataDetectionOneOutputOneMaskTokenDefault - ) - .describe('The token that should be used to mask the sensitive data.'), - score_threshold: zod - .number() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneSensitiveDataDetectionOneOutputOneScoreThresholdDefault - ) - .describe( - 'The score threshold that should be used to detect the sensitive data.' - ), - }) - .optional() - .describe('Configuration of the entities to be detected on the bot output.'), - retrieval: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe( - 'The list of entities that should be detected. Check out https:\/\/microsoft.github.io\/presidio\/supported_entities\/ forthe list of supported entities.' - ), - mask_token: zod - .string() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneSensitiveDataDetectionOneRetrievalOneMaskTokenDefault - ) - .describe('The token that should be used to mask the sensitive data.'), - score_threshold: zod - .number() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneSensitiveDataDetectionOneRetrievalOneScoreThresholdDefault - ) - .describe( - 'The score threshold that should be used to detect the sensitive data.' - ), - }) - .optional() - .describe( - 'Configuration of the entities to be detected on retrieved relevant chunks.' - ), - }) - .describe('Configuration of what sensitive data should be detected.') - .optional() - .describe('Configuration for detecting sensitive data.'), - regex_detection: zod - .object({ - input: zod - .object({ - patterns: zod - .array(zod.string()) - .optional() - .describe('List of regex patterns to match against the text.'), - case_insensitive: zod - .boolean() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneRegexDetectionOneInputOneCaseInsensitiveDefault - ) - .describe('Whether to perform case-insensitive matching.'), - }) - .describe( - 'Configuration options for regex pattern detection on a specific source.' - ) - .optional() - .describe('Configuration for regex patterns to detect on user input.'), - output: zod - .object({ - patterns: zod - .array(zod.string()) - .optional() - .describe('List of regex patterns to match against the text.'), - case_insensitive: zod - .boolean() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneRegexDetectionOneOutputOneCaseInsensitiveDefault - ) - .describe('Whether to perform case-insensitive matching.'), - }) - .describe( - 'Configuration options for regex pattern detection on a specific source.' - ) - .optional() - .describe('Configuration for regex patterns to detect on bot output.'), - retrieval: zod - .object({ - patterns: zod - .array(zod.string()) - .optional() - .describe('List of regex patterns to match against the text.'), - case_insensitive: zod - .boolean() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneRegexDetectionOneRetrievalOneCaseInsensitiveDefault - ) - .describe('Whether to perform case-insensitive matching.'), - }) - .describe( - 'Configuration options for regex pattern detection on a specific source.' - ) - .optional() - .describe( - 'Configuration for regex patterns to detect on retrieved relevant chunks.' - ), - }) - .describe('Configuration for regex pattern detection.') - .optional() - .describe('Configuration for regex pattern detection.'), - jailbreak_detection: zod - .object({ - server_endpoint: zod - .string() - .optional() - .describe( - 'The endpoint for the jailbreak detection heuristics\/model container.' - ), - length_per_perplexity_threshold: zod - .number() - .gt( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneJailbreakDetectionOneLengthPerPerplexityThresholdExclusiveMin - ) - .default( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneJailbreakDetectionOneLengthPerPerplexityThresholdDefault - ) - .describe('The length\/perplexity threshold.'), - prefix_suffix_perplexity_threshold: zod - .number() - .gt( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneJailbreakDetectionOnePrefixSuffixPerplexityThresholdExclusiveMin - ) - .default( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneJailbreakDetectionOnePrefixSuffixPerplexityThresholdDefault - ) - .describe('The prefix\/suffix perplexity threshold.'), - nim_base_url: zod - .string() - .optional() - .describe( - 'Base URL for jailbreak detection model. Example: http:\/\/localhost:8000\/v1' - ), - nim_server_endpoint: zod - .string() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneJailbreakDetectionOneNimServerEndpointDefault - ) - .describe( - "Classification path uri. Defaults to 'classify' for NemoGuard JailbreakDetect." - ), - api_key: zod - .string() - .optional() - .describe( - 'Secret String with API key for use in Jailbreak requests. Takes precedence over api_key_env_var' - ), - api_key_env_var: zod - .string() - .optional() - .describe( - 'Environment variable containing API key for jailbreak detection model' - ), - nim_url: zod - .string() - .optional() - .describe('DEPRECATED: Use nim_base_url instead'), - nim_port: zod - .number() - .optional() - .describe('DEPRECATED: Include port in nim_base_url instead'), - embedding: zod.string().optional(), - }) - .describe('Configuration data for jailbreak detection.') - .optional() - .describe('Configuration for jailbreak detection.'), - injection_detection: zod - .object({ - injections: zod - .array(zod.string()) - .optional() - .describe( - "The list of injection types to detect. Options are 'sqli', 'template', 'code', 'xss'.Currently, only SQL injection, template injection, code injection, and markdown cross-site scripting are supported. Custom rules can be added, provided they are in the `yara_path` and have a `.yara` file extension." - ), - action: zod - .string() - .regex( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneInjectionDetectionOneActionRegExp - ) - .default( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneInjectionDetectionOneActionDefault - ) - .describe( - "Action to take. Options are 'reject' to offer a rejection message, 'omit' to mask the offending content, and 'sanitize' to pass the content as-is in the safest way. These options are listed in descending order of relative safety. 'sanitize' is not implemented at this time." - ), - yara_rules: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Dictionary mapping rule names to YARA rule strings. If provided, these rules will be used instead of loading rules from yara_path. Each rule should be a valid YARA rule string.' - ), - }) - .optional() - .describe('Configuration for injection detection.'), - privateai: zod - .object({ - server_endpoint: zod - .string() - .optional() - .describe('The endpoint for the private AI detection server.'), - input: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe('The list of entities that should be detected.'), - }) - .describe('Configuration options for Private AI.') - .optional() - .describe('Configuration of the entities to be detected on the user input.'), - output: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe('The list of entities that should be detected.'), - }) - .describe('Configuration options for Private AI.') - .optional() - .describe('Configuration of the entities to be detected on the bot output.'), - retrieval: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe('The list of entities that should be detected.'), - }) - .describe('Configuration options for Private AI.') - .optional() - .describe( - 'Configuration of the entities to be detected on retrieved relevant chunks.' - ), - }) - .describe('Configuration for Private AI.') - .optional() - .describe('Configuration for Private AI.'), - gliner: zod - .object({ - server_endpoint: zod - .string() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneGlinerOneServerEndpointDefault - ) - .describe('The endpoint for the GLiNER detection server.'), - threshold: zod - .number() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneGlinerOneThresholdDefault - ) - .describe('Confidence threshold for entity detection (0.0 to 1.0).'), - chunk_length: zod - .number() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneGlinerOneChunkLengthDefault - ) - .describe('Length of text chunks for processing.'), - overlap: zod - .number() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneGlinerOneOverlapDefault - ) - .describe('Overlap between chunks.'), - flat_ner: zod - .boolean() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneGlinerOneFlatNerDefault - ) - .describe( - 'Whether to use flat NER mode. Setting to False allows for nested entities.' - ), - input: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe( - "The list of entity labels to detect (e.g., 'email', 'phone_number', 'ssn')." - ), - }) - .describe('Configuration options for GLiNER.') - .optional() - .describe('Configuration of the entities to be detected on the user input.'), - output: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe( - "The list of entity labels to detect (e.g., 'email', 'phone_number', 'ssn')." - ), - }) - .describe('Configuration options for GLiNER.') - .optional() - .describe('Configuration of the entities to be detected on the bot output.'), - retrieval: zod - .object({ - entities: zod - .array(zod.string()) - .optional() - .describe( - "The list of entity labels to detect (e.g., 'email', 'phone_number', 'ssn')." - ), - }) - .describe('Configuration options for GLiNER.') - .optional() - .describe( - 'Configuration of the entities to be detected on retrieved relevant chunks.' - ), - }) - .describe('Configuration for GLiNER PII detection.') - .optional() - .describe('Configuration for GLiNER PII detection.'), - fiddler: zod - .object({ - fiddler_endpoint: zod - .string() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneFiddlerOneFiddlerEndpointDefault - ) - .describe('The global endpoint for Fiddler Guardrails requests.'), - safety_threshold: zod - .number() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneFiddlerOneSafetyThresholdDefault - ) - .describe('Fiddler Guardrails safety detection threshold.'), - faithfulness_threshold: zod - .number() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneFiddlerOneFaithfulnessThresholdDefault - ) - .describe('Fiddler Guardrails faithfulness detection threshold.'), - }) - .describe('Configuration for Fiddler Guardrails.') - .optional() - .describe('Configuration for Fiddler Guardrails.'), - clavata: zod - .object({ - server_endpoint: zod - .string() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneClavataOneServerEndpointDefault - ) - .describe('The endpoint for the Clavata API'), - policies: zod - .record(zod.string(), zod.string()) - .optional() - .describe('A dictionary of policy aliases and their corresponding IDs.'), - label_match_logic: zod - .enum(['ANY', 'ALL']) - .default( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneClavataOneLabelMatchLogicDefault - ) - .describe( - 'The logic to use when deciding whether the evaluation matched.\n If ANY, only one of the configured labels needs to be found in the input or output.\n If ALL, all configured labels must be found in the input or output.' - ), - input: zod - .object({ - policy: zod - .string() - .describe('The policy alias to use when evaluating inputs or outputs.'), - labels: zod - .array(zod.string()) - .optional() - .describe( - 'A list of labels to match against the policy.\n If no labels are provided, the overall policy result will be returned.\n If labels are provided, only hits on the provided labels will be considered a hit.' - ), - }) - .describe('Configuration data for the Clavata API') - .optional() - .describe('Clavata configuration for an Input Guardrail'), - output: zod - .object({ - policy: zod - .string() - .describe('The policy alias to use when evaluating inputs or outputs.'), - labels: zod - .array(zod.string()) - .optional() - .describe( - 'A list of labels to match against the policy.\n If no labels are provided, the overall policy result will be returned.\n If labels are provided, only hits on the provided labels will be considered a hit.' - ), - }) - .describe('Configuration data for the Clavata API') - .optional() - .describe('Clavata configuration for an Output Guardrail'), - }) - .describe('Configuration data for the Clavata API') - .optional() - .describe('Configuration for Clavata.'), - crowdstrike_aidr: zod - .object({ - timeout: zod - .number() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneCrowdstrikeAidrOneTimeoutDefault - ) - .describe('Timeout in seconds for API requests to CrowdStrike AIDR'), - }) - .describe('Configuration data for the CrowdStrike AIDR API') - .optional() - .describe('Configuration for CrowdStrike AIDR.'), - pangea: zod - .object({ - input: zod - .object({ - recipe: zod - .string() - .describe( - 'Recipe key of a configuration of data types and settings defined in the Pangea User Console. It\n specifies the rules that are to be applied to the text, such as defang malicious URLs.' - ), - }) - .describe('Configuration data for the Pangea AI Guard API') - .optional() - .describe('Pangea configuration for an Input Guardrail'), - output: zod - .object({ - recipe: zod - .string() - .describe( - 'Recipe key of a configuration of data types and settings defined in the Pangea User Console. It\n specifies the rules that are to be applied to the text, such as defang malicious URLs.' - ), - }) - .describe('Configuration data for the Pangea AI Guard API') - .optional() - .describe('Pangea configuration for an Output Guardrail'), - }) - .describe('Configuration data for the Pangea AI Guard API') - .optional() - .describe('Configuration for Pangea.'), - guardrails_ai: zod - .object({ - validators: zod - .array( - zod - .object({ - name: zod - .string() - .describe( - "Unique identifier or import path for the Guardrails AI validator (e.g., 'toxic_language', 'pii', 'regex_match', or 'guardrails\/competitor_check')." - ), - parameters: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Parameters to pass to the validator during initialization (e.g., threshold, regex pattern).' - ), - metadata: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'Metadata to pass to the validator during validation (e.g., valid_topics, context).' - ), - }) - .describe('Configuration for a single Guardrails AI validator.') - ) - .optional() - .describe( - 'List of Guardrails AI validators to apply. Each validator can have its own parameters and metadata.' - ), - }) - .describe('Configuration data for Guardrails AI integration.') - .optional() - .describe('Configuration for Guardrails AI validators.'), - trend_micro: zod - .object({ - v1_url: zod - .string() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneTrendMicroOneV1UrlDefault - ) - .describe( - 'The endpoint for the Trend Micro AI Guard API. For other regions, use: https:\/\/api.{region}.xdr.trendmicro.com\/v3.0\/aiSecurity\/applyGuardrails where region is eu, jp, au, in, sg, or mea.' - ), - api_key_env_var: zod - .string() - .optional() - .describe('Environment variable containing API key for Trend Micro AI Guard'), - application_name: zod - .string() - .max( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneTrendMicroOneApplicationNameMax - ) - .regex( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneTrendMicroOneApplicationNameRegExp - ) - .default( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneTrendMicroOneApplicationNameDefault - ) - .describe( - 'Application name for TMV1-Application-Name header (REQUIRED). Must contain only letters, numbers, hyphens, and underscores, with a maximum length of 64 characters.' - ), - detailed_response: zod - .boolean() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneTrendMicroOneDetailedResponseDefault - ) - .describe( - 'If True, returns detailed AI Guard results with confidence scores (Prefer: return=representation). If False, returns minimal response with only action and reasons (Prefer: return=minimal).' - ), - }) - .describe('Configuration data for the Trend Micro AI Guard API') - .optional() - .describe('Configuration for Trend Micro.'), - ai_defense: zod - .object({ - timeout: zod - .number() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneAiDefenseOneTimeoutDefault - ) - .describe('Timeout in seconds for API requests to AI Defense service'), - fail_open: zod - .boolean() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneAiDefenseOneFailOpenDefault - ) - .describe( - 'If True, allow content when AI Defense API call fails (fail open). If False, block content when API call fails (fail closed). Does not affect missing configuration validation.' - ), - }) - .describe('Configuration data for the Cisco AI Defense API') - .optional() - .describe('Configuration for Cisco AI Defense.'), - content_safety: zod - .object({ - multilingual: zod - .object({ - enabled: zod - .boolean() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneContentSafetyOneMultilingualEnabledDefault - ) - .describe( - 'If True, detect the language of user input and return refusal messages in the same language. Supported languages: en (English), es (Spanish), zh (Chinese), de (German), fr (French), hi (Hindi), ja (Japanese), ar (Arabic), th (Thai).' - ), - refusal_messages: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - "Custom refusal messages per language code. If not specified, built-in defaults are used. Example: {'en': 'Sorry, I cannot help.', 'es': 'Lo siento, no puedo ayudar.'}" - ), - }) - .optional() - .describe('Configuration for multilingual refusal messages.'), - reasoning: zod - .object({ - enabled: zod - .boolean() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneConfigOneContentSafetyOneReasoningEnabledDefault - ) - .describe( - 'If True, enable reasoning mode (with traces) for content safety models. If False, use low-latency mode without reasoning traces.' - ), - }) - .optional() - .describe('Configuration for reasoning mode in content safety models.'), - }) - .describe('Configuration data for content safety rails.') - .optional() - .describe('Configuration for content safety rails.'), - }) - .describe('Configuration data for specific rails that are supported out-of-the-box.') - .optional() - .describe('Configuration data for specific rails that are supported out-of-the-box.'), - input: zod - .object({ - parallel: zod - .boolean() - .default(guardrailsUpdateConfigResponseDataOneRailsOneInputOneParallelDefault) - .describe('If True, the input rails are executed in parallel.'), - flows: zod - .array(zod.string()) - .optional() - .describe('The names of all the flows that implement input rails.'), - }) - .describe('Configuration of input rails.') - .optional() - .describe('Configuration of the input rails.'), - output: zod - .object({ - parallel: zod - .boolean() - .default(guardrailsUpdateConfigResponseDataOneRailsOneOutputOneParallelDefault) - .describe('If True, the output rails are executed in parallel.'), - flows: zod - .array(zod.string()) - .optional() - .describe('The names of all the flows that implement output rails.'), - streaming: zod - .object({ - enabled: zod - .boolean() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneOutputOneStreamingOneEnabledDefault - ) - .describe('Enables streaming mode when True.'), - chunk_size: zod - .number() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneOutputOneStreamingOneChunkSizeDefault - ) - .describe( - 'The number of tokens in each processing chunk. This is the size of the token block on which output rails are applied.' - ), - context_size: zod - .number() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneOutputOneStreamingOneContextSizeDefault - ) - .describe( - 'The number of tokens carried over from the previous chunk to provide context for continuity in processing.' - ), - stream_first: zod - .boolean() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneOutputOneStreamingOneStreamFirstDefault - ) - .describe( - 'If True, token chunks are streamed immediately before output rails are applied.' - ), - }) - .describe('Configuration for managing streaming output of LLM tokens.') - .optional() - .describe('Configuration for streaming output rails.'), - apply_to_reasoning_traces: zod - .boolean() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneOutputOneApplyToReasoningTracesDefault - ) - .describe( - 'If True, output rails will apply guardrails to both reasoning traces and output response. If False, output rails will only apply guardrails to the output response excluding the reasoning traces, thus keeping reasoning traces unaltered.' - ), - }) - .describe('Configuration of output rails.') - .optional() - .describe('Configuration of the output rails.'), - retrieval: zod - .object({ - flows: zod - .array(zod.string()) - .optional() - .describe('The names of all the flows that implement retrieval rails.'), - }) - .describe('Configuration of retrieval rails.') - .optional() - .describe('Configuration of the retrieval rails.'), - dialog: zod - .object({ - single_call: zod - .object({ - enabled: zod - .boolean() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneDialogOneSingleCallOneEnabledDefault - ), - fallback_to_multiple_calls: zod - .boolean() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneDialogOneSingleCallOneFallbackToMultipleCallsDefault - ) - .describe( - 'Whether to fall back to multiple calls if a single call is not possible.' - ), - }) - .describe('Configuration for the single LLM call option for topical rails.') - .optional() - .describe('Configuration for the single LLM call option.'), - user_messages: zod - .object({ - embeddings_only: zod - .boolean() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneDialogOneUserMessagesEmbeddingsOnlyDefault - ) - .describe( - 'Whether to use only embeddings for computing the user canonical form messages.' - ), - embeddings_only_similarity_threshold: zod - .number() - .min( - guardrailsUpdateConfigResponseDataOneRailsOneDialogOneUserMessagesEmbeddingsOnlySimilarityThresholdMin - ) - .max( - guardrailsUpdateConfigResponseDataOneRailsOneDialogOneUserMessagesEmbeddingsOnlySimilarityThresholdMax - ) - .optional() - .describe( - 'The similarity threshold to use when using only embeddings for computing the user canonical form messages.' - ), - embeddings_only_fallback_intent: zod - .string() - .optional() - .describe( - 'Defines the fallback intent when the similarity is below the threshold. If set to None, the user intent is computed normally using the LLM. If set to a string value, that string is used as the intent.' - ), - }) - .optional() - .describe('Configuration for how the user messages are interpreted.'), - }) - .describe('Configuration of topical rails.') - .optional() - .describe('Configuration of the dialog rails.'), - actions: zod - .object({ - instant_actions: zod - .array(zod.string()) - .optional() - .describe('The names of all actions which should finish instantly.'), - }) - .describe( - 'Configuration of action rails.\n\nAction rails control various options related to the execution of actions.\nCurrently, only\n\nIn the future multiple options will be added, e.g., what input validation should be\nperformed per action, output validation, throttling, disabling, etc.' - ) - .optional() - .describe('Configuration of action rails.'), - tool_output: zod - .object({ - flows: zod - .array(zod.string()) - .optional() - .describe('The names of all the flows that implement tool output rails.'), - parallel: zod - .boolean() - .default( - guardrailsUpdateConfigResponseDataOneRailsOneToolOutputOneParallelDefault - ) - .describe('If True, the tool output rails are executed in parallel.'), - }) - .describe( - 'Configuration of tool output rails.\nTool output rails are applied to tool calls before they are executed.\nThey can validate tool names, parameters, and context to ensure safe tool usage.' - ) - .optional() - .describe('Configuration of tool output rails.'), - tool_input: zod - .object({ - flows: zod - .array(zod.string()) - .optional() - .describe('The names of all the flows that implement tool input rails.'), - parallel: zod - .boolean() - .default(guardrailsUpdateConfigResponseDataOneRailsOneToolInputOneParallelDefault) - .describe('If True, the tool input rails are executed in parallel.'), - }) - .describe( - 'Configuration of tool input rails.\nTool input rails are applied to tool results before they are processed.\nThey can validate, filter, or transform tool outputs for security and safety.' - ) - .optional() - .describe('Configuration of tool input rails.'), - }) - .describe('Configuration of specific rails.') - .optional() - .describe('Configuration for the various rails (input, output, etc.).'), - enable_rails_exceptions: zod - .boolean() - .default(guardrailsUpdateConfigResponseDataOneEnableRailsExceptionsDefault) - .describe( - 'If set, the pre-defined guardrails raise exceptions instead of returning pre-defined messages.' - ), - passthrough: zod - .boolean() - .optional() - .describe( - 'Whether the original prompt should pass through the guardrails configuration as is. This means it will not be altered in any way. ' - ), - tracing: zod - .object({ - enabled: zod - .boolean() - .default(guardrailsUpdateConfigResponseDataOneTracingOneEnabledDefault), - adapters: zod - .array( - zod.object({ - name: zod - .string() - .default(guardrailsUpdateConfigResponseDataOneTracingOneAdaptersItemNameDefault) - .describe('The name of the adapter.'), - }) - ) - .optional() - .describe( - 'The list of tracing adapters to use. If not specified, the default adapters are used.' - ), - span_format: zod - .string() - .default(guardrailsUpdateConfigResponseDataOneTracingOneSpanFormatDefault) - .describe( - "The span format to use. Options are 'legacy' (simple metrics) or 'opentelemetry' (OpenTelemetry semantic conventions)." - ), - enable_content_capture: zod - .boolean() - .default(guardrailsUpdateConfigResponseDataOneTracingOneEnableContentCaptureDefault) - .describe( - 'Capture prompts and responses (user\/assistant\/tool message content) in tracing\/telemetry events. Disabled by default for privacy and alignment with OpenTelemetry GenAI semantic conventions. WARNING: Enabling this may include PII and sensitive data in your telemetry backend.' - ), - }) - .optional() - .describe('Configuration for tracing.'), - }) - .describe('Configuration object for the models and the rails.') - .optional() - .describe('Guardrail configuration data'), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe('A guardrail configuration entity.'); - -/** - * Delete a guardrail config. - * @summary Delete Config - */ -export const GuardrailsDeleteConfigParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const guardrailsDeleteConfigResponseMessageDefault = `Resource deleted successfully.`; - -export const GuardrailsDeleteConfigResponse = zod.object({ - message: zod.string().default(guardrailsDeleteConfigResponseMessageDefault), - id: zod.string().optional().describe('The ID of the deleted resource.'), - deleted_at: zod - .string() - .datetime({}) - .optional() - .describe('The timestamp when the resource was deleted.'), -}); diff --git a/web/packages/sdk/generated/platform/zod/iam.ts b/web/packages/sdk/generated/platform/zod/iam.ts deleted file mode 100644 index af31ab1541..0000000000 --- a/web/packages/sdk/generated/platform/zod/iam.ts +++ /dev/null @@ -1,182 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import * as zod from 'zod'; - -/** - * List all role bindings (Platform Admin only) - * @summary List role bindings - */ -export const authListIamRoleBindingsQueryPageDefault = 1; -export const authListIamRoleBindingsQueryPageSizeDefault = 10; -export const authListIamRoleBindingsQuerySortDefault = `created_at`; - -export const AuthListIamRoleBindingsQueryParams = zod.object({ - page: zod.number().default(authListIamRoleBindingsQueryPageDefault).describe('Page number.'), - page_size: zod - .number() - .default(authListIamRoleBindingsQueryPageSizeDefault) - .describe('Page size.'), - sort: zod - .string() - .default(authListIamRoleBindingsQuerySortDefault) - .describe( - 'The field to sort by. To sort in decreasing order, use `-` in front of the field name.' - ), - filter: zod - .object({ - principal: zod.string().optional().describe('Filter by principal ID'), - workspace: zod.string().optional().describe('Filter by workspace'), - role: zod.string().optional().describe('Filter by role'), - granted_by: zod.string().optional().describe('Filter by who granted the role'), - is_active: zod - .boolean() - .optional() - .describe('Filter for active (True) or revoked (False) bindings'), - granted_at: zod - .object({ - gte: zod.string().datetime({}).optional().describe('Greater than or equal to this date'), - lte: zod.string().datetime({}).optional().describe('Less than or equal to this date'), - }) - .describe('Filter for date ranges.') - .optional() - .describe('Filter by granted date range'), - revoked_at: zod - .object({ - gte: zod.string().datetime({}).optional().describe('Greater than or equal to this date'), - lte: zod.string().datetime({}).optional().describe('Less than or equal to this date'), - }) - .describe('Filter for date ranges.') - .optional() - .describe('Filter by revoked date range'), - }) - .optional() - .describe( - 'Filter role bindings by principal, workspace, role, granted_by, is_active, granted_at, and revoked_at.' - ), -}); - -export const AuthListIamRoleBindingsResponse = zod.object({ - data: zod.array( - zod - .object({ - id: zod.string(), - name: zod.string(), - principal: zod.string(), - workspace: zod.string(), - role: zod.string(), - granted_by: zod.string(), - granted_at: zod.string().datetime({}), - revoked_at: zod.string().datetime({}), - }) - .describe('Role binding response model.') - ), - pagination: zod - .object({ - page: zod.number().describe('The current page number.'), - page_size: zod.number().describe('The page size used for the query.'), - current_page_size: zod.number().describe('The size for the current page.'), - total_pages: zod.number().describe('The total number of pages.'), - total_results: zod.number().describe('The total number of results.'), - }) - .optional() - .describe('Pagination information.'), - sort: zod.string().optional().describe('The field on which the results are sorted.'), - filter: zod.record(zod.string(), zod.unknown()).optional().describe('Filtering information.'), -}); - -/** - * Create a new role binding (Platform Admin only) - * @summary Create role binding - */ -export const authCreateIamRoleBindingQueryWaitRolePropagationDefault = true; - -export const AuthCreateIamRoleBindingQueryParams = zod.object({ - wait_role_propagation: zod - .boolean() - .default(authCreateIamRoleBindingQueryWaitRolePropagationDefault) - .describe( - 'If true, wait for role to propagate before returning (default: true). Set to false for bulk operations.' - ), -}); - -export const AuthCreateIamRoleBindingBody = zod - .object({ - principal: zod.string().describe('The principal identifier (email, user ID, or group ID)'), - workspace: zod - .string() - .optional() - .describe('The workspace this binding applies to. None for platform-level roles.'), - role: zod.string().describe("The role name (e.g., 'Viewer', 'Editor', 'Admin')"), - }) - .describe('Input schema for creating a role binding.'); - -export const AuthCreateIamRoleBindingResponse = zod - .object({ - id: zod.string(), - name: zod.string(), - principal: zod.string(), - workspace: zod.string(), - role: zod.string(), - granted_by: zod.string(), - granted_at: zod.string().datetime({}), - revoked_at: zod.string().datetime({}), - }) - .describe('Role binding response model.'); - -/** - * Get a specific role binding (Platform Admin only) - * @summary Get role binding - */ -export const AuthGetIamRoleBindingParams = zod.object({ - name: zod.string(), -}); - -export const AuthGetIamRoleBindingResponse = zod - .object({ - id: zod.string(), - name: zod.string(), - principal: zod.string(), - workspace: zod.string(), - role: zod.string(), - granted_by: zod.string(), - granted_at: zod.string().datetime({}), - revoked_at: zod.string().datetime({}), - }) - .describe('Role binding response model.'); - -/** - * Revoke a role binding (Platform Admin only) - * @summary Revoke role binding - */ -export const AuthRevokeIamRoleBindingParams = zod.object({ - name: zod.string(), -}); - -export const authRevokeIamRoleBindingQueryWaitRolePropagationDefault = true; - -export const AuthRevokeIamRoleBindingQueryParams = zod.object({ - wait_role_propagation: zod - .boolean() - .default(authRevokeIamRoleBindingQueryWaitRolePropagationDefault) - .describe( - 'If true, wait for role to propagate before returning (default: true). Set to false for bulk operations.' - ), -}); - -export const authRevokeIamRoleBindingResponseMessageDefault = `Resource deleted successfully.`; - -export const AuthRevokeIamRoleBindingResponse = zod.object({ - message: zod.string().default(authRevokeIamRoleBindingResponseMessageDefault), - id: zod.string().optional().describe('The ID of the deleted resource.'), - deleted_at: zod - .string() - .datetime({}) - .optional() - .describe('The timestamp when the resource was deleted.'), -}); diff --git a/web/packages/sdk/generated/platform/zod/inference-gateway.ts b/web/packages/sdk/generated/platform/zod/inference-gateway.ts deleted file mode 100644 index a6122dec46..0000000000 --- a/web/packages/sdk/generated/platform/zod/inference-gateway.ts +++ /dev/null @@ -1,354 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import * as zod from 'zod'; - -/** - * Proxy requests to model entity inference endpoints. - -All inference requests must resolve to a `VirtualModel`. The platform's -provider reconciler auto-creates an implicit `autoprovisioned` VirtualModel -for every served model entity (named after the entity, with -`default_model_entity` set to the entity ref) so this is the typical case; -operators can also create custom VirtualModels for routing, plugin chains, -LoRA escape-hatches, etc. Requests for which no VirtualModel can be found -return `404`. - * @summary Model Inference Proxy PATCH - */ -export const GatewayProxyPatchParams = zod.object({ - workspace: zod.string(), - name: zod.string(), - trailing_uri: zod.string(), -}); - -export const GatewayProxyPatchBody = zod.record(zod.string(), zod.unknown()); - -export const GatewayProxyPatchResponse = zod.record(zod.string(), zod.unknown()); - -/** - * Proxy requests to model entity inference endpoints. - -All inference requests must resolve to a `VirtualModel`. The platform's -provider reconciler auto-creates an implicit `autoprovisioned` VirtualModel -for every served model entity (named after the entity, with -`default_model_entity` set to the entity ref) so this is the typical case; -operators can also create custom VirtualModels for routing, plugin chains, -LoRA escape-hatches, etc. Requests for which no VirtualModel can be found -return `404`. - * @summary Model Inference Proxy DELETE - */ -export const GatewayProxyDeleteParams = zod.object({ - workspace: zod.string(), - name: zod.string(), - trailing_uri: zod.string(), -}); - -export const GatewayProxyDeleteResponse = zod.unknown(); - -/** - * Proxy requests to model entity inference endpoints. - -All inference requests must resolve to a `VirtualModel`. The platform's -provider reconciler auto-creates an implicit `autoprovisioned` VirtualModel -for every served model entity (named after the entity, with -`default_model_entity` set to the entity ref) so this is the typical case; -operators can also create custom VirtualModels for routing, plugin chains, -LoRA escape-hatches, etc. Requests for which no VirtualModel can be found -return `404`. - * @summary Model Inference Proxy PUT - */ -export const GatewayProxyPutParams = zod.object({ - workspace: zod.string(), - name: zod.string(), - trailing_uri: zod.string(), -}); - -export const GatewayProxyPutBody = zod.record(zod.string(), zod.unknown()); - -export const GatewayProxyPutResponse = zod.record(zod.string(), zod.unknown()); - -/** - * Proxy requests to model entity inference endpoints. - -All inference requests must resolve to a `VirtualModel`. The platform's -provider reconciler auto-creates an implicit `autoprovisioned` VirtualModel -for every served model entity (named after the entity, with -`default_model_entity` set to the entity ref) so this is the typical case; -operators can also create custom VirtualModels for routing, plugin chains, -LoRA escape-hatches, etc. Requests for which no VirtualModel can be found -return `404`. - * @summary Model Inference Proxy POST - */ -export const GatewayProxyPostParams = zod.object({ - workspace: zod.string(), - name: zod.string(), - trailing_uri: zod.string(), -}); - -export const GatewayProxyPostBody = zod.record(zod.string(), zod.unknown()); - -export const GatewayProxyPostResponse = zod.record(zod.string(), zod.unknown()); - -/** - * Proxy requests to model entity inference endpoints. - -All inference requests must resolve to a `VirtualModel`. The platform's -provider reconciler auto-creates an implicit `autoprovisioned` VirtualModel -for every served model entity (named after the entity, with -`default_model_entity` set to the entity ref) so this is the typical case; -operators can also create custom VirtualModels for routing, plugin chains, -LoRA escape-hatches, etc. Requests for which no VirtualModel can be found -return `404`. - * @summary Model Inference Proxy GET - */ -export const GatewayProxyGetParams = zod.object({ - workspace: zod.string(), - name: zod.string(), - trailing_uri: zod.string(), -}); - -export const GatewayProxyGetResponse = zod.unknown(); - -/** - * This endpoint aggregates models from all model entities and returns them -in OpenAI's list models format. Each model ID is the model entity identifier -in format workspace/model_entity_name. - * @summary OpenAI List Models - */ -export const OpenaiProxyListModelsParams = zod.object({ - workspace: zod.string(), -}); - -export const openaiProxyListModelsResponseDataItemObjectDefault = `model`; -export const openaiProxyListModelsResponseDataItemCreatedDefault = 0; -export const openaiProxyListModelsResponseObjectDefault = `list`; - -export const OpenaiProxyListModelsResponse = zod - .object({ - data: zod.array( - zod - .object({ - id: zod.string(), - owned_by: zod.string(), - object: zod.string().default(openaiProxyListModelsResponseDataItemObjectDefault), - created: zod.number().default(openaiProxyListModelsResponseDataItemCreatedDefault), - }) - .describe('Duplicated structure for an OpenAI \/v1\/models individual model response.') - ), - object: zod.string().default(openaiProxyListModelsResponseObjectDefault), - }) - .describe('Duplicated structure for an OpenAI \/v1\/models response.'); - -/** - * Retrieve information about a specific OpenAI-compatible model. -Workspace is always taken from the URL path; name may be model_entity_name -or workspace/model_entity_name (workspace prefix is ignored). - * @summary OpenAI Get Model - */ -export const OpenaiProxyGetModelParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const openaiProxyGetModelResponseObjectDefault = `model`; -export const openaiProxyGetModelResponseCreatedDefault = 0; - -export const OpenaiProxyGetModelResponse = zod - .object({ - id: zod.string(), - owned_by: zod.string(), - object: zod.string().default(openaiProxyGetModelResponseObjectDefault), - created: zod.number().default(openaiProxyGetModelResponseCreatedDefault), - }) - .describe('Duplicated structure for an OpenAI \/v1\/models individual model response.'); - -/** - * Proxy requests to OpenAI-compatible inference endpoints. - -All inference requests must resolve to a `VirtualModel`. The platform's -provider reconciler auto-creates an implicit `autoprovisioned` VirtualModel -for every served model entity (named after the entity, with -`default_model_entity` set to the entity ref) so this is the typical case; -operators can also create custom VirtualModels for routing, plugin chains, -LoRA escape-hatches, etc. Requests for which no VirtualModel can be found -return `404`. - * @summary OpenAI Inference Proxy PATCH - */ -export const OpenaiProxyPatchParams = zod.object({ - workspace: zod.string(), - trailing_uri: zod.string(), -}); - -export const OpenaiProxyPatchBody = zod.record(zod.string(), zod.unknown()); - -export const OpenaiProxyPatchResponse = zod.record(zod.string(), zod.unknown()); - -/** - * Proxy requests to OpenAI-compatible inference endpoints. - -All inference requests must resolve to a `VirtualModel`. The platform's -provider reconciler auto-creates an implicit `autoprovisioned` VirtualModel -for every served model entity (named after the entity, with -`default_model_entity` set to the entity ref) so this is the typical case; -operators can also create custom VirtualModels for routing, plugin chains, -LoRA escape-hatches, etc. Requests for which no VirtualModel can be found -return `404`. - * @summary OpenAI Inference Proxy DELETE - */ -export const OpenaiProxyDeleteParams = zod.object({ - workspace: zod.string(), - trailing_uri: zod.string(), -}); - -export const OpenaiProxyDeleteResponse = zod.unknown(); - -/** - * Proxy requests to OpenAI-compatible inference endpoints. - -All inference requests must resolve to a `VirtualModel`. The platform's -provider reconciler auto-creates an implicit `autoprovisioned` VirtualModel -for every served model entity (named after the entity, with -`default_model_entity` set to the entity ref) so this is the typical case; -operators can also create custom VirtualModels for routing, plugin chains, -LoRA escape-hatches, etc. Requests for which no VirtualModel can be found -return `404`. - * @summary OpenAI Inference Proxy PUT - */ -export const OpenaiProxyPutParams = zod.object({ - workspace: zod.string(), - trailing_uri: zod.string(), -}); - -export const OpenaiProxyPutBody = zod.record(zod.string(), zod.unknown()); - -export const OpenaiProxyPutResponse = zod.record(zod.string(), zod.unknown()); - -/** - * Proxy requests to OpenAI-compatible inference endpoints. - -All inference requests must resolve to a `VirtualModel`. The platform's -provider reconciler auto-creates an implicit `autoprovisioned` VirtualModel -for every served model entity (named after the entity, with -`default_model_entity` set to the entity ref) so this is the typical case; -operators can also create custom VirtualModels for routing, plugin chains, -LoRA escape-hatches, etc. Requests for which no VirtualModel can be found -return `404`. - * @summary OpenAI Inference Proxy POST - */ -export const OpenaiProxyPostParams = zod.object({ - workspace: zod.string(), - trailing_uri: zod.string(), -}); - -export const OpenaiProxyPostBody = zod.record(zod.string(), zod.unknown()); - -export const OpenaiProxyPostResponse = zod.record(zod.string(), zod.unknown()); - -/** - * Proxy requests to OpenAI-compatible inference endpoints. - -All inference requests must resolve to a `VirtualModel`. The platform's -provider reconciler auto-creates an implicit `autoprovisioned` VirtualModel -for every served model entity (named after the entity, with -`default_model_entity` set to the entity ref) so this is the typical case; -operators can also create custom VirtualModels for routing, plugin chains, -LoRA escape-hatches, etc. Requests for which no VirtualModel can be found -return `404`. - * @summary OpenAI Inference Proxy GET - */ -export const OpenaiProxyGetParams = zod.object({ - workspace: zod.string(), - trailing_uri: zod.string(), -}); - -export const OpenaiProxyGetResponse = zod.unknown(); - -/** - * Proxy requests to provider inference endpoints. - * @summary Provider Inference Proxy PATCH - */ -export const ProviderProxyPatchParams = zod.object({ - workspace: zod.string(), - name: zod.string(), - trailing_uri: zod.string(), -}); - -export const ProviderProxyPatchBody = zod.record(zod.string(), zod.unknown()); - -export const ProviderProxyPatchResponse = zod.record(zod.string(), zod.unknown()); - -/** - * Proxy requests to provider inference endpoints. - * @summary Provider Inference Proxy DELETE - */ -export const ProviderProxyDeleteParams = zod.object({ - workspace: zod.string(), - name: zod.string(), - trailing_uri: zod.string(), -}); - -export const ProviderProxyDeleteResponse = zod.unknown(); - -/** - * Proxy requests to provider inference endpoints. - * @summary Provider Inference Proxy PUT - */ -export const ProviderProxyPutParams = zod.object({ - workspace: zod.string(), - name: zod.string(), - trailing_uri: zod.string(), -}); - -export const ProviderProxyPutBody = zod.record(zod.string(), zod.unknown()); - -export const ProviderProxyPutResponse = zod.record(zod.string(), zod.unknown()); - -/** - * Proxy requests to provider inference endpoints. - * @summary Provider Inference Proxy POST - */ -export const ProviderProxyPostParams = zod.object({ - workspace: zod.string(), - name: zod.string(), - trailing_uri: zod.string(), -}); - -export const ProviderProxyPostBody = zod.record(zod.string(), zod.unknown()); - -export const ProviderProxyPostResponse = zod.record(zod.string(), zod.unknown()); - -/** - * Proxy requests to provider inference endpoints. - * @summary Provider Inference Proxy GET - */ -export const ProviderProxyGetParams = zod.object({ - workspace: zod.string(), - name: zod.string(), - trailing_uri: zod.string(), -}); - -export const ProviderProxyGetResponse = zod.unknown(); - -/** - * Check if a model provider is registered in the gateway's cache. - -This is a lightweight endpoint that only checks the gateway's internal state, -without making any requests to the actual provider backend. Use this to verify -the gateway is ready to route requests to a provider after deployment. - -Returns: - 200 OK with provider info if the provider is registered - 404 Not Found if the provider is not yet in the gateway's cache - * @summary Check Provider Readiness - */ -export const ProviderReadyParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const ProviderReadyResponse = zod.record(zod.string(), zod.unknown()); diff --git a/web/packages/sdk/generated/platform/zod/ingest.ts b/web/packages/sdk/generated/platform/zod/ingest.ts deleted file mode 100644 index 29c6a8568d..0000000000 --- a/web/packages/sdk/generated/platform/zod/ingest.ts +++ /dev/null @@ -1,359 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import * as zod from 'zod'; - -/** - * @summary Ingest Atif - */ -export const IngestAtifParams = zod.object({ - workspace: zod.string(), -}); - -export const ingestAtifBodyFinalMetricsTotalStepsMin = 0; - -export const ingestAtifBodyStepsItemOneMessageDefault = ``; -export const ingestAtifBodyStepsItemOneLlmCallCountMin = 0; - -export const ingestAtifBodyStepsItemTwoMessageDefault = ``; -export const ingestAtifBodyStepsItemTwoLlmCallCountMin = 0; - -export const ingestAtifBodyStepsItemThreeMessageDefault = ``; -export const ingestAtifBodyStepsItemThreeLlmCallCountMin = 0; - -export const IngestAtifBody = zod - .object({ - schema_version: zod.enum([ - 'ATIF-v1.0', - 'ATIF-v1.1', - 'ATIF-v1.2', - 'ATIF-v1.3', - 'ATIF-v1.4', - 'ATIF-v1.5', - 'ATIF-v1.6', - 'ATIF-v1.7', - ]), - session_id: zod.string().optional(), - evaluation_context: zod - .object({ - evaluation_id: zod.string().optional(), - evaluation_sha: zod.string().optional(), - evaluation_run_id: zod.string().optional(), - dataset_id: zod.string().optional(), - dataset_name: zod.string().optional(), - dataset_version: zod.string().optional(), - test_case_id: zod.string().optional(), - metadata: zod.record(zod.string(), zod.unknown()).optional(), - }) - .optional(), - agent: zod.object({ - name: zod.string(), - version: zod.string(), - model_name: zod.string().optional(), - tool_definitions: zod.array(zod.record(zod.string(), zod.unknown())).optional(), - extra: zod.record(zod.string(), zod.unknown()).optional(), - }), - final_metrics: zod - .object({ - total_prompt_tokens: zod.number().optional(), - total_completion_tokens: zod.number().optional(), - total_cached_tokens: zod.number().optional(), - total_cost_usd: zod.number().optional(), - total_steps: zod.number().min(ingestAtifBodyFinalMetricsTotalStepsMin).optional(), - extra: zod.record(zod.string(), zod.unknown()).optional(), - }) - .optional(), - continued_trajectory_ref: zod.string().optional(), - notes: zod.string().optional(), - extra: zod.record(zod.string(), zod.unknown()).optional(), - steps: zod - .array( - zod.union([ - zod.object({ - step_id: zod.number().min(1), - timestamp: zod.string().datetime({}).optional(), - message: zod - .union([ - zod.string(), - zod.array( - zod.union([ - zod.object({ - type: zod.enum(['text']), - text: zod.string(), - }), - zod.object({ - type: zod.enum(['image']), - source: zod.object({ - media_type: zod.enum([ - 'image/jpeg', - 'image/png', - 'image/gif', - 'image/webp', - ]), - path: zod.string(), - }), - }), - ]) - ), - ]) - .default(ingestAtifBodyStepsItemOneMessageDefault), - is_copied_context: zod.boolean().optional(), - extra: zod.record(zod.string(), zod.unknown()).optional(), - llm_call_count: zod.number().min(ingestAtifBodyStepsItemOneLlmCallCountMin).optional(), - source: zod.enum(['system']), - }), - zod.object({ - step_id: zod.number().min(1), - timestamp: zod.string().datetime({}).optional(), - message: zod - .union([ - zod.string(), - zod.array( - zod.union([ - zod.object({ - type: zod.enum(['text']), - text: zod.string(), - }), - zod.object({ - type: zod.enum(['image']), - source: zod.object({ - media_type: zod.enum([ - 'image/jpeg', - 'image/png', - 'image/gif', - 'image/webp', - ]), - path: zod.string(), - }), - }), - ]) - ), - ]) - .default(ingestAtifBodyStepsItemTwoMessageDefault), - is_copied_context: zod.boolean().optional(), - extra: zod.record(zod.string(), zod.unknown()).optional(), - llm_call_count: zod.number().min(ingestAtifBodyStepsItemTwoLlmCallCountMin).optional(), - source: zod.enum(['user']), - }), - zod.object({ - step_id: zod.number().min(1), - timestamp: zod.string().datetime({}).optional(), - message: zod - .union([ - zod.string(), - zod.array( - zod.union([ - zod.object({ - type: zod.enum(['text']), - text: zod.string(), - }), - zod.object({ - type: zod.enum(['image']), - source: zod.object({ - media_type: zod.enum([ - 'image/jpeg', - 'image/png', - 'image/gif', - 'image/webp', - ]), - path: zod.string(), - }), - }), - ]) - ), - ]) - .default(ingestAtifBodyStepsItemThreeMessageDefault), - is_copied_context: zod.boolean().optional(), - extra: zod.record(zod.string(), zod.unknown()).optional(), - llm_call_count: zod - .number() - .min(ingestAtifBodyStepsItemThreeLlmCallCountMin) - .optional(), - source: zod.enum(['agent']), - model_name: zod.string().optional(), - reasoning_effort: zod.union([zod.string(), zod.number()]).optional(), - reasoning_content: zod.string().optional(), - tool_calls: zod - .array( - zod.object({ - tool_call_id: zod.string(), - function_name: zod.string(), - arguments: zod.record(zod.string(), zod.unknown()).optional(), - }) - ) - .optional(), - observation: zod - .object({ - results: zod - .array( - zod.object({ - source_call_id: zod.string().optional(), - content: zod - .union([ - zod.string(), - zod.array( - zod.union([ - zod.object({ - type: zod.enum(['text']), - text: zod.string(), - }), - zod.object({ - type: zod.enum(['image']), - source: zod.object({ - media_type: zod.enum([ - 'image/jpeg', - 'image/png', - 'image/gif', - 'image/webp', - ]), - path: zod.string(), - }), - }), - ]) - ), - ]) - .optional(), - subagent_trajectory_ref: zod - .array( - zod.union([zod.unknown(), zod.unknown(), zod.unknown()]).and( - zod.object({ - trajectory_id: zod.string().optional(), - trajectory_path: zod.string().optional(), - session_id: zod.string().optional(), - extra: zod.record(zod.string(), zod.unknown()).optional(), - }) - ) - ) - .optional(), - extra: zod.record(zod.string(), zod.unknown()).optional(), - }) - ) - .optional(), - }) - .optional(), - metrics: zod - .object({ - prompt_tokens: zod.number().optional(), - completion_tokens: zod.number().optional(), - cached_tokens: zod.number().optional(), - cost_usd: zod.number().optional(), - prompt_token_ids: zod.array(zod.number()).optional(), - completion_token_ids: zod.array(zod.number()).optional(), - logprobs: zod.array(zod.number()).optional(), - extra: zod.record(zod.string(), zod.unknown()).optional(), - }) - .optional(), - }), - ]) - ) - .optional(), - }) - .describe( - 'Span-based ATIF ingest request.\n\nATIF project scoping is intentionally not accepted here; use the workspace\nroute and ``evaluation_context`` for evaluation\/run identity.' - ); - -/** - * @summary Ingest Chat Completion - */ -export const IngestChatCompletionParams = zod.object({ - workspace: zod.string(), -}); - -export const IngestChatCompletionBody = zod.object({ - request: zod - .object({ - messages: zod - .array( - zod - .object({ - role: zod - .enum(['user', 'system', 'assistant', 'developer', 'tool', 'function']) - .describe('Valid role values for entry request messages.') - .describe( - 'The role of the message sender. Must be one of: user, system, assistant, developer, tool, or function.' - ), - }) - .describe( - 'A flexible message model that requires a valid role field but allows any other fields.\n\nThis flexibility enables the Intake service to store messages from various LLM providers\nand future model types without requiring schema updates. Additional fields like `content`,\n`name`, `tool_calls`, `tool_call_id`, etc. are all accepted.\n\nExamples of additional fields:\n- `content`: The message text or content\n- `name`: Name of the user or function\n- `tool_calls`: Tool\/function calls in the message\n- `tool_call_id`: ID of the tool call being responded to' - ) - ) - .describe( - 'A list of messages comprising the conversation. Each message must have a valid role. Additional fields like `content`, `tool_calls`, etc. are provider-specific.' - ), - model: zod - .string() - .describe( - "The model identifier used for this request (e.g., 'gpt-4', 'llama-3-70b', 'claude-3-opus')." - ), - }) - .describe( - 'Flexible entry request that accepts any object shape.\n\nThis flexibility enables the Intake service to store requests from various LLM providers\n(OpenAI, Anthropic, NIM, etc.) and future model types (embeddings, multimodal, etc.)\nwithout requiring schema updates.\n\nRequired fields: `messages` and `model`\nCommon optional fields: `temperature`, `max_tokens`, `top_p`, `tools`, `tool_choice`,\n`stream`, `response_format`, etc.' - ), - response: zod - .union([zod.unknown(), zod.unknown()]) - .and( - zod.object({ - choices: zod - .array(zod.record(zod.string(), zod.unknown())) - .optional() - .describe( - 'A list of response choices generated by the model. Each choice typically contains a message object with role, content, and optional tool_calls. The structure varies by provider but commonly includes fields like `index`, `message`, and `finish_reason`.' - ), - error: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - "Error envelope returned by the provider when the call failed (e.g., OpenAI's `{message, type, code, param}` shape). Mutually exclusive with `choices`: a response carries one or the other." - ), - }) - ) - .describe( - 'Flexible entry response that accepts any object shape.\n\nThis flexibility enables the Intake service to store responses from various LLM providers\nand future model types without requiring schema updates.\n\nRequired: either `choices` (successful response) or `error` (failed call).\nCommon optional fields: `id`, `created`, `model`, `usage`, `system_fingerprint`, etc.' - ), - session_id: zod - .string() - .optional() - .describe('Groups related chat-completions calls without forcing them into the same trace.'), - trace_id: zod - .string() - .optional() - .describe( - 'Opt into joining an existing trace built via OTel or ATIF. This is not a grouping mechanism for chat-completions calls; use session_id to group related calls.' - ), - evaluation_context: zod - .object({ - evaluation_id: zod.string().optional(), - evaluation_sha: zod.string().optional(), - evaluation_run_id: zod.string().optional(), - dataset_id: zod.string().optional(), - dataset_name: zod.string().optional(), - dataset_version: zod.string().optional(), - test_case_id: zod.string().optional(), - metadata: zod.record(zod.string(), zod.unknown()).optional(), - }) - .optional(), - provider: zod.string().optional(), -}); - -/** - * @summary Ingest Otlp Traces - */ -export const IngestOtlpTracesParams = zod.object({ - workspace: zod.string(), -}); - -export const ingestOtlpTracesHeaderContentTypeDefault = `application/octet-stream`; - -export const IngestOtlpTracesHeader = zod.object({ - 'content-type': zod.string().default(ingestOtlpTracesHeaderContentTypeDefault), - 'content-length': zod.number().optional(), -}); - -export const IngestOtlpTracesResponse = zod.object({ - errors: zod.array(zod.string()).optional(), -}); diff --git a/web/packages/sdk/generated/platform/zod/jobs.ts b/web/packages/sdk/generated/platform/zod/jobs.ts deleted file mode 100644 index 73c8e8ff0e..0000000000 --- a/web/packages/sdk/generated/platform/zod/jobs.ts +++ /dev/null @@ -1,4237 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import * as zod from 'zod'; - -/** - * Get all currently configured execution profiles. - * @summary Get Execution Profiles - */ -export const jobsGetExecutionProfilesResponseOneProviderDefault = `cpu`; -export const jobsGetExecutionProfilesResponseOneProfileDefault = `default`; -export const jobsGetExecutionProfilesResponseOneBackendDefault = `docker`; -export const jobsGetExecutionProfilesResponseOneConfigOneTtlSecondsBeforeActiveDefault = 1800; -export const jobsGetExecutionProfilesResponseOneConfigOneTtlSecondsActiveDefault = 86400; -export const jobsGetExecutionProfilesResponseOneConfigOneTtlSecondsAfterFinishedDefault = 3600; -export const jobsGetExecutionProfilesResponseOneConfigOneCleanupCompletedJobsImmediatelyDefault = true; -export const jobsGetExecutionProfilesResponseOneConfigOneLauncherToolPathDefault = `/tools/jobs-launcher`; -export const jobsGetExecutionProfilesResponseOneConfigOneStorageOneVolumeNameDefault = `nemo-jobs-storage`; -export const jobsGetExecutionProfilesResponseOneConfigOneStorageOneVolumePermissionsImageDefault = `busybox`; -export const jobsGetExecutionProfilesResponseOneConfigOneStorageOneAdditionalVolumeMountsItemKindDefault = `volume`; -export const jobsGetExecutionProfilesResponseOneConfigOneStorageOneAdditionalVolumeMountsItemAllowCreateVolumeDefault = false; -export const jobsGetExecutionProfilesResponseOneConfigOneNetworkingOneJobContainerNetworkDefault = `host`; -export const jobsGetExecutionProfilesResponseTwoProviderDefault = `cpu`; -export const jobsGetExecutionProfilesResponseTwoProfileDefault = `default`; -export const jobsGetExecutionProfilesResponseTwoBackendDefault = `kubernetes_job`; -export const jobsGetExecutionProfilesResponseTwoConfigOneTtlSecondsBeforeActiveDefault = 1800; -export const jobsGetExecutionProfilesResponseTwoConfigOneTtlSecondsActiveDefault = 86400; -export const jobsGetExecutionProfilesResponseTwoConfigOneTtlSecondsAfterFinishedDefault = 3600; -export const jobsGetExecutionProfilesResponseTwoConfigOneCleanupCompletedJobsImmediatelyDefault = true; -export const jobsGetExecutionProfilesResponseTwoConfigOneLauncherToolPathDefault = `/tools/jobs-launcher`; -export const jobsGetExecutionProfilesResponseTwoConfigOneServiceAccountNameDefault = `default`; -export const jobsGetExecutionProfilesResponseTwoConfigOneResourcesOneNumNodesDefault = 1; - -export const jobsGetExecutionProfilesResponseTwoConfigOneStorageOnePvcNameDefault = ``; -export const jobsGetExecutionProfilesResponseTwoConfigOneStorageOneVolumePermissionsImageDefault = `busybox`; -export const jobsGetExecutionProfilesResponseTwoConfigOneStorageOneAdditionalVolumesItemPersistentVolumeClaimOneReadOnlyDefault = false; -export const jobsGetExecutionProfilesResponseTwoConfigOneStorageOneAdditionalVolumeMountsItemReadOnlyDefault = false; -export const jobsGetExecutionProfilesResponseTwoConfigOneNumGpusDefault = 1; -export const jobsGetExecutionProfilesResponseTwoConfigOneSchedulerNameDefault = ``; -export const jobsGetExecutionProfilesResponseTwoConfigOneLauncherImageDefault = `nvcr.io/nvidia/nemo-microservices/jobs-launcher:latest`; -export const jobsGetExecutionProfilesResponseThreeProviderDefault = `cpu`; -export const jobsGetExecutionProfilesResponseThreeProfileDefault = `default`; -export const jobsGetExecutionProfilesResponseThreeBackendDefault = `volcano_job`; -export const jobsGetExecutionProfilesResponseThreeConfigOneTtlSecondsBeforeActiveDefault = 1800; -export const jobsGetExecutionProfilesResponseThreeConfigOneTtlSecondsActiveDefault = 86400; -export const jobsGetExecutionProfilesResponseThreeConfigOneTtlSecondsAfterFinishedDefault = 3600; -export const jobsGetExecutionProfilesResponseThreeConfigOneCleanupCompletedJobsImmediatelyDefault = true; -export const jobsGetExecutionProfilesResponseThreeConfigOneLauncherToolPathDefault = `/tools/jobs-launcher`; -export const jobsGetExecutionProfilesResponseThreeConfigOneServiceAccountNameDefault = `default`; -export const jobsGetExecutionProfilesResponseThreeConfigOneResourcesOneNumNodesDefault = 1; - -export const jobsGetExecutionProfilesResponseThreeConfigOneStorageOnePvcNameDefault = ``; -export const jobsGetExecutionProfilesResponseThreeConfigOneStorageOneVolumePermissionsImageDefault = `busybox`; -export const jobsGetExecutionProfilesResponseThreeConfigOneStorageOneAdditionalVolumesItemPersistentVolumeClaimOneReadOnlyDefault = false; -export const jobsGetExecutionProfilesResponseThreeConfigOneStorageOneAdditionalVolumeMountsItemReadOnlyDefault = false; -export const jobsGetExecutionProfilesResponseThreeConfigOneNumGpusDefault = 1; -export const jobsGetExecutionProfilesResponseThreeConfigOneSchedulerNameDefault = `volcano`; -export const jobsGetExecutionProfilesResponseThreeConfigOneLauncherImageDefault = `nvcr.io/nvidia/nemo-microservices/jobs-launcher:latest`; -export const jobsGetExecutionProfilesResponseThreeConfigOneQueueDefault = `default`; -export const jobsGetExecutionProfilesResponseThreeConfigOneMaxRetryDefault = 0; -export const jobsGetExecutionProfilesResponseThreeConfigOneEnableMultiNodeNetworkingDefault = true; -export const jobsGetExecutionProfilesResponseFourProviderDefault = `subprocess`; -export const jobsGetExecutionProfilesResponseFourProfileDefault = `default`; -export const jobsGetExecutionProfilesResponseFourBackendDefault = `subprocess`; -export const jobsGetExecutionProfilesResponseFourConfigOneTtlSecondsBeforeActiveDefault = 1800; -export const jobsGetExecutionProfilesResponseFourConfigOneTtlSecondsActiveDefault = 86400; -export const jobsGetExecutionProfilesResponseFourConfigOneTtlSecondsAfterFinishedDefault = 3600; -export const jobsGetExecutionProfilesResponseFourConfigOneCleanupCompletedJobsImmediatelyDefault = false; -export const jobsGetExecutionProfilesResponseFourConfigOneLauncherToolPathDefault = `/tools/jobs-launcher`; -export const jobsGetExecutionProfilesResponseFourConfigOneWorkingDirectoryDefault = `/tmp/nmp-subprocess-jobs`; -export const jobsGetExecutionProfilesResponseFourConfigOneGracefulShutdownTimeoutSecondsDefault = 10; -export const jobsGetExecutionProfilesResponseFiveProviderDefault = `cpu`; -export const jobsGetExecutionProfilesResponseFiveProfileDefault = `default`; -export const jobsGetExecutionProfilesResponseFiveBackendDefault = `e2e`; -export const jobsGetExecutionProfilesResponseFiveConfigOneTtlSecondsBeforeActiveDefault = 1800; -export const jobsGetExecutionProfilesResponseFiveConfigOneTtlSecondsActiveDefault = 86400; -export const jobsGetExecutionProfilesResponseFiveConfigOneTtlSecondsAfterFinishedDefault = 3600; -export const jobsGetExecutionProfilesResponseFiveConfigOneCleanupCompletedJobsImmediatelyDefault = true; -export const jobsGetExecutionProfilesResponseFiveConfigOneLauncherToolPathDefault = `/tools/jobs-launcher`; - -export const JobsGetExecutionProfilesResponseItem = zod.union([ - zod - .object({ - provider: zod - .string() - .default(jobsGetExecutionProfilesResponseOneProviderDefault) - .describe('The compute provider for the executor, e.g., cpu, gpu'), - profile: zod - .string() - .default(jobsGetExecutionProfilesResponseOneProfileDefault) - .describe( - 'The profile name for the executor, e.g., high_priority_a100, low_priority, etc.' - ), - backend: zod.literal('docker').default(jobsGetExecutionProfilesResponseOneBackendDefault), - config: zod - .object({ - ttl_seconds_before_active: zod - .number() - .default(jobsGetExecutionProfilesResponseOneConfigOneTtlSecondsBeforeActiveDefault), - ttl_seconds_active: zod - .number() - .default(jobsGetExecutionProfilesResponseOneConfigOneTtlSecondsActiveDefault), - ttl_seconds_after_finished: zod - .number() - .default(jobsGetExecutionProfilesResponseOneConfigOneTtlSecondsAfterFinishedDefault), - cleanup_completed_jobs_immediately: zod - .boolean() - .default( - jobsGetExecutionProfilesResponseOneConfigOneCleanupCompletedJobsImmediatelyDefault - ), - launcher_tool_path: zod - .string() - .default(jobsGetExecutionProfilesResponseOneConfigOneLauncherToolPathDefault) - .describe('Path to the jobs launcher tool'), - env: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Optional env vars applied to all jobs (e.g. HOME=\/tmp). Keys must not conflict with platform-reserved names. Job steps may override these variables.' - ), - storage: zod - .object({ - volume_name: zod - .string() - .default(jobsGetExecutionProfilesResponseOneConfigOneStorageOneVolumeNameDefault) - .describe('Name of the Docker volume for persistent storage'), - volume_permissions_image: zod - .string() - .default( - jobsGetExecutionProfilesResponseOneConfigOneStorageOneVolumePermissionsImageDefault - ) - .describe('Docker image used to set permissions on the volume'), - additional_volume_mounts: zod - .array( - zod.object({ - volume_name: zod.string().describe('Name of the Docker volume to mount'), - mount_path: zod - .string() - .describe('Path inside the container where the volume will be mounted'), - kind: zod - .enum(['volume', 'tmpfs']) - .default( - jobsGetExecutionProfilesResponseOneConfigOneStorageOneAdditionalVolumeMountsItemKindDefault - ) - .describe( - "Type of the Docker volume to mount. Options are 'volume' or 'tmpfs' (default: 'volume'). tmpfs volumes are only supported on Linux hosts." - ), - options: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Additional options for the volume'), - allow_create_volume: zod - .boolean() - .default( - jobsGetExecutionProfilesResponseOneConfigOneStorageOneAdditionalVolumeMountsItemAllowCreateVolumeDefault - ) - .describe( - 'Whether to allow the creation of the volume if it does not exist (default: false).' - ), - }) - ) - .optional() - .describe('List of additional Docker volume mounts for the job'), - }) - .describe('Configuration for persistent storage in Docker jobs.') - .optional() - .describe('Docker storage configuration'), - networking: zod - .object({ - job_container_network: zod - .string() - .default( - jobsGetExecutionProfilesResponseOneConfigOneNetworkingOneJobContainerNetworkDefault - ) - .describe('Docker network for the job container'), - }) - .optional() - .describe('Docker networking configuration'), - }) - .describe('Configuration for Docker Job execution profile.') - .describe('Additional configuration for the docker executor'), - }) - .describe( - 'Execution configuration for a Docker Job.\nThis is used to define the executor type, provider, profile, and any additional configuration\nrequired for the executor to run the job on Docker' - ), - zod - .object({ - provider: zod - .string() - .default(jobsGetExecutionProfilesResponseTwoProviderDefault) - .describe('The compute provider for the executor, e.g., cpu, gpu'), - profile: zod - .string() - .default(jobsGetExecutionProfilesResponseTwoProfileDefault) - .describe( - 'The profile name for the executor, e.g., high_priority_a100, low_priority, etc.' - ), - backend: zod - .literal('kubernetes_job') - .default(jobsGetExecutionProfilesResponseTwoBackendDefault), - config: zod - .object({ - ttl_seconds_before_active: zod - .number() - .default(jobsGetExecutionProfilesResponseTwoConfigOneTtlSecondsBeforeActiveDefault), - ttl_seconds_active: zod - .number() - .default(jobsGetExecutionProfilesResponseTwoConfigOneTtlSecondsActiveDefault), - ttl_seconds_after_finished: zod - .number() - .default(jobsGetExecutionProfilesResponseTwoConfigOneTtlSecondsAfterFinishedDefault), - cleanup_completed_jobs_immediately: zod - .boolean() - .default( - jobsGetExecutionProfilesResponseTwoConfigOneCleanupCompletedJobsImmediatelyDefault - ), - launcher_tool_path: zod - .string() - .default(jobsGetExecutionProfilesResponseTwoConfigOneLauncherToolPathDefault) - .describe('Path to the jobs launcher tool'), - env: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Optional env vars applied to all jobs (e.g. HOME=\/tmp). Keys must not conflict with platform-reserved names. Job steps may override these variables.' - ), - namespace: zod - .string() - .optional() - .describe( - 'Kubernetes namespace to submit the job to. If not set, it will be determined from the environment.' - ), - service_account_name: zod - .string() - .default(jobsGetExecutionProfilesResponseTwoConfigOneServiceAccountNameDefault) - .describe( - "Kubernetes service account name for job pods. Uses the Kubernetes default service account when set to 'default'." - ), - tolerations: zod - .array(zod.record(zod.string(), zod.unknown())) - .optional() - .describe('Tolerations for the Kubernetes job pods.'), - node_selector: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Node selector for the Kubernetes job pods.'), - affinity: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Affinity for the Kubernetes job pods.'), - resources: zod - .object({ - requests: zod - .object({ - cpu: zod - .string() - .optional() - .describe("CPU specification (e.g., '250m', '1', '2.5')."), - memory: zod - .string() - .optional() - .describe("Memory specification (e.g., '128Mi', '1Gi', '512M')."), - }) - .describe('Resource specification.') - .optional() - .describe('Minimum resources requested for the container.'), - limits: zod - .object({ - cpu: zod - .string() - .optional() - .describe("CPU specification (e.g., '250m', '1', '2.5')."), - memory: zod - .string() - .optional() - .describe("Memory specification (e.g., '128Mi', '1Gi', '512M')."), - }) - .describe('Resource specification.') - .optional() - .describe('Maximum resources the container can use.'), - num_nodes: zod - .number() - .min(1) - .default(jobsGetExecutionProfilesResponseTwoConfigOneResourcesOneNumNodesDefault) - .describe('Number of nodes to use.'), - num_gpus: zod.number().optional().describe('Step requesting number of GPUs.'), - shm_size: zod - .string() - .optional() - .describe( - "Shared memory (\/dev\/shm) size as a Kubernetes quantity (e.g. '1Gi', '4Gi'). Used for GPU and distributed-GPU job executors. When unset, defaults to 1Gi per allocated GPU." - ), - }) - .describe('Resource requirements matching k8s ResourceRequirements format.') - .optional() - .describe('Resource requests and limits for the Kubernetes job pods.'), - pod_security_context: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Pod security context for the Kubernetes job pods.'), - image_pull_secrets: zod - .array( - zod - .object({ - name: zod.string().describe('Kubernetes Secret name for pulling images'), - }) - .describe('Kubernetes image pull secret reference.') - ) - .optional() - .describe('Image pull secrets for the Kubernetes job pods.'), - job_metadata: zod - .object({ - labels: zod.record(zod.string(), zod.string()).optional(), - annotations: zod.record(zod.string(), zod.string()).optional(), - }) - .optional() - .describe('Metadata to add to each job object in the Kubernetes job.'), - pod_metadata: zod - .object({ - labels: zod.record(zod.string(), zod.string()).optional(), - annotations: zod.record(zod.string(), zod.string()).optional(), - }) - .optional() - .describe('Metadata to add to each pod in the Kubernetes job.'), - storage: zod - .object({ - pvc_name: zod - .string() - .default(jobsGetExecutionProfilesResponseTwoConfigOneStorageOnePvcNameDefault) - .describe('Persistent Volume Claim Name to use for job storage.'), - volume_permissions_image: zod - .string() - .default( - jobsGetExecutionProfilesResponseTwoConfigOneStorageOneVolumePermissionsImageDefault - ) - .describe('Image used to set volume permissions'), - additional_volumes: zod - .array( - zod - .object({ - name: zod.string().describe('Volume Name'), - persistent_volume_claim: zod - .object({ - claim_name: zod.string().describe('Persistent Volume Claim Name'), - read_only: zod - .boolean() - .default( - jobsGetExecutionProfilesResponseTwoConfigOneStorageOneAdditionalVolumesItemPersistentVolumeClaimOneReadOnlyDefault - ) - .describe('Whether the volume is mounted read-only'), - }) - .describe('Kubernetes Persistent Volume Claim definition.') - .optional() - .describe('Persistent Volume Claim configuration'), - empty_dir: zod - .object({ - medium: zod - .string() - .optional() - .describe("The medium of the emptyDir volume (e.g., 'Memory')"), - size_limit: zod - .string() - .optional() - .describe("The size limit of the emptyDir volume (e.g., '1Gi')"), - }) - .describe('Kubernetes EmptyDir Volume definition.') - .optional() - .describe('EmptyDir Volume configuration'), - }) - .describe('Kubernetes Volume definition.') - ) - .optional() - .describe('Additional volumes to mount'), - additional_volume_mounts: zod - .array( - zod - .object({ - name: zod.string().describe('Volume Name'), - mount_path: zod.string().describe('Mount Path in the container'), - sub_path: zod - .string() - .optional() - .describe('Sub-path within the volume to mount'), - read_only: zod - .boolean() - .default( - jobsGetExecutionProfilesResponseTwoConfigOneStorageOneAdditionalVolumeMountsItemReadOnlyDefault - ) - .describe('Whether the volume mount is read-only'), - }) - .describe('Kubernetes Volume Mount definition.') - ) - .optional() - .describe('Additional volume mounts'), - }) - .describe('Configuration for persistent storage in Kubernetes jobs.') - .optional() - .describe('Storage configuration for the Kubernetes job pods.'), - num_gpus: zod - .number() - .default(jobsGetExecutionProfilesResponseTwoConfigOneNumGpusDefault) - .describe('Number of GPUs to request for the job'), - scheduler_name: zod - .string() - .default(jobsGetExecutionProfilesResponseTwoConfigOneSchedulerNameDefault) - .describe( - "The scheduler name to use for the pod spec. When non-empty, this value is applied to the pod's schedulerName field, enabling custom schedulers such as KAI Scheduler. Empty string omits schedulerName so the cluster default scheduler is used." - ), - launcher_image: zod - .string() - .default(jobsGetExecutionProfilesResponseTwoConfigOneLauncherImageDefault) - .describe('Container image that contains the jobs-launcher binary.'), - }) - .describe('Configuration for Kubernetes execution environment.') - .describe('Additional configuration for the kubernetes executor'), - }) - .describe( - 'Execution configuration for a Kubernetes Job.\nThis is used to define the executor type, provider, profile, and any additional configuration\nrequired for the executor to run the job on Kubernetes' - ), - zod - .object({ - provider: zod - .string() - .default(jobsGetExecutionProfilesResponseThreeProviderDefault) - .describe('The compute provider for the executor, e.g., cpu, gpu'), - profile: zod - .string() - .default(jobsGetExecutionProfilesResponseThreeProfileDefault) - .describe( - 'The profile name for the executor, e.g., high_priority_a100, low_priority, etc.' - ), - backend: zod - .literal('volcano_job') - .default(jobsGetExecutionProfilesResponseThreeBackendDefault), - config: zod - .object({ - ttl_seconds_before_active: zod - .number() - .default(jobsGetExecutionProfilesResponseThreeConfigOneTtlSecondsBeforeActiveDefault), - ttl_seconds_active: zod - .number() - .default(jobsGetExecutionProfilesResponseThreeConfigOneTtlSecondsActiveDefault), - ttl_seconds_after_finished: zod - .number() - .default(jobsGetExecutionProfilesResponseThreeConfigOneTtlSecondsAfterFinishedDefault), - cleanup_completed_jobs_immediately: zod - .boolean() - .default( - jobsGetExecutionProfilesResponseThreeConfigOneCleanupCompletedJobsImmediatelyDefault - ), - launcher_tool_path: zod - .string() - .default(jobsGetExecutionProfilesResponseThreeConfigOneLauncherToolPathDefault) - .describe('Path to the jobs launcher tool'), - env: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Optional env vars applied to all jobs (e.g. HOME=\/tmp). Keys must not conflict with platform-reserved names. Job steps may override these variables.' - ), - namespace: zod - .string() - .optional() - .describe( - 'Kubernetes namespace to submit the job to. If not set, it will be determined from the environment.' - ), - service_account_name: zod - .string() - .default(jobsGetExecutionProfilesResponseThreeConfigOneServiceAccountNameDefault) - .describe( - "Kubernetes service account name for job pods. Uses the Kubernetes default service account when set to 'default'." - ), - tolerations: zod - .array(zod.record(zod.string(), zod.unknown())) - .optional() - .describe('Tolerations for the Kubernetes job pods.'), - node_selector: zod - .record(zod.string(), zod.string()) - .optional() - .describe('Node selector for the Kubernetes job pods.'), - affinity: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Affinity for the Kubernetes job pods.'), - resources: zod - .object({ - requests: zod - .object({ - cpu: zod - .string() - .optional() - .describe("CPU specification (e.g., '250m', '1', '2.5')."), - memory: zod - .string() - .optional() - .describe("Memory specification (e.g., '128Mi', '1Gi', '512M')."), - }) - .describe('Resource specification.') - .optional() - .describe('Minimum resources requested for the container.'), - limits: zod - .object({ - cpu: zod - .string() - .optional() - .describe("CPU specification (e.g., '250m', '1', '2.5')."), - memory: zod - .string() - .optional() - .describe("Memory specification (e.g., '128Mi', '1Gi', '512M')."), - }) - .describe('Resource specification.') - .optional() - .describe('Maximum resources the container can use.'), - num_nodes: zod - .number() - .min(1) - .default(jobsGetExecutionProfilesResponseThreeConfigOneResourcesOneNumNodesDefault) - .describe('Number of nodes to use.'), - num_gpus: zod.number().optional().describe('Step requesting number of GPUs.'), - shm_size: zod - .string() - .optional() - .describe( - "Shared memory (\/dev\/shm) size as a Kubernetes quantity (e.g. '1Gi', '4Gi'). Used for GPU and distributed-GPU job executors. When unset, defaults to 1Gi per allocated GPU." - ), - }) - .describe('Resource requirements matching k8s ResourceRequirements format.') - .optional() - .describe('Resource requests and limits for the Kubernetes job pods.'), - pod_security_context: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe('Pod security context for the Kubernetes job pods.'), - image_pull_secrets: zod - .array( - zod - .object({ - name: zod.string().describe('Kubernetes Secret name for pulling images'), - }) - .describe('Kubernetes image pull secret reference.') - ) - .optional() - .describe('Image pull secrets for the Kubernetes job pods.'), - job_metadata: zod - .object({ - labels: zod.record(zod.string(), zod.string()).optional(), - annotations: zod.record(zod.string(), zod.string()).optional(), - }) - .optional() - .describe('Metadata to add to each job object in the Kubernetes job.'), - pod_metadata: zod - .object({ - labels: zod.record(zod.string(), zod.string()).optional(), - annotations: zod.record(zod.string(), zod.string()).optional(), - }) - .optional() - .describe('Metadata to add to each pod in the Kubernetes job.'), - storage: zod - .object({ - pvc_name: zod - .string() - .default(jobsGetExecutionProfilesResponseThreeConfigOneStorageOnePvcNameDefault) - .describe('Persistent Volume Claim Name to use for job storage.'), - volume_permissions_image: zod - .string() - .default( - jobsGetExecutionProfilesResponseThreeConfigOneStorageOneVolumePermissionsImageDefault - ) - .describe('Image used to set volume permissions'), - additional_volumes: zod - .array( - zod - .object({ - name: zod.string().describe('Volume Name'), - persistent_volume_claim: zod - .object({ - claim_name: zod.string().describe('Persistent Volume Claim Name'), - read_only: zod - .boolean() - .default( - jobsGetExecutionProfilesResponseThreeConfigOneStorageOneAdditionalVolumesItemPersistentVolumeClaimOneReadOnlyDefault - ) - .describe('Whether the volume is mounted read-only'), - }) - .describe('Kubernetes Persistent Volume Claim definition.') - .optional() - .describe('Persistent Volume Claim configuration'), - empty_dir: zod - .object({ - medium: zod - .string() - .optional() - .describe("The medium of the emptyDir volume (e.g., 'Memory')"), - size_limit: zod - .string() - .optional() - .describe("The size limit of the emptyDir volume (e.g., '1Gi')"), - }) - .describe('Kubernetes EmptyDir Volume definition.') - .optional() - .describe('EmptyDir Volume configuration'), - }) - .describe('Kubernetes Volume definition.') - ) - .optional() - .describe('Additional volumes to mount'), - additional_volume_mounts: zod - .array( - zod - .object({ - name: zod.string().describe('Volume Name'), - mount_path: zod.string().describe('Mount Path in the container'), - sub_path: zod - .string() - .optional() - .describe('Sub-path within the volume to mount'), - read_only: zod - .boolean() - .default( - jobsGetExecutionProfilesResponseThreeConfigOneStorageOneAdditionalVolumeMountsItemReadOnlyDefault - ) - .describe('Whether the volume mount is read-only'), - }) - .describe('Kubernetes Volume Mount definition.') - ) - .optional() - .describe('Additional volume mounts'), - }) - .describe('Configuration for persistent storage in Kubernetes jobs.') - .optional() - .describe('Storage configuration for the Kubernetes job pods.'), - num_gpus: zod - .number() - .default(jobsGetExecutionProfilesResponseThreeConfigOneNumGpusDefault) - .describe('Number of GPUs to request for the job'), - scheduler_name: zod - .string() - .default(jobsGetExecutionProfilesResponseThreeConfigOneSchedulerNameDefault) - .describe('The scheduler name to use for the Volcano job.'), - launcher_image: zod - .string() - .default(jobsGetExecutionProfilesResponseThreeConfigOneLauncherImageDefault) - .describe('Container image that contains the jobs-launcher binary.'), - queue: zod - .string() - .default(jobsGetExecutionProfilesResponseThreeConfigOneQueueDefault) - .describe('The Volcano queue to submit the job to.'), - max_retry: zod - .number() - .default(jobsGetExecutionProfilesResponseThreeConfigOneMaxRetryDefault) - .describe('maxRetry indicates the maximum number of retries allowed by the job'), - plugins: zod - .record(zod.string(), zod.unknown()) - .optional() - .describe( - 'plugins indicates the plugins used by Volcano when the job is scheduled. We always add the pytorch plugin if more than one node.' - ), - enable_multi_node_networking: zod - .boolean() - .default(jobsGetExecutionProfilesResponseThreeConfigOneEnableMultiNodeNetworkingDefault) - .describe( - 'Enable multi-node networking injection. Sets annotations to trigger Kyverno policy mutations.' - ), - }) - .describe('Configuration for Volcano Job Execution Profile') - .describe('Additional configuration for the kubernetes executor'), - }) - .describe('Volcano Job Execution Profile'), - zod.object({ - provider: zod - .literal('subprocess') - .default(jobsGetExecutionProfilesResponseFourProviderDefault), - profile: zod - .string() - .default(jobsGetExecutionProfilesResponseFourProfileDefault) - .describe('The profile name for the executor, e.g., high_priority_a100, low_priority, etc.'), - backend: zod.literal('subprocess').default(jobsGetExecutionProfilesResponseFourBackendDefault), - config: zod - .object({ - ttl_seconds_before_active: zod - .number() - .default(jobsGetExecutionProfilesResponseFourConfigOneTtlSecondsBeforeActiveDefault), - ttl_seconds_active: zod - .number() - .default(jobsGetExecutionProfilesResponseFourConfigOneTtlSecondsActiveDefault), - ttl_seconds_after_finished: zod - .number() - .default(jobsGetExecutionProfilesResponseFourConfigOneTtlSecondsAfterFinishedDefault), - cleanup_completed_jobs_immediately: zod - .boolean() - .default( - jobsGetExecutionProfilesResponseFourConfigOneCleanupCompletedJobsImmediatelyDefault - ) - .describe('Keep subprocess working directories by default so runs remain inspectable.'), - launcher_tool_path: zod - .string() - .default(jobsGetExecutionProfilesResponseFourConfigOneLauncherToolPathDefault) - .describe('Path to the jobs launcher tool'), - env: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Optional env vars applied to all jobs (e.g. HOME=\/tmp). Keys must not conflict with platform-reserved names. Job steps may override these variables.' - ), - working_directory: zod - .string() - .default(jobsGetExecutionProfilesResponseFourConfigOneWorkingDirectoryDefault) - .describe('Root directory for subprocess job state, config, storage, and logs.'), - graceful_shutdown_timeout_seconds: zod - .number() - .default( - jobsGetExecutionProfilesResponseFourConfigOneGracefulShutdownTimeoutSecondsDefault - ) - .describe('How long to wait after SIGTERM before force killing the process group.'), - }) - .optional() - .describe('Additional configuration for the subprocess executor'), - }), - zod - .object({ - provider: zod - .string() - .default(jobsGetExecutionProfilesResponseFiveProviderDefault) - .describe('The compute provider for the executor, e.g., cpu, gpu'), - profile: zod - .string() - .default(jobsGetExecutionProfilesResponseFiveProfileDefault) - .describe( - 'The profile name for the executor, e.g., high_priority_a100, low_priority, etc.' - ), - backend: zod.literal('e2e').default(jobsGetExecutionProfilesResponseFiveBackendDefault), - config: zod - .object({ - ttl_seconds_before_active: zod - .number() - .default(jobsGetExecutionProfilesResponseFiveConfigOneTtlSecondsBeforeActiveDefault), - ttl_seconds_active: zod - .number() - .default(jobsGetExecutionProfilesResponseFiveConfigOneTtlSecondsActiveDefault), - ttl_seconds_after_finished: zod - .number() - .default(jobsGetExecutionProfilesResponseFiveConfigOneTtlSecondsAfterFinishedDefault), - cleanup_completed_jobs_immediately: zod - .boolean() - .default( - jobsGetExecutionProfilesResponseFiveConfigOneCleanupCompletedJobsImmediatelyDefault - ), - launcher_tool_path: zod - .string() - .default(jobsGetExecutionProfilesResponseFiveConfigOneLauncherToolPathDefault) - .describe('Path to the jobs launcher tool'), - env: zod - .record(zod.string(), zod.string()) - .optional() - .describe( - 'Optional env vars applied to all jobs (e.g. HOME=\/tmp). Keys must not conflict with platform-reserved names. Job steps may override these variables.' - ), - }) - .optional() - .describe('Configuration for the e2e test executor'), - }) - .describe( - 'Execution configuration for E2E testing.\nThis backend auto-completes jobs without actually running containers,\nmaking tests fast and deterministic.' - ), -]); -export const JobsGetExecutionProfilesResponse = zod.array(JobsGetExecutionProfilesResponseItem); - -/** - * Create a new platform job. - * @summary Create Job - */ -export const JobsCreateJobParams = zod.object({ - workspace: zod.string(), -}); - -export const jobsCreateJobBodyPlatformSpecStepsItemNameRegExp = new RegExp( - '^[a-z](?!.\*--)[a-z0-9\\-@.+_]{1,62}(?= 0.' - ), - max_holdout: zod - .number() - .default(safeSynthesizerCreateJobBodySpecConfigOneDataOneMaxHoldoutDefault) - .describe( - 'Maximum number of records to hold out. Overrides any behavior set by ``holdout``. Must be >= 0.' - ), - random_state: zod - .number() - .optional() - .describe('Random state for holdout split to ensure reproducibility.'), - }) - .describe( - 'Configuration for grouping, ordering, and splitting input data for training and evaluation.' - ) - .optional() - .describe( - 'Configuration controlling how input data is grouped and split for training and evaluation.' - ), - evaluation: zod - .object({ - mia_enabled: zod - .boolean() - .default(safeSynthesizerCreateJobBodySpecConfigOneEvaluationOneMiaEnabledDefault) - .describe('Enable membership inference attack evaluation for privacy assessment.'), - aia_enabled: zod - .boolean() - .default(safeSynthesizerCreateJobBodySpecConfigOneEvaluationOneAiaEnabledDefault) - .describe('Enable attribute inference attack evaluation for privacy assessment.'), - sqs_report_columns: zod - .number() - .default( - safeSynthesizerCreateJobBodySpecConfigOneEvaluationOneSqsReportColumnsDefault - ) - .describe('Number of columns to include in statistical quality reports.'), - sqs_report_rows: zod - .number() - .default(safeSynthesizerCreateJobBodySpecConfigOneEvaluationOneSqsReportRowsDefault) - .describe('Number of rows to include in statistical quality reports.'), - mandatory_columns: zod - .number() - .optional() - .describe('Number of mandatory columns that must be used in evaluation.'), - enabled: zod - .boolean() - .default(safeSynthesizerCreateJobBodySpecConfigOneEvaluationOneEnabledDefault) - .describe('Enable or disable evaluation.'), - quasi_identifier_count: zod - .number() - .default( - safeSynthesizerCreateJobBodySpecConfigOneEvaluationOneQuasiIdentifierCountDefault - ) - .describe('Number of quasi-identifiers to sample for privacy attacks.'), - pii_replay_enabled: zod - .boolean() - .default( - safeSynthesizerCreateJobBodySpecConfigOneEvaluationOnePiiReplayEnabledDefault - ) - .describe('Enable PII Replay detection.'), - pii_replay_entities: zod - .array(zod.string()) - .optional() - .describe( - 'List of entities for PII Replay. If not provided, default entities will be used.' - ), - pii_replay_columns: zod - .array(zod.string()) - .optional() - .describe( - 'List of columns for PII Replay. If not provided, only entities will be used.' - ), - }) - .describe( - 'Configuration for evaluating synthetic data quality and privacy.\n\nThis class controls which evaluation metrics are computed and how they are configured.\nIt includes privacy attack evaluations, statistical quality metrics, and downstream\nmachine learning performance assessments.' - ) - .optional() - .describe('Parameters for evaluating the quality of generated synthetic data.'), - training: zod - .object({ - num_input_records_to_sample: zod - .union([zod.literal('auto'), zod.number()]) - .default( - safeSynthesizerCreateJobBodySpecConfigOneTrainingOneNumInputRecordsToSampleDefault - ) - .describe( - "Number of records the model will see during training. This parameter is a proxy for training time. For example, if its value is the same size as the input dataset, this is like training for a single epoch. If its value is larger, this is like training for multiple (possibly fractional) epochs. If its value is smaller, this is like training for a fraction of an epoch. Supports 'auto' where a reasonable value is chosen based on other config params and data." - ), - batch_size: zod - .number() - .default(safeSynthesizerCreateJobBodySpecConfigOneTrainingOneBatchSizeDefault) - .describe('The batch size per device for training. Must be >= 1.'), - gradient_accumulation_steps: zod - .number() - .default( - safeSynthesizerCreateJobBodySpecConfigOneTrainingOneGradientAccumulationStepsDefault - ) - .describe( - 'Number of update steps to accumulate the gradients for, before performing a backward\/update pass. This technique increases the effective batch size that will fit into GPU memory. Must be >= 1.' - ), - weight_decay: zod - .number() - .default(safeSynthesizerCreateJobBodySpecConfigOneTrainingOneWeightDecayDefault) - .describe( - 'The weight decay to apply to all layers except all bias and LayerNorm weights in the AdamW optimizer. Must be in (0, 1).' - ), - warmup_ratio: zod - .number() - .default(safeSynthesizerCreateJobBodySpecConfigOneTrainingOneWarmupRatioDefault) - .describe( - 'Ratio of total training steps used for a linear warmup from 0 to the learning rate. Must be > 0.' - ), - lr_scheduler: zod - .string() - .default(safeSynthesizerCreateJobBodySpecConfigOneTrainingOneLrSchedulerDefault) - .describe( - 'The scheduler type to use. See the HuggingFace documentation of ``SchedulerType`` for all possible values.' - ), - learning_rate: zod - .union([zod.literal('auto'), zod.number()]) - .default(safeSynthesizerCreateJobBodySpecConfigOneTrainingOneLearningRateDefault) - .describe( - "The initial learning rate for `AdamW` optimizer. Must be in (0, 1). Setting to 'auto' uses a model-specific default if one exists." - ), - lora_r: zod - .number() - .default(safeSynthesizerCreateJobBodySpecConfigOneTrainingOneLoraRDefault) - .describe( - 'The rank of the LoRA update matrices. Lower rank results in smaller update matrices with fewer trainable parameters. Must be > 0.' - ), - lora_alpha_over_r: zod - .number() - .default(safeSynthesizerCreateJobBodySpecConfigOneTrainingOneLoraAlphaOverRDefault) - .describe( - 'The ratio of the LoRA scaling factor (alpha) to the LoRA rank. Empirically, this parameter works well when set to 0.5, 1, or 2. Must be in [0.5, 3].' - ), - lora_target_modules: zod - .array(zod.string()) - .default( - safeSynthesizerCreateJobBodySpecConfigOneTrainingOneLoraTargetModulesDefault - ) - .describe( - "The list of transformer modules to apply LoRA to. Possible modules: 'q_proj', 'k_proj', 'v_proj', 'o_proj', 'gate_proj', 'up_proj', 'down_proj'." - ), - use_unsloth: zod - .union([zod.literal('auto'), zod.boolean()]) - .default(safeSynthesizerCreateJobBodySpecConfigOneTrainingOneUseUnslothDefault) - .describe('Whether to use Unsloth for optimized training.'), - rope_scaling_factor: zod - .union([zod.literal('auto'), zod.number()]) - .default( - safeSynthesizerCreateJobBodySpecConfigOneTrainingOneRopeScalingFactorDefault - ) - .describe( - "Scale the base LLM's context length by this factor using RoPE scaling. Must be >= 1 or 'auto'." - ), - validation_ratio: zod - .number() - .default(safeSynthesizerCreateJobBodySpecConfigOneTrainingOneValidationRatioDefault) - .describe( - 'The fraction of the training data used for validation. Must be in [0, 1]. If set to 0, no validation will be performed. If set larger than 0, validation loss will be computed and reported throughout training.' - ), - validation_steps: zod - .number() - .default(safeSynthesizerCreateJobBodySpecConfigOneTrainingOneValidationStepsDefault) - .describe( - 'The number of steps between validation checks for the HF Trainer arguments. Must be > 0.' - ), - pretrained_model: zod - .string() - .default(safeSynthesizerCreateJobBodySpecConfigOneTrainingOnePretrainedModelDefault) - .describe( - 'Pretrained model to use for fine-tuning. Defaults to SmolLM3. May be a Hugging Face model ID (loaded from the Hugging Face Hub or cache) or a local path. See security note in docs before using untrusted sources.' - ), - quantize_model: zod - .boolean() - .default(safeSynthesizerCreateJobBodySpecConfigOneTrainingOneQuantizeModelDefault) - .describe( - 'Whether to quantize the model during training. This can reduce memory usage and potentially speed up training, but may also impact model accuracy.' - ), - quantization_bits: zod - .union([zod.literal(4), zod.literal(8)]) - .default( - safeSynthesizerCreateJobBodySpecConfigOneTrainingOneQuantizationBitsDefault - ) - .describe( - 'The number of bits to use for quantization if ``quantize_model`` is ``True``. Accepts 8 or 4.' - ), - peft_implementation: zod - .string() - .default( - safeSynthesizerCreateJobBodySpecConfigOneTrainingOnePeftImplementationDefault - ) - .describe( - "The PEFT (Parameter-Efficient Fine-Tuning) implementation to use. Options: 'lora' for Low-Rank Adaptation, 'QLORA' for Quantized LoRA." - ), - max_vram_fraction: zod - .number() - .default(safeSynthesizerCreateJobBodySpecConfigOneTrainingOneMaxVramFractionDefault) - .describe( - 'The fraction of the total VRAM to use for training. Modify this to allow longer sequences. Must be in [0, 1].' - ), - attn_implementation: zod - .string() - .default( - safeSynthesizerCreateJobBodySpecConfigOneTrainingOneAttnImplementationDefault - ) - .describe( - "The attention implementation to use for model loading. Default uses Flash Attention 3 via the HuggingFace Kernels Hub (requires the 'kernels' pip package; falls back to 'sdpa' if the 'kernels' package is not installed). Other common values: 'flash_attention_2' (requires flash-attn pip package), 'sdpa' (PyTorch scaled dot product attention), 'eager' (standard PyTorch). Custom HuggingFace Kernels Hub paths (e.g. 'kernels-community\/flash-attn2') are also supported." - ), - }) - .describe( - 'Hyperparameters that control the training process behavior.\n\nThis class contains all the fine-tuning hyperparameters that control how the model\nlearns, including learning rates, batch sizes, LoRA configuration, and optimization\nsettings. These parameters directly affect training performance and quality.' - ) - .optional() - .describe( - 'Hyperparameters for model training such as learning rate, batch size, and LoRA adapter settings.' - ), - generation: zod - .object({ - num_records: zod - .number() - .default(safeSynthesizerCreateJobBodySpecConfigOneGenerationOneNumRecordsDefault) - .describe('Number of records to generate.'), - temperature: zod - .number() - .default(safeSynthesizerCreateJobBodySpecConfigOneGenerationOneTemperatureDefault) - .describe( - 'Sampling temperature for controlling randomness (higher = more random).' - ), - repetition_penalty: zod - .number() - .default( - safeSynthesizerCreateJobBodySpecConfigOneGenerationOneRepetitionPenaltyDefault - ) - .describe( - 'The value used to control the likelihood of the model repeating the same token. Must be > 0.' - ), - top_p: zod - .number() - .default(safeSynthesizerCreateJobBodySpecConfigOneGenerationOneTopPDefault) - .describe('Nucleus sampling probability for token selection. Must be in (0, 1].'), - patience: zod - .number() - .default(safeSynthesizerCreateJobBodySpecConfigOneGenerationOnePatienceDefault) - .describe( - 'Number of consecutive generations where the ``invalid_fraction_threshold`` is reached before stopping generation. Must be >= 1.' - ), - invalid_fraction_threshold: zod - .number() - .default( - safeSynthesizerCreateJobBodySpecConfigOneGenerationOneInvalidFractionThresholdDefault - ) - .describe( - 'The fraction of invalid records that will stop generation after the ``patience`` limit is reached. Must be in [0, 1].' - ), - use_structured_generation: zod - .boolean() - .default( - safeSynthesizerCreateJobBodySpecConfigOneGenerationOneUseStructuredGenerationDefault - ) - .describe('Whether to use structured generation for better format control.'), - structured_generation_backend: zod - .enum(['auto', 'xgrammar', 'guidance', 'outlines', 'lm-format-enforcer']) - .default( - safeSynthesizerCreateJobBodySpecConfigOneGenerationOneStructuredGenerationBackendDefault - ) - .describe( - "The backend used by vLLM when ``use_structured_generation`` is ``True``. Supported backends: 'outlines', 'guidance', 'xgrammar', 'lm-format-enforcer'. 'auto' will allow vLLM to choose the backend." - ), - structured_generation_schema_method: zod - .enum(['regex', 'json_schema']) - .default( - safeSynthesizerCreateJobBodySpecConfigOneGenerationOneStructuredGenerationSchemaMethodDefault - ) - .describe( - "The method used to generate the schema from your dataset and pass it to the generation backend. 'regex' uses a custom regex construction method that tends to be more comprehensive than 'json_schema' at the cost of speed." - ), - structured_generation_use_single_sequence: zod - .boolean() - .default( - safeSynthesizerCreateJobBodySpecConfigOneGenerationOneStructuredGenerationUseSingleSequenceDefault - ) - .describe( - 'Whether to use a regex that matches exactly one sequence or record if ``max_sequences_per_example`` is 1.' - ), - enforce_timeseries_fidelity: zod - .boolean() - .default( - safeSynthesizerCreateJobBodySpecConfigOneGenerationOneEnforceTimeseriesFidelityDefault - ) - .describe( - 'Enforce time-series fidelity by enforcing order, intervals, start and end times of the records.' - ), - validation: zod - .object({ - group_by_accept_no_delineator: zod - .boolean() - .default( - safeSynthesizerCreateJobBodySpecConfigOneGenerationOneValidationOneGroupByAcceptNoDelineatorDefault - ) - .describe( - 'Whether to accept completions without both beginning and end of sequence delineators as a single sequence.' - ), - group_by_ignore_invalid_records: zod - .boolean() - .default( - safeSynthesizerCreateJobBodySpecConfigOneGenerationOneValidationOneGroupByIgnoreInvalidRecordsDefault - ) - .describe( - 'Whether to ignore invalid records in a sequence and proceed with the valid records.' - ), - group_by_fix_non_unique_value: zod - .boolean() - .default( - safeSynthesizerCreateJobBodySpecConfigOneGenerationOneValidationOneGroupByFixNonUniqueValueDefault - ) - .describe( - 'Whether to automatically fix non-unique group-by values in a sequence by using the first unique value for all records.' - ), - group_by_fix_unordered_records: zod - .boolean() - .default( - safeSynthesizerCreateJobBodySpecConfigOneGenerationOneValidationOneGroupByFixUnorderedRecordsDefault - ) - .describe( - 'Whether to automatically fix unordered records in a sequence by sorting the records.' - ), - }) - .describe( - 'Configuration for record and sequence validation.\n\nThese parameters control the validation and automatic fixes when going\nfrom LLM output to tabular data.' - ) - .optional() - .describe( - 'Validation parameters controlling validation logic and automatic fixes when parsing LLM output and converting to tabular data.' - ), - attention_backend: zod - .string() - .default( - safeSynthesizerCreateJobBodySpecConfigOneGenerationOneAttentionBackendDefault - ) - .describe( - "The attention backend for the vLLM engine. Common values: 'FLASHINFER', 'FLASH_ATTN', 'TRITON_ATTN', 'FLEX_ATTENTION'. If ``None`` or 'auto', vLLM will auto-select the best available backend." - ), - }) - .describe( - 'Configuration parameters for synthetic data generation.\n\nThese parameters control how synthetic data is generated after the model is trained.\nThey affect the quality, diversity, and validity of the generated synthetic records.' - ) - .optional() - .describe( - 'Parameters governing synthetic data generation including temperature, top-p, and number of records to produce.' - ), - privacy: zod - .object({ - dp_enabled: zod - .boolean() - .default(safeSynthesizerCreateJobBodySpecConfigOnePrivacyOneDpEnabledDefault) - .describe('Enable differentially-private training with DP-SGD.'), - epsilon: zod - .number() - .default(safeSynthesizerCreateJobBodySpecConfigOnePrivacyOneEpsilonDefault) - .describe( - 'Target privacy budget -- lower values provide stronger privacy. Must be > 0.' - ), - delta: zod - .union([zod.literal('auto'), zod.number()]) - .default(safeSynthesizerCreateJobBodySpecConfigOnePrivacyOneDeltaDefault) - .describe( - "Probability of accidentally leaking information. Should be much smaller than 1\/n where n is the number of training records. Setting to 'auto' uses delta of 1\/n^1.2. Must be in [0, 1) or 'auto'." - ), - per_sample_max_grad_norm: zod - .number() - .default( - safeSynthesizerCreateJobBodySpecConfigOnePrivacyOnePerSampleMaxGradNormDefault - ) - .describe('Maximum L2 norm for per-sample gradient clipping. Must be > 0.'), - }) - .describe( - 'Hyperparameters for differential privacy during training.\n\nThese parameters configure differential privacy (DP) training using DP-SGD algorithm.\nWhen enabled, they provide formal privacy guarantees by adding calibrated noise\nduring training.' - ) - .optional() - .describe( - 'Differential-privacy hyperparameters. When ``None``, differential privacy is disabled entirely.' - ), - time_series: zod - .object({ - is_timeseries: zod - .boolean() - .default(safeSynthesizerCreateJobBodySpecConfigOneTimeSeriesOneIsTimeseriesDefault) - .describe( - 'Whether to treat the dataset as time series. When enabled, either ``timestamp_column`` or ``timestamp_interval_seconds`` is required. For grouped time series, ``group_training_examples_by`` needs to be set.' - ), - timestamp_column: zod - .string() - .optional() - .describe( - 'Name of the column containing timestamps used to order records when ``is_timeseries`` is ``True``. Required only when ``is_timeseries`` is ``True`` and ``timestamp_interval_seconds`` is not provided.' - ), - timestamp_interval_seconds: zod - .number() - .optional() - .describe( - 'Interval in seconds between timestamps. If not provided, the timestamp column will be used to infer the interval.' - ), - timestamp_format: zod - .string() - .optional() - .describe( - "Format of the timestamp column. Accepts either: (1) Python strftime format codes for string timestamps (e.g., '%Y-%m-%d %H:%M:%S', '%m\/%d\/%Y'), or (2) 'elapsed_seconds' for numeric (int\/float) timestamps representing seconds as an increasing counter (e.g., 0, 60, 120 for 1-minute intervals). If not provided, the format will be inferred from the data." - ), - start_timestamp: zod - .union([zod.string(), zod.number()]) - .optional() - .describe( - 'Start timestamp. If not provided, the first timestamp in the timestamp column will be used.' - ), - stop_timestamp: zod - .union([zod.string(), zod.number()]) - .optional() - .describe( - 'Stop timestamp. If not provided, the last timestamp in the timestamp column will be used.' - ), - }) - .describe( - 'Configuration for time-series mode in the Safe Synthesizer pipeline.\n\nControls whether a dataset is treated as time-series data, including\ntimestamp column selection, interval inference, and format validation.\nThe time-series pipeline is currently experimental.' - ) - .optional() - .describe( - 'Configuration for time-series mode. Time-series pipeline is currently experimental.' - ), - replace_pii: zod - .object({ - globals: zod - .object({ - locales: zod.array(zod.string()).optional().describe('List of locales.'), - seed: zod - .number() - .gt( - safeSynthesizerCreateJobBodySpecConfigOneReplacePiiOneGlobalsOneSeedExclusiveMin - ) - .lt( - safeSynthesizerCreateJobBodySpecConfigOneReplacePiiOneGlobalsOneSeedExclusiveMax - ) - .optional() - .describe('Optional random seed.'), - classify: zod - .object({ - enable_classify: zod - .boolean() - .optional() - .describe('Enable column classification.'), - entities: zod - .array(zod.string()) - .optional() - .describe('List of entity types to classify.'), - num_samples: zod - .number() - .default( - safeSynthesizerCreateJobBodySpecConfigOneReplacePiiOneGlobalsOneClassifyOneNumSamplesDefault - ) - .describe('Number of column values to sample for classification.'), - classify_model_provider: zod - .string() - .optional() - .describe( - 'Name of the model provider in the Inference Gateway for column classification. The job compiler will resolve this to the appropriate endpoint URL.' - ), - }) - .describe('Configuration for column classification using an LLM.') - .default( - safeSynthesizerCreateJobBodySpecConfigOneReplacePiiOneGlobalsOneClassifyDefault - ) - .describe('Column classification configuration.'), - ner: zod - .object({ - ner_threshold: zod - .number() - .default( - safeSynthesizerCreateJobBodySpecConfigOneReplacePiiOneGlobalsOneNerOneNerThresholdDefault - ) - .describe('NER model threshold.'), - enable_regexps: zod - .boolean() - .default( - safeSynthesizerCreateJobBodySpecConfigOneReplacePiiOneGlobalsOneNerOneEnableRegexpsDefault - ) - .describe('Enable NER regular expressions (experimental).'), - gliner: zod - .object({ - enable_gliner: zod - .boolean() - .default( - safeSynthesizerCreateJobBodySpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneEnableGlinerDefault - ) - .describe('Enable GLiNER NER module.'), - enable_batch_mode: zod - .boolean() - .default( - safeSynthesizerCreateJobBodySpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneEnableBatchModeDefault - ) - .describe('Enable GLiNER batch mode.'), - batch_size: zod - .number() - .default( - safeSynthesizerCreateJobBodySpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneBatchSizeDefault - ) - .describe('GLiNER batch size.'), - chunk_length: zod - .number() - .default( - safeSynthesizerCreateJobBodySpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneChunkLengthDefault - ) - .describe('GLiNER batch chunk length in characters.'), - gliner_model: zod - .string() - .default( - safeSynthesizerCreateJobBodySpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneGlinerModelDefault - ) - .describe('GLiNER model name.'), - }) - .describe('Configuration for the GLiNER named-entity recognition model.') - .default( - safeSynthesizerCreateJobBodySpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerDefault - ) - .describe('GLiNER NER configuration.'), - ner_entities: zod - .array(zod.string()) - .optional() - .describe( - 'List of entity types to recognize. If unset, classification entity types are used.' - ), - }) - .describe('Configuration for Named Entity Recognition.') - .default( - safeSynthesizerCreateJobBodySpecConfigOneReplacePiiOneGlobalsOneNerDefault - ) - .describe('Named Entity Recognition configuration.'), - lock_columns: zod - .array(zod.string()) - .optional() - .describe( - 'List of columns to preserve as immutable across all transformations.' - ), - }) - .describe( - 'Global settings for the PII replacer including locales, seed, NER, and classification.' - ) - .optional() - .describe('Global configuration options.'), - steps: zod - .array( - zod - .object({ - vars: zod - .record( - zod.string(), - zod.union([ - zod.string(), - zod.record(zod.string(), zod.unknown()), - zod.array(zod.unknown()), - ]) - ) - .optional() - .describe('Variable names and templates.'), - columns: zod - .object({ - add: zod - .array( - zod - .object({ - name: zod.string().optional().describe('Column name.'), - position: zod - .union([zod.number(), zod.array(zod.number())]) - .optional() - .describe('Column position.'), - condition: zod.string().optional().describe('Column condition.'), - value: zod.string().optional().describe('Rename to value.'), - entity: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Column entity match.'), - type: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Column type match.'), - }) - .describe( - 'Rule matcher for selecting columns by name, position, condition, entity, or type.' - ) - ) - .optional() - .describe('Columns to add.'), - drop: zod - .array( - zod - .object({ - name: zod.string().optional().describe('Column name.'), - position: zod - .union([zod.number(), zod.array(zod.number())]) - .optional() - .describe('Column position.'), - condition: zod.string().optional().describe('Column condition.'), - value: zod.string().optional().describe('Rename to value.'), - entity: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Column entity match.'), - type: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Column type match.'), - }) - .describe( - 'Rule matcher for selecting columns by name, position, condition, entity, or type.' - ) - ) - .optional() - .describe('Columns to drop.'), - rename: zod - .array( - zod - .object({ - name: zod.string().optional().describe('Column name.'), - position: zod - .union([zod.number(), zod.array(zod.number())]) - .optional() - .describe('Column position.'), - condition: zod.string().optional().describe('Column condition.'), - value: zod.string().optional().describe('Rename to value.'), - entity: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Column entity match.'), - type: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Column type match.'), - }) - .describe( - 'Rule matcher for selecting columns by name, position, condition, entity, or type.' - ) - ) - .optional() - .describe('Columns to rename.'), - }) - .describe('Container for column add, drop, and rename operations.') - .optional() - .describe('Columns transform configuration.'), - rows: zod - .object({ - drop: zod - .array( - zod - .object({ - name: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Row name.'), - condition: zod - .string() - .optional() - .describe('Row condition match.'), - foreach: zod.string().optional().describe('Foreach expression.'), - value: zod.string().optional().describe('Row value definition.'), - entity: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Row entity match.'), - type: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Row type match.'), - fallback_value: zod - .string() - .optional() - .describe('Row fallback value.'), - description: zod - .string() - .optional() - .describe('Rule description for human consumption.'), - }) - .describe( - 'Rule matcher for selecting rows by name, condition, entity, or type.' - ) - ) - .optional() - .describe('Rows to drop.'), - update: zod - .array( - zod - .object({ - name: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Row name.'), - condition: zod - .string() - .optional() - .describe('Row condition match.'), - foreach: zod.string().optional().describe('Foreach expression.'), - value: zod.string().optional().describe('Row value definition.'), - entity: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Row entity match.'), - type: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Row type match.'), - fallback_value: zod - .string() - .optional() - .describe('Row fallback value.'), - description: zod - .string() - .optional() - .describe('Rule description for human consumption.'), - }) - .describe( - 'Rule matcher for selecting rows by name, condition, entity, or type.' - ) - ) - .optional() - .describe('Rows to update.'), - }) - .describe('Container for row drop and update operations.') - .optional() - .describe('Rows transform configurations.'), - }) - .describe( - 'Single transformation step with optional variables, column actions, and row actions.' - ) - ) - .min(1) - .max(safeSynthesizerCreateJobBodySpecConfigOneReplacePiiOneStepsMax) - .describe('List of transformation steps to perform on input data.'), - }) - .describe( - 'Configuration for PII replacer.\n\nDefines how PII data should be detected and replaced in a dataset.' - ) - .optional() - .describe('PII replacement configuration. When ``None``, PII replacement is skipped.'), - }) - .describe( - 'Main configuration class for the Safe Synthesizer pipeline.\n\nThis is the top-level configuration class that orchestrates all aspects of\nsynthetic data generation including training, generation, privacy, evaluation,\nand data handling. It provides validation to ensure parameter compatibility.' - ) - .describe('The Safe Synthesizer parameters configuration.'), - hf_token_secret: zod - .string() - .optional() - .describe( - 'Name of platform secret containing the HuggingFace token. Must exist in the same workspace as the job.' - ), - enable_synthesis: zod - .boolean() - .default(safeSynthesizerCreateJobBodySpecEnableSynthesisDefault) - .describe( - 'Whether to run LLM training and generation phases. When False the task only performs PII replacement and returns the processed data.' - ), - }) - .describe( - 'Configuration model for Safe Synthesizer jobs.\n\nUsed primarily internally to configure a run submitted to the NeMo Jobs\nMicroservice.' - ), - ownership: zod.record(zod.string(), zod.unknown()).optional(), - custom_fields: zod.record(zod.string(), zod.unknown()).optional(), -}); - -/** - * @summary List Jobs - */ -export const SafeSynthesizerListJobsParams = zod.object({ - workspace: zod.string(), -}); - -export const safeSynthesizerListJobsQueryPageDefault = 1; -export const safeSynthesizerListJobsQueryPageExclusiveMin = 0; - -export const safeSynthesizerListJobsQueryPageSizeDefault = 10; -export const safeSynthesizerListJobsQueryPageSizeExclusiveMin = 0; - -export const safeSynthesizerListJobsQuerySortDefault = `-created_at`; - -export const SafeSynthesizerListJobsQueryParams = zod.object({ - page: zod - .number() - .gt(safeSynthesizerListJobsQueryPageExclusiveMin) - .default(safeSynthesizerListJobsQueryPageDefault) - .describe('Page number.'), - page_size: zod - .number() - .gt(safeSynthesizerListJobsQueryPageSizeExclusiveMin) - .default(safeSynthesizerListJobsQueryPageSizeDefault) - .describe('Page size.'), - sort: zod - .enum(['created_at', '-created_at', 'updated_at', '-updated_at']) - .default(safeSynthesizerListJobsQuerySortDefault) - .describe( - 'The field to sort by. To sort in decreasing order, use `-` in front of the field name.' - ), - filter: zod - .object({ - created_at: zod - .object({ - $gte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results greater than or equal to this datetime.'), - $lte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results less than or equal to this datetime.'), - }) - .optional() - .describe("Jobs created at 'gte' datetime or 'lte' datetime."), - name: zod.string().optional().describe('Name of the job.'), - workspace: zod.string().optional().describe('Workspace of the job.'), - project: zod.string().optional().describe('Project containing the job.'), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ) - .optional() - .describe('The current status.'), - updated_at: zod - .object({ - $gte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results greater than or equal to this datetime.'), - $lte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results less than or equal to this datetime.'), - }) - .optional() - .describe("Jobs updated at 'gte' datetime or 'lte' datetime."), - }) - .optional() - .describe('Filter jobs on various criteria.'), -}); - -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneDataOneMaxSequencesPerExampleDefault = `auto`; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneDataOneHoldoutDefault = 0.05; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneDataOneMaxHoldoutDefault = 2000; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneEvaluationOneMiaEnabledDefault = true; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneEvaluationOneAiaEnabledDefault = true; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneEvaluationOneSqsReportColumnsDefault = 250; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneEvaluationOneSqsReportRowsDefault = 5000; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneEvaluationOneEnabledDefault = true; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneEvaluationOneQuasiIdentifierCountDefault = 3; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneEvaluationOnePiiReplayEnabledDefault = true; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneNumInputRecordsToSampleDefault = `auto`; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneBatchSizeDefault = 1; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneGradientAccumulationStepsDefault = 8; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneWeightDecayDefault = 0.01; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneWarmupRatioDefault = 0.05; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneLrSchedulerDefault = `cosine`; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneLearningRateDefault = `auto`; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneLoraRDefault = 32; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneLoraAlphaOverRDefault = 1; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneLoraTargetModulesDefault = - [`q_proj`, `k_proj`, `v_proj`, `o_proj`]; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneUseUnslothDefault = `auto`; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneRopeScalingFactorDefault = `auto`; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneValidationRatioDefault = 0; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneValidationStepsDefault = 15; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOnePretrainedModelDefault = `HuggingFaceTB/SmolLM3-3B`; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneQuantizeModelDefault = false; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneQuantizationBitsDefault = 8; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOnePeftImplementationDefault = `QLORA`; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneMaxVramFractionDefault = 0.8; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneAttnImplementationDefault = `kernels-community/vllm-flash-attn3`; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneGenerationOneNumRecordsDefault = 1000; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneGenerationOneTemperatureDefault = 0.9; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneGenerationOneRepetitionPenaltyDefault = 1; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneGenerationOneTopPDefault = 1; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneGenerationOnePatienceDefault = 3; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneGenerationOneInvalidFractionThresholdDefault = 0.8; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneGenerationOneUseStructuredGenerationDefault = false; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneGenerationOneStructuredGenerationBackendDefault = `auto`; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneGenerationOneStructuredGenerationSchemaMethodDefault = `regex`; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneGenerationOneStructuredGenerationUseSingleSequenceDefault = false; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneGenerationOneEnforceTimeseriesFidelityDefault = false; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneGenerationOneValidationOneGroupByAcceptNoDelineatorDefault = false; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneGenerationOneValidationOneGroupByIgnoreInvalidRecordsDefault = false; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneGenerationOneValidationOneGroupByFixNonUniqueValueDefault = false; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneGenerationOneValidationOneGroupByFixUnorderedRecordsDefault = false; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneGenerationOneAttentionBackendDefault = `auto`; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOnePrivacyOneDpEnabledDefault = false; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOnePrivacyOneEpsilonDefault = 8; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOnePrivacyOneDeltaDefault = `auto`; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOnePrivacyOnePerSampleMaxGradNormDefault = 1; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneTimeSeriesOneIsTimeseriesDefault = false; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneReplacePiiOneGlobalsOneSeedExclusiveMin = - -2147483647; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneReplacePiiOneGlobalsOneSeedExclusiveMax = 2147483647; - -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneReplacePiiOneGlobalsOneClassifyOneNumSamplesDefault = 3; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneReplacePiiOneGlobalsOneClassifyDefault = - { num_samples: 3 }; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneReplacePiiOneGlobalsOneNerOneNerThresholdDefault = 0.3; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneReplacePiiOneGlobalsOneNerOneEnableRegexpsDefault = false; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneEnableGlinerDefault = true; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneEnableBatchModeDefault = true; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneBatchSizeDefault = 8; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneChunkLengthDefault = 512; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneGlinerModelDefault = `nvidia/gliner-PII`; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerDefault = - { - enable_gliner: true, - enable_batch_mode: true, - batch_size: 8, - chunk_length: 512, - gliner_model: 'nvidia/gliner-PII', - }; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneReplacePiiOneGlobalsOneNerDefault = - { ner_threshold: 0.3, enable_regexps: false }; -export const safeSynthesizerListJobsResponseDataItemSpecConfigOneReplacePiiOneStepsMax = 10; - -export const safeSynthesizerListJobsResponseDataItemSpecEnableSynthesisDefault = true; - -export const SafeSynthesizerListJobsResponse = zod.object({ - data: zod.array( - zod.object({ - id: zod.string().optional(), - name: zod.string(), - description: zod.string().optional(), - project: zod.string().optional(), - workspace: zod.string().optional(), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - spec: zod - .object({ - data_source: zod.string().describe('The data source for the job.'), - config: zod - .object({ - data: zod - .object({ - group_training_examples_by: zod - .string() - .optional() - .describe( - 'Column to group training examples by. This is useful when you want the model to learn inter-record correlations for a given grouping of records.' - ), - order_training_examples_by: zod - .string() - .optional() - .describe( - 'Column to order training examples by. This is useful when you want the model to learn sequential relationships for a given ordering of records. If you provide this parameter, you must also provide ``group_training_examples_by``.' - ), - max_sequences_per_example: zod - .union([zod.literal('auto'), zod.number()]) - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneDataOneMaxSequencesPerExampleDefault - ) - .describe( - "If specified, adds at most this number of sequences per example. Supports 'auto' where a value of 1 is chosen if differential privacy is enabled, and 10 otherwise. If not specified or set to 'auto', fills up context. Required for DP to limit contribution of each example." - ), - holdout: zod - .number() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneDataOneHoldoutDefault - ) - .describe( - 'Amount of records to hold out for evaluation. If this is a float between 0 and 1, that ratio of records is held out. If an integer greater than 1, that number of records is held out. If the value is equal to zero, no holdout will be performed. Must be >= 0.' - ), - max_holdout: zod - .number() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneDataOneMaxHoldoutDefault - ) - .describe( - 'Maximum number of records to hold out. Overrides any behavior set by ``holdout``. Must be >= 0.' - ), - random_state: zod - .number() - .optional() - .describe('Random state for holdout split to ensure reproducibility.'), - }) - .describe( - 'Configuration for grouping, ordering, and splitting input data for training and evaluation.' - ) - .optional() - .describe( - 'Configuration controlling how input data is grouped and split for training and evaluation.' - ), - evaluation: zod - .object({ - mia_enabled: zod - .boolean() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneEvaluationOneMiaEnabledDefault - ) - .describe( - 'Enable membership inference attack evaluation for privacy assessment.' - ), - aia_enabled: zod - .boolean() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneEvaluationOneAiaEnabledDefault - ) - .describe( - 'Enable attribute inference attack evaluation for privacy assessment.' - ), - sqs_report_columns: zod - .number() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneEvaluationOneSqsReportColumnsDefault - ) - .describe('Number of columns to include in statistical quality reports.'), - sqs_report_rows: zod - .number() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneEvaluationOneSqsReportRowsDefault - ) - .describe('Number of rows to include in statistical quality reports.'), - mandatory_columns: zod - .number() - .optional() - .describe('Number of mandatory columns that must be used in evaluation.'), - enabled: zod - .boolean() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneEvaluationOneEnabledDefault - ) - .describe('Enable or disable evaluation.'), - quasi_identifier_count: zod - .number() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneEvaluationOneQuasiIdentifierCountDefault - ) - .describe('Number of quasi-identifiers to sample for privacy attacks.'), - pii_replay_enabled: zod - .boolean() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneEvaluationOnePiiReplayEnabledDefault - ) - .describe('Enable PII Replay detection.'), - pii_replay_entities: zod - .array(zod.string()) - .optional() - .describe( - 'List of entities for PII Replay. If not provided, default entities will be used.' - ), - pii_replay_columns: zod - .array(zod.string()) - .optional() - .describe( - 'List of columns for PII Replay. If not provided, only entities will be used.' - ), - }) - .describe( - 'Configuration for evaluating synthetic data quality and privacy.\n\nThis class controls which evaluation metrics are computed and how they are configured.\nIt includes privacy attack evaluations, statistical quality metrics, and downstream\nmachine learning performance assessments.' - ) - .optional() - .describe('Parameters for evaluating the quality of generated synthetic data.'), - training: zod - .object({ - num_input_records_to_sample: zod - .union([zod.literal('auto'), zod.number()]) - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneNumInputRecordsToSampleDefault - ) - .describe( - "Number of records the model will see during training. This parameter is a proxy for training time. For example, if its value is the same size as the input dataset, this is like training for a single epoch. If its value is larger, this is like training for multiple (possibly fractional) epochs. If its value is smaller, this is like training for a fraction of an epoch. Supports 'auto' where a reasonable value is chosen based on other config params and data." - ), - batch_size: zod - .number() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneBatchSizeDefault - ) - .describe('The batch size per device for training. Must be >= 1.'), - gradient_accumulation_steps: zod - .number() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneGradientAccumulationStepsDefault - ) - .describe( - 'Number of update steps to accumulate the gradients for, before performing a backward\/update pass. This technique increases the effective batch size that will fit into GPU memory. Must be >= 1.' - ), - weight_decay: zod - .number() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneWeightDecayDefault - ) - .describe( - 'The weight decay to apply to all layers except all bias and LayerNorm weights in the AdamW optimizer. Must be in (0, 1).' - ), - warmup_ratio: zod - .number() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneWarmupRatioDefault - ) - .describe( - 'Ratio of total training steps used for a linear warmup from 0 to the learning rate. Must be > 0.' - ), - lr_scheduler: zod - .string() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneLrSchedulerDefault - ) - .describe( - 'The scheduler type to use. See the HuggingFace documentation of ``SchedulerType`` for all possible values.' - ), - learning_rate: zod - .union([zod.literal('auto'), zod.number()]) - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneLearningRateDefault - ) - .describe( - "The initial learning rate for `AdamW` optimizer. Must be in (0, 1). Setting to 'auto' uses a model-specific default if one exists." - ), - lora_r: zod - .number() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneLoraRDefault - ) - .describe( - 'The rank of the LoRA update matrices. Lower rank results in smaller update matrices with fewer trainable parameters. Must be > 0.' - ), - lora_alpha_over_r: zod - .number() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneLoraAlphaOverRDefault - ) - .describe( - 'The ratio of the LoRA scaling factor (alpha) to the LoRA rank. Empirically, this parameter works well when set to 0.5, 1, or 2. Must be in [0.5, 3].' - ), - lora_target_modules: zod - .array(zod.string()) - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneLoraTargetModulesDefault - ) - .describe( - "The list of transformer modules to apply LoRA to. Possible modules: 'q_proj', 'k_proj', 'v_proj', 'o_proj', 'gate_proj', 'up_proj', 'down_proj'." - ), - use_unsloth: zod - .union([zod.literal('auto'), zod.boolean()]) - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneUseUnslothDefault - ) - .describe('Whether to use Unsloth for optimized training.'), - rope_scaling_factor: zod - .union([zod.literal('auto'), zod.number()]) - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneRopeScalingFactorDefault - ) - .describe( - "Scale the base LLM's context length by this factor using RoPE scaling. Must be >= 1 or 'auto'." - ), - validation_ratio: zod - .number() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneValidationRatioDefault - ) - .describe( - 'The fraction of the training data used for validation. Must be in [0, 1]. If set to 0, no validation will be performed. If set larger than 0, validation loss will be computed and reported throughout training.' - ), - validation_steps: zod - .number() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneValidationStepsDefault - ) - .describe( - 'The number of steps between validation checks for the HF Trainer arguments. Must be > 0.' - ), - pretrained_model: zod - .string() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOnePretrainedModelDefault - ) - .describe( - 'Pretrained model to use for fine-tuning. Defaults to SmolLM3. May be a Hugging Face model ID (loaded from the Hugging Face Hub or cache) or a local path. See security note in docs before using untrusted sources.' - ), - quantize_model: zod - .boolean() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneQuantizeModelDefault - ) - .describe( - 'Whether to quantize the model during training. This can reduce memory usage and potentially speed up training, but may also impact model accuracy.' - ), - quantization_bits: zod - .union([zod.literal(4), zod.literal(8)]) - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneQuantizationBitsDefault - ) - .describe( - 'The number of bits to use for quantization if ``quantize_model`` is ``True``. Accepts 8 or 4.' - ), - peft_implementation: zod - .string() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOnePeftImplementationDefault - ) - .describe( - "The PEFT (Parameter-Efficient Fine-Tuning) implementation to use. Options: 'lora' for Low-Rank Adaptation, 'QLORA' for Quantized LoRA." - ), - max_vram_fraction: zod - .number() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneMaxVramFractionDefault - ) - .describe( - 'The fraction of the total VRAM to use for training. Modify this to allow longer sequences. Must be in [0, 1].' - ), - attn_implementation: zod - .string() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneTrainingOneAttnImplementationDefault - ) - .describe( - "The attention implementation to use for model loading. Default uses Flash Attention 3 via the HuggingFace Kernels Hub (requires the 'kernels' pip package; falls back to 'sdpa' if the 'kernels' package is not installed). Other common values: 'flash_attention_2' (requires flash-attn pip package), 'sdpa' (PyTorch scaled dot product attention), 'eager' (standard PyTorch). Custom HuggingFace Kernels Hub paths (e.g. 'kernels-community\/flash-attn2') are also supported." - ), - }) - .describe( - 'Hyperparameters that control the training process behavior.\n\nThis class contains all the fine-tuning hyperparameters that control how the model\nlearns, including learning rates, batch sizes, LoRA configuration, and optimization\nsettings. These parameters directly affect training performance and quality.' - ) - .optional() - .describe( - 'Hyperparameters for model training such as learning rate, batch size, and LoRA adapter settings.' - ), - generation: zod - .object({ - num_records: zod - .number() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneGenerationOneNumRecordsDefault - ) - .describe('Number of records to generate.'), - temperature: zod - .number() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneGenerationOneTemperatureDefault - ) - .describe( - 'Sampling temperature for controlling randomness (higher = more random).' - ), - repetition_penalty: zod - .number() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneGenerationOneRepetitionPenaltyDefault - ) - .describe( - 'The value used to control the likelihood of the model repeating the same token. Must be > 0.' - ), - top_p: zod - .number() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneGenerationOneTopPDefault - ) - .describe( - 'Nucleus sampling probability for token selection. Must be in (0, 1].' - ), - patience: zod - .number() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneGenerationOnePatienceDefault - ) - .describe( - 'Number of consecutive generations where the ``invalid_fraction_threshold`` is reached before stopping generation. Must be >= 1.' - ), - invalid_fraction_threshold: zod - .number() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneGenerationOneInvalidFractionThresholdDefault - ) - .describe( - 'The fraction of invalid records that will stop generation after the ``patience`` limit is reached. Must be in [0, 1].' - ), - use_structured_generation: zod - .boolean() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneGenerationOneUseStructuredGenerationDefault - ) - .describe('Whether to use structured generation for better format control.'), - structured_generation_backend: zod - .enum(['auto', 'xgrammar', 'guidance', 'outlines', 'lm-format-enforcer']) - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneGenerationOneStructuredGenerationBackendDefault - ) - .describe( - "The backend used by vLLM when ``use_structured_generation`` is ``True``. Supported backends: 'outlines', 'guidance', 'xgrammar', 'lm-format-enforcer'. 'auto' will allow vLLM to choose the backend." - ), - structured_generation_schema_method: zod - .enum(['regex', 'json_schema']) - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneGenerationOneStructuredGenerationSchemaMethodDefault - ) - .describe( - "The method used to generate the schema from your dataset and pass it to the generation backend. 'regex' uses a custom regex construction method that tends to be more comprehensive than 'json_schema' at the cost of speed." - ), - structured_generation_use_single_sequence: zod - .boolean() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneGenerationOneStructuredGenerationUseSingleSequenceDefault - ) - .describe( - 'Whether to use a regex that matches exactly one sequence or record if ``max_sequences_per_example`` is 1.' - ), - enforce_timeseries_fidelity: zod - .boolean() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneGenerationOneEnforceTimeseriesFidelityDefault - ) - .describe( - 'Enforce time-series fidelity by enforcing order, intervals, start and end times of the records.' - ), - validation: zod - .object({ - group_by_accept_no_delineator: zod - .boolean() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneGenerationOneValidationOneGroupByAcceptNoDelineatorDefault - ) - .describe( - 'Whether to accept completions without both beginning and end of sequence delineators as a single sequence.' - ), - group_by_ignore_invalid_records: zod - .boolean() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneGenerationOneValidationOneGroupByIgnoreInvalidRecordsDefault - ) - .describe( - 'Whether to ignore invalid records in a sequence and proceed with the valid records.' - ), - group_by_fix_non_unique_value: zod - .boolean() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneGenerationOneValidationOneGroupByFixNonUniqueValueDefault - ) - .describe( - 'Whether to automatically fix non-unique group-by values in a sequence by using the first unique value for all records.' - ), - group_by_fix_unordered_records: zod - .boolean() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneGenerationOneValidationOneGroupByFixUnorderedRecordsDefault - ) - .describe( - 'Whether to automatically fix unordered records in a sequence by sorting the records.' - ), - }) - .describe( - 'Configuration for record and sequence validation.\n\nThese parameters control the validation and automatic fixes when going\nfrom LLM output to tabular data.' - ) - .optional() - .describe( - 'Validation parameters controlling validation logic and automatic fixes when parsing LLM output and converting to tabular data.' - ), - attention_backend: zod - .string() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneGenerationOneAttentionBackendDefault - ) - .describe( - "The attention backend for the vLLM engine. Common values: 'FLASHINFER', 'FLASH_ATTN', 'TRITON_ATTN', 'FLEX_ATTENTION'. If ``None`` or 'auto', vLLM will auto-select the best available backend." - ), - }) - .describe( - 'Configuration parameters for synthetic data generation.\n\nThese parameters control how synthetic data is generated after the model is trained.\nThey affect the quality, diversity, and validity of the generated synthetic records.' - ) - .optional() - .describe( - 'Parameters governing synthetic data generation including temperature, top-p, and number of records to produce.' - ), - privacy: zod - .object({ - dp_enabled: zod - .boolean() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOnePrivacyOneDpEnabledDefault - ) - .describe('Enable differentially-private training with DP-SGD.'), - epsilon: zod - .number() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOnePrivacyOneEpsilonDefault - ) - .describe( - 'Target privacy budget -- lower values provide stronger privacy. Must be > 0.' - ), - delta: zod - .union([zod.literal('auto'), zod.number()]) - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOnePrivacyOneDeltaDefault - ) - .describe( - "Probability of accidentally leaking information. Should be much smaller than 1\/n where n is the number of training records. Setting to 'auto' uses delta of 1\/n^1.2. Must be in [0, 1) or 'auto'." - ), - per_sample_max_grad_norm: zod - .number() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOnePrivacyOnePerSampleMaxGradNormDefault - ) - .describe('Maximum L2 norm for per-sample gradient clipping. Must be > 0.'), - }) - .describe( - 'Hyperparameters for differential privacy during training.\n\nThese parameters configure differential privacy (DP) training using DP-SGD algorithm.\nWhen enabled, they provide formal privacy guarantees by adding calibrated noise\nduring training.' - ) - .optional() - .describe( - 'Differential-privacy hyperparameters. When ``None``, differential privacy is disabled entirely.' - ), - time_series: zod - .object({ - is_timeseries: zod - .boolean() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneTimeSeriesOneIsTimeseriesDefault - ) - .describe( - 'Whether to treat the dataset as time series. When enabled, either ``timestamp_column`` or ``timestamp_interval_seconds`` is required. For grouped time series, ``group_training_examples_by`` needs to be set.' - ), - timestamp_column: zod - .string() - .optional() - .describe( - 'Name of the column containing timestamps used to order records when ``is_timeseries`` is ``True``. Required only when ``is_timeseries`` is ``True`` and ``timestamp_interval_seconds`` is not provided.' - ), - timestamp_interval_seconds: zod - .number() - .optional() - .describe( - 'Interval in seconds between timestamps. If not provided, the timestamp column will be used to infer the interval.' - ), - timestamp_format: zod - .string() - .optional() - .describe( - "Format of the timestamp column. Accepts either: (1) Python strftime format codes for string timestamps (e.g., '%Y-%m-%d %H:%M:%S', '%m\/%d\/%Y'), or (2) 'elapsed_seconds' for numeric (int\/float) timestamps representing seconds as an increasing counter (e.g., 0, 60, 120 for 1-minute intervals). If not provided, the format will be inferred from the data." - ), - start_timestamp: zod - .union([zod.string(), zod.number()]) - .optional() - .describe( - 'Start timestamp. If not provided, the first timestamp in the timestamp column will be used.' - ), - stop_timestamp: zod - .union([zod.string(), zod.number()]) - .optional() - .describe( - 'Stop timestamp. If not provided, the last timestamp in the timestamp column will be used.' - ), - }) - .describe( - 'Configuration for time-series mode in the Safe Synthesizer pipeline.\n\nControls whether a dataset is treated as time-series data, including\ntimestamp column selection, interval inference, and format validation.\nThe time-series pipeline is currently experimental.' - ) - .optional() - .describe( - 'Configuration for time-series mode. Time-series pipeline is currently experimental.' - ), - replace_pii: zod - .object({ - globals: zod - .object({ - locales: zod.array(zod.string()).optional().describe('List of locales.'), - seed: zod - .number() - .gt( - safeSynthesizerListJobsResponseDataItemSpecConfigOneReplacePiiOneGlobalsOneSeedExclusiveMin - ) - .lt( - safeSynthesizerListJobsResponseDataItemSpecConfigOneReplacePiiOneGlobalsOneSeedExclusiveMax - ) - .optional() - .describe('Optional random seed.'), - classify: zod - .object({ - enable_classify: zod - .boolean() - .optional() - .describe('Enable column classification.'), - entities: zod - .array(zod.string()) - .optional() - .describe('List of entity types to classify.'), - num_samples: zod - .number() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneReplacePiiOneGlobalsOneClassifyOneNumSamplesDefault - ) - .describe('Number of column values to sample for classification.'), - classify_model_provider: zod - .string() - .optional() - .describe( - 'Name of the model provider in the Inference Gateway for column classification. The job compiler will resolve this to the appropriate endpoint URL.' - ), - }) - .describe('Configuration for column classification using an LLM.') - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneReplacePiiOneGlobalsOneClassifyDefault - ) - .describe('Column classification configuration.'), - ner: zod - .object({ - ner_threshold: zod - .number() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneReplacePiiOneGlobalsOneNerOneNerThresholdDefault - ) - .describe('NER model threshold.'), - enable_regexps: zod - .boolean() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneReplacePiiOneGlobalsOneNerOneEnableRegexpsDefault - ) - .describe('Enable NER regular expressions (experimental).'), - gliner: zod - .object({ - enable_gliner: zod - .boolean() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneEnableGlinerDefault - ) - .describe('Enable GLiNER NER module.'), - enable_batch_mode: zod - .boolean() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneEnableBatchModeDefault - ) - .describe('Enable GLiNER batch mode.'), - batch_size: zod - .number() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneBatchSizeDefault - ) - .describe('GLiNER batch size.'), - chunk_length: zod - .number() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneChunkLengthDefault - ) - .describe('GLiNER batch chunk length in characters.'), - gliner_model: zod - .string() - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneGlinerModelDefault - ) - .describe('GLiNER model name.'), - }) - .describe( - 'Configuration for the GLiNER named-entity recognition model.' - ) - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerDefault - ) - .describe('GLiNER NER configuration.'), - ner_entities: zod - .array(zod.string()) - .optional() - .describe( - 'List of entity types to recognize. If unset, classification entity types are used.' - ), - }) - .describe('Configuration for Named Entity Recognition.') - .default( - safeSynthesizerListJobsResponseDataItemSpecConfigOneReplacePiiOneGlobalsOneNerDefault - ) - .describe('Named Entity Recognition configuration.'), - lock_columns: zod - .array(zod.string()) - .optional() - .describe( - 'List of columns to preserve as immutable across all transformations.' - ), - }) - .describe( - 'Global settings for the PII replacer including locales, seed, NER, and classification.' - ) - .optional() - .describe('Global configuration options.'), - steps: zod - .array( - zod - .object({ - vars: zod - .record( - zod.string(), - zod.union([ - zod.string(), - zod.record(zod.string(), zod.unknown()), - zod.array(zod.unknown()), - ]) - ) - .optional() - .describe('Variable names and templates.'), - columns: zod - .object({ - add: zod - .array( - zod - .object({ - name: zod.string().optional().describe('Column name.'), - position: zod - .union([zod.number(), zod.array(zod.number())]) - .optional() - .describe('Column position.'), - condition: zod - .string() - .optional() - .describe('Column condition.'), - value: zod.string().optional().describe('Rename to value.'), - entity: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Column entity match.'), - type: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Column type match.'), - }) - .describe( - 'Rule matcher for selecting columns by name, position, condition, entity, or type.' - ) - ) - .optional() - .describe('Columns to add.'), - drop: zod - .array( - zod - .object({ - name: zod.string().optional().describe('Column name.'), - position: zod - .union([zod.number(), zod.array(zod.number())]) - .optional() - .describe('Column position.'), - condition: zod - .string() - .optional() - .describe('Column condition.'), - value: zod.string().optional().describe('Rename to value.'), - entity: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Column entity match.'), - type: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Column type match.'), - }) - .describe( - 'Rule matcher for selecting columns by name, position, condition, entity, or type.' - ) - ) - .optional() - .describe('Columns to drop.'), - rename: zod - .array( - zod - .object({ - name: zod.string().optional().describe('Column name.'), - position: zod - .union([zod.number(), zod.array(zod.number())]) - .optional() - .describe('Column position.'), - condition: zod - .string() - .optional() - .describe('Column condition.'), - value: zod.string().optional().describe('Rename to value.'), - entity: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Column entity match.'), - type: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Column type match.'), - }) - .describe( - 'Rule matcher for selecting columns by name, position, condition, entity, or type.' - ) - ) - .optional() - .describe('Columns to rename.'), - }) - .describe('Container for column add, drop, and rename operations.') - .optional() - .describe('Columns transform configuration.'), - rows: zod - .object({ - drop: zod - .array( - zod - .object({ - name: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Row name.'), - condition: zod - .string() - .optional() - .describe('Row condition match.'), - foreach: zod - .string() - .optional() - .describe('Foreach expression.'), - value: zod - .string() - .optional() - .describe('Row value definition.'), - entity: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Row entity match.'), - type: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Row type match.'), - fallback_value: zod - .string() - .optional() - .describe('Row fallback value.'), - description: zod - .string() - .optional() - .describe('Rule description for human consumption.'), - }) - .describe( - 'Rule matcher for selecting rows by name, condition, entity, or type.' - ) - ) - .optional() - .describe('Rows to drop.'), - update: zod - .array( - zod - .object({ - name: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Row name.'), - condition: zod - .string() - .optional() - .describe('Row condition match.'), - foreach: zod - .string() - .optional() - .describe('Foreach expression.'), - value: zod - .string() - .optional() - .describe('Row value definition.'), - entity: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Row entity match.'), - type: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Row type match.'), - fallback_value: zod - .string() - .optional() - .describe('Row fallback value.'), - description: zod - .string() - .optional() - .describe('Rule description for human consumption.'), - }) - .describe( - 'Rule matcher for selecting rows by name, condition, entity, or type.' - ) - ) - .optional() - .describe('Rows to update.'), - }) - .describe('Container for row drop and update operations.') - .optional() - .describe('Rows transform configurations.'), - }) - .describe( - 'Single transformation step with optional variables, column actions, and row actions.' - ) - ) - .min(1) - .max(safeSynthesizerListJobsResponseDataItemSpecConfigOneReplacePiiOneStepsMax) - .describe('List of transformation steps to perform on input data.'), - }) - .describe( - 'Configuration for PII replacer.\n\nDefines how PII data should be detected and replaced in a dataset.' - ) - .optional() - .describe( - 'PII replacement configuration. When ``None``, PII replacement is skipped.' - ), - }) - .describe( - 'Main configuration class for the Safe Synthesizer pipeline.\n\nThis is the top-level configuration class that orchestrates all aspects of\nsynthetic data generation including training, generation, privacy, evaluation,\nand data handling. It provides validation to ensure parameter compatibility.' - ) - .describe('The Safe Synthesizer parameters configuration.'), - hf_token_secret: zod - .string() - .optional() - .describe( - 'Name of platform secret containing the HuggingFace token. Must exist in the same workspace as the job.' - ), - enable_synthesis: zod - .boolean() - .default(safeSynthesizerListJobsResponseDataItemSpecEnableSynthesisDefault) - .describe( - 'Whether to run LLM training and generation phases. When False the task only performs PII replacement and returns the processed data.' - ), - }) - .describe( - 'Configuration model for Safe Synthesizer jobs.\n\nUsed primarily internally to configure a run submitted to the NeMo Jobs\nMicroservice.' - ), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .optional() - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ), - status_details: zod.record(zod.string(), zod.unknown()).optional(), - error_details: zod.record(zod.string(), zod.unknown()).optional(), - ownership: zod.record(zod.string(), zod.unknown()).optional(), - custom_fields: zod.record(zod.string(), zod.unknown()).optional(), - }) - ), - pagination: zod - .object({ - page: zod.number().describe('The current page number.'), - page_size: zod.number().describe('The page size used for the query.'), - current_page_size: zod.number().describe('The size for the current page.'), - total_pages: zod.number().describe('The total number of pages.'), - total_results: zod.number().describe('The total number of results.'), - }) - .optional() - .describe('Pagination information.'), - sort: zod.string().optional().describe('The field on which the results are sorted.'), - filter: zod.record(zod.string(), zod.unknown()).optional().describe('Filtering information.'), -}); - -/** - * @summary Download Job Result Adapter - */ -export const SafeSynthesizerDownloadJobResultAdapterParams = zod.object({ - workspace: zod.string(), - job: zod.string(), -}); - -/** - * @summary Download Job Result Evaluation-Report - */ -export const SafeSynthesizerDownloadJobResultEvaluationReportParams = zod.object({ - workspace: zod.string(), - job: zod.string(), -}); - -/** - * @summary Download Job Result Summary - */ -export const SafeSynthesizerDownloadJobResultSummaryParams = zod.object({ - workspace: zod.string(), - job: zod.string(), -}); - -export const SafeSynthesizerDownloadJobResultSummaryResponse = zod - .object({ - synthetic_data_quality_score: zod - .number() - .optional() - .describe( - 'Weighted composite of the five sub-scores below (SQS). Higher is better (0--10 scale).' - ), - column_correlation_stability_score: zod - .number() - .optional() - .describe( - 'How closely pairwise column correlations in synthetic data match the original for numeric and categorical columns.' - ), - deep_structure_stability_score: zod - .number() - .optional() - .describe( - 'PCA-based comparison of multivariate structure between real and synthetic data for numeric and categorical columns.' - ), - column_distribution_stability_score: zod - .number() - .optional() - .describe( - 'Per-column Jensen-Shannon distance between training and synthetic distributions averaged across all numeric and categorical columns.' - ), - text_semantic_similarity_score: zod - .number() - .optional() - .describe('Embedding-based semantic closeness between real and synthetic free-text columns.'), - text_structure_similarity_score: zod - .number() - .optional() - .describe( - 'Jensen-Shannon divergence over sentence count, words-per-sentence, and characters-per-word distributions between real and synthetic free-text columns.' - ), - data_privacy_score: zod - .number() - .optional() - .describe('Composite of MIA and AIA protection scores.'), - membership_inference_protection_score: zod - .number() - .optional() - .describe( - 'Resistance to attacks that try to determine whether a record was in the training set.' - ), - attribute_inference_protection_score: zod - .number() - .optional() - .describe( - 'Resistance to attacks that try to infer sensitive attributes from quasi-identifiers.' - ), - num_valid_records: zod - .number() - .optional() - .describe('Count of synthetic records that passed schema and format validation.'), - num_invalid_records: zod - .number() - .optional() - .describe('Count of synthetic records filtered out during validation.'), - num_prompts: zod.number().optional().describe('Total LLM generation prompts issued.'), - valid_record_fraction: zod - .number() - .optional() - .describe( - 'Ratio of valid records: ``num_valid_records \/ (num_valid_records + num_invalid_records)``.' - ), - timing: zod - .object({ - total_time_sec: zod - .number() - .optional() - .describe('Total end-to-end pipeline duration in seconds.'), - pii_replacer_time_sec: zod.number().optional().describe('Time spent on PII replacement.'), - training_time_sec: zod.number().optional().describe('Time spent on model training.'), - generation_time_sec: zod - .number() - .optional() - .describe('Time spent generating synthetic records.'), - evaluation_time_sec: zod - .number() - .optional() - .describe('Time spent evaluating synthetic data quality.'), - }) - .describe('Wall-clock durations for each pipeline stage.') - .describe('Per-stage wall-clock durations.'), - }) - .describe('Aggregated quality, privacy, and record-count metrics for a pipeline run.'); - -/** - * @summary Download Job Result Synthetic-Data - */ -export const SafeSynthesizerDownloadJobResultSyntheticDataParams = zod.object({ - workspace: zod.string(), - job: zod.string(), -}); - -/** - * @summary Get Job Result - */ -export const SafeSynthesizerGetJobResultParams = zod.object({ - workspace: zod.string(), - job: zod.string(), - name: zod.string(), -}); - -export const SafeSynthesizerGetJobResultResponse = zod.object({ - name: zod.string(), - job: zod.string(), - workspace: zod.string(), - project: zod.string().optional(), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - artifact_url: zod.string(), - artifact_storage_type: zod.enum(['fileset']), - download_url: zod.string().optional(), -}); - -/** - * @summary Download Job Result - */ -export const SafeSynthesizerDownloadJobResultParams = zod.object({ - workspace: zod.string(), - job: zod.string(), - name: zod.string(), -}); - -/** - * @summary Get Job - */ -export const SafeSynthesizerGetJobParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const safeSynthesizerGetJobResponseSpecConfigOneDataOneMaxSequencesPerExampleDefault = `auto`; -export const safeSynthesizerGetJobResponseSpecConfigOneDataOneHoldoutDefault = 0.05; -export const safeSynthesizerGetJobResponseSpecConfigOneDataOneMaxHoldoutDefault = 2000; -export const safeSynthesizerGetJobResponseSpecConfigOneEvaluationOneMiaEnabledDefault = true; -export const safeSynthesizerGetJobResponseSpecConfigOneEvaluationOneAiaEnabledDefault = true; -export const safeSynthesizerGetJobResponseSpecConfigOneEvaluationOneSqsReportColumnsDefault = 250; -export const safeSynthesizerGetJobResponseSpecConfigOneEvaluationOneSqsReportRowsDefault = 5000; -export const safeSynthesizerGetJobResponseSpecConfigOneEvaluationOneEnabledDefault = true; -export const safeSynthesizerGetJobResponseSpecConfigOneEvaluationOneQuasiIdentifierCountDefault = 3; -export const safeSynthesizerGetJobResponseSpecConfigOneEvaluationOnePiiReplayEnabledDefault = true; -export const safeSynthesizerGetJobResponseSpecConfigOneTrainingOneNumInputRecordsToSampleDefault = `auto`; -export const safeSynthesizerGetJobResponseSpecConfigOneTrainingOneBatchSizeDefault = 1; -export const safeSynthesizerGetJobResponseSpecConfigOneTrainingOneGradientAccumulationStepsDefault = 8; -export const safeSynthesizerGetJobResponseSpecConfigOneTrainingOneWeightDecayDefault = 0.01; -export const safeSynthesizerGetJobResponseSpecConfigOneTrainingOneWarmupRatioDefault = 0.05; -export const safeSynthesizerGetJobResponseSpecConfigOneTrainingOneLrSchedulerDefault = `cosine`; -export const safeSynthesizerGetJobResponseSpecConfigOneTrainingOneLearningRateDefault = `auto`; -export const safeSynthesizerGetJobResponseSpecConfigOneTrainingOneLoraRDefault = 32; -export const safeSynthesizerGetJobResponseSpecConfigOneTrainingOneLoraAlphaOverRDefault = 1; -export const safeSynthesizerGetJobResponseSpecConfigOneTrainingOneLoraTargetModulesDefault = [ - `q_proj`, - `k_proj`, - `v_proj`, - `o_proj`, -]; -export const safeSynthesizerGetJobResponseSpecConfigOneTrainingOneUseUnslothDefault = `auto`; -export const safeSynthesizerGetJobResponseSpecConfigOneTrainingOneRopeScalingFactorDefault = `auto`; -export const safeSynthesizerGetJobResponseSpecConfigOneTrainingOneValidationRatioDefault = 0; -export const safeSynthesizerGetJobResponseSpecConfigOneTrainingOneValidationStepsDefault = 15; -export const safeSynthesizerGetJobResponseSpecConfigOneTrainingOnePretrainedModelDefault = `HuggingFaceTB/SmolLM3-3B`; -export const safeSynthesizerGetJobResponseSpecConfigOneTrainingOneQuantizeModelDefault = false; -export const safeSynthesizerGetJobResponseSpecConfigOneTrainingOneQuantizationBitsDefault = 8; -export const safeSynthesizerGetJobResponseSpecConfigOneTrainingOnePeftImplementationDefault = `QLORA`; -export const safeSynthesizerGetJobResponseSpecConfigOneTrainingOneMaxVramFractionDefault = 0.8; -export const safeSynthesizerGetJobResponseSpecConfigOneTrainingOneAttnImplementationDefault = `kernels-community/vllm-flash-attn3`; -export const safeSynthesizerGetJobResponseSpecConfigOneGenerationOneNumRecordsDefault = 1000; -export const safeSynthesizerGetJobResponseSpecConfigOneGenerationOneTemperatureDefault = 0.9; -export const safeSynthesizerGetJobResponseSpecConfigOneGenerationOneRepetitionPenaltyDefault = 1; -export const safeSynthesizerGetJobResponseSpecConfigOneGenerationOneTopPDefault = 1; -export const safeSynthesizerGetJobResponseSpecConfigOneGenerationOnePatienceDefault = 3; -export const safeSynthesizerGetJobResponseSpecConfigOneGenerationOneInvalidFractionThresholdDefault = 0.8; -export const safeSynthesizerGetJobResponseSpecConfigOneGenerationOneUseStructuredGenerationDefault = false; -export const safeSynthesizerGetJobResponseSpecConfigOneGenerationOneStructuredGenerationBackendDefault = `auto`; -export const safeSynthesizerGetJobResponseSpecConfigOneGenerationOneStructuredGenerationSchemaMethodDefault = `regex`; -export const safeSynthesizerGetJobResponseSpecConfigOneGenerationOneStructuredGenerationUseSingleSequenceDefault = false; -export const safeSynthesizerGetJobResponseSpecConfigOneGenerationOneEnforceTimeseriesFidelityDefault = false; -export const safeSynthesizerGetJobResponseSpecConfigOneGenerationOneValidationOneGroupByAcceptNoDelineatorDefault = false; -export const safeSynthesizerGetJobResponseSpecConfigOneGenerationOneValidationOneGroupByIgnoreInvalidRecordsDefault = false; -export const safeSynthesizerGetJobResponseSpecConfigOneGenerationOneValidationOneGroupByFixNonUniqueValueDefault = false; -export const safeSynthesizerGetJobResponseSpecConfigOneGenerationOneValidationOneGroupByFixUnorderedRecordsDefault = false; -export const safeSynthesizerGetJobResponseSpecConfigOneGenerationOneAttentionBackendDefault = `auto`; -export const safeSynthesizerGetJobResponseSpecConfigOnePrivacyOneDpEnabledDefault = false; -export const safeSynthesizerGetJobResponseSpecConfigOnePrivacyOneEpsilonDefault = 8; -export const safeSynthesizerGetJobResponseSpecConfigOnePrivacyOneDeltaDefault = `auto`; -export const safeSynthesizerGetJobResponseSpecConfigOnePrivacyOnePerSampleMaxGradNormDefault = 1; -export const safeSynthesizerGetJobResponseSpecConfigOneTimeSeriesOneIsTimeseriesDefault = false; -export const safeSynthesizerGetJobResponseSpecConfigOneReplacePiiOneGlobalsOneSeedExclusiveMin = - -2147483647; -export const safeSynthesizerGetJobResponseSpecConfigOneReplacePiiOneGlobalsOneSeedExclusiveMax = 2147483647; - -export const safeSynthesizerGetJobResponseSpecConfigOneReplacePiiOneGlobalsOneClassifyOneNumSamplesDefault = 3; -export const safeSynthesizerGetJobResponseSpecConfigOneReplacePiiOneGlobalsOneClassifyDefault = { - num_samples: 3, -}; -export const safeSynthesizerGetJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerOneNerThresholdDefault = 0.3; -export const safeSynthesizerGetJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerOneEnableRegexpsDefault = false; -export const safeSynthesizerGetJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneEnableGlinerDefault = true; -export const safeSynthesizerGetJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneEnableBatchModeDefault = true; -export const safeSynthesizerGetJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneBatchSizeDefault = 8; -export const safeSynthesizerGetJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneChunkLengthDefault = 512; -export const safeSynthesizerGetJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneGlinerModelDefault = `nvidia/gliner-PII`; -export const safeSynthesizerGetJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerDefault = - { - enable_gliner: true, - enable_batch_mode: true, - batch_size: 8, - chunk_length: 512, - gliner_model: 'nvidia/gliner-PII', - }; -export const safeSynthesizerGetJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerDefault = { - ner_threshold: 0.3, - enable_regexps: false, -}; -export const safeSynthesizerGetJobResponseSpecConfigOneReplacePiiOneStepsMax = 10; - -export const safeSynthesizerGetJobResponseSpecEnableSynthesisDefault = true; - -export const SafeSynthesizerGetJobResponse = zod.object({ - id: zod.string().optional(), - name: zod.string(), - description: zod.string().optional(), - project: zod.string().optional(), - workspace: zod.string().optional(), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - spec: zod - .object({ - data_source: zod.string().describe('The data source for the job.'), - config: zod - .object({ - data: zod - .object({ - group_training_examples_by: zod - .string() - .optional() - .describe( - 'Column to group training examples by. This is useful when you want the model to learn inter-record correlations for a given grouping of records.' - ), - order_training_examples_by: zod - .string() - .optional() - .describe( - 'Column to order training examples by. This is useful when you want the model to learn sequential relationships for a given ordering of records. If you provide this parameter, you must also provide ``group_training_examples_by``.' - ), - max_sequences_per_example: zod - .union([zod.literal('auto'), zod.number()]) - .default( - safeSynthesizerGetJobResponseSpecConfigOneDataOneMaxSequencesPerExampleDefault - ) - .describe( - "If specified, adds at most this number of sequences per example. Supports 'auto' where a value of 1 is chosen if differential privacy is enabled, and 10 otherwise. If not specified or set to 'auto', fills up context. Required for DP to limit contribution of each example." - ), - holdout: zod - .number() - .default(safeSynthesizerGetJobResponseSpecConfigOneDataOneHoldoutDefault) - .describe( - 'Amount of records to hold out for evaluation. If this is a float between 0 and 1, that ratio of records is held out. If an integer greater than 1, that number of records is held out. If the value is equal to zero, no holdout will be performed. Must be >= 0.' - ), - max_holdout: zod - .number() - .default(safeSynthesizerGetJobResponseSpecConfigOneDataOneMaxHoldoutDefault) - .describe( - 'Maximum number of records to hold out. Overrides any behavior set by ``holdout``. Must be >= 0.' - ), - random_state: zod - .number() - .optional() - .describe('Random state for holdout split to ensure reproducibility.'), - }) - .describe( - 'Configuration for grouping, ordering, and splitting input data for training and evaluation.' - ) - .optional() - .describe( - 'Configuration controlling how input data is grouped and split for training and evaluation.' - ), - evaluation: zod - .object({ - mia_enabled: zod - .boolean() - .default(safeSynthesizerGetJobResponseSpecConfigOneEvaluationOneMiaEnabledDefault) - .describe('Enable membership inference attack evaluation for privacy assessment.'), - aia_enabled: zod - .boolean() - .default(safeSynthesizerGetJobResponseSpecConfigOneEvaluationOneAiaEnabledDefault) - .describe('Enable attribute inference attack evaluation for privacy assessment.'), - sqs_report_columns: zod - .number() - .default( - safeSynthesizerGetJobResponseSpecConfigOneEvaluationOneSqsReportColumnsDefault - ) - .describe('Number of columns to include in statistical quality reports.'), - sqs_report_rows: zod - .number() - .default( - safeSynthesizerGetJobResponseSpecConfigOneEvaluationOneSqsReportRowsDefault - ) - .describe('Number of rows to include in statistical quality reports.'), - mandatory_columns: zod - .number() - .optional() - .describe('Number of mandatory columns that must be used in evaluation.'), - enabled: zod - .boolean() - .default(safeSynthesizerGetJobResponseSpecConfigOneEvaluationOneEnabledDefault) - .describe('Enable or disable evaluation.'), - quasi_identifier_count: zod - .number() - .default( - safeSynthesizerGetJobResponseSpecConfigOneEvaluationOneQuasiIdentifierCountDefault - ) - .describe('Number of quasi-identifiers to sample for privacy attacks.'), - pii_replay_enabled: zod - .boolean() - .default( - safeSynthesizerGetJobResponseSpecConfigOneEvaluationOnePiiReplayEnabledDefault - ) - .describe('Enable PII Replay detection.'), - pii_replay_entities: zod - .array(zod.string()) - .optional() - .describe( - 'List of entities for PII Replay. If not provided, default entities will be used.' - ), - pii_replay_columns: zod - .array(zod.string()) - .optional() - .describe( - 'List of columns for PII Replay. If not provided, only entities will be used.' - ), - }) - .describe( - 'Configuration for evaluating synthetic data quality and privacy.\n\nThis class controls which evaluation metrics are computed and how they are configured.\nIt includes privacy attack evaluations, statistical quality metrics, and downstream\nmachine learning performance assessments.' - ) - .optional() - .describe('Parameters for evaluating the quality of generated synthetic data.'), - training: zod - .object({ - num_input_records_to_sample: zod - .union([zod.literal('auto'), zod.number()]) - .default( - safeSynthesizerGetJobResponseSpecConfigOneTrainingOneNumInputRecordsToSampleDefault - ) - .describe( - "Number of records the model will see during training. This parameter is a proxy for training time. For example, if its value is the same size as the input dataset, this is like training for a single epoch. If its value is larger, this is like training for multiple (possibly fractional) epochs. If its value is smaller, this is like training for a fraction of an epoch. Supports 'auto' where a reasonable value is chosen based on other config params and data." - ), - batch_size: zod - .number() - .default(safeSynthesizerGetJobResponseSpecConfigOneTrainingOneBatchSizeDefault) - .describe('The batch size per device for training. Must be >= 1.'), - gradient_accumulation_steps: zod - .number() - .default( - safeSynthesizerGetJobResponseSpecConfigOneTrainingOneGradientAccumulationStepsDefault - ) - .describe( - 'Number of update steps to accumulate the gradients for, before performing a backward\/update pass. This technique increases the effective batch size that will fit into GPU memory. Must be >= 1.' - ), - weight_decay: zod - .number() - .default(safeSynthesizerGetJobResponseSpecConfigOneTrainingOneWeightDecayDefault) - .describe( - 'The weight decay to apply to all layers except all bias and LayerNorm weights in the AdamW optimizer. Must be in (0, 1).' - ), - warmup_ratio: zod - .number() - .default(safeSynthesizerGetJobResponseSpecConfigOneTrainingOneWarmupRatioDefault) - .describe( - 'Ratio of total training steps used for a linear warmup from 0 to the learning rate. Must be > 0.' - ), - lr_scheduler: zod - .string() - .default(safeSynthesizerGetJobResponseSpecConfigOneTrainingOneLrSchedulerDefault) - .describe( - 'The scheduler type to use. See the HuggingFace documentation of ``SchedulerType`` for all possible values.' - ), - learning_rate: zod - .union([zod.literal('auto'), zod.number()]) - .default(safeSynthesizerGetJobResponseSpecConfigOneTrainingOneLearningRateDefault) - .describe( - "The initial learning rate for `AdamW` optimizer. Must be in (0, 1). Setting to 'auto' uses a model-specific default if one exists." - ), - lora_r: zod - .number() - .default(safeSynthesizerGetJobResponseSpecConfigOneTrainingOneLoraRDefault) - .describe( - 'The rank of the LoRA update matrices. Lower rank results in smaller update matrices with fewer trainable parameters. Must be > 0.' - ), - lora_alpha_over_r: zod - .number() - .default(safeSynthesizerGetJobResponseSpecConfigOneTrainingOneLoraAlphaOverRDefault) - .describe( - 'The ratio of the LoRA scaling factor (alpha) to the LoRA rank. Empirically, this parameter works well when set to 0.5, 1, or 2. Must be in [0.5, 3].' - ), - lora_target_modules: zod - .array(zod.string()) - .default( - safeSynthesizerGetJobResponseSpecConfigOneTrainingOneLoraTargetModulesDefault - ) - .describe( - "The list of transformer modules to apply LoRA to. Possible modules: 'q_proj', 'k_proj', 'v_proj', 'o_proj', 'gate_proj', 'up_proj', 'down_proj'." - ), - use_unsloth: zod - .union([zod.literal('auto'), zod.boolean()]) - .default(safeSynthesizerGetJobResponseSpecConfigOneTrainingOneUseUnslothDefault) - .describe('Whether to use Unsloth for optimized training.'), - rope_scaling_factor: zod - .union([zod.literal('auto'), zod.number()]) - .default( - safeSynthesizerGetJobResponseSpecConfigOneTrainingOneRopeScalingFactorDefault - ) - .describe( - "Scale the base LLM's context length by this factor using RoPE scaling. Must be >= 1 or 'auto'." - ), - validation_ratio: zod - .number() - .default( - safeSynthesizerGetJobResponseSpecConfigOneTrainingOneValidationRatioDefault - ) - .describe( - 'The fraction of the training data used for validation. Must be in [0, 1]. If set to 0, no validation will be performed. If set larger than 0, validation loss will be computed and reported throughout training.' - ), - validation_steps: zod - .number() - .default( - safeSynthesizerGetJobResponseSpecConfigOneTrainingOneValidationStepsDefault - ) - .describe( - 'The number of steps between validation checks for the HF Trainer arguments. Must be > 0.' - ), - pretrained_model: zod - .string() - .default( - safeSynthesizerGetJobResponseSpecConfigOneTrainingOnePretrainedModelDefault - ) - .describe( - 'Pretrained model to use for fine-tuning. Defaults to SmolLM3. May be a Hugging Face model ID (loaded from the Hugging Face Hub or cache) or a local path. See security note in docs before using untrusted sources.' - ), - quantize_model: zod - .boolean() - .default(safeSynthesizerGetJobResponseSpecConfigOneTrainingOneQuantizeModelDefault) - .describe( - 'Whether to quantize the model during training. This can reduce memory usage and potentially speed up training, but may also impact model accuracy.' - ), - quantization_bits: zod - .union([zod.literal(4), zod.literal(8)]) - .default( - safeSynthesizerGetJobResponseSpecConfigOneTrainingOneQuantizationBitsDefault - ) - .describe( - 'The number of bits to use for quantization if ``quantize_model`` is ``True``. Accepts 8 or 4.' - ), - peft_implementation: zod - .string() - .default( - safeSynthesizerGetJobResponseSpecConfigOneTrainingOnePeftImplementationDefault - ) - .describe( - "The PEFT (Parameter-Efficient Fine-Tuning) implementation to use. Options: 'lora' for Low-Rank Adaptation, 'QLORA' for Quantized LoRA." - ), - max_vram_fraction: zod - .number() - .default( - safeSynthesizerGetJobResponseSpecConfigOneTrainingOneMaxVramFractionDefault - ) - .describe( - 'The fraction of the total VRAM to use for training. Modify this to allow longer sequences. Must be in [0, 1].' - ), - attn_implementation: zod - .string() - .default( - safeSynthesizerGetJobResponseSpecConfigOneTrainingOneAttnImplementationDefault - ) - .describe( - "The attention implementation to use for model loading. Default uses Flash Attention 3 via the HuggingFace Kernels Hub (requires the 'kernels' pip package; falls back to 'sdpa' if the 'kernels' package is not installed). Other common values: 'flash_attention_2' (requires flash-attn pip package), 'sdpa' (PyTorch scaled dot product attention), 'eager' (standard PyTorch). Custom HuggingFace Kernels Hub paths (e.g. 'kernels-community\/flash-attn2') are also supported." - ), - }) - .describe( - 'Hyperparameters that control the training process behavior.\n\nThis class contains all the fine-tuning hyperparameters that control how the model\nlearns, including learning rates, batch sizes, LoRA configuration, and optimization\nsettings. These parameters directly affect training performance and quality.' - ) - .optional() - .describe( - 'Hyperparameters for model training such as learning rate, batch size, and LoRA adapter settings.' - ), - generation: zod - .object({ - num_records: zod - .number() - .default(safeSynthesizerGetJobResponseSpecConfigOneGenerationOneNumRecordsDefault) - .describe('Number of records to generate.'), - temperature: zod - .number() - .default(safeSynthesizerGetJobResponseSpecConfigOneGenerationOneTemperatureDefault) - .describe( - 'Sampling temperature for controlling randomness (higher = more random).' - ), - repetition_penalty: zod - .number() - .default( - safeSynthesizerGetJobResponseSpecConfigOneGenerationOneRepetitionPenaltyDefault - ) - .describe( - 'The value used to control the likelihood of the model repeating the same token. Must be > 0.' - ), - top_p: zod - .number() - .default(safeSynthesizerGetJobResponseSpecConfigOneGenerationOneTopPDefault) - .describe('Nucleus sampling probability for token selection. Must be in (0, 1].'), - patience: zod - .number() - .default(safeSynthesizerGetJobResponseSpecConfigOneGenerationOnePatienceDefault) - .describe( - 'Number of consecutive generations where the ``invalid_fraction_threshold`` is reached before stopping generation. Must be >= 1.' - ), - invalid_fraction_threshold: zod - .number() - .default( - safeSynthesizerGetJobResponseSpecConfigOneGenerationOneInvalidFractionThresholdDefault - ) - .describe( - 'The fraction of invalid records that will stop generation after the ``patience`` limit is reached. Must be in [0, 1].' - ), - use_structured_generation: zod - .boolean() - .default( - safeSynthesizerGetJobResponseSpecConfigOneGenerationOneUseStructuredGenerationDefault - ) - .describe('Whether to use structured generation for better format control.'), - structured_generation_backend: zod - .enum(['auto', 'xgrammar', 'guidance', 'outlines', 'lm-format-enforcer']) - .default( - safeSynthesizerGetJobResponseSpecConfigOneGenerationOneStructuredGenerationBackendDefault - ) - .describe( - "The backend used by vLLM when ``use_structured_generation`` is ``True``. Supported backends: 'outlines', 'guidance', 'xgrammar', 'lm-format-enforcer'. 'auto' will allow vLLM to choose the backend." - ), - structured_generation_schema_method: zod - .enum(['regex', 'json_schema']) - .default( - safeSynthesizerGetJobResponseSpecConfigOneGenerationOneStructuredGenerationSchemaMethodDefault - ) - .describe( - "The method used to generate the schema from your dataset and pass it to the generation backend. 'regex' uses a custom regex construction method that tends to be more comprehensive than 'json_schema' at the cost of speed." - ), - structured_generation_use_single_sequence: zod - .boolean() - .default( - safeSynthesizerGetJobResponseSpecConfigOneGenerationOneStructuredGenerationUseSingleSequenceDefault - ) - .describe( - 'Whether to use a regex that matches exactly one sequence or record if ``max_sequences_per_example`` is 1.' - ), - enforce_timeseries_fidelity: zod - .boolean() - .default( - safeSynthesizerGetJobResponseSpecConfigOneGenerationOneEnforceTimeseriesFidelityDefault - ) - .describe( - 'Enforce time-series fidelity by enforcing order, intervals, start and end times of the records.' - ), - validation: zod - .object({ - group_by_accept_no_delineator: zod - .boolean() - .default( - safeSynthesizerGetJobResponseSpecConfigOneGenerationOneValidationOneGroupByAcceptNoDelineatorDefault - ) - .describe( - 'Whether to accept completions without both beginning and end of sequence delineators as a single sequence.' - ), - group_by_ignore_invalid_records: zod - .boolean() - .default( - safeSynthesizerGetJobResponseSpecConfigOneGenerationOneValidationOneGroupByIgnoreInvalidRecordsDefault - ) - .describe( - 'Whether to ignore invalid records in a sequence and proceed with the valid records.' - ), - group_by_fix_non_unique_value: zod - .boolean() - .default( - safeSynthesizerGetJobResponseSpecConfigOneGenerationOneValidationOneGroupByFixNonUniqueValueDefault - ) - .describe( - 'Whether to automatically fix non-unique group-by values in a sequence by using the first unique value for all records.' - ), - group_by_fix_unordered_records: zod - .boolean() - .default( - safeSynthesizerGetJobResponseSpecConfigOneGenerationOneValidationOneGroupByFixUnorderedRecordsDefault - ) - .describe( - 'Whether to automatically fix unordered records in a sequence by sorting the records.' - ), - }) - .describe( - 'Configuration for record and sequence validation.\n\nThese parameters control the validation and automatic fixes when going\nfrom LLM output to tabular data.' - ) - .optional() - .describe( - 'Validation parameters controlling validation logic and automatic fixes when parsing LLM output and converting to tabular data.' - ), - attention_backend: zod - .string() - .default( - safeSynthesizerGetJobResponseSpecConfigOneGenerationOneAttentionBackendDefault - ) - .describe( - "The attention backend for the vLLM engine. Common values: 'FLASHINFER', 'FLASH_ATTN', 'TRITON_ATTN', 'FLEX_ATTENTION'. If ``None`` or 'auto', vLLM will auto-select the best available backend." - ), - }) - .describe( - 'Configuration parameters for synthetic data generation.\n\nThese parameters control how synthetic data is generated after the model is trained.\nThey affect the quality, diversity, and validity of the generated synthetic records.' - ) - .optional() - .describe( - 'Parameters governing synthetic data generation including temperature, top-p, and number of records to produce.' - ), - privacy: zod - .object({ - dp_enabled: zod - .boolean() - .default(safeSynthesizerGetJobResponseSpecConfigOnePrivacyOneDpEnabledDefault) - .describe('Enable differentially-private training with DP-SGD.'), - epsilon: zod - .number() - .default(safeSynthesizerGetJobResponseSpecConfigOnePrivacyOneEpsilonDefault) - .describe( - 'Target privacy budget -- lower values provide stronger privacy. Must be > 0.' - ), - delta: zod - .union([zod.literal('auto'), zod.number()]) - .default(safeSynthesizerGetJobResponseSpecConfigOnePrivacyOneDeltaDefault) - .describe( - "Probability of accidentally leaking information. Should be much smaller than 1\/n where n is the number of training records. Setting to 'auto' uses delta of 1\/n^1.2. Must be in [0, 1) or 'auto'." - ), - per_sample_max_grad_norm: zod - .number() - .default( - safeSynthesizerGetJobResponseSpecConfigOnePrivacyOnePerSampleMaxGradNormDefault - ) - .describe('Maximum L2 norm for per-sample gradient clipping. Must be > 0.'), - }) - .describe( - 'Hyperparameters for differential privacy during training.\n\nThese parameters configure differential privacy (DP) training using DP-SGD algorithm.\nWhen enabled, they provide formal privacy guarantees by adding calibrated noise\nduring training.' - ) - .optional() - .describe( - 'Differential-privacy hyperparameters. When ``None``, differential privacy is disabled entirely.' - ), - time_series: zod - .object({ - is_timeseries: zod - .boolean() - .default(safeSynthesizerGetJobResponseSpecConfigOneTimeSeriesOneIsTimeseriesDefault) - .describe( - 'Whether to treat the dataset as time series. When enabled, either ``timestamp_column`` or ``timestamp_interval_seconds`` is required. For grouped time series, ``group_training_examples_by`` needs to be set.' - ), - timestamp_column: zod - .string() - .optional() - .describe( - 'Name of the column containing timestamps used to order records when ``is_timeseries`` is ``True``. Required only when ``is_timeseries`` is ``True`` and ``timestamp_interval_seconds`` is not provided.' - ), - timestamp_interval_seconds: zod - .number() - .optional() - .describe( - 'Interval in seconds between timestamps. If not provided, the timestamp column will be used to infer the interval.' - ), - timestamp_format: zod - .string() - .optional() - .describe( - "Format of the timestamp column. Accepts either: (1) Python strftime format codes for string timestamps (e.g., '%Y-%m-%d %H:%M:%S', '%m\/%d\/%Y'), or (2) 'elapsed_seconds' for numeric (int\/float) timestamps representing seconds as an increasing counter (e.g., 0, 60, 120 for 1-minute intervals). If not provided, the format will be inferred from the data." - ), - start_timestamp: zod - .union([zod.string(), zod.number()]) - .optional() - .describe( - 'Start timestamp. If not provided, the first timestamp in the timestamp column will be used.' - ), - stop_timestamp: zod - .union([zod.string(), zod.number()]) - .optional() - .describe( - 'Stop timestamp. If not provided, the last timestamp in the timestamp column will be used.' - ), - }) - .describe( - 'Configuration for time-series mode in the Safe Synthesizer pipeline.\n\nControls whether a dataset is treated as time-series data, including\ntimestamp column selection, interval inference, and format validation.\nThe time-series pipeline is currently experimental.' - ) - .optional() - .describe( - 'Configuration for time-series mode. Time-series pipeline is currently experimental.' - ), - replace_pii: zod - .object({ - globals: zod - .object({ - locales: zod.array(zod.string()).optional().describe('List of locales.'), - seed: zod - .number() - .gt( - safeSynthesizerGetJobResponseSpecConfigOneReplacePiiOneGlobalsOneSeedExclusiveMin - ) - .lt( - safeSynthesizerGetJobResponseSpecConfigOneReplacePiiOneGlobalsOneSeedExclusiveMax - ) - .optional() - .describe('Optional random seed.'), - classify: zod - .object({ - enable_classify: zod - .boolean() - .optional() - .describe('Enable column classification.'), - entities: zod - .array(zod.string()) - .optional() - .describe('List of entity types to classify.'), - num_samples: zod - .number() - .default( - safeSynthesizerGetJobResponseSpecConfigOneReplacePiiOneGlobalsOneClassifyOneNumSamplesDefault - ) - .describe('Number of column values to sample for classification.'), - classify_model_provider: zod - .string() - .optional() - .describe( - 'Name of the model provider in the Inference Gateway for column classification. The job compiler will resolve this to the appropriate endpoint URL.' - ), - }) - .describe('Configuration for column classification using an LLM.') - .default( - safeSynthesizerGetJobResponseSpecConfigOneReplacePiiOneGlobalsOneClassifyDefault - ) - .describe('Column classification configuration.'), - ner: zod - .object({ - ner_threshold: zod - .number() - .default( - safeSynthesizerGetJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerOneNerThresholdDefault - ) - .describe('NER model threshold.'), - enable_regexps: zod - .boolean() - .default( - safeSynthesizerGetJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerOneEnableRegexpsDefault - ) - .describe('Enable NER regular expressions (experimental).'), - gliner: zod - .object({ - enable_gliner: zod - .boolean() - .default( - safeSynthesizerGetJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneEnableGlinerDefault - ) - .describe('Enable GLiNER NER module.'), - enable_batch_mode: zod - .boolean() - .default( - safeSynthesizerGetJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneEnableBatchModeDefault - ) - .describe('Enable GLiNER batch mode.'), - batch_size: zod - .number() - .default( - safeSynthesizerGetJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneBatchSizeDefault - ) - .describe('GLiNER batch size.'), - chunk_length: zod - .number() - .default( - safeSynthesizerGetJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneChunkLengthDefault - ) - .describe('GLiNER batch chunk length in characters.'), - gliner_model: zod - .string() - .default( - safeSynthesizerGetJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneGlinerModelDefault - ) - .describe('GLiNER model name.'), - }) - .describe('Configuration for the GLiNER named-entity recognition model.') - .default( - safeSynthesizerGetJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerDefault - ) - .describe('GLiNER NER configuration.'), - ner_entities: zod - .array(zod.string()) - .optional() - .describe( - 'List of entity types to recognize. If unset, classification entity types are used.' - ), - }) - .describe('Configuration for Named Entity Recognition.') - .default( - safeSynthesizerGetJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerDefault - ) - .describe('Named Entity Recognition configuration.'), - lock_columns: zod - .array(zod.string()) - .optional() - .describe( - 'List of columns to preserve as immutable across all transformations.' - ), - }) - .describe( - 'Global settings for the PII replacer including locales, seed, NER, and classification.' - ) - .optional() - .describe('Global configuration options.'), - steps: zod - .array( - zod - .object({ - vars: zod - .record( - zod.string(), - zod.union([ - zod.string(), - zod.record(zod.string(), zod.unknown()), - zod.array(zod.unknown()), - ]) - ) - .optional() - .describe('Variable names and templates.'), - columns: zod - .object({ - add: zod - .array( - zod - .object({ - name: zod.string().optional().describe('Column name.'), - position: zod - .union([zod.number(), zod.array(zod.number())]) - .optional() - .describe('Column position.'), - condition: zod.string().optional().describe('Column condition.'), - value: zod.string().optional().describe('Rename to value.'), - entity: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Column entity match.'), - type: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Column type match.'), - }) - .describe( - 'Rule matcher for selecting columns by name, position, condition, entity, or type.' - ) - ) - .optional() - .describe('Columns to add.'), - drop: zod - .array( - zod - .object({ - name: zod.string().optional().describe('Column name.'), - position: zod - .union([zod.number(), zod.array(zod.number())]) - .optional() - .describe('Column position.'), - condition: zod.string().optional().describe('Column condition.'), - value: zod.string().optional().describe('Rename to value.'), - entity: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Column entity match.'), - type: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Column type match.'), - }) - .describe( - 'Rule matcher for selecting columns by name, position, condition, entity, or type.' - ) - ) - .optional() - .describe('Columns to drop.'), - rename: zod - .array( - zod - .object({ - name: zod.string().optional().describe('Column name.'), - position: zod - .union([zod.number(), zod.array(zod.number())]) - .optional() - .describe('Column position.'), - condition: zod.string().optional().describe('Column condition.'), - value: zod.string().optional().describe('Rename to value.'), - entity: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Column entity match.'), - type: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Column type match.'), - }) - .describe( - 'Rule matcher for selecting columns by name, position, condition, entity, or type.' - ) - ) - .optional() - .describe('Columns to rename.'), - }) - .describe('Container for column add, drop, and rename operations.') - .optional() - .describe('Columns transform configuration.'), - rows: zod - .object({ - drop: zod - .array( - zod - .object({ - name: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Row name.'), - condition: zod - .string() - .optional() - .describe('Row condition match.'), - foreach: zod.string().optional().describe('Foreach expression.'), - value: zod.string().optional().describe('Row value definition.'), - entity: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Row entity match.'), - type: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Row type match.'), - fallback_value: zod - .string() - .optional() - .describe('Row fallback value.'), - description: zod - .string() - .optional() - .describe('Rule description for human consumption.'), - }) - .describe( - 'Rule matcher for selecting rows by name, condition, entity, or type.' - ) - ) - .optional() - .describe('Rows to drop.'), - update: zod - .array( - zod - .object({ - name: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Row name.'), - condition: zod - .string() - .optional() - .describe('Row condition match.'), - foreach: zod.string().optional().describe('Foreach expression.'), - value: zod.string().optional().describe('Row value definition.'), - entity: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Row entity match.'), - type: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Row type match.'), - fallback_value: zod - .string() - .optional() - .describe('Row fallback value.'), - description: zod - .string() - .optional() - .describe('Rule description for human consumption.'), - }) - .describe( - 'Rule matcher for selecting rows by name, condition, entity, or type.' - ) - ) - .optional() - .describe('Rows to update.'), - }) - .describe('Container for row drop and update operations.') - .optional() - .describe('Rows transform configurations.'), - }) - .describe( - 'Single transformation step with optional variables, column actions, and row actions.' - ) - ) - .min(1) - .max(safeSynthesizerGetJobResponseSpecConfigOneReplacePiiOneStepsMax) - .describe('List of transformation steps to perform on input data.'), - }) - .describe( - 'Configuration for PII replacer.\n\nDefines how PII data should be detected and replaced in a dataset.' - ) - .optional() - .describe('PII replacement configuration. When ``None``, PII replacement is skipped.'), - }) - .describe( - 'Main configuration class for the Safe Synthesizer pipeline.\n\nThis is the top-level configuration class that orchestrates all aspects of\nsynthetic data generation including training, generation, privacy, evaluation,\nand data handling. It provides validation to ensure parameter compatibility.' - ) - .describe('The Safe Synthesizer parameters configuration.'), - hf_token_secret: zod - .string() - .optional() - .describe( - 'Name of platform secret containing the HuggingFace token. Must exist in the same workspace as the job.' - ), - enable_synthesis: zod - .boolean() - .default(safeSynthesizerGetJobResponseSpecEnableSynthesisDefault) - .describe( - 'Whether to run LLM training and generation phases. When False the task only performs PII replacement and returns the processed data.' - ), - }) - .describe( - 'Configuration model for Safe Synthesizer jobs.\n\nUsed primarily internally to configure a run submitted to the NeMo Jobs\nMicroservice.' - ), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .optional() - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ), - status_details: zod.record(zod.string(), zod.unknown()).optional(), - error_details: zod.record(zod.string(), zod.unknown()).optional(), - ownership: zod.record(zod.string(), zod.unknown()).optional(), - custom_fields: zod.record(zod.string(), zod.unknown()).optional(), -}); - -/** - * @summary Delete Job - */ -export const SafeSynthesizerDeleteJobParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -/** - * @summary Cancel Job - */ -export const SafeSynthesizerCancelJobParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const safeSynthesizerCancelJobResponseSpecConfigOneDataOneMaxSequencesPerExampleDefault = `auto`; -export const safeSynthesizerCancelJobResponseSpecConfigOneDataOneHoldoutDefault = 0.05; -export const safeSynthesizerCancelJobResponseSpecConfigOneDataOneMaxHoldoutDefault = 2000; -export const safeSynthesizerCancelJobResponseSpecConfigOneEvaluationOneMiaEnabledDefault = true; -export const safeSynthesizerCancelJobResponseSpecConfigOneEvaluationOneAiaEnabledDefault = true; -export const safeSynthesizerCancelJobResponseSpecConfigOneEvaluationOneSqsReportColumnsDefault = 250; -export const safeSynthesizerCancelJobResponseSpecConfigOneEvaluationOneSqsReportRowsDefault = 5000; -export const safeSynthesizerCancelJobResponseSpecConfigOneEvaluationOneEnabledDefault = true; -export const safeSynthesizerCancelJobResponseSpecConfigOneEvaluationOneQuasiIdentifierCountDefault = 3; -export const safeSynthesizerCancelJobResponseSpecConfigOneEvaluationOnePiiReplayEnabledDefault = true; -export const safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneNumInputRecordsToSampleDefault = `auto`; -export const safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneBatchSizeDefault = 1; -export const safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneGradientAccumulationStepsDefault = 8; -export const safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneWeightDecayDefault = 0.01; -export const safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneWarmupRatioDefault = 0.05; -export const safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneLrSchedulerDefault = `cosine`; -export const safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneLearningRateDefault = `auto`; -export const safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneLoraRDefault = 32; -export const safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneLoraAlphaOverRDefault = 1; -export const safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneLoraTargetModulesDefault = [ - `q_proj`, - `k_proj`, - `v_proj`, - `o_proj`, -]; -export const safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneUseUnslothDefault = `auto`; -export const safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneRopeScalingFactorDefault = `auto`; -export const safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneValidationRatioDefault = 0; -export const safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneValidationStepsDefault = 15; -export const safeSynthesizerCancelJobResponseSpecConfigOneTrainingOnePretrainedModelDefault = `HuggingFaceTB/SmolLM3-3B`; -export const safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneQuantizeModelDefault = false; -export const safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneQuantizationBitsDefault = 8; -export const safeSynthesizerCancelJobResponseSpecConfigOneTrainingOnePeftImplementationDefault = `QLORA`; -export const safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneMaxVramFractionDefault = 0.8; -export const safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneAttnImplementationDefault = `kernels-community/vllm-flash-attn3`; -export const safeSynthesizerCancelJobResponseSpecConfigOneGenerationOneNumRecordsDefault = 1000; -export const safeSynthesizerCancelJobResponseSpecConfigOneGenerationOneTemperatureDefault = 0.9; -export const safeSynthesizerCancelJobResponseSpecConfigOneGenerationOneRepetitionPenaltyDefault = 1; -export const safeSynthesizerCancelJobResponseSpecConfigOneGenerationOneTopPDefault = 1; -export const safeSynthesizerCancelJobResponseSpecConfigOneGenerationOnePatienceDefault = 3; -export const safeSynthesizerCancelJobResponseSpecConfigOneGenerationOneInvalidFractionThresholdDefault = 0.8; -export const safeSynthesizerCancelJobResponseSpecConfigOneGenerationOneUseStructuredGenerationDefault = false; -export const safeSynthesizerCancelJobResponseSpecConfigOneGenerationOneStructuredGenerationBackendDefault = `auto`; -export const safeSynthesizerCancelJobResponseSpecConfigOneGenerationOneStructuredGenerationSchemaMethodDefault = `regex`; -export const safeSynthesizerCancelJobResponseSpecConfigOneGenerationOneStructuredGenerationUseSingleSequenceDefault = false; -export const safeSynthesizerCancelJobResponseSpecConfigOneGenerationOneEnforceTimeseriesFidelityDefault = false; -export const safeSynthesizerCancelJobResponseSpecConfigOneGenerationOneValidationOneGroupByAcceptNoDelineatorDefault = false; -export const safeSynthesizerCancelJobResponseSpecConfigOneGenerationOneValidationOneGroupByIgnoreInvalidRecordsDefault = false; -export const safeSynthesizerCancelJobResponseSpecConfigOneGenerationOneValidationOneGroupByFixNonUniqueValueDefault = false; -export const safeSynthesizerCancelJobResponseSpecConfigOneGenerationOneValidationOneGroupByFixUnorderedRecordsDefault = false; -export const safeSynthesizerCancelJobResponseSpecConfigOneGenerationOneAttentionBackendDefault = `auto`; -export const safeSynthesizerCancelJobResponseSpecConfigOnePrivacyOneDpEnabledDefault = false; -export const safeSynthesizerCancelJobResponseSpecConfigOnePrivacyOneEpsilonDefault = 8; -export const safeSynthesizerCancelJobResponseSpecConfigOnePrivacyOneDeltaDefault = `auto`; -export const safeSynthesizerCancelJobResponseSpecConfigOnePrivacyOnePerSampleMaxGradNormDefault = 1; -export const safeSynthesizerCancelJobResponseSpecConfigOneTimeSeriesOneIsTimeseriesDefault = false; -export const safeSynthesizerCancelJobResponseSpecConfigOneReplacePiiOneGlobalsOneSeedExclusiveMin = - -2147483647; -export const safeSynthesizerCancelJobResponseSpecConfigOneReplacePiiOneGlobalsOneSeedExclusiveMax = 2147483647; - -export const safeSynthesizerCancelJobResponseSpecConfigOneReplacePiiOneGlobalsOneClassifyOneNumSamplesDefault = 3; -export const safeSynthesizerCancelJobResponseSpecConfigOneReplacePiiOneGlobalsOneClassifyDefault = { - num_samples: 3, -}; -export const safeSynthesizerCancelJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerOneNerThresholdDefault = 0.3; -export const safeSynthesizerCancelJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerOneEnableRegexpsDefault = false; -export const safeSynthesizerCancelJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneEnableGlinerDefault = true; -export const safeSynthesizerCancelJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneEnableBatchModeDefault = true; -export const safeSynthesizerCancelJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneBatchSizeDefault = 8; -export const safeSynthesizerCancelJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneChunkLengthDefault = 512; -export const safeSynthesizerCancelJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneGlinerModelDefault = `nvidia/gliner-PII`; -export const safeSynthesizerCancelJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerDefault = - { - enable_gliner: true, - enable_batch_mode: true, - batch_size: 8, - chunk_length: 512, - gliner_model: 'nvidia/gliner-PII', - }; -export const safeSynthesizerCancelJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerDefault = { - ner_threshold: 0.3, - enable_regexps: false, -}; -export const safeSynthesizerCancelJobResponseSpecConfigOneReplacePiiOneStepsMax = 10; - -export const safeSynthesizerCancelJobResponseSpecEnableSynthesisDefault = true; - -export const SafeSynthesizerCancelJobResponse = zod.object({ - id: zod.string().optional(), - name: zod.string(), - description: zod.string().optional(), - project: zod.string().optional(), - workspace: zod.string().optional(), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - spec: zod - .object({ - data_source: zod.string().describe('The data source for the job.'), - config: zod - .object({ - data: zod - .object({ - group_training_examples_by: zod - .string() - .optional() - .describe( - 'Column to group training examples by. This is useful when you want the model to learn inter-record correlations for a given grouping of records.' - ), - order_training_examples_by: zod - .string() - .optional() - .describe( - 'Column to order training examples by. This is useful when you want the model to learn sequential relationships for a given ordering of records. If you provide this parameter, you must also provide ``group_training_examples_by``.' - ), - max_sequences_per_example: zod - .union([zod.literal('auto'), zod.number()]) - .default( - safeSynthesizerCancelJobResponseSpecConfigOneDataOneMaxSequencesPerExampleDefault - ) - .describe( - "If specified, adds at most this number of sequences per example. Supports 'auto' where a value of 1 is chosen if differential privacy is enabled, and 10 otherwise. If not specified or set to 'auto', fills up context. Required for DP to limit contribution of each example." - ), - holdout: zod - .number() - .default(safeSynthesizerCancelJobResponseSpecConfigOneDataOneHoldoutDefault) - .describe( - 'Amount of records to hold out for evaluation. If this is a float between 0 and 1, that ratio of records is held out. If an integer greater than 1, that number of records is held out. If the value is equal to zero, no holdout will be performed. Must be >= 0.' - ), - max_holdout: zod - .number() - .default(safeSynthesizerCancelJobResponseSpecConfigOneDataOneMaxHoldoutDefault) - .describe( - 'Maximum number of records to hold out. Overrides any behavior set by ``holdout``. Must be >= 0.' - ), - random_state: zod - .number() - .optional() - .describe('Random state for holdout split to ensure reproducibility.'), - }) - .describe( - 'Configuration for grouping, ordering, and splitting input data for training and evaluation.' - ) - .optional() - .describe( - 'Configuration controlling how input data is grouped and split for training and evaluation.' - ), - evaluation: zod - .object({ - mia_enabled: zod - .boolean() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneEvaluationOneMiaEnabledDefault - ) - .describe('Enable membership inference attack evaluation for privacy assessment.'), - aia_enabled: zod - .boolean() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneEvaluationOneAiaEnabledDefault - ) - .describe('Enable attribute inference attack evaluation for privacy assessment.'), - sqs_report_columns: zod - .number() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneEvaluationOneSqsReportColumnsDefault - ) - .describe('Number of columns to include in statistical quality reports.'), - sqs_report_rows: zod - .number() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneEvaluationOneSqsReportRowsDefault - ) - .describe('Number of rows to include in statistical quality reports.'), - mandatory_columns: zod - .number() - .optional() - .describe('Number of mandatory columns that must be used in evaluation.'), - enabled: zod - .boolean() - .default(safeSynthesizerCancelJobResponseSpecConfigOneEvaluationOneEnabledDefault) - .describe('Enable or disable evaluation.'), - quasi_identifier_count: zod - .number() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneEvaluationOneQuasiIdentifierCountDefault - ) - .describe('Number of quasi-identifiers to sample for privacy attacks.'), - pii_replay_enabled: zod - .boolean() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneEvaluationOnePiiReplayEnabledDefault - ) - .describe('Enable PII Replay detection.'), - pii_replay_entities: zod - .array(zod.string()) - .optional() - .describe( - 'List of entities for PII Replay. If not provided, default entities will be used.' - ), - pii_replay_columns: zod - .array(zod.string()) - .optional() - .describe( - 'List of columns for PII Replay. If not provided, only entities will be used.' - ), - }) - .describe( - 'Configuration for evaluating synthetic data quality and privacy.\n\nThis class controls which evaluation metrics are computed and how they are configured.\nIt includes privacy attack evaluations, statistical quality metrics, and downstream\nmachine learning performance assessments.' - ) - .optional() - .describe('Parameters for evaluating the quality of generated synthetic data.'), - training: zod - .object({ - num_input_records_to_sample: zod - .union([zod.literal('auto'), zod.number()]) - .default( - safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneNumInputRecordsToSampleDefault - ) - .describe( - "Number of records the model will see during training. This parameter is a proxy for training time. For example, if its value is the same size as the input dataset, this is like training for a single epoch. If its value is larger, this is like training for multiple (possibly fractional) epochs. If its value is smaller, this is like training for a fraction of an epoch. Supports 'auto' where a reasonable value is chosen based on other config params and data." - ), - batch_size: zod - .number() - .default(safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneBatchSizeDefault) - .describe('The batch size per device for training. Must be >= 1.'), - gradient_accumulation_steps: zod - .number() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneGradientAccumulationStepsDefault - ) - .describe( - 'Number of update steps to accumulate the gradients for, before performing a backward\/update pass. This technique increases the effective batch size that will fit into GPU memory. Must be >= 1.' - ), - weight_decay: zod - .number() - .default(safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneWeightDecayDefault) - .describe( - 'The weight decay to apply to all layers except all bias and LayerNorm weights in the AdamW optimizer. Must be in (0, 1).' - ), - warmup_ratio: zod - .number() - .default(safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneWarmupRatioDefault) - .describe( - 'Ratio of total training steps used for a linear warmup from 0 to the learning rate. Must be > 0.' - ), - lr_scheduler: zod - .string() - .default(safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneLrSchedulerDefault) - .describe( - 'The scheduler type to use. See the HuggingFace documentation of ``SchedulerType`` for all possible values.' - ), - learning_rate: zod - .union([zod.literal('auto'), zod.number()]) - .default( - safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneLearningRateDefault - ) - .describe( - "The initial learning rate for `AdamW` optimizer. Must be in (0, 1). Setting to 'auto' uses a model-specific default if one exists." - ), - lora_r: zod - .number() - .default(safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneLoraRDefault) - .describe( - 'The rank of the LoRA update matrices. Lower rank results in smaller update matrices with fewer trainable parameters. Must be > 0.' - ), - lora_alpha_over_r: zod - .number() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneLoraAlphaOverRDefault - ) - .describe( - 'The ratio of the LoRA scaling factor (alpha) to the LoRA rank. Empirically, this parameter works well when set to 0.5, 1, or 2. Must be in [0.5, 3].' - ), - lora_target_modules: zod - .array(zod.string()) - .default( - safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneLoraTargetModulesDefault - ) - .describe( - "The list of transformer modules to apply LoRA to. Possible modules: 'q_proj', 'k_proj', 'v_proj', 'o_proj', 'gate_proj', 'up_proj', 'down_proj'." - ), - use_unsloth: zod - .union([zod.literal('auto'), zod.boolean()]) - .default(safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneUseUnslothDefault) - .describe('Whether to use Unsloth for optimized training.'), - rope_scaling_factor: zod - .union([zod.literal('auto'), zod.number()]) - .default( - safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneRopeScalingFactorDefault - ) - .describe( - "Scale the base LLM's context length by this factor using RoPE scaling. Must be >= 1 or 'auto'." - ), - validation_ratio: zod - .number() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneValidationRatioDefault - ) - .describe( - 'The fraction of the training data used for validation. Must be in [0, 1]. If set to 0, no validation will be performed. If set larger than 0, validation loss will be computed and reported throughout training.' - ), - validation_steps: zod - .number() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneValidationStepsDefault - ) - .describe( - 'The number of steps between validation checks for the HF Trainer arguments. Must be > 0.' - ), - pretrained_model: zod - .string() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneTrainingOnePretrainedModelDefault - ) - .describe( - 'Pretrained model to use for fine-tuning. Defaults to SmolLM3. May be a Hugging Face model ID (loaded from the Hugging Face Hub or cache) or a local path. See security note in docs before using untrusted sources.' - ), - quantize_model: zod - .boolean() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneQuantizeModelDefault - ) - .describe( - 'Whether to quantize the model during training. This can reduce memory usage and potentially speed up training, but may also impact model accuracy.' - ), - quantization_bits: zod - .union([zod.literal(4), zod.literal(8)]) - .default( - safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneQuantizationBitsDefault - ) - .describe( - 'The number of bits to use for quantization if ``quantize_model`` is ``True``. Accepts 8 or 4.' - ), - peft_implementation: zod - .string() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneTrainingOnePeftImplementationDefault - ) - .describe( - "The PEFT (Parameter-Efficient Fine-Tuning) implementation to use. Options: 'lora' for Low-Rank Adaptation, 'QLORA' for Quantized LoRA." - ), - max_vram_fraction: zod - .number() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneMaxVramFractionDefault - ) - .describe( - 'The fraction of the total VRAM to use for training. Modify this to allow longer sequences. Must be in [0, 1].' - ), - attn_implementation: zod - .string() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneTrainingOneAttnImplementationDefault - ) - .describe( - "The attention implementation to use for model loading. Default uses Flash Attention 3 via the HuggingFace Kernels Hub (requires the 'kernels' pip package; falls back to 'sdpa' if the 'kernels' package is not installed). Other common values: 'flash_attention_2' (requires flash-attn pip package), 'sdpa' (PyTorch scaled dot product attention), 'eager' (standard PyTorch). Custom HuggingFace Kernels Hub paths (e.g. 'kernels-community\/flash-attn2') are also supported." - ), - }) - .describe( - 'Hyperparameters that control the training process behavior.\n\nThis class contains all the fine-tuning hyperparameters that control how the model\nlearns, including learning rates, batch sizes, LoRA configuration, and optimization\nsettings. These parameters directly affect training performance and quality.' - ) - .optional() - .describe( - 'Hyperparameters for model training such as learning rate, batch size, and LoRA adapter settings.' - ), - generation: zod - .object({ - num_records: zod - .number() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneGenerationOneNumRecordsDefault - ) - .describe('Number of records to generate.'), - temperature: zod - .number() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneGenerationOneTemperatureDefault - ) - .describe( - 'Sampling temperature for controlling randomness (higher = more random).' - ), - repetition_penalty: zod - .number() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneGenerationOneRepetitionPenaltyDefault - ) - .describe( - 'The value used to control the likelihood of the model repeating the same token. Must be > 0.' - ), - top_p: zod - .number() - .default(safeSynthesizerCancelJobResponseSpecConfigOneGenerationOneTopPDefault) - .describe('Nucleus sampling probability for token selection. Must be in (0, 1].'), - patience: zod - .number() - .default(safeSynthesizerCancelJobResponseSpecConfigOneGenerationOnePatienceDefault) - .describe( - 'Number of consecutive generations where the ``invalid_fraction_threshold`` is reached before stopping generation. Must be >= 1.' - ), - invalid_fraction_threshold: zod - .number() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneGenerationOneInvalidFractionThresholdDefault - ) - .describe( - 'The fraction of invalid records that will stop generation after the ``patience`` limit is reached. Must be in [0, 1].' - ), - use_structured_generation: zod - .boolean() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneGenerationOneUseStructuredGenerationDefault - ) - .describe('Whether to use structured generation for better format control.'), - structured_generation_backend: zod - .enum(['auto', 'xgrammar', 'guidance', 'outlines', 'lm-format-enforcer']) - .default( - safeSynthesizerCancelJobResponseSpecConfigOneGenerationOneStructuredGenerationBackendDefault - ) - .describe( - "The backend used by vLLM when ``use_structured_generation`` is ``True``. Supported backends: 'outlines', 'guidance', 'xgrammar', 'lm-format-enforcer'. 'auto' will allow vLLM to choose the backend." - ), - structured_generation_schema_method: zod - .enum(['regex', 'json_schema']) - .default( - safeSynthesizerCancelJobResponseSpecConfigOneGenerationOneStructuredGenerationSchemaMethodDefault - ) - .describe( - "The method used to generate the schema from your dataset and pass it to the generation backend. 'regex' uses a custom regex construction method that tends to be more comprehensive than 'json_schema' at the cost of speed." - ), - structured_generation_use_single_sequence: zod - .boolean() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneGenerationOneStructuredGenerationUseSingleSequenceDefault - ) - .describe( - 'Whether to use a regex that matches exactly one sequence or record if ``max_sequences_per_example`` is 1.' - ), - enforce_timeseries_fidelity: zod - .boolean() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneGenerationOneEnforceTimeseriesFidelityDefault - ) - .describe( - 'Enforce time-series fidelity by enforcing order, intervals, start and end times of the records.' - ), - validation: zod - .object({ - group_by_accept_no_delineator: zod - .boolean() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneGenerationOneValidationOneGroupByAcceptNoDelineatorDefault - ) - .describe( - 'Whether to accept completions without both beginning and end of sequence delineators as a single sequence.' - ), - group_by_ignore_invalid_records: zod - .boolean() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneGenerationOneValidationOneGroupByIgnoreInvalidRecordsDefault - ) - .describe( - 'Whether to ignore invalid records in a sequence and proceed with the valid records.' - ), - group_by_fix_non_unique_value: zod - .boolean() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneGenerationOneValidationOneGroupByFixNonUniqueValueDefault - ) - .describe( - 'Whether to automatically fix non-unique group-by values in a sequence by using the first unique value for all records.' - ), - group_by_fix_unordered_records: zod - .boolean() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneGenerationOneValidationOneGroupByFixUnorderedRecordsDefault - ) - .describe( - 'Whether to automatically fix unordered records in a sequence by sorting the records.' - ), - }) - .describe( - 'Configuration for record and sequence validation.\n\nThese parameters control the validation and automatic fixes when going\nfrom LLM output to tabular data.' - ) - .optional() - .describe( - 'Validation parameters controlling validation logic and automatic fixes when parsing LLM output and converting to tabular data.' - ), - attention_backend: zod - .string() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneGenerationOneAttentionBackendDefault - ) - .describe( - "The attention backend for the vLLM engine. Common values: 'FLASHINFER', 'FLASH_ATTN', 'TRITON_ATTN', 'FLEX_ATTENTION'. If ``None`` or 'auto', vLLM will auto-select the best available backend." - ), - }) - .describe( - 'Configuration parameters for synthetic data generation.\n\nThese parameters control how synthetic data is generated after the model is trained.\nThey affect the quality, diversity, and validity of the generated synthetic records.' - ) - .optional() - .describe( - 'Parameters governing synthetic data generation including temperature, top-p, and number of records to produce.' - ), - privacy: zod - .object({ - dp_enabled: zod - .boolean() - .default(safeSynthesizerCancelJobResponseSpecConfigOnePrivacyOneDpEnabledDefault) - .describe('Enable differentially-private training with DP-SGD.'), - epsilon: zod - .number() - .default(safeSynthesizerCancelJobResponseSpecConfigOnePrivacyOneEpsilonDefault) - .describe( - 'Target privacy budget -- lower values provide stronger privacy. Must be > 0.' - ), - delta: zod - .union([zod.literal('auto'), zod.number()]) - .default(safeSynthesizerCancelJobResponseSpecConfigOnePrivacyOneDeltaDefault) - .describe( - "Probability of accidentally leaking information. Should be much smaller than 1\/n where n is the number of training records. Setting to 'auto' uses delta of 1\/n^1.2. Must be in [0, 1) or 'auto'." - ), - per_sample_max_grad_norm: zod - .number() - .default( - safeSynthesizerCancelJobResponseSpecConfigOnePrivacyOnePerSampleMaxGradNormDefault - ) - .describe('Maximum L2 norm for per-sample gradient clipping. Must be > 0.'), - }) - .describe( - 'Hyperparameters for differential privacy during training.\n\nThese parameters configure differential privacy (DP) training using DP-SGD algorithm.\nWhen enabled, they provide formal privacy guarantees by adding calibrated noise\nduring training.' - ) - .optional() - .describe( - 'Differential-privacy hyperparameters. When ``None``, differential privacy is disabled entirely.' - ), - time_series: zod - .object({ - is_timeseries: zod - .boolean() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneTimeSeriesOneIsTimeseriesDefault - ) - .describe( - 'Whether to treat the dataset as time series. When enabled, either ``timestamp_column`` or ``timestamp_interval_seconds`` is required. For grouped time series, ``group_training_examples_by`` needs to be set.' - ), - timestamp_column: zod - .string() - .optional() - .describe( - 'Name of the column containing timestamps used to order records when ``is_timeseries`` is ``True``. Required only when ``is_timeseries`` is ``True`` and ``timestamp_interval_seconds`` is not provided.' - ), - timestamp_interval_seconds: zod - .number() - .optional() - .describe( - 'Interval in seconds between timestamps. If not provided, the timestamp column will be used to infer the interval.' - ), - timestamp_format: zod - .string() - .optional() - .describe( - "Format of the timestamp column. Accepts either: (1) Python strftime format codes for string timestamps (e.g., '%Y-%m-%d %H:%M:%S', '%m\/%d\/%Y'), or (2) 'elapsed_seconds' for numeric (int\/float) timestamps representing seconds as an increasing counter (e.g., 0, 60, 120 for 1-minute intervals). If not provided, the format will be inferred from the data." - ), - start_timestamp: zod - .union([zod.string(), zod.number()]) - .optional() - .describe( - 'Start timestamp. If not provided, the first timestamp in the timestamp column will be used.' - ), - stop_timestamp: zod - .union([zod.string(), zod.number()]) - .optional() - .describe( - 'Stop timestamp. If not provided, the last timestamp in the timestamp column will be used.' - ), - }) - .describe( - 'Configuration for time-series mode in the Safe Synthesizer pipeline.\n\nControls whether a dataset is treated as time-series data, including\ntimestamp column selection, interval inference, and format validation.\nThe time-series pipeline is currently experimental.' - ) - .optional() - .describe( - 'Configuration for time-series mode. Time-series pipeline is currently experimental.' - ), - replace_pii: zod - .object({ - globals: zod - .object({ - locales: zod.array(zod.string()).optional().describe('List of locales.'), - seed: zod - .number() - .gt( - safeSynthesizerCancelJobResponseSpecConfigOneReplacePiiOneGlobalsOneSeedExclusiveMin - ) - .lt( - safeSynthesizerCancelJobResponseSpecConfigOneReplacePiiOneGlobalsOneSeedExclusiveMax - ) - .optional() - .describe('Optional random seed.'), - classify: zod - .object({ - enable_classify: zod - .boolean() - .optional() - .describe('Enable column classification.'), - entities: zod - .array(zod.string()) - .optional() - .describe('List of entity types to classify.'), - num_samples: zod - .number() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneReplacePiiOneGlobalsOneClassifyOneNumSamplesDefault - ) - .describe('Number of column values to sample for classification.'), - classify_model_provider: zod - .string() - .optional() - .describe( - 'Name of the model provider in the Inference Gateway for column classification. The job compiler will resolve this to the appropriate endpoint URL.' - ), - }) - .describe('Configuration for column classification using an LLM.') - .default( - safeSynthesizerCancelJobResponseSpecConfigOneReplacePiiOneGlobalsOneClassifyDefault - ) - .describe('Column classification configuration.'), - ner: zod - .object({ - ner_threshold: zod - .number() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerOneNerThresholdDefault - ) - .describe('NER model threshold.'), - enable_regexps: zod - .boolean() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerOneEnableRegexpsDefault - ) - .describe('Enable NER regular expressions (experimental).'), - gliner: zod - .object({ - enable_gliner: zod - .boolean() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneEnableGlinerDefault - ) - .describe('Enable GLiNER NER module.'), - enable_batch_mode: zod - .boolean() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneEnableBatchModeDefault - ) - .describe('Enable GLiNER batch mode.'), - batch_size: zod - .number() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneBatchSizeDefault - ) - .describe('GLiNER batch size.'), - chunk_length: zod - .number() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneChunkLengthDefault - ) - .describe('GLiNER batch chunk length in characters.'), - gliner_model: zod - .string() - .default( - safeSynthesizerCancelJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerOneGlinerModelDefault - ) - .describe('GLiNER model name.'), - }) - .describe('Configuration for the GLiNER named-entity recognition model.') - .default( - safeSynthesizerCancelJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerOneGlinerDefault - ) - .describe('GLiNER NER configuration.'), - ner_entities: zod - .array(zod.string()) - .optional() - .describe( - 'List of entity types to recognize. If unset, classification entity types are used.' - ), - }) - .describe('Configuration for Named Entity Recognition.') - .default( - safeSynthesizerCancelJobResponseSpecConfigOneReplacePiiOneGlobalsOneNerDefault - ) - .describe('Named Entity Recognition configuration.'), - lock_columns: zod - .array(zod.string()) - .optional() - .describe( - 'List of columns to preserve as immutable across all transformations.' - ), - }) - .describe( - 'Global settings for the PII replacer including locales, seed, NER, and classification.' - ) - .optional() - .describe('Global configuration options.'), - steps: zod - .array( - zod - .object({ - vars: zod - .record( - zod.string(), - zod.union([ - zod.string(), - zod.record(zod.string(), zod.unknown()), - zod.array(zod.unknown()), - ]) - ) - .optional() - .describe('Variable names and templates.'), - columns: zod - .object({ - add: zod - .array( - zod - .object({ - name: zod.string().optional().describe('Column name.'), - position: zod - .union([zod.number(), zod.array(zod.number())]) - .optional() - .describe('Column position.'), - condition: zod.string().optional().describe('Column condition.'), - value: zod.string().optional().describe('Rename to value.'), - entity: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Column entity match.'), - type: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Column type match.'), - }) - .describe( - 'Rule matcher for selecting columns by name, position, condition, entity, or type.' - ) - ) - .optional() - .describe('Columns to add.'), - drop: zod - .array( - zod - .object({ - name: zod.string().optional().describe('Column name.'), - position: zod - .union([zod.number(), zod.array(zod.number())]) - .optional() - .describe('Column position.'), - condition: zod.string().optional().describe('Column condition.'), - value: zod.string().optional().describe('Rename to value.'), - entity: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Column entity match.'), - type: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Column type match.'), - }) - .describe( - 'Rule matcher for selecting columns by name, position, condition, entity, or type.' - ) - ) - .optional() - .describe('Columns to drop.'), - rename: zod - .array( - zod - .object({ - name: zod.string().optional().describe('Column name.'), - position: zod - .union([zod.number(), zod.array(zod.number())]) - .optional() - .describe('Column position.'), - condition: zod.string().optional().describe('Column condition.'), - value: zod.string().optional().describe('Rename to value.'), - entity: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Column entity match.'), - type: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Column type match.'), - }) - .describe( - 'Rule matcher for selecting columns by name, position, condition, entity, or type.' - ) - ) - .optional() - .describe('Columns to rename.'), - }) - .describe('Container for column add, drop, and rename operations.') - .optional() - .describe('Columns transform configuration.'), - rows: zod - .object({ - drop: zod - .array( - zod - .object({ - name: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Row name.'), - condition: zod - .string() - .optional() - .describe('Row condition match.'), - foreach: zod.string().optional().describe('Foreach expression.'), - value: zod.string().optional().describe('Row value definition.'), - entity: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Row entity match.'), - type: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Row type match.'), - fallback_value: zod - .string() - .optional() - .describe('Row fallback value.'), - description: zod - .string() - .optional() - .describe('Rule description for human consumption.'), - }) - .describe( - 'Rule matcher for selecting rows by name, condition, entity, or type.' - ) - ) - .optional() - .describe('Rows to drop.'), - update: zod - .array( - zod - .object({ - name: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Row name.'), - condition: zod - .string() - .optional() - .describe('Row condition match.'), - foreach: zod.string().optional().describe('Foreach expression.'), - value: zod.string().optional().describe('Row value definition.'), - entity: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Row entity match.'), - type: zod - .union([zod.string(), zod.array(zod.string())]) - .optional() - .describe('Row type match.'), - fallback_value: zod - .string() - .optional() - .describe('Row fallback value.'), - description: zod - .string() - .optional() - .describe('Rule description for human consumption.'), - }) - .describe( - 'Rule matcher for selecting rows by name, condition, entity, or type.' - ) - ) - .optional() - .describe('Rows to update.'), - }) - .describe('Container for row drop and update operations.') - .optional() - .describe('Rows transform configurations.'), - }) - .describe( - 'Single transformation step with optional variables, column actions, and row actions.' - ) - ) - .min(1) - .max(safeSynthesizerCancelJobResponseSpecConfigOneReplacePiiOneStepsMax) - .describe('List of transformation steps to perform on input data.'), - }) - .describe( - 'Configuration for PII replacer.\n\nDefines how PII data should be detected and replaced in a dataset.' - ) - .optional() - .describe('PII replacement configuration. When ``None``, PII replacement is skipped.'), - }) - .describe( - 'Main configuration class for the Safe Synthesizer pipeline.\n\nThis is the top-level configuration class that orchestrates all aspects of\nsynthetic data generation including training, generation, privacy, evaluation,\nand data handling. It provides validation to ensure parameter compatibility.' - ) - .describe('The Safe Synthesizer parameters configuration.'), - hf_token_secret: zod - .string() - .optional() - .describe( - 'Name of platform secret containing the HuggingFace token. Must exist in the same workspace as the job.' - ), - enable_synthesis: zod - .boolean() - .default(safeSynthesizerCancelJobResponseSpecEnableSynthesisDefault) - .describe( - 'Whether to run LLM training and generation phases. When False the task only performs PII replacement and returns the processed data.' - ), - }) - .describe( - 'Configuration model for Safe Synthesizer jobs.\n\nUsed primarily internally to configure a run submitted to the NeMo Jobs\nMicroservice.' - ), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .optional() - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ), - status_details: zod.record(zod.string(), zod.unknown()).optional(), - error_details: zod.record(zod.string(), zod.unknown()).optional(), - ownership: zod.record(zod.string(), zod.unknown()).optional(), - custom_fields: zod.record(zod.string(), zod.unknown()).optional(), -}); - -/** - * @summary Get Job Logs - */ -export const SafeSynthesizerGetJobLogsParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const SafeSynthesizerGetJobLogsQueryParams = zod.object({ - limit: zod.number().optional(), - page_cursor: zod.string().optional(), -}); - -export const SafeSynthesizerGetJobLogsResponse = zod.object({ - data: zod.array( - zod.object({ - timestamp: zod.string().datetime({}), - job: zod.string(), - job_step: zod.string(), - job_task: zod.string(), - message: zod.string(), - }) - ), - total: zod.number(), - next_page: zod.string(), - prev_page: zod.string(), -}); - -/** - * @summary List Job Results - */ -export const SafeSynthesizerListJobResultsParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const SafeSynthesizerListJobResultsResponse = zod.object({ - data: zod.array( - zod.object({ - name: zod.string(), - job: zod.string(), - workspace: zod.string(), - project: zod.string().optional(), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - artifact_url: zod.string(), - artifact_storage_type: zod.enum(['fileset']), - download_url: zod.string().optional(), - }) - ), -}); - -/** - * @summary Get Job Status - */ -export const SafeSynthesizerGetJobStatusParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const SafeSynthesizerGetJobStatusResponse = zod.object({ - id: zod.string(), - name: zod.string(), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ), - status_details: zod.record(zod.string(), zod.unknown()), - error_details: zod.record(zod.string(), zod.unknown()), - steps: zod.array( - zod.object({ - id: zod.string(), - name: zod.string(), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ), - status_details: zod.record(zod.string(), zod.unknown()), - error_details: zod.record(zod.string(), zod.unknown()), - tasks: zod.array( - zod.object({ - id: zod.string(), - name: zod.string(), - status: zod - .enum([ - 'created', - 'pending', - 'active', - 'cancelled', - 'cancelling', - 'error', - 'completed', - 'paused', - 'pausing', - 'resuming', - ]) - .describe( - 'Enumeration of possible job statuses.\n\nThis enum represents the various states a job can be in during its lifecycle,\nfrom creation to a terminal state.' - ), - status_details: zod.record(zod.string(), zod.unknown()), - error_details: zod.record(zod.string(), zod.unknown()), - error_stack: zod.string(), - created_at: zod.string().datetime({}), - updated_at: zod.string().datetime({}), - }) - ), - created_at: zod.string().datetime({}), - updated_at: zod.string().datetime({}), - }) - ), - created_at: zod.string().datetime({}), - updated_at: zod.string().datetime({}), -}); diff --git a/web/packages/sdk/generated/platform/zod/secrets.ts b/web/packages/sdk/generated/platform/zod/secrets.ts deleted file mode 100644 index d3ebddf33a..0000000000 --- a/web/packages/sdk/generated/platform/zod/secrets.ts +++ /dev/null @@ -1,153 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import * as zod from 'zod'; - -/** - * Create a new secret. - * @summary Create Secret - */ -export const SecretsCreateSecretParams = zod.object({ - workspace: zod.string(), -}); - -export const SecretsCreateSecretBody = zod - .object({ - name: zod - .string() - .describe( - 'The name of the secret to create. Allowed characters: letters (a-z, A-Z), digits (0-9), underscores, hyphens, and dots.' - ), - description: zod.string().optional().describe('An optional description of the secret'), - value: zod.string().describe('The payload of the secret'), - }) - .describe('Request body for creating a new platform secret.'); - -/** - * List available secrets - * @summary List Secrets - */ -export const SecretsListSecretsParams = zod.object({ - workspace: zod.string(), -}); - -export const secretsListSecretsQueryPageDefault = 1; -export const secretsListSecretsQueryPageExclusiveMin = 0; - -export const secretsListSecretsQueryPageSizeDefault = 10; -export const secretsListSecretsQueryPageSizeExclusiveMin = 0; - -export const SecretsListSecretsQueryParams = zod.object({ - page: zod - .number() - .gt(secretsListSecretsQueryPageExclusiveMin) - .default(secretsListSecretsQueryPageDefault) - .describe('Page number.'), - page_size: zod - .number() - .gt(secretsListSecretsQueryPageSizeExclusiveMin) - .default(secretsListSecretsQueryPageSizeDefault) - .describe('Page size.'), -}); - -export const SecretsListSecretsResponse = zod.object({ - data: zod.array( - zod - .object({ - name: zod.string().describe('The name of the secret'), - workspace: zod.string().describe('The workspace ID the secret belongs to'), - description: zod.string().optional().describe('An optional description of the secret'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - }) - .describe('Response model for a platform secret.') - ), - pagination: zod - .object({ - page: zod.number().describe('The current page number.'), - page_size: zod.number().describe('The page size used for the query.'), - current_page_size: zod.number().describe('The size for the current page.'), - total_pages: zod.number().describe('The total number of pages.'), - total_results: zod.number().describe('The total number of results.'), - }) - .optional() - .describe('Pagination information.'), - sort: zod.string().optional().describe('The field on which the results are sorted.'), - filter: zod.record(zod.string(), zod.unknown()).optional().describe('Filtering information.'), -}); - -/** - * Retrieve a secret by its name. - * @summary Get Secret - */ -export const SecretsGetSecretParams = zod.object({ - name: zod.string(), - workspace: zod.string(), -}); - -export const SecretsGetSecretResponse = zod - .object({ - name: zod.string().describe('The name of the secret'), - workspace: zod.string().describe('The workspace ID the secret belongs to'), - description: zod.string().optional().describe('An optional description of the secret'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - }) - .describe('Response model for a platform secret.'); - -/** - * Update a secret's metadata. - * @summary Update Secret - */ -export const SecretsUpdateSecretParams = zod.object({ - name: zod.string(), - workspace: zod.string(), -}); - -export const SecretsUpdateSecretBody = zod - .object({ - description: zod.string().optional().describe('An optional description of the secret'), - value: zod.string().optional().describe('The new secret value'), - }) - .describe("Request body for updating a platform secret's metadata."); - -export const SecretsUpdateSecretResponse = zod - .object({ - name: zod.string().describe('The name of the secret'), - workspace: zod.string().describe('The workspace ID the secret belongs to'), - description: zod.string().optional().describe('An optional description of the secret'), - created_at: zod.string().datetime({}).optional(), - updated_at: zod.string().datetime({}).optional(), - }) - .describe('Response model for a platform secret.'); - -/** - * Delete a secret. - * @summary Delete Secret - */ -export const SecretsDeleteSecretParams = zod.object({ - name: zod.string(), - workspace: zod.string(), -}); - -/** - * Access the value of a secret. - * @summary Access Secret - */ -export const SecretsAccessSecretParams = zod.object({ - name: zod.string(), - workspace: zod.string(), -}); - -export const SecretsAccessSecretResponse = zod - .object({ - name: zod.string().describe('The name of the secret'), - workspace: zod.string().describe('The workspace ID the secret belongs to'), - value: zod.string().describe('The payload of the secret'), - }) - .describe("Response model for accessing a platform secret's value."); diff --git a/web/packages/sdk/generated/platform/zod/spans.ts b/web/packages/sdk/generated/platform/zod/spans.ts deleted file mode 100644 index cd76403d87..0000000000 --- a/web/packages/sdk/generated/platform/zod/spans.ts +++ /dev/null @@ -1,274 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import * as zod from 'zod'; - -/** - * @summary List Spans - */ -export const ListSpansParams = zod.object({ - workspace: zod.string(), -}); - -export const listSpansQueryPageDefault = 1; - -export const listSpansQueryPageSizeDefault = 10; -export const listSpansQueryPageSizeMax = 1000; - -export const listSpansQuerySortDefault = `-started_at`; -export const listSpansQueryModeDefault = `detailed`; - -export const ListSpansQueryParams = zod.object({ - page: zod.number().min(1).default(listSpansQueryPageDefault).describe('Page number.'), - page_size: zod - .number() - .min(1) - .max(listSpansQueryPageSizeMax) - .default(listSpansQueryPageSizeDefault) - .describe('Page size.'), - sort: zod.enum(['started_at', '-started_at']).default(listSpansQuerySortDefault), - mode: zod.enum(['summary', 'detailed']).default(listSpansQueryModeDefault), - filter: zod - .object({ - session_id: zod.string().optional().describe('Filter by span session id.'), - project: zod.string().optional().describe('Filter by project name.'), - evaluation_id: zod.string().optional().describe('Filter by evaluation id.'), - evaluation_sha: zod.string().optional().describe('Filter by evaluation sha.'), - evaluation_run_id: zod - .string() - .optional() - .describe( - 'Filter by evaluation run id. ATIF evaluation context is stored on root trajectory spans; use session_id from a matched root to fetch the full trace tree.' - ), - dataset_id: zod.string().optional().describe('Filter by dataset id.'), - dataset_name: zod.string().optional().describe('Filter by dataset name.'), - dataset_version: zod.string().optional().describe('Filter by dataset version.'), - test_case_id: zod.string().optional().describe('Filter by dataset test case id.'), - source: zod - .string() - .optional() - .describe("Filter by ingest source (e.g. 'otel', 'atif', 'chat_completions')."), - kind: zod - .enum([ - 'LLM', - 'CHAIN', - 'TOOL', - 'RETRIEVER', - 'EMBEDDING', - 'AGENT', - 'RERANKER', - 'EVALUATOR', - 'GUARDRAIL', - 'UNKNOWN', - ]) - .optional() - .describe('Filter by normalized span kind.'), - status: zod - .enum(['success', 'error', 'cancelled', 'unknown']) - .optional() - .describe('Filter by normalized span status.'), - model: zod.string().optional().describe('Filter by model name.'), - tool_name: zod.string().optional().describe('Filter by tool name.'), - provider: zod - .string() - .optional() - .describe("Filter by provider (e.g. 'openai', 'nim', 'anthropic')."), - agent_id: zod.string().optional().describe('Filter by agent identifier.'), - agent_name: zod - .string() - .optional() - .describe("Filter by agent application name (e.g. 'claude-code', 'codex')."), - prompt_name: zod.string().optional().describe('Filter by prompt template name.'), - prompt_version: zod.string().optional().describe('Filter by prompt template version.'), - parent_span_id: zod - .string() - .optional() - .describe('Filter by parent span id. Use to fetch direct children of a span.'), - started_at: zod - .object({ - $gte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results greater than or equal to this datetime.'), - $lte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results less than or equal to this datetime.'), - }) - .optional() - .describe('Filter by span start timestamp.'), - }) - .optional() - .describe( - 'Filter spans by session_id, parent_span_id, project, evaluation context fields, source, kind, status, model, tool_name, provider, agent_id, agent_name, prompt_name, prompt_version, and started_at.' - ), -}); - -export const listSpansResponseDataItemInputTokensMin = 0; - -export const listSpansResponseDataItemOutputTokensMin = 0; - -export const listSpansResponseDataItemCachedTokensMin = 0; - -export const listSpansResponseDataItemTotalTokensMin = 0; - -export const ListSpansResponse = zod.object({ - data: zod.array( - zod.object({ - span_id: zod.string(), - session_id: zod.string(), - workspace: zod.string(), - project: zod.string().optional(), - evaluation_context: zod - .object({ - evaluation_id: zod.string().optional(), - evaluation_sha: zod.string().optional(), - evaluation_run_id: zod.string().optional(), - dataset_id: zod.string().optional(), - dataset_name: zod.string().optional(), - dataset_version: zod.string().optional(), - test_case_id: zod.string().optional(), - metadata: zod.record(zod.string(), zod.unknown()).optional(), - }) - .optional(), - parent_span_id: zod.string().optional(), - kind: zod.enum([ - 'LLM', - 'CHAIN', - 'TOOL', - 'RETRIEVER', - 'EMBEDDING', - 'AGENT', - 'RERANKER', - 'EVALUATOR', - 'GUARDRAIL', - 'UNKNOWN', - ]), - name: zod.string().optional(), - source: zod.string(), - trace_id: zod.string().optional(), - started_at: zod.string().datetime({}), - ended_at: zod.string().datetime({}).optional(), - status: zod.enum(['success', 'error', 'cancelled', 'unknown']), - error_type: zod.string().optional(), - error_message: zod.string().optional(), - provider: zod.string().optional(), - model: zod.string().optional(), - prompt_id: zod.string().optional(), - prompt_name: zod.string().optional(), - prompt_version: zod.string().optional(), - agent_id: zod.string().optional(), - agent_name: zod.string().optional(), - tool_name: zod.string().optional(), - input_tokens: zod.number().min(listSpansResponseDataItemInputTokensMin).optional(), - output_tokens: zod.number().min(listSpansResponseDataItemOutputTokensMin).optional(), - cached_tokens: zod.number().min(listSpansResponseDataItemCachedTokensMin).optional(), - total_tokens: zod.number().min(listSpansResponseDataItemTotalTokensMin).optional(), - usage_details: zod.record(zod.string(), zod.number()).optional(), - cost_total_usd: zod.number().optional(), - cost_input_usd: zod.number().optional(), - cost_output_usd: zod.number().optional(), - cost_details: zod.record(zod.string(), zod.number()).optional(), - input: zod.string().optional(), - output: zod.string().optional(), - raw_attributes: zod.string().optional(), - ingested_at: zod.string().datetime({}), - }) - ), - pagination: zod - .object({ - page: zod.number().describe('The current page number.'), - page_size: zod.number().describe('The page size used for the query.'), - current_page_size: zod.number().describe('The size for the current page.'), - total_pages: zod.number().describe('The total number of pages.'), - total_results: zod.number().describe('The total number of results.'), - }) - .optional() - .describe('Pagination information.'), - sort: zod.string().optional().describe('The field on which the results are sorted.'), - filter: zod.record(zod.string(), zod.unknown()).optional().describe('Filtering information.'), -}); - -/** - * @summary Get Span - */ -export const GetSpanParams = zod.object({ - workspace: zod.string(), - span_id: zod.string(), -}); - -export const getSpanResponseInputTokensMin = 0; - -export const getSpanResponseOutputTokensMin = 0; - -export const getSpanResponseCachedTokensMin = 0; - -export const getSpanResponseTotalTokensMin = 0; - -export const GetSpanResponse = zod.object({ - span_id: zod.string(), - session_id: zod.string(), - workspace: zod.string(), - project: zod.string().optional(), - evaluation_context: zod - .object({ - evaluation_id: zod.string().optional(), - evaluation_sha: zod.string().optional(), - evaluation_run_id: zod.string().optional(), - dataset_id: zod.string().optional(), - dataset_name: zod.string().optional(), - dataset_version: zod.string().optional(), - test_case_id: zod.string().optional(), - metadata: zod.record(zod.string(), zod.unknown()).optional(), - }) - .optional(), - parent_span_id: zod.string().optional(), - kind: zod.enum([ - 'LLM', - 'CHAIN', - 'TOOL', - 'RETRIEVER', - 'EMBEDDING', - 'AGENT', - 'RERANKER', - 'EVALUATOR', - 'GUARDRAIL', - 'UNKNOWN', - ]), - name: zod.string().optional(), - source: zod.string(), - trace_id: zod.string().optional(), - started_at: zod.string().datetime({}), - ended_at: zod.string().datetime({}).optional(), - status: zod.enum(['success', 'error', 'cancelled', 'unknown']), - error_type: zod.string().optional(), - error_message: zod.string().optional(), - provider: zod.string().optional(), - model: zod.string().optional(), - prompt_id: zod.string().optional(), - prompt_name: zod.string().optional(), - prompt_version: zod.string().optional(), - agent_id: zod.string().optional(), - agent_name: zod.string().optional(), - tool_name: zod.string().optional(), - input_tokens: zod.number().min(getSpanResponseInputTokensMin).optional(), - output_tokens: zod.number().min(getSpanResponseOutputTokensMin).optional(), - cached_tokens: zod.number().min(getSpanResponseCachedTokensMin).optional(), - total_tokens: zod.number().min(getSpanResponseTotalTokensMin).optional(), - usage_details: zod.record(zod.string(), zod.number()).optional(), - cost_total_usd: zod.number().optional(), - cost_input_usd: zod.number().optional(), - cost_output_usd: zod.number().optional(), - cost_details: zod.record(zod.string(), zod.number()).optional(), - input: zod.string().optional(), - output: zod.string().optional(), - raw_attributes: zod.string().optional(), - ingested_at: zod.string().datetime({}), -}); diff --git a/web/packages/sdk/generated/platform/zod/tasks.ts b/web/packages/sdk/generated/platform/zod/tasks.ts deleted file mode 100644 index 62708bbe3b..0000000000 --- a/web/packages/sdk/generated/platform/zod/tasks.ts +++ /dev/null @@ -1,207 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import * as zod from 'zod'; - -/** - * Get a specific task. - * @summary Get Task - */ -export const GetTaskParams = zod.object({ - workspace: zod.string(), - app: zod.string(), - name: zod.string(), -}); - -export const getTaskResponseLockedDefault = false; - -export const GetTaskResponse = zod - .object({ - id: zod.string().describe('Unique identifier'), - name: zod.string().describe('Task name'), - workspace: zod.string().describe('Workspace identifier'), - app: zod.string().describe('Parent app reference (workspace\/name)'), - description: zod.string().optional().describe('Task description'), - project: zod.string().optional().describe('The name of the project associated with this task'), - locked: zod.boolean().default(getTaskResponseLockedDefault).describe('Lock status'), - created_at: zod.string().datetime({}).optional().describe('Creation timestamp'), - updated_at: zod.string().datetime({}).optional().describe('Last update timestamp'), - }) - .describe('Schema for Task responses.'); - -/** - * Update an existing task. - * @summary Update Task - */ -export const UpdateTaskParams = zod.object({ - workspace: zod.string(), - app: zod.string(), - name: zod.string(), -}); - -export const UpdateTaskBody = zod - .object({ - description: zod.string().optional().describe('Task description'), - project: zod.string().optional().describe('The name of the project associated with this task'), - locked: zod.boolean().optional().describe('Lock status'), - }) - .describe('Schema for updating an existing Task.'); - -export const updateTaskResponseLockedDefault = false; - -export const UpdateTaskResponse = zod - .object({ - id: zod.string().describe('Unique identifier'), - name: zod.string().describe('Task name'), - workspace: zod.string().describe('Workspace identifier'), - app: zod.string().describe('Parent app reference (workspace\/name)'), - description: zod.string().optional().describe('Task description'), - project: zod.string().optional().describe('The name of the project associated with this task'), - locked: zod.boolean().default(updateTaskResponseLockedDefault).describe('Lock status'), - created_at: zod.string().datetime({}).optional().describe('Creation timestamp'), - updated_at: zod.string().datetime({}).optional().describe('Last update timestamp'), - }) - .describe('Schema for Task responses.'); - -/** - * Delete a task. - * @summary Delete Task - */ -export const DeleteTaskParams = zod.object({ - workspace: zod.string(), - app: zod.string(), - name: zod.string(), -}); - -/** - * List all tasks for a specific app. - * @summary List Tasks - */ -export const ListTasksParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const listTasksQueryPageDefault = 1; -export const listTasksQueryPageSizeDefault = 10; -export const listTasksQuerySortDefault = `created_at`; - -export const ListTasksQueryParams = zod.object({ - page: zod.number().default(listTasksQueryPageDefault).describe('Page number.'), - page_size: zod.number().default(listTasksQueryPageSizeDefault).describe('Page size.'), - sort: zod - .enum(['created_at', '-created_at', 'name', '-name', 'updated_at', '-updated_at']) - .describe('Sort fields for Tasks.') - .default(listTasksQuerySortDefault) - .describe( - 'The field to sort by. To sort in decreasing order, use `-` in front of the field name.' - ), - filter: zod - .object({ - workspace: zod.string().optional().describe('Filter by workspace id.'), - name: zod.string().optional().describe('Filter by task name.'), - app: zod.string().optional().describe('Filter by app reference (workspace\/name).'), - project: zod.string().optional().describe('Filter by project name.'), - description: zod.string().optional().describe('Filter by task description.'), - created_at: zod - .object({ - $gte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results greater than or equal to this datetime.'), - $lte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results less than or equal to this datetime.'), - }) - .optional() - .describe('Filter entities based on creation date.'), - updated_at: zod - .object({ - $gte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results greater than or equal to this datetime.'), - $lte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results less than or equal to this datetime.'), - }) - .optional() - .describe('Filter entities based on update date.'), - }) - .optional() - .describe('Filter tasks by name, app, description, project, created_at, and updated_at.'), -}); - -export const listTasksResponseDataItemLockedDefault = false; - -export const ListTasksResponse = zod.object({ - data: zod.array( - zod - .object({ - id: zod.string().describe('Unique identifier'), - name: zod.string().describe('Task name'), - workspace: zod.string().describe('Workspace identifier'), - app: zod.string().describe('Parent app reference (workspace\/name)'), - description: zod.string().optional().describe('Task description'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this task'), - locked: zod - .boolean() - .default(listTasksResponseDataItemLockedDefault) - .describe('Lock status'), - created_at: zod.string().datetime({}).optional().describe('Creation timestamp'), - updated_at: zod.string().datetime({}).optional().describe('Last update timestamp'), - }) - .describe('Schema for Task responses.') - ), - pagination: zod - .object({ - page: zod.number().describe('The current page number.'), - page_size: zod.number().describe('The page size used for the query.'), - current_page_size: zod.number().describe('The size for the current page.'), - total_pages: zod.number().describe('The total number of pages.'), - total_results: zod.number().describe('The total number of results.'), - }) - .optional() - .describe('Pagination information.'), - sort: zod.string().optional().describe('The field on which the results are sorted.'), - filter: zod.record(zod.string(), zod.unknown()).optional().describe('Filtering information.'), -}); - -/** - * Create a new task. - * @summary Create Task - */ -export const CreateTaskParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const createTaskBodyLockedDefault = false; - -export const CreateTaskBody = zod - .object({ - name: zod.string().describe('Task name'), - description: zod.string().optional().describe('Task description'), - project: zod.string().optional().describe('The name of the project associated with this task'), - locked: zod - .boolean() - .default(createTaskBodyLockedDefault) - .describe('If true, this record cannot be automatically updated when entries are ingested.'), - }) - .describe( - 'Schema for creating a new Task.\n\nNote: workspace and app are automatically set from the URL path.' - ); diff --git a/web/packages/sdk/generated/platform/zod/traces.ts b/web/packages/sdk/generated/platform/zod/traces.ts deleted file mode 100644 index 4126a701a9..0000000000 --- a/web/packages/sdk/generated/platform/zod/traces.ts +++ /dev/null @@ -1,201 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import * as zod from 'zod'; - -/** - * @summary List Traces - */ -export const ListTracesParams = zod.object({ - workspace: zod.string(), -}); - -export const listTracesQueryPageDefault = 1; - -export const listTracesQueryPageSizeDefault = 10; -export const listTracesQueryPageSizeMax = 1000; - -export const listTracesQuerySortDefault = `-started_at`; -export const listTracesQueryModeDefault = `detailed`; - -export const ListTracesQueryParams = zod.object({ - page: zod.number().min(1).default(listTracesQueryPageDefault).describe('Page number.'), - page_size: zod - .number() - .min(1) - .max(listTracesQueryPageSizeMax) - .default(listTracesQueryPageSizeDefault) - .describe('Page size.'), - sort: zod.enum(['started_at', '-started_at']).default(listTracesQuerySortDefault), - mode: zod - .enum(['summary', 'detailed']) - .default(listTracesQueryModeDefault) - .describe( - 'Use summary for root-span trace fields only, or detailed to include token, cost, and span-count rollups.' - ), - filter: zod - .object({ - id: zod.string().optional().describe('Filter by canonical Intake trace id.'), - session_id: zod.string().optional().describe('Filter by session id.'), - status: zod - .enum(['success', 'error', 'cancelled', 'unknown']) - .optional() - .describe('Filter by rolled-up trace status.'), - started_at: zod - .object({ - $gte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results greater than or equal to this datetime.'), - $lte: zod - .string() - .datetime({}) - .optional() - .describe('Filter for results less than or equal to this datetime.'), - }) - .optional() - .describe('Filter by root span start timestamp.'), - evaluation_id: zod.string().optional().describe('Filter by root-span evaluation id.'), - evaluation_sha: zod.string().optional().describe('Filter by root-span evaluation sha.'), - evaluation_run_id: zod.string().optional().describe('Filter by root-span evaluation run id.'), - dataset_id: zod.string().optional().describe('Filter by root-span dataset id.'), - dataset_name: zod.string().optional().describe('Filter by root-span dataset name.'), - dataset_version: zod.string().optional().describe('Filter by root-span dataset version.'), - test_case_id: zod.string().optional().describe('Filter by root-span dataset test case id.'), - }) - .optional() - .describe( - 'Filter root-span-backed traces by id, session_id, rolled-up status, root span started_at, and root-span evaluation context fields.' - ), -}); - -export const listTracesResponseDataItemInputTokensMin = 0; - -export const listTracesResponseDataItemOutputTokensMin = 0; - -export const listTracesResponseDataItemCachedTokensMin = 0; - -export const listTracesResponseDataItemTotalTokensMin = 0; - -export const listTracesResponseDataItemSpanCountMin = 0; - -export const listTracesResponseDataItemErrorCountMin = 0; - -export const ListTracesResponse = zod.object({ - data: zod.array( - zod.object({ - id: zod.string(), - root_span_id: zod.string().optional(), - session_id: zod.string(), - workspace: zod.string(), - name: zod.string().optional(), - evaluation_context: zod - .object({ - evaluation_id: zod.string().optional(), - evaluation_sha: zod.string().optional(), - evaluation_run_id: zod.string().optional(), - dataset_id: zod.string().optional(), - dataset_name: zod.string().optional(), - dataset_version: zod.string().optional(), - test_case_id: zod.string().optional(), - metadata: zod.record(zod.string(), zod.unknown()).optional(), - }) - .optional(), - started_at: zod.string().datetime({}), - ended_at: zod.string().datetime({}).optional(), - duration_ms: zod.number().optional(), - status: zod.enum(['success', 'error', 'cancelled', 'unknown']), - input_tokens: zod.number().min(listTracesResponseDataItemInputTokensMin).optional(), - output_tokens: zod.number().min(listTracesResponseDataItemOutputTokensMin).optional(), - cached_tokens: zod.number().min(listTracesResponseDataItemCachedTokensMin).optional(), - total_tokens: zod.number().min(listTracesResponseDataItemTotalTokensMin).optional(), - cost_usd: zod.number().optional(), - cost_input_usd: zod.number().optional(), - cost_output_usd: zod.number().optional(), - span_count: zod.number().min(listTracesResponseDataItemSpanCountMin).optional(), - error_count: zod.number().min(listTracesResponseDataItemErrorCountMin).optional(), - }) - ), - pagination: zod - .object({ - page: zod.number().describe('The current page number.'), - page_size: zod.number().describe('The page size used for the query.'), - current_page_size: zod.number().describe('The size for the current page.'), - total_pages: zod.number().describe('The total number of pages.'), - total_results: zod.number().describe('The total number of results.'), - }) - .optional() - .describe('Pagination information.'), - sort: zod.string().optional().describe('The field on which the results are sorted.'), - filter: zod.record(zod.string(), zod.unknown()).optional().describe('Filtering information.'), -}); - -/** - * @summary Get Trace - */ -export const GetTraceParams = zod.object({ - workspace: zod.string(), - id: zod.string(), -}); - -export const getTraceQueryModeDefault = `detailed`; - -export const GetTraceQueryParams = zod.object({ - mode: zod - .enum(['summary', 'detailed']) - .default(getTraceQueryModeDefault) - .describe( - 'Use summary for root-span trace fields only, or detailed to include token, cost, and span-count rollups.' - ), -}); - -export const getTraceResponseInputTokensMin = 0; - -export const getTraceResponseOutputTokensMin = 0; - -export const getTraceResponseCachedTokensMin = 0; - -export const getTraceResponseTotalTokensMin = 0; - -export const getTraceResponseSpanCountMin = 0; - -export const getTraceResponseErrorCountMin = 0; - -export const GetTraceResponse = zod.object({ - id: zod.string(), - root_span_id: zod.string().optional(), - session_id: zod.string(), - workspace: zod.string(), - name: zod.string().optional(), - evaluation_context: zod - .object({ - evaluation_id: zod.string().optional(), - evaluation_sha: zod.string().optional(), - evaluation_run_id: zod.string().optional(), - dataset_id: zod.string().optional(), - dataset_name: zod.string().optional(), - dataset_version: zod.string().optional(), - test_case_id: zod.string().optional(), - metadata: zod.record(zod.string(), zod.unknown()).optional(), - }) - .optional(), - started_at: zod.string().datetime({}), - ended_at: zod.string().datetime({}).optional(), - duration_ms: zod.number().optional(), - status: zod.enum(['success', 'error', 'cancelled', 'unknown']), - input_tokens: zod.number().min(getTraceResponseInputTokensMin).optional(), - output_tokens: zod.number().min(getTraceResponseOutputTokensMin).optional(), - cached_tokens: zod.number().min(getTraceResponseCachedTokensMin).optional(), - total_tokens: zod.number().min(getTraceResponseTotalTokensMin).optional(), - cost_usd: zod.number().optional(), - cost_input_usd: zod.number().optional(), - cost_output_usd: zod.number().optional(), - span_count: zod.number().min(getTraceResponseSpanCountMin).optional(), - error_count: zod.number().min(getTraceResponseErrorCountMin).optional(), -}); diff --git a/web/packages/sdk/generated/platform/zod/virtual-models.ts b/web/packages/sdk/generated/platform/zod/virtual-models.ts deleted file mode 100644 index 26fb56d90d..0000000000 --- a/web/packages/sdk/generated/platform/zod/virtual-models.ts +++ /dev/null @@ -1,599 +0,0 @@ -/** - * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - * - * Generated by Orval šŸŗ - * Do not edit manually. - * Nemo Platform API - */ -import * as zod from 'zod'; - -/** - * Create a new VirtualModel in the given workspace. - -A VirtualModel defines an ordered middleware pipeline that IGW executes -when an inference request arrives with ``model: "workspace/name"`` matching -this entity. - * @summary Create VirtualModel - */ -export const CreateVirtualModelParams = zod.object({ - workspace: zod.string(), -}); - -export const createVirtualModelBodyAutoprovisionedDefault = false; - -export const CreateVirtualModelBody = zod - .object({ - default_model_entity: zod - .string() - .optional() - .describe( - 'Model entity to route to, in \"workspace\/name\" format. Written into request[\"model\"] before the request middleware pipeline runs. If omitted, a request middleware plugin must handle backend routing itself. Set to null to clear an existing value.' - ), - autoprovisioned: zod - .boolean() - .default(createVirtualModelBodyAutoprovisionedDefault) - .describe( - 'Marks this VirtualModel as controller-managed. The Models controller will delete it once no ModelProvider serves the matching entity. Setting this manually opts the VirtualModel into that cleanup behavior.' - ), - models: zod - .array( - zod - .object({ - model: zod.string(), - backend_format: zod - .enum(['OPENAI_CHAT', 'ANTHROPIC_MESSAGES']) - .describe( - 'Inference backend API wire formats understood by IGW and middleware plugins.' - ) - .nullish() - .describe('Optional backend format override for this VirtualModel entry.'), - }) - .describe('Inference configuration for one model entity referenced by a VirtualModel.') - ) - .optional() - .describe( - 'Model entity references used by this VirtualModel. A per-entry backend_format overrides the referenced ModelEntity backend_format when IGW resolves the backend format for a request.' - ), - request_middleware: zod - .array( - zod - .object({ - name: zod.string(), - config_type: zod.string(), - config: zod.record(zod.string(), zod.unknown()).optional(), - config_id: zod.string().optional(), - }) - .describe( - 'One entry in a VirtualModel middleware pipeline.\n\nDeclares which plugin to invoke and how to resolve its configuration.\nExactly one of ``config`` (inline dict) or ``config_id`` (entity reference)\nshould be provided. ``config_type`` is always required regardless of which\nis used — it is the discriminator that tells IGW (and the plugin) which\nconfig schema applies.\n\nAttributes:\n name: The entry-point key of the plugin to invoke\n (e.g. ``\"nemo-switchyard\"``). Must match the plugin\'s\n ``nemo.inference_middleware`` entry-point key.\n config_type: Always required. Maps to the ``entity_type`` of the plugin\'s\n config ``NemoEntity`` subclass (e.g. ``\"routellm_config\"``). Used by\n IGW to call :meth:`~NemoInferenceMiddleware.validate_middleware_config`\n with the right discriminator, and by the plugin to dispatch to the\n correct schema when it supports multiple config types.\n config: Inline config dict. Mutually exclusive with ``config_id``.\n config_id: ``\"workspace\/name\"`` reference to a stored config entity.\n Mutually exclusive with ``config``. IGW resolves this by calling\n :meth:`~NemoInferenceMiddleware.get_middleware_config` on the plugin.' - ) - ) - .optional() - .describe( - 'Ordered list of middleware plugins applied before proxying to the backend. Each entry is a MiddlewareCall with a \"name\" (plugin identifier) and optional \"config_type\" and \"config_id\" fields that reference a stored plugin configuration.' - ), - response_middleware: zod - .array( - zod - .object({ - name: zod.string(), - config_type: zod.string(), - config: zod.record(zod.string(), zod.unknown()).optional(), - config_id: zod.string().optional(), - }) - .describe( - 'One entry in a VirtualModel middleware pipeline.\n\nDeclares which plugin to invoke and how to resolve its configuration.\nExactly one of ``config`` (inline dict) or ``config_id`` (entity reference)\nshould be provided. ``config_type`` is always required regardless of which\nis used — it is the discriminator that tells IGW (and the plugin) which\nconfig schema applies.\n\nAttributes:\n name: The entry-point key of the plugin to invoke\n (e.g. ``\"nemo-switchyard\"``). Must match the plugin\'s\n ``nemo.inference_middleware`` entry-point key.\n config_type: Always required. Maps to the ``entity_type`` of the plugin\'s\n config ``NemoEntity`` subclass (e.g. ``\"routellm_config\"``). Used by\n IGW to call :meth:`~NemoInferenceMiddleware.validate_middleware_config`\n with the right discriminator, and by the plugin to dispatch to the\n correct schema when it supports multiple config types.\n config: Inline config dict. Mutually exclusive with ``config_id``.\n config_id: ``\"workspace\/name\"`` reference to a stored config entity.\n Mutually exclusive with ``config``. IGW resolves this by calling\n :meth:`~NemoInferenceMiddleware.get_middleware_config` on the plugin.' - ) - ) - .optional() - .describe( - 'Ordered list of middleware plugins applied after the backend response is received, before returning it to the caller.' - ), - post_response_middleware: zod - .array( - zod - .object({ - name: zod.string(), - config_type: zod.string(), - config: zod.record(zod.string(), zod.unknown()).optional(), - config_id: zod.string().optional(), - }) - .describe( - 'One entry in a VirtualModel middleware pipeline.\n\nDeclares which plugin to invoke and how to resolve its configuration.\nExactly one of ``config`` (inline dict) or ``config_id`` (entity reference)\nshould be provided. ``config_type`` is always required regardless of which\nis used — it is the discriminator that tells IGW (and the plugin) which\nconfig schema applies.\n\nAttributes:\n name: The entry-point key of the plugin to invoke\n (e.g. ``\"nemo-switchyard\"``). Must match the plugin\'s\n ``nemo.inference_middleware`` entry-point key.\n config_type: Always required. Maps to the ``entity_type`` of the plugin\'s\n config ``NemoEntity`` subclass (e.g. ``\"routellm_config\"``). Used by\n IGW to call :meth:`~NemoInferenceMiddleware.validate_middleware_config`\n with the right discriminator, and by the plugin to dispatch to the\n correct schema when it supports multiple config types.\n config: Inline config dict. Mutually exclusive with ``config_id``.\n config_id: ``\"workspace\/name\"`` reference to a stored config entity.\n Mutually exclusive with ``config``. IGW resolves this by calling\n :meth:`~NemoInferenceMiddleware.get_middleware_config` on the plugin.' - ) - ) - .optional() - .describe( - 'Ordered list of middleware plugins invoked after the response has been returned to the caller. Intended for fire-and-forget work (logging, analytics) that must not block or modify the response.' - ), - override_proxy: zod - .string() - .optional() - .describe( - 'Plugin-provided proxy implementation for IGW to use instead of its default aiohttp proxy. Format: \"plugin-name.proxy-name\". Leave unset to use the default IGW proxy. Set to null to clear an existing value.' - ), - name: zod - .string() - .describe('Name of the virtual model within the workspace. Must be unique per workspace.'), - }) - .describe('Request body for creating a new VirtualModel.'); - -/** - * List VirtualModels for the given workspace. - -Use ``workspace=-`` to list across all workspaces accessible to the caller. - * @summary List VirtualModels - */ -export const ListVirtualModelsParams = zod.object({ - workspace: zod.string(), -}); - -export const listVirtualModelsQueryPageDefault = 1; - -export const listVirtualModelsQueryPageSizeDefault = 20; -export const listVirtualModelsQueryPageSizeMax = 200; - -export const listVirtualModelsQuerySortDefault = `-created_at`; - -export const ListVirtualModelsQueryParams = zod.object({ - page: zod - .number() - .min(1) - .default(listVirtualModelsQueryPageDefault) - .describe('Page number (1-indexed).'), - page_size: zod - .number() - .min(1) - .max(listVirtualModelsQueryPageSizeMax) - .default(listVirtualModelsQueryPageSizeDefault) - .describe('Number of results per page.'), - sort: zod - .string() - .default(listVirtualModelsQuerySortDefault) - .describe('Sort field. Prefix with ``-`` for descending order.'), -}); - -export const listVirtualModelsResponseDataItemNameDefault = ``; -export const listVirtualModelsResponseDataItemWorkspaceRegExp = new RegExp('^[\\w\\-\\+.@:]+$'); -export const listVirtualModelsResponseDataItemAutoprovisionedDefault = false; -export const listVirtualModelsResponseDataItemRequestMiddlewareDefault = []; -export const listVirtualModelsResponseDataItemResponseMiddlewareDefault = []; -export const listVirtualModelsResponseDataItemPostResponseMiddlewareDefault = []; - -export const ListVirtualModelsResponse = zod.object({ - data: zod.array( - zod - .object({ - name: zod - .string() - .default(listVirtualModelsResponseDataItemNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(listVirtualModelsResponseDataItemWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - default_model_entity: zod.string().optional(), - autoprovisioned: zod - .boolean() - .default(listVirtualModelsResponseDataItemAutoprovisionedDefault) - .describe( - 'Marks this VirtualModel as controller-managed. The Models controller will delete it once no ModelProvider serves the matching entity. Setting this manually opts the VirtualModel into that cleanup behavior.' - ), - models: zod - .array( - zod - .object({ - model: zod.string(), - backend_format: zod - .enum(['OPENAI_CHAT', 'ANTHROPIC_MESSAGES']) - .describe( - 'Inference backend API wire formats understood by IGW and middleware plugins.' - ) - .nullish() - .describe('Optional backend format override for this VirtualModel entry.'), - }) - .describe( - 'Inference configuration for one model entity referenced by a VirtualModel.' - ) - ) - .optional(), - request_middleware: zod - .array( - zod - .object({ - name: zod.string(), - config_type: zod.string(), - config: zod.record(zod.string(), zod.unknown()).optional(), - config_id: zod.string().optional(), - }) - .describe( - 'One entry in a VirtualModel middleware pipeline.\n\nDeclares which plugin to invoke and how to resolve its configuration.\nExactly one of ``config`` (inline dict) or ``config_id`` (entity reference)\nshould be provided. ``config_type`` is always required regardless of which\nis used — it is the discriminator that tells IGW (and the plugin) which\nconfig schema applies.\n\nAttributes:\n name: The entry-point key of the plugin to invoke\n (e.g. ``\"nemo-switchyard\"``). Must match the plugin\'s\n ``nemo.inference_middleware`` entry-point key.\n config_type: Always required. Maps to the ``entity_type`` of the plugin\'s\n config ``NemoEntity`` subclass (e.g. ``\"routellm_config\"``). Used by\n IGW to call :meth:`~NemoInferenceMiddleware.validate_middleware_config`\n with the right discriminator, and by the plugin to dispatch to the\n correct schema when it supports multiple config types.\n config: Inline config dict. Mutually exclusive with ``config_id``.\n config_id: ``\"workspace\/name\"`` reference to a stored config entity.\n Mutually exclusive with ``config``. IGW resolves this by calling\n :meth:`~NemoInferenceMiddleware.get_middleware_config` on the plugin.' - ) - ) - .default(listVirtualModelsResponseDataItemRequestMiddlewareDefault), - response_middleware: zod - .array( - zod - .object({ - name: zod.string(), - config_type: zod.string(), - config: zod.record(zod.string(), zod.unknown()).optional(), - config_id: zod.string().optional(), - }) - .describe( - 'One entry in a VirtualModel middleware pipeline.\n\nDeclares which plugin to invoke and how to resolve its configuration.\nExactly one of ``config`` (inline dict) or ``config_id`` (entity reference)\nshould be provided. ``config_type`` is always required regardless of which\nis used — it is the discriminator that tells IGW (and the plugin) which\nconfig schema applies.\n\nAttributes:\n name: The entry-point key of the plugin to invoke\n (e.g. ``\"nemo-switchyard\"``). Must match the plugin\'s\n ``nemo.inference_middleware`` entry-point key.\n config_type: Always required. Maps to the ``entity_type`` of the plugin\'s\n config ``NemoEntity`` subclass (e.g. ``\"routellm_config\"``). Used by\n IGW to call :meth:`~NemoInferenceMiddleware.validate_middleware_config`\n with the right discriminator, and by the plugin to dispatch to the\n correct schema when it supports multiple config types.\n config: Inline config dict. Mutually exclusive with ``config_id``.\n config_id: ``\"workspace\/name\"`` reference to a stored config entity.\n Mutually exclusive with ``config``. IGW resolves this by calling\n :meth:`~NemoInferenceMiddleware.get_middleware_config` on the plugin.' - ) - ) - .default(listVirtualModelsResponseDataItemResponseMiddlewareDefault), - post_response_middleware: zod - .array( - zod - .object({ - name: zod.string(), - config_type: zod.string(), - config: zod.record(zod.string(), zod.unknown()).optional(), - config_id: zod.string().optional(), - }) - .describe( - 'One entry in a VirtualModel middleware pipeline.\n\nDeclares which plugin to invoke and how to resolve its configuration.\nExactly one of ``config`` (inline dict) or ``config_id`` (entity reference)\nshould be provided. ``config_type`` is always required regardless of which\nis used — it is the discriminator that tells IGW (and the plugin) which\nconfig schema applies.\n\nAttributes:\n name: The entry-point key of the plugin to invoke\n (e.g. ``\"nemo-switchyard\"``). Must match the plugin\'s\n ``nemo.inference_middleware`` entry-point key.\n config_type: Always required. Maps to the ``entity_type`` of the plugin\'s\n config ``NemoEntity`` subclass (e.g. ``\"routellm_config\"``). Used by\n IGW to call :meth:`~NemoInferenceMiddleware.validate_middleware_config`\n with the right discriminator, and by the plugin to dispatch to the\n correct schema when it supports multiple config types.\n config: Inline config dict. Mutually exclusive with ``config_id``.\n config_id: ``\"workspace\/name\"`` reference to a stored config entity.\n Mutually exclusive with ``config``. IGW resolves this by calling\n :meth:`~NemoInferenceMiddleware.get_middleware_config` on the plugin.' - ) - ) - .default(listVirtualModelsResponseDataItemPostResponseMiddlewareDefault), - override_proxy: zod.string().optional(), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe( - 'Logical inference route.\n\nMaps a user-facing model name to an optional default model entity and\ndefines ordered middleware pipelines for the request, response, and\npost-response phases.\n\nWhen a caller sets ``model: \"workspace\/my-virtual-model\"`` in an inference\nrequest, IGW resolves the ``VirtualModel`` instead of a ``ModelEntity``\ndirectly. If ``default_model_entity`` is set, IGW writes it into\n``request[\"model\"]`` before the request middleware pipeline runs. Middleware\nmay mutate ``request[\"model\"]`` freely. After the pipeline completes, IGW\nreads ``request[\"model\"]``, resolves it to a ``ModelProvider`` via the\n``ModelCache``, and proxies.\n\nThe ``ModelProviderReconciler`` auto-creates a passthrough ``VirtualModel``\nfor each discovered model (same workspace and name as the ``ModelEntity``,\nempty middleware lists, ``default_model_entity`` pointing to that entity).\nAll existing inference requests continue to work without changes.' - ) - ), - pagination: zod - .object({ - page: zod.number().describe('The current page number.'), - page_size: zod.number().describe('The page size used for the query.'), - current_page_size: zod.number().describe('The size for the current page.'), - total_pages: zod.number().describe('The total number of pages.'), - total_results: zod.number().describe('The total number of results.'), - }) - .optional() - .describe('Pagination information.'), - sort: zod.string().optional().describe('The field on which the results are sorted.'), - filter: zod.record(zod.string(), zod.unknown()).optional().describe('Filtering information.'), -}); - -/** - * Get a VirtualModel by workspace and name. - * @summary Get VirtualModel - */ -export const GetVirtualModelParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const getVirtualModelResponseNameDefault = ``; -export const getVirtualModelResponseWorkspaceRegExp = new RegExp('^[\\w\\-\\+.@:]+$'); -export const getVirtualModelResponseAutoprovisionedDefault = false; -export const getVirtualModelResponseRequestMiddlewareDefault = []; -export const getVirtualModelResponseResponseMiddlewareDefault = []; -export const getVirtualModelResponsePostResponseMiddlewareDefault = []; - -export const GetVirtualModelResponse = zod - .object({ - name: zod - .string() - .default(getVirtualModelResponseNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(getVirtualModelResponseWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - default_model_entity: zod.string().optional(), - autoprovisioned: zod - .boolean() - .default(getVirtualModelResponseAutoprovisionedDefault) - .describe( - 'Marks this VirtualModel as controller-managed. The Models controller will delete it once no ModelProvider serves the matching entity. Setting this manually opts the VirtualModel into that cleanup behavior.' - ), - models: zod - .array( - zod - .object({ - model: zod.string(), - backend_format: zod - .enum(['OPENAI_CHAT', 'ANTHROPIC_MESSAGES']) - .describe( - 'Inference backend API wire formats understood by IGW and middleware plugins.' - ) - .nullish() - .describe('Optional backend format override for this VirtualModel entry.'), - }) - .describe('Inference configuration for one model entity referenced by a VirtualModel.') - ) - .optional(), - request_middleware: zod - .array( - zod - .object({ - name: zod.string(), - config_type: zod.string(), - config: zod.record(zod.string(), zod.unknown()).optional(), - config_id: zod.string().optional(), - }) - .describe( - 'One entry in a VirtualModel middleware pipeline.\n\nDeclares which plugin to invoke and how to resolve its configuration.\nExactly one of ``config`` (inline dict) or ``config_id`` (entity reference)\nshould be provided. ``config_type`` is always required regardless of which\nis used — it is the discriminator that tells IGW (and the plugin) which\nconfig schema applies.\n\nAttributes:\n name: The entry-point key of the plugin to invoke\n (e.g. ``\"nemo-switchyard\"``). Must match the plugin\'s\n ``nemo.inference_middleware`` entry-point key.\n config_type: Always required. Maps to the ``entity_type`` of the plugin\'s\n config ``NemoEntity`` subclass (e.g. ``\"routellm_config\"``). Used by\n IGW to call :meth:`~NemoInferenceMiddleware.validate_middleware_config`\n with the right discriminator, and by the plugin to dispatch to the\n correct schema when it supports multiple config types.\n config: Inline config dict. Mutually exclusive with ``config_id``.\n config_id: ``\"workspace\/name\"`` reference to a stored config entity.\n Mutually exclusive with ``config``. IGW resolves this by calling\n :meth:`~NemoInferenceMiddleware.get_middleware_config` on the plugin.' - ) - ) - .default(getVirtualModelResponseRequestMiddlewareDefault), - response_middleware: zod - .array( - zod - .object({ - name: zod.string(), - config_type: zod.string(), - config: zod.record(zod.string(), zod.unknown()).optional(), - config_id: zod.string().optional(), - }) - .describe( - 'One entry in a VirtualModel middleware pipeline.\n\nDeclares which plugin to invoke and how to resolve its configuration.\nExactly one of ``config`` (inline dict) or ``config_id`` (entity reference)\nshould be provided. ``config_type`` is always required regardless of which\nis used — it is the discriminator that tells IGW (and the plugin) which\nconfig schema applies.\n\nAttributes:\n name: The entry-point key of the plugin to invoke\n (e.g. ``\"nemo-switchyard\"``). Must match the plugin\'s\n ``nemo.inference_middleware`` entry-point key.\n config_type: Always required. Maps to the ``entity_type`` of the plugin\'s\n config ``NemoEntity`` subclass (e.g. ``\"routellm_config\"``). Used by\n IGW to call :meth:`~NemoInferenceMiddleware.validate_middleware_config`\n with the right discriminator, and by the plugin to dispatch to the\n correct schema when it supports multiple config types.\n config: Inline config dict. Mutually exclusive with ``config_id``.\n config_id: ``\"workspace\/name\"`` reference to a stored config entity.\n Mutually exclusive with ``config``. IGW resolves this by calling\n :meth:`~NemoInferenceMiddleware.get_middleware_config` on the plugin.' - ) - ) - .default(getVirtualModelResponseResponseMiddlewareDefault), - post_response_middleware: zod - .array( - zod - .object({ - name: zod.string(), - config_type: zod.string(), - config: zod.record(zod.string(), zod.unknown()).optional(), - config_id: zod.string().optional(), - }) - .describe( - 'One entry in a VirtualModel middleware pipeline.\n\nDeclares which plugin to invoke and how to resolve its configuration.\nExactly one of ``config`` (inline dict) or ``config_id`` (entity reference)\nshould be provided. ``config_type`` is always required regardless of which\nis used — it is the discriminator that tells IGW (and the plugin) which\nconfig schema applies.\n\nAttributes:\n name: The entry-point key of the plugin to invoke\n (e.g. ``\"nemo-switchyard\"``). Must match the plugin\'s\n ``nemo.inference_middleware`` entry-point key.\n config_type: Always required. Maps to the ``entity_type`` of the plugin\'s\n config ``NemoEntity`` subclass (e.g. ``\"routellm_config\"``). Used by\n IGW to call :meth:`~NemoInferenceMiddleware.validate_middleware_config`\n with the right discriminator, and by the plugin to dispatch to the\n correct schema when it supports multiple config types.\n config: Inline config dict. Mutually exclusive with ``config_id``.\n config_id: ``\"workspace\/name\"`` reference to a stored config entity.\n Mutually exclusive with ``config``. IGW resolves this by calling\n :meth:`~NemoInferenceMiddleware.get_middleware_config` on the plugin.' - ) - ) - .default(getVirtualModelResponsePostResponseMiddlewareDefault), - override_proxy: zod.string().optional(), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe( - 'Logical inference route.\n\nMaps a user-facing model name to an optional default model entity and\ndefines ordered middleware pipelines for the request, response, and\npost-response phases.\n\nWhen a caller sets ``model: \"workspace\/my-virtual-model\"`` in an inference\nrequest, IGW resolves the ``VirtualModel`` instead of a ``ModelEntity``\ndirectly. If ``default_model_entity`` is set, IGW writes it into\n``request[\"model\"]`` before the request middleware pipeline runs. Middleware\nmay mutate ``request[\"model\"]`` freely. After the pipeline completes, IGW\nreads ``request[\"model\"]``, resolves it to a ``ModelProvider`` via the\n``ModelCache``, and proxies.\n\nThe ``ModelProviderReconciler`` auto-creates a passthrough ``VirtualModel``\nfor each discovered model (same workspace and name as the ``ModelEntity``,\nempty middleware lists, ``default_model_entity`` pointing to that entity).\nAll existing inference requests continue to work without changes.' - ); - -/** - * Partially update a VirtualModel. - -Only fields present in the request body are modified. Fields absent from -the request body retain their current values. - * @summary Update VirtualModel - */ -export const UpdateVirtualModelParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); - -export const updateVirtualModelBodyAutoprovisionedDefault = false; - -export const UpdateVirtualModelBody = zod - .object({ - default_model_entity: zod - .string() - .optional() - .describe( - 'Model entity to route to, in \"workspace\/name\" format. Written into request[\"model\"] before the request middleware pipeline runs. If omitted, a request middleware plugin must handle backend routing itself. Set to null to clear an existing value.' - ), - autoprovisioned: zod - .boolean() - .default(updateVirtualModelBodyAutoprovisionedDefault) - .describe( - 'Marks this VirtualModel as controller-managed. The Models controller will delete it once no ModelProvider serves the matching entity. Setting this manually opts the VirtualModel into that cleanup behavior.' - ), - models: zod - .array( - zod - .object({ - model: zod.string(), - backend_format: zod - .enum(['OPENAI_CHAT', 'ANTHROPIC_MESSAGES']) - .describe( - 'Inference backend API wire formats understood by IGW and middleware plugins.' - ) - .nullish() - .describe('Optional backend format override for this VirtualModel entry.'), - }) - .describe('Inference configuration for one model entity referenced by a VirtualModel.') - ) - .optional() - .describe( - 'Model entity references used by this VirtualModel. A per-entry backend_format overrides the referenced ModelEntity backend_format when IGW resolves the backend format for a request.' - ), - request_middleware: zod - .array( - zod - .object({ - name: zod.string(), - config_type: zod.string(), - config: zod.record(zod.string(), zod.unknown()).optional(), - config_id: zod.string().optional(), - }) - .describe( - 'One entry in a VirtualModel middleware pipeline.\n\nDeclares which plugin to invoke and how to resolve its configuration.\nExactly one of ``config`` (inline dict) or ``config_id`` (entity reference)\nshould be provided. ``config_type`` is always required regardless of which\nis used — it is the discriminator that tells IGW (and the plugin) which\nconfig schema applies.\n\nAttributes:\n name: The entry-point key of the plugin to invoke\n (e.g. ``\"nemo-switchyard\"``). Must match the plugin\'s\n ``nemo.inference_middleware`` entry-point key.\n config_type: Always required. Maps to the ``entity_type`` of the plugin\'s\n config ``NemoEntity`` subclass (e.g. ``\"routellm_config\"``). Used by\n IGW to call :meth:`~NemoInferenceMiddleware.validate_middleware_config`\n with the right discriminator, and by the plugin to dispatch to the\n correct schema when it supports multiple config types.\n config: Inline config dict. Mutually exclusive with ``config_id``.\n config_id: ``\"workspace\/name\"`` reference to a stored config entity.\n Mutually exclusive with ``config``. IGW resolves this by calling\n :meth:`~NemoInferenceMiddleware.get_middleware_config` on the plugin.' - ) - ) - .optional() - .describe( - 'Ordered list of middleware plugins applied before proxying to the backend. Each entry is a MiddlewareCall with a \"name\" (plugin identifier) and optional \"config_type\" and \"config_id\" fields that reference a stored plugin configuration.' - ), - response_middleware: zod - .array( - zod - .object({ - name: zod.string(), - config_type: zod.string(), - config: zod.record(zod.string(), zod.unknown()).optional(), - config_id: zod.string().optional(), - }) - .describe( - 'One entry in a VirtualModel middleware pipeline.\n\nDeclares which plugin to invoke and how to resolve its configuration.\nExactly one of ``config`` (inline dict) or ``config_id`` (entity reference)\nshould be provided. ``config_type`` is always required regardless of which\nis used — it is the discriminator that tells IGW (and the plugin) which\nconfig schema applies.\n\nAttributes:\n name: The entry-point key of the plugin to invoke\n (e.g. ``\"nemo-switchyard\"``). Must match the plugin\'s\n ``nemo.inference_middleware`` entry-point key.\n config_type: Always required. Maps to the ``entity_type`` of the plugin\'s\n config ``NemoEntity`` subclass (e.g. ``\"routellm_config\"``). Used by\n IGW to call :meth:`~NemoInferenceMiddleware.validate_middleware_config`\n with the right discriminator, and by the plugin to dispatch to the\n correct schema when it supports multiple config types.\n config: Inline config dict. Mutually exclusive with ``config_id``.\n config_id: ``\"workspace\/name\"`` reference to a stored config entity.\n Mutually exclusive with ``config``. IGW resolves this by calling\n :meth:`~NemoInferenceMiddleware.get_middleware_config` on the plugin.' - ) - ) - .optional() - .describe( - 'Ordered list of middleware plugins applied after the backend response is received, before returning it to the caller.' - ), - post_response_middleware: zod - .array( - zod - .object({ - name: zod.string(), - config_type: zod.string(), - config: zod.record(zod.string(), zod.unknown()).optional(), - config_id: zod.string().optional(), - }) - .describe( - 'One entry in a VirtualModel middleware pipeline.\n\nDeclares which plugin to invoke and how to resolve its configuration.\nExactly one of ``config`` (inline dict) or ``config_id`` (entity reference)\nshould be provided. ``config_type`` is always required regardless of which\nis used — it is the discriminator that tells IGW (and the plugin) which\nconfig schema applies.\n\nAttributes:\n name: The entry-point key of the plugin to invoke\n (e.g. ``\"nemo-switchyard\"``). Must match the plugin\'s\n ``nemo.inference_middleware`` entry-point key.\n config_type: Always required. Maps to the ``entity_type`` of the plugin\'s\n config ``NemoEntity`` subclass (e.g. ``\"routellm_config\"``). Used by\n IGW to call :meth:`~NemoInferenceMiddleware.validate_middleware_config`\n with the right discriminator, and by the plugin to dispatch to the\n correct schema when it supports multiple config types.\n config: Inline config dict. Mutually exclusive with ``config_id``.\n config_id: ``\"workspace\/name\"`` reference to a stored config entity.\n Mutually exclusive with ``config``. IGW resolves this by calling\n :meth:`~NemoInferenceMiddleware.get_middleware_config` on the plugin.' - ) - ) - .optional() - .describe( - 'Ordered list of middleware plugins invoked after the response has been returned to the caller. Intended for fire-and-forget work (logging, analytics) that must not block or modify the response.' - ), - override_proxy: zod - .string() - .optional() - .describe( - 'Plugin-provided proxy implementation for IGW to use instead of its default aiohttp proxy. Format: \"plugin-name.proxy-name\". Leave unset to use the default IGW proxy. Set to null to clear an existing value.' - ), - }) - .describe( - 'Request body for partially updating an existing VirtualModel (PATCH).\n\nOnly fields present in the request body are updated. Omitted fields\nretain their current values. ``model_fields_set`` is used in the handler\nto distinguish an intentional ``[]`` (clear the list) from a missing field\n(leave unchanged). Set ``default_model_entity`` or ``override_proxy`` to\n``null`` explicitly to clear them.' - ); - -export const updateVirtualModelResponseNameDefault = ``; -export const updateVirtualModelResponseWorkspaceRegExp = new RegExp('^[\\w\\-\\+.@:]+$'); -export const updateVirtualModelResponseAutoprovisionedDefault = false; -export const updateVirtualModelResponseRequestMiddlewareDefault = []; -export const updateVirtualModelResponseResponseMiddlewareDefault = []; -export const updateVirtualModelResponsePostResponseMiddlewareDefault = []; - -export const UpdateVirtualModelResponse = zod - .object({ - name: zod - .string() - .default(updateVirtualModelResponseNameDefault) - .describe('Entity name within the workspace'), - workspace: zod - .string() - .regex(updateVirtualModelResponseWorkspaceRegExp) - .describe('Workspace identifier'), - project: zod - .string() - .optional() - .describe('The name of the project associated with this entity.'), - default_model_entity: zod.string().optional(), - autoprovisioned: zod - .boolean() - .default(updateVirtualModelResponseAutoprovisionedDefault) - .describe( - 'Marks this VirtualModel as controller-managed. The Models controller will delete it once no ModelProvider serves the matching entity. Setting this manually opts the VirtualModel into that cleanup behavior.' - ), - models: zod - .array( - zod - .object({ - model: zod.string(), - backend_format: zod - .enum(['OPENAI_CHAT', 'ANTHROPIC_MESSAGES']) - .describe( - 'Inference backend API wire formats understood by IGW and middleware plugins.' - ) - .nullish() - .describe('Optional backend format override for this VirtualModel entry.'), - }) - .describe('Inference configuration for one model entity referenced by a VirtualModel.') - ) - .optional(), - request_middleware: zod - .array( - zod - .object({ - name: zod.string(), - config_type: zod.string(), - config: zod.record(zod.string(), zod.unknown()).optional(), - config_id: zod.string().optional(), - }) - .describe( - 'One entry in a VirtualModel middleware pipeline.\n\nDeclares which plugin to invoke and how to resolve its configuration.\nExactly one of ``config`` (inline dict) or ``config_id`` (entity reference)\nshould be provided. ``config_type`` is always required regardless of which\nis used — it is the discriminator that tells IGW (and the plugin) which\nconfig schema applies.\n\nAttributes:\n name: The entry-point key of the plugin to invoke\n (e.g. ``\"nemo-switchyard\"``). Must match the plugin\'s\n ``nemo.inference_middleware`` entry-point key.\n config_type: Always required. Maps to the ``entity_type`` of the plugin\'s\n config ``NemoEntity`` subclass (e.g. ``\"routellm_config\"``). Used by\n IGW to call :meth:`~NemoInferenceMiddleware.validate_middleware_config`\n with the right discriminator, and by the plugin to dispatch to the\n correct schema when it supports multiple config types.\n config: Inline config dict. Mutually exclusive with ``config_id``.\n config_id: ``\"workspace\/name\"`` reference to a stored config entity.\n Mutually exclusive with ``config``. IGW resolves this by calling\n :meth:`~NemoInferenceMiddleware.get_middleware_config` on the plugin.' - ) - ) - .default(updateVirtualModelResponseRequestMiddlewareDefault), - response_middleware: zod - .array( - zod - .object({ - name: zod.string(), - config_type: zod.string(), - config: zod.record(zod.string(), zod.unknown()).optional(), - config_id: zod.string().optional(), - }) - .describe( - 'One entry in a VirtualModel middleware pipeline.\n\nDeclares which plugin to invoke and how to resolve its configuration.\nExactly one of ``config`` (inline dict) or ``config_id`` (entity reference)\nshould be provided. ``config_type`` is always required regardless of which\nis used — it is the discriminator that tells IGW (and the plugin) which\nconfig schema applies.\n\nAttributes:\n name: The entry-point key of the plugin to invoke\n (e.g. ``\"nemo-switchyard\"``). Must match the plugin\'s\n ``nemo.inference_middleware`` entry-point key.\n config_type: Always required. Maps to the ``entity_type`` of the plugin\'s\n config ``NemoEntity`` subclass (e.g. ``\"routellm_config\"``). Used by\n IGW to call :meth:`~NemoInferenceMiddleware.validate_middleware_config`\n with the right discriminator, and by the plugin to dispatch to the\n correct schema when it supports multiple config types.\n config: Inline config dict. Mutually exclusive with ``config_id``.\n config_id: ``\"workspace\/name\"`` reference to a stored config entity.\n Mutually exclusive with ``config``. IGW resolves this by calling\n :meth:`~NemoInferenceMiddleware.get_middleware_config` on the plugin.' - ) - ) - .default(updateVirtualModelResponseResponseMiddlewareDefault), - post_response_middleware: zod - .array( - zod - .object({ - name: zod.string(), - config_type: zod.string(), - config: zod.record(zod.string(), zod.unknown()).optional(), - config_id: zod.string().optional(), - }) - .describe( - 'One entry in a VirtualModel middleware pipeline.\n\nDeclares which plugin to invoke and how to resolve its configuration.\nExactly one of ``config`` (inline dict) or ``config_id`` (entity reference)\nshould be provided. ``config_type`` is always required regardless of which\nis used — it is the discriminator that tells IGW (and the plugin) which\nconfig schema applies.\n\nAttributes:\n name: The entry-point key of the plugin to invoke\n (e.g. ``\"nemo-switchyard\"``). Must match the plugin\'s\n ``nemo.inference_middleware`` entry-point key.\n config_type: Always required. Maps to the ``entity_type`` of the plugin\'s\n config ``NemoEntity`` subclass (e.g. ``\"routellm_config\"``). Used by\n IGW to call :meth:`~NemoInferenceMiddleware.validate_middleware_config`\n with the right discriminator, and by the plugin to dispatch to the\n correct schema when it supports multiple config types.\n config: Inline config dict. Mutually exclusive with ``config_id``.\n config_id: ``\"workspace\/name\"`` reference to a stored config entity.\n Mutually exclusive with ``config``. IGW resolves this by calling\n :meth:`~NemoInferenceMiddleware.get_middleware_config` on the plugin.' - ) - ) - .default(updateVirtualModelResponsePostResponseMiddlewareDefault), - override_proxy: zod.string().optional(), - id: zod.string(), - created_at: zod.string().datetime({}), - created_by: zod.string().nullable(), - updated_at: zod.string().datetime({}), - updated_by: zod.string().nullable(), - entity_id: zod.string().describe('Alias for id for backwards compatibility.'), - parent: zod.string().describe('Parent entity ID for nested entities.'), - }) - .describe( - 'Logical inference route.\n\nMaps a user-facing model name to an optional default model entity and\ndefines ordered middleware pipelines for the request, response, and\npost-response phases.\n\nWhen a caller sets ``model: \"workspace\/my-virtual-model\"`` in an inference\nrequest, IGW resolves the ``VirtualModel`` instead of a ``ModelEntity``\ndirectly. If ``default_model_entity`` is set, IGW writes it into\n``request[\"model\"]`` before the request middleware pipeline runs. Middleware\nmay mutate ``request[\"model\"]`` freely. After the pipeline completes, IGW\nreads ``request[\"model\"]``, resolves it to a ``ModelProvider`` via the\n``ModelCache``, and proxies.\n\nThe ``ModelProviderReconciler`` auto-creates a passthrough ``VirtualModel``\nfor each discovered model (same workspace and name as the ``ModelEntity``,\nempty middleware lists, ``default_model_entity`` pointing to that entity).\nAll existing inference requests continue to work without changes.' - ); - -/** - * Permanently delete a VirtualModel. - -This does not affect any in-flight requests already being routed through -this VirtualModel. IGW's model cache is refreshed on its next polling cycle. - * @summary Delete VirtualModel - */ -export const DeleteVirtualModelParams = zod.object({ - workspace: zod.string(), - name: zod.string(), -}); diff --git a/web/packages/sdk/package.json b/web/packages/sdk/package.json index a22939a0b4..2005c034dc 100644 --- a/web/packages/sdk/package.json +++ b/web/packages/sdk/package.json @@ -6,6 +6,7 @@ "scripts": { "gen": "tsx ./orval/generate.ts", "gen:all": "tsx ./generateAll.ts", + "gen:all-force": "tsx ./generateAll.ts --force", "gen:agents": "tsx ./orval/generate.ts agents", "gen:agents-zod": "ORVAL_CLIENT=zod tsx ./orval/generate.ts agents", "gen:customizer": "tsx ./orval/generate.ts customizer",