/// <reference types="node" />
import { ChannelCredentials, ChannelOptions, UntypedServiceImplementation, handleUnaryCall, Client, ClientUnaryCall, Metadata, CallOptions, ServiceError } from '@grpc/grpc-js';
import _m0 from 'protobufjs/minimal';
import { ClassificationLabel, ClassificationSample } from '../../../../../../yandex/cloud/ai/foundation_models/v1/text_classification/text_classification';
export declare const protobufPackage = "yandex.cloud.ai.foundation_models.v1.text_classification";
/**
 * Request for the service to classify text with tuned model.
 *
 * The names of the classes between which the model will be distributing requests must be specified during model tuning;
 * therefore, they are not provided in the request.
 *
 * For examples of usage, see [step-by-step guides](/docs/foundation-models/operations/classifier/additionally-trained).
 */
export interface TextClassificationRequest {
    /** The [URI](/docs/foundation-models/concepts/classifier/models) of your tuned classifier model. */
    modelUri: string;
    /** Text for classification. */
    text: string;
}
/** Response with classifier predictions. */
export interface TextClassificationResponse {
    /**
     * The classification results with the `confidence`` values
     * for the probability of classifying the request text into each class.
     */
    predictions: ClassificationLabel[];
    /** The model version changes with each new releases. */
    modelVersion: string;
}
/**
 * Request for the service to classify text.
 * For examples of usage, see [step-by-step guides](/docs/operations/classifier/readymade).
 */
