import { BaseApi } from "../base-api"; import type { CategoricalFeatureInput, ClassifierSettings, EmbeddingFeatureInput, FeatureInput, ModelTrainingConfig, NewModelConnection, NumericFeatureInput, OutputModel, TextFeatureInput, TrainClassifierRequest, TrainClassifierResponse, TrainModelRequest, TrainModelResponse } from "./types"; /** * A class for accessing the Model Training API. * @extends BaseApi */ declare class ModelTrainingApi extends BaseApi { /** * Trains a model. * * @param {CreateNqlQueryRequest} data - The data for the model training. * @returns {Promise} A promise that resolves with the model training response. */ trainModel(data: TrainModelRequest): Promise; /** * Trains a text classifier on a dataset. Only datasets on Snowflake data * planes are supported. * * The training data is named by `dataset_id` and the backing table resolved * server-side, so the caller never handles it. Every column reference — * `label_column`, `id_column`, and each feature's `field_path` — is checked * against the dataset's schema before the job is created. * * This posts to `v1/model-training/train-classifier`. The unversioned * endpoint still exists but is deprecated: it took the training table as an * opaque `config` blob and validated none of it. * * @param {TrainClassifierRequest} data - The dataset, features and classifier * settings to train with. * @returns {Promise} The id of the created job. Poll * the jobs API for status and results. Rejects with 400 if a name is not a * valid identifier, a column reference is not in the dataset's schema, or the * dataset is not materialized on a Snowflake data plane; 403 if the dataset * is reachable but owned by another company. * @see https://docs.narrative.io/api-reference/model-training/train-a-classifier */ trainClassifier(data: TrainClassifierRequest): Promise; } export { type CategoricalFeatureInput, type ClassifierSettings, type EmbeddingFeatureInput, type FeatureInput, ModelTrainingApi, type ModelTrainingConfig, type NewModelConnection, type NumericFeatureInput, type OutputModel, type TextFeatureInput, type TrainClassifierRequest, type TrainClassifierResponse, type TrainModelRequest, type TrainModelResponse, };