import { ScorerConfig, ScorerDefaults, ScorerTypes, ModelType, ChainPollTemplate, OutputType, InputType, ValidateRegisteredScorerResult, createScorerOptions, ScorerResponse, ListScorersResponse, BaseScorerVersionResponse, DeleteScorerResponse } from '../types/scorer.types'; import { CollaboratorUpdate, ListUserCollaboratorsResponse, ProjectCreateOptions, ProjectCreateResponse, ProjectDeleteResponse, ProjectTypes, UserCollaborator, UserCollaboratorCreate } from '../types/project.types'; import { BaseClient } from './base-client'; import { SessionCreateResponse } from '../types/logging/session.types'; import { ExtendedTraceRecordWithChildren, ExtendedSpanRecord, ExtendedSessionRecordWithChildren, LogTraceUpdateRequest, LogTraceUpdateResponse, LogSpanUpdateRequest, LogSpanUpdateResponse, LogSpansIngestRequest, LogSpansIngestResponse, LogRecordsDeleteRequest, LogRecordsDeleteResponse, LogRecordsQueryCountRequest, LogRecordsQueryCountResponse, LogRecordsAvailableColumnsRequest, LogRecordsAvailableColumnsResponse, RecomputeLogRecordsMetricsRequest, AggregatedTraceViewRequest, AggregatedTraceViewResponse, LogTracesIngestRequest, LogTracesIngestResponse, Trace } from '../types/logging/trace.types'; import type { ExperimentUpdateRequest, ExperimentMetricsRequest, ExperimentMetricsResponse, ListExperimentResponse, ExperimentsAvailableColumnsResponse } from '../types/experiment.types'; import { SyntheticDatasetExtensionRequest, SyntheticDatasetExtensionResponse, JobProgress, ListDatasetProjectsResponse, ListDatasetResponse, ListDatasetParams, DatasetFormat, DatasetDBType } from '../types/dataset.types'; import { CreateJobResponse, ExperimentDatasetRequest, PromptRunSettings, ExperimentResponseType, RunTagDB } from '../types/experiment.types'; import { RenderTemplateRequest, RenderTemplateResponse, GlobalPromptTemplateListOptions, ListPromptTemplateResponse } from '../types/prompt-template.types'; import { JobDbType, TaskType } from '../types/job.types'; import { Message } from '../types/message.types'; import { StepType } from '../types/logging/step.types'; import { LogRecordsExportRequest } from '../types/export.types'; import { LogRecordsQueryRequest, LogRecordsQueryResponse } from '../types/shared.types'; import { LogRecordsMetricsQueryRequest, LogRecordsMetricsResponse } from '../types/metrics.types'; import { SegmentFilter, RunScorerSettingsResponse } from '../types/runs.types'; import { type DatasetAppendRow } from 'galileo-generated'; export declare class GalileoApiClientParams { projectType: ProjectTypes; projectName?: string; projectId?: string; logStreamName?: string; logStreamId?: string; runId?: string; datasetId?: string; experimentId?: string; sessionId?: string; projectScoped: boolean; forceInit: boolean; } export declare class GalileoApiClient extends BaseClient { projectType: ProjectTypes; projectId: string; logStreamId: string; runId: string; datasetId: string; experimentId: string; sessionId?: string; projectScoped: boolean; private jobsService?; private jobProgressService?; private authService?; private projectService?; private logStreamService?; private promptTemplateService?; private globalPromptTemplateService?; private globalProjectService?; private datasetService?; private traceService?; private experimentService?; private experimentTagsService?; private scorerService?; private exportService?; private runsService?; static timestampRecord: number; init(params?: Partial): Promise; /** * Utility function to ensure the Galileo client is initialized. * Checks if the client is already initialized before calling init() to avoid redundant initialization. * A client is considered initialized if it has: * - A projectId (non-empty string) OR is not projectScoped * - Either logStreamId or experimentId set (non-empty string) * * @param client - The GalileoApiClient instance to initialize * @param params - Parameters for client initialization * @returns Promise that resolves when client is initialized */ private _isClientInitialized; static getTimestampRecord(): Date; /** * Lists projects available to the authenticated user. * @param projectType - (Optional) Project type filter for the request. * @returns A promise that resolves to the accessible projects. */ getProjects(projectType?: ProjectTypes): Promise<{ id: string; permissions?: { action: "update" | "delete" | "share" | "record_annotation" | "export" | "rename" | "list_members" | "join" | "request_to_join" | "update_role" | "delete_log_data" | "read_settings" | "update_settings" | "read_api_keys" | "change_role_to_admin" | "change_role_to_manager" | "change_role_to_user" | "change_role_to_read_only" | "create_run" | "delete_run" | "rename_run" | "move_run" | "export_data" | "configure_human_feedback" | "record_human_feedback" | "log_data" | "toggle_metric" | "edit_alert" | "create_stage" | "edit_stage" | "configure_crown_logic" | "delete_data" | "set_metric" | "edit_run_tags" | "dismiss_alert" | "edit_slice" | "edit_edit"; allowed: boolean; message?: string | null | undefined; }[] | undefined; name?: string | null | undefined; createdBy: string; type?: "prompt_evaluation" | "llm_monitor" | "gen_ai" | "protect" | null | undefined; createdByUser: { id: string; email: string; firstName?: string | null | undefined; lastName?: string | null | undefined; }; runs: { name?: string | null | undefined; projectId?: string | null | undefined; createdBy: string; numSamples: number; winner: boolean; datasetHash?: string | null | undefined; datasetVersionId?: string | null | undefined; id: string; createdAt: string; updatedAt: string; taskType?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | null | undefined; lastUpdatedBy: string; runTags?: { key: string; value: string; tagType: string; projectId: string; runId: string; createdBy: string; id: string; createdAt: string; updatedAt: string; }[] | undefined; exampleContentId?: string | null | undefined; creator: { id: string; permissions?: { action: "update" | "delete" | "share" | "record_annotation" | "export" | "rename" | "list_members" | "join" | "request_to_join" | "update_role" | "delete_log_data" | "read_settings" | "update_settings" | "read_api_keys" | "change_role_to_admin" | "change_role_to_manager" | "change_role_to_user" | "change_role_to_read_only" | "create_run" | "delete_run" | "rename_run" | "move_run" | "export_data" | "configure_human_feedback" | "record_human_feedback" | "log_data" | "toggle_metric" | "edit_alert" | "create_stage" | "edit_stage" | "configure_crown_logic" | "delete_data" | "set_metric" | "edit_run_tags" | "dismiss_alert" | "edit_slice" | "edit_edit"; allowed: boolean; message?: string | null | undefined; }[] | undefined; email: string; firstName?: string | null | undefined; lastName?: string | null | undefined; authMethod?: "email" | "google" | "github" | "okta" | "azure-ad" | "custom" | "saml" | "invite" | undefined; role?: "user" | "admin" | "manager" | "read_only" | undefined; emailIsVerified?: boolean | null | undefined; organizationId: string; organizationName: string; createdAt: string; updatedAt: string; }; loggedSplits: string[]; loggedInferenceNames: string[]; }[]; createdAt: string; updatedAt: string; bookmark?: boolean | undefined; description?: string | null | undefined; labels?: "sample"[] | undefined; }[]>; /** * Gets a project by ID. * @param id - ID of the project to fetch. * @returns A promise that resolves to the matching project. */ getProject(id: string): Promise<{ id: string; permissions?: { action: "update" | "delete" | "share" | "record_annotation" | "export" | "rename" | "list_members" | "join" | "request_to_join" | "update_role" | "delete_log_data" | "read_settings" | "update_settings" | "read_api_keys" | "change_role_to_admin" | "change_role_to_manager" | "change_role_to_user" | "change_role_to_read_only" | "create_run" | "delete_run" | "rename_run" | "move_run" | "export_data" | "configure_human_feedback" | "record_human_feedback" | "log_data" | "toggle_metric" | "edit_alert" | "create_stage" | "edit_stage" | "configure_crown_logic" | "delete_data" | "set_metric" | "edit_run_tags" | "dismiss_alert" | "edit_slice" | "edit_edit"; allowed: boolean; message?: string | null | undefined; }[] | undefined; name?: string | null | undefined; createdBy: string; type?: "prompt_evaluation" | "llm_monitor" | "gen_ai" | "protect" | null | undefined; createdByUser: { id: string; email: string; firstName?: string | null | undefined; lastName?: string | null | undefined; }; runs: { name?: string | null | undefined; projectId?: string | null | undefined; createdBy: string; numSamples: number; winner: boolean; datasetHash?: string | null | undefined; datasetVersionId?: string | null | undefined; id: string; createdAt: string; updatedAt: string; taskType?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | null | undefined; lastUpdatedBy: string; runTags?: { key: string; value: string; tagType: string; projectId: string; runId: string; createdBy: string; id: string; createdAt: string; updatedAt: string; }[] | undefined; exampleContentId?: string | null | undefined; creator: { id: string; permissions?: { action: "update" | "delete" | "share" | "record_annotation" | "export" | "rename" | "list_members" | "join" | "request_to_join" | "update_role" | "delete_log_data" | "read_settings" | "update_settings" | "read_api_keys" | "change_role_to_admin" | "change_role_to_manager" | "change_role_to_user" | "change_role_to_read_only" | "create_run" | "delete_run" | "rename_run" | "move_run" | "export_data" | "configure_human_feedback" | "record_human_feedback" | "log_data" | "toggle_metric" | "edit_alert" | "create_stage" | "edit_stage" | "configure_crown_logic" | "delete_data" | "set_metric" | "edit_run_tags" | "dismiss_alert" | "edit_slice" | "edit_edit"; allowed: boolean; message?: string | null | undefined; }[] | undefined; email: string; firstName?: string | null | undefined; lastName?: string | null | undefined; authMethod?: "email" | "google" | "github" | "okta" | "azure-ad" | "custom" | "saml" | "invite" | undefined; role?: "user" | "admin" | "manager" | "read_only" | undefined; emailIsVerified?: boolean | null | undefined; organizationId: string; organizationName: string; createdAt: string; updatedAt: string; }; loggedSplits: string[]; loggedInferenceNames: string[]; }[]; createdAt: string; updatedAt: string; bookmark?: boolean | undefined; description?: string | null | undefined; labels?: "sample"[] | undefined; }>; /** * Gets a project by name. * @param name - Name of the project to fetch. * @param options - (Optional) Additional lookup options. * @param options.projectType - (Optional) Project type hint to disambiguate by name. * @returns A promise that resolves to the matching project. */ getProjectByName(name: string, options?: { projectType?: ProjectTypes | null; }): Promise<{ id: string; permissions?: { action: "update" | "delete" | "share" | "record_annotation" | "export" | "rename" | "list_members" | "join" | "request_to_join" | "update_role" | "delete_log_data" | "read_settings" | "update_settings" | "read_api_keys" | "change_role_to_admin" | "change_role_to_manager" | "change_role_to_user" | "change_role_to_read_only" | "create_run" | "delete_run" | "rename_run" | "move_run" | "export_data" | "configure_human_feedback" | "record_human_feedback" | "log_data" | "toggle_metric" | "edit_alert" | "create_stage" | "edit_stage" | "configure_crown_logic" | "delete_data" | "set_metric" | "edit_run_tags" | "dismiss_alert" | "edit_slice" | "edit_edit"; allowed: boolean; message?: string | null | undefined; }[] | undefined; name?: string | null | undefined; createdBy: string; type?: "prompt_evaluation" | "llm_monitor" | "gen_ai" | "protect" | null | undefined; createdByUser: { id: string; email: string; firstName?: string | null | undefined; lastName?: string | null | undefined; }; runs: { name?: string | null | undefined; projectId?: string | null | undefined; createdBy: string; numSamples: number; winner: boolean; datasetHash?: string | null | undefined; datasetVersionId?: string | null | undefined; id: string; createdAt: string; updatedAt: string; taskType?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | null | undefined; lastUpdatedBy: string; runTags?: { key: string; value: string; tagType: string; projectId: string; runId: string; createdBy: string; id: string; createdAt: string; updatedAt: string; }[] | undefined; exampleContentId?: string | null | undefined; creator: { id: string; permissions?: { action: "update" | "delete" | "share" | "record_annotation" | "export" | "rename" | "list_members" | "join" | "request_to_join" | "update_role" | "delete_log_data" | "read_settings" | "update_settings" | "read_api_keys" | "change_role_to_admin" | "change_role_to_manager" | "change_role_to_user" | "change_role_to_read_only" | "create_run" | "delete_run" | "rename_run" | "move_run" | "export_data" | "configure_human_feedback" | "record_human_feedback" | "log_data" | "toggle_metric" | "edit_alert" | "create_stage" | "edit_stage" | "configure_crown_logic" | "delete_data" | "set_metric" | "edit_run_tags" | "dismiss_alert" | "edit_slice" | "edit_edit"; allowed: boolean; message?: string | null | undefined; }[] | undefined; email: string; firstName?: string | null | undefined; lastName?: string | null | undefined; authMethod?: "email" | "google" | "github" | "okta" | "azure-ad" | "custom" | "saml" | "invite" | undefined; role?: "user" | "admin" | "manager" | "read_only" | undefined; emailIsVerified?: boolean | null | undefined; organizationId: string; organizationName: string; createdAt: string; updatedAt: string; }; loggedSplits: string[]; loggedInferenceNames: string[]; }[]; createdAt: string; updatedAt: string; bookmark?: boolean | undefined; description?: string | null | undefined; labels?: "sample"[] | undefined; }>; /** * Gets a project by name. * @param name - Name of the project to fetch. * @param options - (Optional) Additional lookup options. * @param options.projectType - (Optional) Project type hint to disambiguate by name. * @returns A promise that resolves to the matching project. */ getGlobalProjectByName(name: string, projectType?: ProjectTypes): Promise<{ id: string; permissions?: { action: "update" | "delete" | "share" | "record_annotation" | "export" | "rename" | "list_members" | "join" | "request_to_join" | "update_role" | "delete_log_data" | "read_settings" | "update_settings" | "read_api_keys" | "change_role_to_admin" | "change_role_to_manager" | "change_role_to_user" | "change_role_to_read_only" | "create_run" | "delete_run" | "rename_run" | "move_run" | "export_data" | "configure_human_feedback" | "record_human_feedback" | "log_data" | "toggle_metric" | "edit_alert" | "create_stage" | "edit_stage" | "configure_crown_logic" | "delete_data" | "set_metric" | "edit_run_tags" | "dismiss_alert" | "edit_slice" | "edit_edit"; allowed: boolean; message?: string | null | undefined; }[] | undefined; name?: string | null | undefined; createdBy: string; type?: "prompt_evaluation" | "llm_monitor" | "gen_ai" | "protect" | null | undefined; createdByUser: { id: string; email: string; firstName?: string | null | undefined; lastName?: string | null | undefined; }; runs: { name?: string | null | undefined; projectId?: string | null | undefined; createdBy: string; numSamples: number; winner: boolean; datasetHash?: string | null | undefined; datasetVersionId?: string | null | undefined; id: string; createdAt: string; updatedAt: string; taskType?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | null | undefined; lastUpdatedBy: string; runTags?: { key: string; value: string; tagType: string; projectId: string; runId: string; createdBy: string; id: string; createdAt: string; updatedAt: string; }[] | undefined; exampleContentId?: string | null | undefined; creator: { id: string; permissions?: { action: "update" | "delete" | "share" | "record_annotation" | "export" | "rename" | "list_members" | "join" | "request_to_join" | "update_role" | "delete_log_data" | "read_settings" | "update_settings" | "read_api_keys" | "change_role_to_admin" | "change_role_to_manager" | "change_role_to_user" | "change_role_to_read_only" | "create_run" | "delete_run" | "rename_run" | "move_run" | "export_data" | "configure_human_feedback" | "record_human_feedback" | "log_data" | "toggle_metric" | "edit_alert" | "create_stage" | "edit_stage" | "configure_crown_logic" | "delete_data" | "set_metric" | "edit_run_tags" | "dismiss_alert" | "edit_slice" | "edit_edit"; allowed: boolean; message?: string | null | undefined; }[] | undefined; email: string; firstName?: string | null | undefined; lastName?: string | null | undefined; authMethod?: "email" | "google" | "github" | "okta" | "azure-ad" | "custom" | "saml" | "invite" | undefined; role?: "user" | "admin" | "manager" | "read_only" | undefined; emailIsVerified?: boolean | null | undefined; organizationId: string; organizationName: string; createdAt: string; updatedAt: string; }; loggedSplits: string[]; loggedInferenceNames: string[]; }[]; createdAt: string; updatedAt: string; bookmark?: boolean | undefined; description?: string | null | undefined; labels?: "sample"[] | undefined; }>; /** * Gets a project ID by name. * @param name - Name of the project to resolve. * @param options - (Optional) Additional lookup options. * @param options.projectType - (Optional) Project type hint to disambiguate by name. * @returns A promise that resolves to the project ID. */ getProjectIdByName(name: string, projectType?: ProjectTypes): Promise; /** * Creates a new project. * @param name - Name of the project to create. * @param options - (Optional) Additional project creation parameters. * @param options.type - (Optional) Project type to assign. * @param options.createdBy - (Optional) Identifier of the creator. * @param options.createExampleTemplates - (Optional) Whether example templates should be created. * @returns A promise that resolves to the created project payload. */ createProject(name: string, options?: ProjectCreateOptions): Promise; /** * Deletes a project by ID. * @param projectId - ID of the project to delete. * @returns A promise that resolves to the delete response payload. */ deleteProject(projectId: string): Promise; /** * Lists project collaborators with optional pagination controls. * @param options - (Optional) Options for the list operation. * @param options.projectId - (Optional) Explicit project ID override. * @param options.startingToken - (Optional) Pagination token to start from. * @param options.limit - (Optional) Maximum collaborators to return per page. * @returns A promise that resolves to the collaborators list payload. */ listUserProjectCollaborators(options?: { projectId?: string; startingToken?: number; limit?: number; }): Promise; /** * Creates user collaborators for a project. * @param collaborators - Collaborator payloads to create. * @param projectId - (Optional) Project ID override when not using a scoped client. * @returns A promise that resolves to the created collaborators. */ createUserProjectCollaborators(collaborators: UserCollaboratorCreate[], projectId?: string): Promise; /** * Updates a user collaborator. * @param userId - ID of the collaborator to update. * @param update - Update payload describing the collaborator changes. * @param projectId - (Optional) Project ID override when not using a scoped client. * @returns A promise that resolves to the updated collaborator. */ updateUserProjectCollaborator(userId: string, update: CollaboratorUpdate, projectId?: string): Promise; /** * Removes a user collaborator from a project. * @param userId - ID of the collaborator to delete. * @param projectId - ID of the project the collaborator belongs to. * @returns A promise that resolves when the collaborator is removed. */ deleteUserProjectCollaborator(userId: string, projectId: string): Promise; /** * Lists all log streams for the project. * @returns A promise that resolves to an array of log streams. */ getLogStreams(): Promise; /** * Retrieves a log stream by ID. * @param id - The ID of the log stream to retrieve. * @returns A promise that resolves to the log stream. */ getLogStream(id: string): Promise; /** * Retrieves a log stream by name. * @param name - The name of the log stream to retrieve. * @returns A promise that resolves to the log stream. */ getLogStreamByName(name: string): Promise; /** * Creates a new log stream. * @param name - The name of the log stream to create. * @returns A promise that resolves to the created log stream. */ createLogStream(name: string): Promise; /** * Creates scorer settings for a log stream. * @param logStreamId - The ID of the log stream to configure scorers for. * @param scorers - Array of scorer configurations to apply. * @returns A promise that resolves when the scorer settings are created. */ createLogStreamScorerSettings(logStreamId: string, scorers: ScorerConfig[]): Promise; /** * Gets all datasets visible to the client. * @returns A promise that resolves to the list of datasets. */ getDatasets(limit?: number): Promise; /** * Gets a dataset by ID. * @param id - The ID of the dataset to retrieve. * @returns A promise that resolves to the dataset. */ getDataset(id: string): Promise; /** * Gets the ETag for a dataset used for optimistic concurrency control. * @param id - The ID of the dataset. * @returns A promise that resolves to the dataset ETag. */ getDatasetEtag(id: string): Promise; /** * Gets a dataset by name. * @param name - The name of the dataset to retrieve. * @returns A promise that resolves to the dataset. */ getDatasetByName(name: string): Promise; /** * @overload * Creates a new dataset with a name, file path, and format. * @param name - The name of the dataset. * @param filePath - The path to the dataset file. * @param format - The format of the dataset file. * @returns A promise that resolves to the created dataset. */ createDataset(name: string, filePath: string, format: DatasetFormat): Promise; /** * @overload * Creates a new dataset from an options object. * @param params - The options used to create the dataset. * @param params.name - The name of the dataset. * @param params.filePath - The path to the dataset file. * @param params.format - The format of the dataset file. * @param params.projectId - (Optional) The ID of the project that will use the dataset. * @returns A promise that resolves to the created dataset. */ createDataset(params: { name: string; filePath: string; format: DatasetFormat; projectId?: string; }): Promise; /** * Gets the content of a dataset. * @param datasetId - The ID of the dataset. * @returns A promise that resolves to the rows of the dataset. */ getDatasetContent(datasetId: string): Promise; /** * Deletes a dataset by ID. * @param datasetId - The ID of the dataset to delete. * @returns A promise that resolves when the dataset has been deleted. */ deleteDataset(datasetId: string): Promise; /** * Appends rows to the content of a dataset. * @param datasetId - The ID of the dataset. * @param etag - The ETag used for optimistic concurrency control. * @param rows - The rows to append to the dataset content. * @returns A promise that resolves when the rows have been appended. */ appendRowsToDatasetContent(datasetId: string, etag: string, rows: DatasetAppendRow[]): Promise; /** * Extends a dataset with synthetically generated data. * @param params - Configuration for synthetic dataset generation. * @returns A promise that resolves to the synthetic dataset extension response. */ extendDataset(params: SyntheticDatasetExtensionRequest): Promise; /** * Gets the status of a dataset extension job. * @param datasetId - The ID of the dataset being extended. * @returns A promise that resolves to the job progress. */ getExtendDatasetStatus(datasetId: string): Promise; /** * Queries datasets with filters and pagination options. * @param params - The list dataset parameters used to filter datasets. * @param query - (Optional) Pagination options for the query. * @param query.startingToken - (Optional) The starting token for pagination. * @param query.limit - (Optional) The maximum number of datasets to return. * @returns A promise that resolves to the list dataset response. */ queryDatasets(params: ListDatasetParams, query?: { startingToken?: number; limit?: number; }): Promise; /** * Gets the version history for a dataset. * @param datasetId - The ID of the dataset. * @returns A promise that resolves to the version history. */ getDatasetVersionHistory(datasetId: string): Promise; /** * Gets the content for a specific version of a dataset. * @param datasetId - The ID of the dataset. * @param versionIndex - The index of the version to retrieve. * @returns A promise that resolves to the dataset content for the specified version. */ getDatasetVersionContent(datasetId: string, versionIndex: number): Promise; /** * Lists all projects that use a dataset. * @param datasetId - The ID of the dataset. * @param limit - (Optional) The maximum number of projects to return. * @returns A promise that resolves to the list of projects that use the dataset. */ listDatasetProjects(datasetId: string, limit?: number): Promise; ingestTracesLegacy(traces: Trace[]): Promise; ingestTraces(options: LogTracesIngestRequest): Promise; createSessionLegacy({ name, previousSessionId, externalId, metadata }: { name?: string; previousSessionId?: string; externalId?: string; metadata?: Record; }): Promise; /** * Search for sessions matching the provided query criteria. * * @param request - Query request object * @param request.startingToken - (Optional) Starting token for pagination (default: 0) * @param request.limit - (Optional) Maximum number of records to return (default: 100) * @param request.previousLastRowId - (Optional) Previous last row ID for pagination * @param request.logStreamId - (Optional) Log stream ID to filter by * @param request.experimentId - (Optional) Experiment ID to filter by * @param request.metricsTestingId - (Optional) Metrics testing ID to filter by * @param request.filters - (Optional) Array of filter objects to apply * @param request.filterTree - (Optional) Complex filter tree structure * @param request.sort - (Optional) Sort clause for ordering results * @returns Promise resolving to a query response containing matching session records */ searchSessions(request: LogRecordsQueryRequest): Promise; /** * Retrieve a session by its ID, including all child traces and spans. * * @param sessionId - The unique identifier of the session to retrieve * @returns Promise resolving to the session record with its children */ getSession(sessionId: string): Promise; /** * Delete sessions matching the provided filter criteria. * * @param options - Delete request object * @param options.logStreamId - (Optional) Log stream ID to filter by * @param options.experimentId - (Optional) Experiment ID to filter by * @param options.metricsTestingId - (Optional) Metrics testing ID to filter by * @param options.filters - (Optional) Array of filter objects to identify sessions to delete * @param options.filterTree - (Optional) Complex filter tree structure * @returns Promise resolving to a response indicating the deletion operation result */ deleteSessions(options: LogRecordsDeleteRequest): Promise; /** * Retrieve a trace by its ID, including all child spans. * * @param traceId - The unique identifier of the trace to retrieve * @returns Promise resolving to the trace record with its children */ getTrace(traceId: string): Promise; /** * Update a trace with new data. * * @param options - Update request object * @param options.traceId - The unique identifier of the trace to update * @param options.logStreamId - (Optional) Log stream ID associated with the trace * @param options.experimentId - (Optional) Experiment ID associated with the trace * @param options.metricsTestingId - (Optional) Metrics testing ID associated with the trace * @param options.loggingMethod - (Optional) Logging method to use (default: 'api_direct') * @param options.clientVersion - (Optional) Client version identifier * @param options.reliable - (Optional) Whether to use reliable logging (default: false) * @param options.input - (Optional) New input value to overwrite existing input * @param options.output - (Optional) New output value to overwrite existing output * @param options.statusCode - (Optional) Status code to overwrite existing status code * @param options.tags - (Optional) Tags to add to the trace * @returns Promise resolving to the updated trace record */ updateTrace(options: LogTraceUpdateRequest): Promise; /** * Delete traces matching the provided filter criteria. * * @param options - Delete request object * @param options.logStreamId - (Optional) Log stream ID to filter by * @param options.experimentId - (Optional) Experiment ID to filter by * @param options.metricsTestingId - (Optional) Metrics testing ID to filter by * @param options.filters - (Optional) Array of filter objects to identify traces to delete * @param options.filterTree - (Optional) Complex filter tree structure * @returns Promise resolving to a response indicating the deletion operation result */ deleteTraces(options: LogRecordsDeleteRequest): Promise; /** * Ingest spans into a trace. Spans represent individual operations or steps within a trace. * * @param options - Ingest request object * @param options.spans - Array of span objects to ingest (AgentSpan, WorkflowSpan, LlmSpan, RetrieverSpan, or ToolSpan) * @param options.traceId - The unique identifier of the trace to attach spans to * @param options.parentId - The unique identifier of the parent trace or span * @param options.logStreamId - (Optional) Log stream ID associated with the spans * @param options.experimentId - (Optional) Experiment ID associated with the spans * @param options.metricsTestingId - (Optional) Metrics testing ID associated with the spans * @param options.loggingMethod - (Optional) Logging method to use (default: 'api_direct') * @param options.clientVersion - (Optional) Client version identifier * @param options.reliable - (Optional) Whether to use reliable logging (default: false) * @returns Promise resolving to a response indicating the ingestion result */ ingestSpans(options: LogSpansIngestRequest): Promise; /** * Retrieve a span by its ID. * * @param spanId - The unique identifier of the span to retrieve * @returns Promise resolving to the span record */ getSpan(spanId: string): Promise; /** * Update a span with new data. * * @param options - Update request object * @param options.spanId - The unique identifier of the span to update * @param options.logStreamId - (Optional) Log stream ID associated with the span * @param options.experimentId - (Optional) Experiment ID associated with the span * @param options.metricsTestingId - (Optional) Metrics testing ID associated with the span * @param options.loggingMethod - (Optional) Logging method to use (default: 'api_direct') * @param options.clientVersion - (Optional) Client version identifier * @param options.reliable - (Optional) Whether to use reliable logging (default: false) * @param options.input - (Optional) New input value to overwrite existing input (string or Message array) * @param options.output - (Optional) New output value to overwrite existing output (string, Message, or Document array) * @param options.tags - (Optional) Tags to add to the span * @param options.statusCode - (Optional) Status code to overwrite existing status code * @returns Promise resolving to the updated span record */ updateSpan(options: LogSpanUpdateRequest): Promise; /** * Delete spans matching the provided filter criteria. * * @param options - Delete request object * @param options.logStreamId - (Optional) Log stream ID to filter by * @param options.experimentId - (Optional) Experiment ID to filter by * @param options.metricsTestingId - (Optional) Metrics testing ID to filter by * @param options.filters - (Optional) Array of filter objects to identify spans to delete * @param options.filterTree - (Optional) Complex filter tree structure * @returns Promise resolving to a response indicating the deletion operation result */ deleteSpans(options: LogRecordsDeleteRequest): Promise; /** * Count the number of traces matching the provided query criteria. * * @param options - Count request object * @param options.logStreamId - (Optional) Log stream ID to filter by * @param options.experimentId - (Optional) Experiment ID to filter by * @param options.metricsTestingId - (Optional) Metrics testing ID to filter by * @param options.filters - (Optional) Array of filter objects to identify traces to count * @param options.filterTree - (Optional) Complex filter tree structure * @returns Promise resolving to a response containing the total count */ countTraces(options: LogRecordsQueryCountRequest): Promise; /** * Count the number of sessions matching the provided query criteria. * * @param options - Count request object * @param options.logStreamId - (Optional) Log stream ID to filter by * @param options.experimentId - (Optional) Experiment ID to filter by * @param options.metricsTestingId - (Optional) Metrics testing ID to filter by * @param options.filters - (Optional) Array of filter objects to identify sessions to count * @param options.filterTree - (Optional) Complex filter tree structure * @returns Promise resolving to a response containing the total count */ countSessions(options: LogRecordsQueryCountRequest): Promise; /** * Count the number of spans matching the provided query criteria. * * @param options - Count request object * @param options.logStreamId - (Optional) Log stream ID to filter by * @param options.experimentId - (Optional) Experiment ID to filter by * @param options.metricsTestingId - (Optional) Metrics testing ID to filter by * @param options.filters - (Optional) Array of filter objects to identify spans to count * @param options.filterTree - (Optional) Complex filter tree structure * @returns Promise resolving to a response containing the total count */ countSpans(options: LogRecordsQueryCountRequest): Promise; /** * Get the list of available columns for traces that can be used in queries and filters. * * @param options - Request object * @param options.logStreamId - (Optional) Log stream ID to get columns for * @param options.experimentId - (Optional) Experiment ID to get columns for * @param options.metricsTestingId - (Optional) Metrics testing ID to filter by * @param options.startTime - (Optional) Start time for filtering columns * @param options.endTime - (Optional) End time for filtering columns * @returns Promise resolving to a response containing the available columns */ getTracesAvailableColumns(options: LogRecordsAvailableColumnsRequest): Promise; /** * Get the list of available columns for sessions that can be used in queries and filters. * * @param options - Request object * @param options.logStreamId - (Optional) Log stream ID to get columns for * @param options.experimentId - (Optional) Experiment ID to get columns for * @param options.metricsTestingId - (Optional) Metrics testing ID to filter by * @param options.startTime - (Optional) Start time for filtering columns * @param options.endTime - (Optional) End time for filtering columns * @returns Promise resolving to a response containing the available columns */ getSessionsAvailableColumns(options: LogRecordsAvailableColumnsRequest): Promise; /** * Get the list of available columns for spans that can be used in queries and filters. * * @param options - Request object * @param options.logStreamId - (Optional) Log stream ID to get columns for * @param options.experimentId - (Optional) Experiment ID to get columns for * @param options.metricsTestingId - (Optional) Metrics testing ID to filter by * @param options.startTime - (Optional) Start time for filtering columns * @param options.endTime - (Optional) End time for filtering columns * @returns Promise resolving to a response containing the available columns */ getSpansAvailableColumns(options: LogRecordsAvailableColumnsRequest): Promise; /** * Recompute metrics for log records (traces, sessions, or spans) based on the provided filters and scorer IDs. * This triggers a background job to recalculate metrics for matching records. * * @param options - Request object * @param options.scorerIds - Array of scorer IDs for which metrics should be recomputed * @param options.logStreamId - (Optional) Log stream ID to filter by * @param options.experimentId - (Optional) Experiment ID to filter by * @param options.metricsTestingId - (Optional) Metrics testing ID to filter by * @param options.filters - (Optional) Array of filter objects to identify records for recomputation * @param options.filterTree - (Optional) Complex filter tree structure * @param options.sort - (Optional) Sort clause for ordering results * @param options.limit - (Optional) Maximum number of records to process (default: 100) * @param options.startingToken - (Optional) Starting token for pagination (default: 0) * @param options.previousLastRowId - (Optional) Previous last row ID for pagination * @param options.truncateFields - (Optional) Whether to truncate fields (default: false) * @returns Promise resolving to the recomputation job result */ recomputeMetrics(options: RecomputeLogRecordsMetricsRequest): Promise; /** * Get an aggregated view of traces, providing a graph representation of trace relationships and patterns. * * @param options - Request object * @param options.logStreamId - Log stream ID associated with the traces * @param options.filters - (Optional) Array of filter objects to apply (only trace-level filters are supported) * @returns Promise resolving to an aggregated trace view with graph data */ getAggregatedTraceView(options: AggregatedTraceViewRequest): Promise; /** * Lists prompt templates scoped to the initialized project. * * These methods operate on project-scoped templates, which are templates * that exist only within a specific project and are not shared across projects. * The client must be initialized with a project (via `init({ projectName })` * or `init({ projectId })`) before using these methods. * * **Note:** For global templates (which can be shared across projects but * can also be filtered by project), use the `getGlobalPromptTemplate*` methods * instead. The global methods (`listGlobalPromptTemplates`, `getGlobalPromptTemplate`, * etc.) support optional `projectId` and `projectName` parameters to filter * results. * * @returns A promise that resolves to an array of prompt templates * associated with the initialized project. * @throws Error if the client is not initialized with a project or if * the prompt template service is not available. */ getPromptTemplates(): Promise; /** * Retrieves a prompt template by ID from the initialized project. * * This method retrieves project-scoped templates only. For global templates * (which can also be filtered by project), use `getGlobalPromptTemplate(id)` instead. * * @param id - The unique identifier of the template to fetch. Must be * a template ID that exists within the initialized project. * @returns A promise that resolves to the prompt template payload containing * template metadata, versions, and associated information. * @throws Error if the template is not found in the project, if the client * is not initialized with a project, or if the service is unavailable. */ getPromptTemplate(id: string): Promise; /** * Retrieves a specific prompt template version by ID and version number. * * Templates can have multiple versions. This method fetches a specific * version of a project-scoped template within the initialized project. * For global templates (which can also be filtered by project), use * `getGlobalPromptTemplateVersion(id, version)` instead. * * @param id - The unique identifier of the template. * @param version - The version number to retrieve. Version numbers are * typically sequential integers starting from 1. * @returns A promise that resolves to the prompt template version payload, * including the template content, settings, and version metadata. * @throws Error if the template or version is not found in the project, * if the client is not initialized with a project, or if the service * is unavailable. */ getPromptTemplateVersion(id: string, version: number): Promise; /** * Resolves a prompt template by name and fetches the requested version. * * This method first searches for a project-scoped template by name within * the initialized project, then retrieves the specified version. If no version * is provided, it returns the currently selected version of the template. * * For global templates (which can be filtered by project using `projectId` * or `projectName` in the options), use `listGlobalPromptTemplates()` with * name filtering and project filtering, then `getGlobalPromptTemplateVersion()`. * * @param name - The name of the template to search for. The search is * performed within the scope of the initialized project. * @param version - (Optional) The version number to fetch. If not provided, * defaults to the template's selected version (typically the latest). * @returns A promise that resolves to the prompt template version payload. * @throws Error if no template with the given name is found in the project, * if the specified version doesn't exist, if the client is not initialized * with a project, or if the service is unavailable. */ getPromptTemplateVersionByName(name: string, version?: number): Promise; /** * Creates a new prompt template scoped to the initialized project. * * Creates a project-scoped prompt template that is associated with the project * the client was initialized with. * * For global templates (which can be shared across projects but can optionally * be associated with a project), use `createGlobalPromptTemplate()` instead, * which accepts optional `projectId` or `projectName` parameters. * * @param template - An array of Message objects representing the template * content. Each message should have a role (e.g., 'user', 'system', * 'assistant') and content. * @param name - A unique name to assign to the template within the project. * The name should be descriptive and follow your naming conventions. * @returns A promise that resolves to the created prompt template payload, * including the assigned ID, version information, and metadata. * @throws Error if a template with the same name already exists in the project, * if the client is not initialized with a project, if the service is * unavailable, or if the template data is invalid. */ createPromptTemplate(template: Message[], name: string): Promise; /** * Builds list request parameters for the global prompt template API. * @param options - Base list options. * @param options.nameFilter - (Optional) Name filter applied to results. * @param options.nameOperator - (Optional) Name comparison operator. * @param options.projectId - (Optional) Project ID to include in results. * @param options.excludeProjectId - (Optional) Project ID to exclude from results. * @param options.sortField - (Optional) Field used for sorting results. * @param options.ascending - (Optional) Sort direction flag. * @returns A promise that resolves to the generated list parameters. */ private buildGlobalPromptTemplateListOptions; /** * Stream records from the export endpoint. * * Defaults to the first log stream available if `logStreamId` and `experimentId` are not provided. * * Setup (validation, log stream resolution) happens immediately when this function is called. * The HTTP request is made immediately when this function is called. * Record streaming and line buffering happen when the returned AsyncIterable is iterated. * * @param params - Export parameters * @param params.rootType - The type of records to export (default: 'trace') * @param params.filters - Filters to apply to the export * @param params.sort - Sort clause to order the exported records (default: { columnId: 'created_at', ascending: false }) * @param params.exportFormat - The desired format for the exported data (default: 'jsonl') * @param params.logStreamId - Filter records by a specific log stream ID * @param params.experimentId - Filter records by a specific experiment ID * @param params.columnIds - Column IDs to include in the export * @param params.redact - Redact sensitive data from the response (default: true) * @param params.metricsTestingId - Metrics testing ID associated with the traces * @returns A Promise that resolves to an AsyncIterable that yields records based on the export format. * - For JSONL format: Each record is a `string` containing a complete JSONL line (JSON object as string with trailing newline) * - For JSON format: Each record is a `Record` (parsed JSON object) * - For CSV format: Each record is a `string` containing a complete CSV line (with trailing newline) */ exportRecords(options: LogRecordsExportRequest): Promise>>; /** * Creates a global prompt template, optionally resolving a project by ID or name. * * If both `projectId` and `projectName` are provided, an error will be thrown. * Only one of these parameters should be specified. * * @param template - Template messages stored in the template. * @param name - Name assigned to the template. * @param options - (Optional) Project scoping information. * @param options.projectId - (Optional) Project ID to associate with the template. * @param options.projectName - (Optional) Project name to resolve to an ID. * @returns A promise that resolves to the created template payload. */ createGlobalPromptTemplate(template: Message[], name: string, options?: { projectId?: string | null; projectName?: string; }): Promise; /** * Lists global prompt templates using name filter, limit, and pagination token. * * @overload * @param nameFilter - Template name filter. Filters templates by name containing this string. * @param limit - Maximum number of templates to fetch per page. * @param startingToken - Pagination starting token (default: 0 for first page). * @returns A promise that resolves to the list response payload containing templates and pagination info. */ listGlobalPromptTemplates(nameFilter: string, limit: number, startingToken: number): Promise; /** * Lists global prompt templates using optional filters and pagination. * * @overload * @param options - (Optional) Options for the list call. * @param options.projectId - (Optional) Project ID used to filter results. * @param options.projectName - (Optional) Project name resolved to an ID. * @param options.nameFilter - (Optional) Template name filter. * @param options.nameOperator - (Optional) Operator applied to the name filter. * @param options.excludeProjectId - (Optional) Project ID excluded from results. * @param options.sortField - (Optional) Field used to sort results. * @param options.ascending - (Optional) Sort direction flag. * @param options.limit - (Optional) Maximum templates to fetch. * @param options.startingToken - (Optional) Pagination starting token. * @returns A promise that resolves to the list response payload. */ listGlobalPromptTemplates(options: GlobalPromptTemplateListOptions): Promise; /** * Retrieves a global prompt template by ID. * @param id - Template identifier to fetch. * @returns A promise that resolves to the prompt template payload. */ getGlobalPromptTemplate(id: string): Promise; /** * Retrieves a global prompt template version by ID. * @param id - Template identifier to fetch. * @param version - Version number to retrieve. * @returns A promise that resolves to the template version payload. */ getGlobalPromptTemplateVersion(id: string, version: number): Promise; /** * Deletes a global prompt template by ID. * @param id - Template identifier to delete. * @returns A promise that resolves when the template is removed. */ deleteGlobalPromptTemplate(id: string): Promise; /** * Renames a global prompt template. * @param templateId - Template identifier to update. * @param name - New template name. * @returns A promise that resolves to the updated template payload. */ updateGlobalPromptTemplate(templateId: string, name: string): Promise; /** * Renders a global prompt template using dataset or string inputs. * @param request - Render template request payload. * @param request.template - Template messages to render. * @param request.data - Dataset identifier, string input, or structured data. * @param startingToken - (Optional) Pagination starting token (default: 0). * @param limit - (Optional) Maximum records per page (default: 100). * @returns A promise that resolves to the render response payload. */ renderPromptTemplate(request: RenderTemplateRequest, startingToken?: number, limit?: number): Promise; getExperiments(): Promise; getExperiment(id: string): Promise; createExperiment(name: string, dataset?: ExperimentDatasetRequest | null): Promise; /** * Lists scorers with optional filtering (backward compatible, use * getScorersPage for pagination and limit). * @param options - (Optional) The filtering options. * @param options.type - (Optional) Filter by a single scorer type. * @param options.names - (Optional) Filter by multiple scorer names. * @returns A promise that resolves to an array of scorers. */ getScorers(options?: { type?: ScorerTypes; names?: string[]; }): Promise; /** * Lists scorers with pagination support. * @param options - (Optional) The filtering and pagination options. * @param options.name - (Optional) Filter by a single scorer name. * @param options.names - (Optional) Filter by multiple scorer names. * @param options.types - (Optional) Filter by scorer types. * @param options.startingToken - (Optional) The starting token for pagination. * @param options.limit - (Optional) The maximum number of scorers to return. * @returns A promise that resolves to an object containing scorers and the next starting token. */ getScorersPage(options?: { name?: string; names?: string[]; types?: ScorerTypes[]; startingToken?: number; limit?: number; }): Promise; /** * Retrieves a page of scorers filtered by label. */ getScorersPageByLabels(options: { labels: string[]; strict?: boolean; caseSensitive?: boolean; startingToken?: number; limit?: number; }): Promise; /** * Retrieves a page of scorers filtered by ID. */ getScorersPageByIds(options: { ids: string[]; startingToken?: number; limit?: number; }): Promise; /** * Retrieves a specific version of a scorer. * @param scorerId - The unique identifier of the scorer. * @param version - The version number to retrieve. * @returns A promise that resolves to the scorer version. */ getScorerVersion(scorerId: string, version: number): Promise; /** * Updates scorer settings for a specific run using PATCH upsert semantics. * @param options - The run scorer settings options. * @param options.projectId - The unique identifier of the project. * @param options.runId - The unique identifier of the run. * @param options.scorers - The list of scorer configurations to apply. * @param options.segmentFilters - (Optional) The list of segment filters to apply. * @returns A promise that resolves to the updated scorer settings response. * @throws Error if validation errors occur (HTTP 422) or if the update fails. */ updateRunScorerSettings(options: { projectId: string; runId: string; scorers: ScorerConfig[]; segmentFilters?: SegmentFilter[] | null; }): Promise; /** * Creates run scorer settings (backward compatibility method). * @param experimentId - The experiment ID (used as runId). * @param projectId - The unique identifier of the project. * @param scorers - The list of scorer configurations to apply. * @returns A promise that resolves when the settings are created. * @deprecated Use updateRunScorerSettings instead for new code. */ createRunScorerSettings(experimentId: string, projectId: string, scorers: ScorerConfig[]): Promise; createPromptRunJob(experimentId: string, projectId: string, promptTemplateVersionId: string, datasetId: string, scorers?: ScorerConfig[], promptSettings?: PromptRunSettings): Promise; /** * Updates an experiment. * @param id - The unique identifier of the experiment. * @param updateRequest - The experiment update request. * @returns A promise that resolves to the updated experiment. */ updateExperiment(id: string, updateRequest: ExperimentUpdateRequest): Promise; /** * Deletes an experiment. * @param id - The unique identifier of the experiment. * @returns A promise that resolves when the experiment is deleted. */ deleteExperiment(id: string): Promise; /** * Gets experiment metrics. * @param id - The unique identifier of the experiment. * @param metricsRequest - The experiment metrics request. * @returns A promise that resolves to the experiment metrics response. */ getExperimentMetrics(id: string, projectId: string, metricsRequest: ExperimentMetricsRequest): Promise; /** * Gets paginated experiments. * @param options - The pagination options. * @param options.startingToken - (Optional) The starting token for pagination (default: 0). * @param options.limit - (Optional) The maximum number of records to return (default: 100). * @param options.includeCounts - (Optional) Whether to include counts (default: false). * @returns A promise that resolves to the paginated experiments response. */ getExperimentsPaginated(options?: { startingToken?: number; limit?: number; includeCounts?: boolean; }): Promise; /** * Gets available columns for experiments. * @returns A promise that resolves to the available columns response. */ getExperimentsAvailableColumns(): Promise; /** * Gets all tags for a specific experiment. * @param experimentId - The unique identifier of the experiment. * @returns A promise that resolves to an array of experiment tags. */ getExperimentTags(experimentId: string): Promise; /** * Upserts (creates or updates) a tag for a specific experiment. * @param experimentId - The unique identifier of the experiment. * @param key - The tag key. * @param value - The tag value. * @param tagType - (Optional) The type of tag (default: 'generic'). * @returns A promise that resolves to the created or updated tag. */ upsertExperimentTag(experimentId: string, key: string, value: string, tagType?: string): Promise; /** * Deletes a tag for a specific experiment. * @param experimentId - The unique identifier of the experiment. * @param tagId - The unique identifier of the tag to delete. * @returns A promise that resolves when the tag is deleted. */ deleteExperimentTag(experimentId: string, tagId: string): Promise; createJob(options: { projectId: string; name: string; runId: string; datasetId: string; promptTemplateId: string; taskType: TaskType; promptSettings: PromptRunSettings; scorers?: ScorerConfig[]; }): Promise; /** * Creates a new scorer. * @param options - The scorer creation options. * @param options.name - The name of the scorer. * @param options.scorerType - The type of the scorer. * @param options.description - (Optional) A description for the scorer. * @param options.tags - (Optional) Tags to associate with the scorer. * @param options.defaults - (Optional) Default settings for the scorer. Required for LLM scorers. * @param options.modelType - (Optional) The model type for the scorer. * @param options.defaultVersionId - (Optional) The default version ID for the scorer. * @param options.scoreableNodeTypes - (Optional) The node types that can be scored. * @param options.outputType - (Optional) The output type for the scorer. * @param options.inputType - (Optional) The input type for the scorer. * @returns A promise that resolves to the created scorer. */ createScorer(options: createScorerOptions): Promise; /** * Creates a new scorer. * @param name - The name of the scorer. * @param scorerType - The type of the scorer. * @param description - (Optional) A description for the scorer. * @param tags - (Optional) Tags to associate with the scorer. * @param defaults - (Optional) Default settings for the scorer. Required for LLM scorers. * @param modelType - (Optional) The model type for the scorer. * @param defaultVersionId - (Optional) The default version ID for the scorer. * @param scoreableNodeTypes - (Optional) The node types that can be scored. * @param outputType - (Optional) The output type for the scorer. * @param inputType - (Optional) The input type for the scorer. * @returns A promise that resolves to the created scorer. */ createScorer(name: string, scorerType: ScorerTypes, description?: string, tags?: string[], defaults?: ScorerDefaults, modelType?: ModelType, defaultVersionId?: string, scoreableNodeTypes?: StepType[], outputType?: OutputType, inputType?: InputType): Promise; /** * Creates a new LLM scorer version. * @param scorerId - The unique identifier of the scorer. * @param options - The LLM scorer version creation options. * @param options.instructions - (Optional) Instructions for the LLM scorer. * @param options.chainPollTemplate - (Optional) Chain poll template configuration. * @param options.userPrompt - (Optional) User prompt for the LLM scorer. * @param options.cotEnabled - (Optional) Whether chain-of-thought is enabled. * @param options.modelName - (Optional) The model name to use. * @param options.numJudges - (Optional) The number of judges for consensus. * @returns A promise that resolves to the created scorer version. */ createLlmScorerVersion(scorerId: string, options: { instructions?: string; chainPollTemplate?: ChainPollTemplate; userPrompt?: string; cotEnabled?: boolean; modelName?: string; numJudges?: number; }): Promise; /** * Creates a new LLM scorer version. * @param scorerId - The unique identifier of the scorer. * @param instructions - (Optional) Instructions for the LLM scorer. * @param chainPollTemplate - (Optional) Chain poll template configuration. * @param userPrompt - (Optional) User prompt for the LLM scorer. * @param cotEnabled - (Optional) Whether chain-of-thought is enabled. * @param modelName - (Optional) The model name to use. * @param numJudges - (Optional) The number of judges for consensus. * @returns A promise that resolves to the created scorer version. */ createLlmScorerVersion(scorerId: string, instructions?: string, chainPollTemplate?: ChainPollTemplate, userPrompt?: string, cotEnabled?: boolean, modelName?: string, numJudges?: number): Promise; /** * Deletes a scorer by its unique identifier. * @param scorerId - The unique identifier of the scorer to delete. * @returns A promise that resolves to a response containing a success message. */ deleteScorer(scorerId: string): Promise; /** * Creates a code-based scorer version. * @param scorerId - The unique identifier of the scorer. * @param codeContent - The Python code content for the scorer. * @param validationResult - (Optional) The validation result JSON string. * @returns A promise that resolves to the created scorer version. */ createCodeScorerVersion(scorerId: string, codeContent: string, validationResult?: string): Promise; validateCodeScorerAndWait(codeContent: string, scoreableNodeTypes: StepType[], timeoutMs?: number, pollIntervalMs?: number, requiredScorers?: string[]): Promise; private resolveProjectId; private resolveProjectIdOrName; private ensureService; searchTraces(options: LogRecordsQueryRequest): Promise; searchSpans(options: LogRecordsQueryRequest): Promise; searchMetrics(options: LogRecordsMetricsQueryRequest): Promise; getJob(jobId: string): Promise; getJobsForProjectRun(projectId: string, runId: string): Promise; getRunScorerJobs(projectId: string, runId: string): Promise; }