export interface FewShotTextClassificationRequest {
    /** The [URI](/docs/foundation-models/concepts/classifier/models) of the classifier model. */
    modelUri: string;
    /** Text description of the classification task. */
    taskDescription: string;
    /**
     * List of available labels for the classification result.
     * Give meaningful names to label classes: this is essential for correct classification results.
     * For example, use ``chemistry`` and ``physics`` rather than ``chm`` and ``phs`` for class names.
     */
    labels: string[];
    /** Text for classification. */
    text: string;
    /** Optional set of text samples with expected labels that may be used as an additional hint for the classifier. */
    samples: ClassificationSample[];
}
/** Response containing classifier predictions. */
export interface FewShotTextClassificationResponse {
    /**
     * The classification results with the `confidence`` values
     * for the probability of classifying the request text into each class.
     */
    predictions: ClassificationLabel[];
    /** The model version changes with each new releases. */
    modelVersion: string;
}
export declare const TextClassificationRequest: {
    encode(message: TextClassificationRequest, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): TextClassificationRequest;
    fromJSON(object: any): TextClassificationRequest;
    toJSON(message: TextClassificationRequest): unknown;
    fromPartial<I extends {
        modelUri?: string | undefined;
        text?: string | undefined;
    } & {
        modelUri?: string | undefined;
        text?: string | undefined;
    } & Record<Exclude<keyof I, keyof TextClassificationRequest>, never>>(object: I): TextClassificationRequest;
};
export declare const TextClassificationResponse: {
    encode(message: TextClassificationResponse, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): TextClassificationResponse;
    fromJSON(object: any): TextClassificationResponse;
    toJSON(message: TextClassificationResponse): unknown;
    fromPartial<I extends {
        predictions?: {
            label?: string | undefined;
            confidence?: number | undefined;
        }[] | undefined;
        modelVersion?: string | undefined;
    } & {
        predictions?: ({
            label?: string | undefined;
            confidence?: number | undefined;
        }[] & ({
            label?: string | undefined;
            confidence?: number | undefined;
        } & {
            label?: string | undefined;
            confidence?: number | undefined;
        } & Record<Exclude<keyof I["predictions"][number], keyof ClassificationLabel>, never>)[] & Record<Exclude<keyof I["predictions"], keyof {
            label?: string | undefined;
            confidence?: number | undefined;
        }[]>, never>) | undefined;
        modelVersion?: string | undefined;
    } & Record<Exclude<keyof I, keyof TextClassificationResponse>, never>>(object: I): TextClassificationResponse;
};
export declare const FewShotTextClassificationRequest: {
    encode(message: FewShotTextClassificationRequest, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): FewShotTextClassificationRequest;
    fromJSON(object: any): FewShotTextClassificationRequest;
    toJSON(message: FewShotTextClassificationRequest): unknown;
    fromPartial<I extends {
        modelUri?: string | undefined;
        taskDescription?: string | undefined;
        labels?: string[] | undefined;
        text?: string | undefined;
        samples?: {
            text?: string | undefined;
            label?: string | undefined;
        }[] | undefined;
    } & {
        modelUri?: string | undefined;
        taskDescription?: string | undefined;
        labels?: (string[] & string[] & Record<Exclude<keyof I["labels"], keyof string[]>, never>) | undefined;
        text?: string | undefined;
        samples?: ({
            text?: string | undefined;
            label?: string | undefined;
        }[] & ({
            text?: string | undefined;
            label?: string | undefined;
        } & {
            text?: string | undefined;
            label?: string | undefined;
        } & Record<Exclude<keyof I["samples"][number], keyof ClassificationSample>, never>)[] & Record<Exclude<keyof I["samples"], keyof {
            text?: string | undefined;
            label?: string | undefined;
        }[]>, never>) | undefined;
    } & Record<Exclude<keyof I, keyof FewShotTextClassificationRequest>, never>>(object: I): FewShotTextClassificationRequest;
};
export declare const FewShotTextClassificationResponse: {
    encode(message: FewShotTextClassificationResponse, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): FewShotTextClassificationResponse;
    fromJSON(object: any): FewShotTextClassificationResponse;
    toJSON(message: FewShotTextClassificationResponse): unknown;
    fromPartial<I extends {
        predictions?: {
            label?: string | undefined;
            confidence?: number | undefined;
        }[] | undefined;
        modelVersion?: string | undefined;
    } & {
        predictions?: ({
            label?: string | undefined;
            confidence?: number | undefined;
        }[] & ({
            label?: string | undefined;
            confidence?: number | undefined;
        } & {
            label?: string | undefined;
            confidence?: number | undefined;
        } & Record<Exclude<keyof I["predictions"][number], keyof ClassificationLabel>, never>)[] & Record<Exclude<keyof I["predictions"], keyof {
            label?: string | undefined;
            confidence?: number | undefined;
        }[]>, never>) | undefined;
        modelVersion?: string | undefined;
    } & Record<Exclude<keyof I, keyof FewShotTextClassificationResponse>, never>>(object: I): FewShotTextClassificationResponse;
};
/** Service for classifying the text requests provided in prompts. */
export declare const TextClassificationServiceService: {
    /**
     * RPC method to classify text with tuned model.
     *
     * The names of the classes between which the model will be distributing requests
     * must be specified during model tuning and are not provided in the request.
     */
    readonly classify: {
        readonly path: "/yandex.cloud.ai.foundation_models.v1.text_classification.TextClassificationService/Classify";
        readonly requestStream: false;
        readonly responseStream: false;
        readonly requestSerialize: (value: TextClassificationRequest) => Buffer;
        readonly requestDeserialize: (value: Buffer) => TextClassificationRequest;
        readonly responseSerialize: (value: TextClassificationResponse) => Buffer;
        readonly responseDeserialize: (value: Buffer) => TextClassificationResponse;
    };
    /**
     * RPC method for binary and multi-class classification.
     *
     * You can provide up to 20 classes for few-shot text classification
     * with optional examples.
     */
    readonly fewShotClassify: {
        readonly path: "/yandex.cloud.ai.foundation_models.v1.text_classification.TextClassificationService/FewShotClassify";
        readonly requestStream: false;
        readonly responseStream: false;
        readonly requestSerialize: (value: FewShotTextClassificationRequest) => Buffer;
        readonly requestDeserialize: (value: Buffer) => FewShotTextClassificationRequest;
        readonly responseSerialize: (value: FewShotTextClassificationResponse) => Buffer;
        readonly responseDeserialize: (value: Buffer) => FewShotTextClassificationResponse;
    };
};
export interface TextClassificationServiceServer extends UntypedServiceImplementation {
    /**
     * RPC method to classify text with tuned model.
     *
     * The names of the classes between which the model will be distributing requests
     * must be specified during model tuning and are not provided in the request.
     */
    classify: handleUnaryCall<TextClassificationRequest, TextClassificationResponse>;
    /**
     * RPC method for binary and multi-class classification.
     *
     * You can provide up to 20 classes for few-shot text classification
     * with optional examples.
     */
    fewShotClassify: handleUnaryCall<FewShotTextClassificationRequest, FewShotTextClassificationResponse>;
}
export interface TextClassificationServiceClient extends Client {
    /**
     * RPC method to classify text with tuned model.
     *
     * The names of the classes between which the model will be distributing requests
     * must be specified during model tuning and are not provided in the request.
     */
    classify(request: TextClassificationRequest, callback: (error: ServiceError | null, response: TextClassificationResponse) => void): ClientUnaryCall;
    classify(request: TextClassificationRequest, metadata: Metadata, callback: (error: ServiceError | null, response: TextClassificationResponse) => void): ClientUnaryCall;
    classify(request: TextClassificationRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: TextClassificationResponse) => void): ClientUnaryCall;
    /**
     * RPC method for binary and multi-class classification.
     *
     * You can provide up to 20 classes for few-shot text classification
     * with optional examples.
     */
    fewShotClassify(request: FewShotTextClassificationRequest, callback: (error: ServiceError | null, response: FewShotTextClassificationResponse) => void): ClientUnaryCall;
    fewShotClassify(request: FewShotTextClassificationRequest, metadata: Metadata, callback: (error: ServiceError | null, response: FewShotTextClassificationResponse) => void): ClientUnaryCall;
    fewShotClassify(request: FewShotTextClassificationRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: FewShotTextClassificationResponse) => void): ClientUnaryCall;
}
export declare const TextClassificationServiceClient: {
    new (address: string, credentials: ChannelCredentials, options?: Partial<ChannelOptions>): TextClassificationServiceClient;
    service: typeof TextClassificationServiceService;
};
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
    [K in keyof T]?: DeepPartial<T[K]>;
} : Partial<T>;
type KeysOfUnion<T> = T extends T ? keyof T : never;
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
    [K in keyof P]: Exact<P[K], I[K]>;
} & Record<Exclude<keyof I, KeysOfUnion<P>>, never>;
export {};
