import type { ExperimentResponseType, ExperimentDatasetRequest, ExperimentUpdateRequest, ExperimentsAvailableColumnsResponse, RunExperimentParams, RunExperimentOutput } from '../types/experiment.types'; import type { GalileoMetrics, Metric } from '../types/metrics.types'; export type { RunExperimentParams, RunExperimentOutput }; /** * Gets all experiments. * @param projectName - (Optional) The name of the project. * @param projectId - (Optional) The id of the project. * @returns A promise that resolves to an array of experiments. */ export declare function getExperiments(projectName?: string, projectId?: string): Promise; /** * Creates a new experiment. * @param name - The name of the experiment. * @param projectName - The name of the project. * @param dataset - (Optional) The dataset configuration. * @param metrics - (Optional) List of server-side metrics to configure for the experiment. * @returns A promise that resolves to the created experiment. */ export declare function createExperiment(name: string, projectName: string, dataset?: ExperimentDatasetRequest | null, metrics?: (GalileoMetrics | Metric | string)[]): Promise; /** * Gets an experiment by id or name. * At least one of id or name must be provided. * @param options - The options for getting an experiment. * @param options.id - (Optional) The id of the experiment. * @param options.name - (Optional) The name of the experiment. * @param options.projectName - The name of the project. * @returns A promise that resolves to the experiment, or undefined if not found. */ export declare function getExperiment({ id, name, projectName }: { id?: string; name?: string; projectName: string; }): Promise; /** * Runs an experiment by processing each row of a dataset through a specified function or prompt template. * If metrics are provided, they will be used to evaluate the experiment. * @param params - The experiment run parameters. * @param params.name - The name of the experiment. * @param params.function - The function to process each dataset row. Either function or promptTemplate must be provided. * @param params.promptTemplate - The prompt template to use. Either function or promptTemplate must be provided. * @param params.dataset - The dataset to process. Either dataset, datasetId, or datasetName must be provided. * @param params.datasetId - The id of the dataset to process. Either dataset, datasetId, or datasetName must be provided. * @param params.datasetName - The name of the dataset to process. Either dataset, datasetId, or datasetName must be provided. * @param params.metrics - (Optional) List of metrics to evaluate the experiment. * @param params.projectName - (Optional) The name of the project. * @param params.projectId - (Optional) The id of the project. * @param params.experimentTags - (Optional) Tags to associate with the experiment. * @param params.promptSettings - (Optional) Settings for prompt template execution. * @returns A promise that resolves to the experiment run output. */ export declare function runExperiment>(params: RunExperimentParams): Promise; /** * Updates an experiment. * Either projectId or projectName must be provided. * @param options - The options for updating an experiment. * @param options.id - The unique identifier of the experiment. * @param options.projectId - (Optional) The unique identifier of the project. * @param options.projectName - (Optional) The name of the project. * @param options.updateRequest - The experiment update request. * @returns A promise that resolves to the updated experiment. * @internal Use the `Experiments` class instead; not part of the public API. */ export declare function updateExperiment(options: { id: string; projectId?: string; projectName?: string; updateRequest: ExperimentUpdateRequest; }): Promise; /** * Deletes an experiment. * @param options - The options for deleting an experiment. * @param options.id - The unique identifier of the experiment. * @param options.projectId - The unique identifier of the project. * @returns A promise that resolves when the experiment is deleted. * @internal Use the `Experiments` class instead; not part of the public API. */ export declare function deleteExperiment(options: { id: string; projectId: string; }): Promise; /** * Returns available columns for the experiment comparison table. * * Scorer-backed metric columns have IDs of the form `"metrics/{scorer-uuid}"`, which maps * directly to the keys in `experiment.metricAggregates`. Use `column.metricKeyAlias` for * the legacy snake_case metric name and `column.label` for the human-readable display label. * System metrics (e.g. 'cost', 'duration_ns') appear in `metricAggregates` under raw string * keys and may also appear as `metrics/{raw_key}` columns (e.g. `metrics/duration_ns`) with * `metricKeyAlias: null`. * * @example * const cols = await getExperimentColumns({ projectName: 'My Project' }); * const colMap = Object.fromEntries((cols.columns ?? []).map(c => [c.id, c])); * for (const [metricId, agg] of Object.entries(experiment.metricAggregates ?? {})) { * const col = colMap[`metrics/${metricId}`]; * const label = col?.label ?? metricId; * console.log(`${label}: avg=${agg.avg}`); * } */ export declare function getExperimentColumns(options: { projectId?: string; projectName?: string; }): Promise;