@mastra/core
Version:
Mastra is a framework for building AI-powered applications and agents with a modern TypeScript stack.
78 lines • 2.25 kB
TypeScript
import type { Mastra } from '../mastra/index.js';
import type { TargetType } from '../storage/types.js';
import { Dataset } from './dataset.js';
/**
* Public API for managing datasets.
*
* Provides methods for dataset CRUD and cross-dataset experiment operations.
* Typically accessed via `mastra.datasets` (Phase 4).
*/
export declare class DatasetsManager {
#private;
constructor(mastra: Mastra);
/**
* Create a new dataset.
* Zod schemas are automatically converted to JSON Schema.
*/
create(input: {
name: string;
description?: string;
inputSchema?: unknown;
groundTruthSchema?: unknown;
requestContextSchema?: Record<string, unknown> | null;
metadata?: Record<string, unknown>;
targetType?: TargetType;
targetIds?: string[];
scorerIds?: string[];
}): Promise<Dataset>;
/**
* Get an existing dataset by ID.
* Throws if the dataset does not exist.
*/
get(args: {
id: string;
}): Promise<Dataset>;
/**
* List all datasets with pagination.
*/
list(args?: {
page?: number;
perPage?: number;
}): Promise<import("../storage/types.js").ListDatasetsOutput>;
/**
* Delete a dataset by ID.
*/
delete(args: {
id: string;
}): Promise<void>;
/**
* Get a specific experiment (run) by ID.
*/
getExperiment(args: {
experimentId: string;
}): Promise<import("../storage/types.js").Experiment | null>;
/**
* Compare two or more experiments.
*
* Uses the internal `compareExperiments` function for pairwise comparison,
* then enriches results with per-item input/groundTruth/output data.
*/
compareExperiments(args: {
experimentIds: string[];
baselineId?: string;
}): Promise<{
baselineId: string;
items: {
itemId: string;
input: {} | null;
groundTruth: {} | null;
results: {
[x: string]: {
output: unknown;
scores: Record<string, number | null>;
} | null;
};
}[];
}>;
}
//# sourceMappingURL=manager.d.ts.map