/**
 * This file was auto-generated by Fern from our API Definition.
 */
import * as environments from "./environments";
import * as core from "./core";
import * as Cohere from "./api/index";
import { V2 } from "./api/resources/v2/client/Client";
import { EmbedJobs } from "./api/resources/embedJobs/client/Client";
import { Datasets } from "./api/resources/datasets/client/Client";
import { Connectors } from "./api/resources/connectors/client/Client";
import { Models } from "./api/resources/models/client/Client";
import { Finetuning } from "./api/resources/finetuning/client/Client";
export declare namespace CohereClient {
    interface Options {
        environment?: core.Supplier<environments.CohereEnvironment | string>;
        token?: core.Supplier<core.BearerToken | undefined>;
        /** Override the X-Client-Name header */
        clientName?: core.Supplier<string | undefined>;
        fetcher?: core.FetchFunction;
    }
    interface RequestOptions {
        /** The maximum time to wait for a response in seconds. */
        timeoutInSeconds?: number;
        /** The number of times to retry the request. Defaults to 2. */
        maxRetries?: number;
        /** A hook to abort the request. */
        abortSignal?: AbortSignal;
        /** Override the X-Client-Name header */
        clientName?: string | undefined;
    }
}
export declare class CohereClient {
    protected readonly _options: CohereClient.Options;
    constructor(_options?: CohereClient.Options);
    /**
     * Generates a text response to a user message.
     * To learn how to use the Chat API and RAG follow our [Text Generation guides](https://docs.cohere.com/docs/chat-api).
     */
    chatStream(request: Cohere.ChatStreamRequest, requestOptions?: CohereClient.RequestOptions): Promise<core.Stream<Cohere.StreamedChatResponse>>;
    /**
     * Generates a text response to a user message.
     * To learn how to use the Chat API and RAG follow our [Text Generation guides](https://docs.cohere.com/docs/chat-api).
     *
     * @param {Cohere.ChatRequest} request
     * @param {CohereClient.RequestOptions} requestOptions - Request-specific configuration.
     *
     * @throws {@link Cohere.BadRequestError}
     * @throws {@link Cohere.UnauthorizedError}
     * @throws {@link Cohere.ForbiddenError}
     * @throws {@link Cohere.NotFoundError}
     * @throws {@link Cohere.UnprocessableEntityError}
     * @throws {@link Cohere.TooManyRequestsError}
     * @throws {@link Cohere.ClientClosedRequestError}
     * @throws {@link Cohere.InternalServerError}
     * @throws {@link Cohere.NotImplementedError}
     * @throws {@link Cohere.ServiceUnavailableError}
     * @throws {@link Cohere.GatewayTimeoutError}
     *
     * @example
     *     await client.chat({
     *         message: "Can you give me a global market overview of solar panels?",
     *         chatHistory: [{
     *                 role: "TOOL"
     *             }, {
     *                 role: "TOOL"
     *             }],
     *         promptTruncation: Cohere.ChatRequestPromptTruncation.Off,
     *         temperature: 0.3
     *     })
     */
    chat(request: Cohere.ChatRequest, requestOptions?: CohereClient.RequestOptions): Promise<Cohere.NonStreamedChatResponse>;
    /**
     * <Warning>
     * This API is marked as "Legacy" and is no longer maintained. Follow the [migration guide](/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
     * </Warning>
     * Generates realistic text conditioned on a given input.
     */
    generateStream(request: Cohere.GenerateStreamRequest, requestOptions?: CohereClient.RequestOptions): Promise<core.Stream<Cohere.GenerateStreamedResponse>>;
    /**
     * <Warning>
     * This API is marked as "Legacy" and is no longer maintained. Follow the [migration guide](/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
     * </Warning>
     * Generates realistic text conditioned on a given input.
     *
     * @param {Cohere.GenerateRequest} request
     * @param {CohereClient.RequestOptions} requestOptions - Request-specific configuration.
     *
     * @throws {@link Cohere.BadRequestError}
     * @throws {@link Cohere.UnauthorizedError}
     * @throws {@link Cohere.ForbiddenError}
     * @throws {@link Cohere.NotFoundError}
     * @throws {@link Cohere.UnprocessableEntityError}
     * @throws {@link Cohere.TooManyRequestsError}
     * @throws {@link Cohere.ClientClosedRequestError}
     * @throws {@link Cohere.InternalServerError}
     * @throws {@link Cohere.NotImplementedError}
     * @throws {@link Cohere.ServiceUnavailableError}
     * @throws {@link Cohere.GatewayTimeoutError}
     *
     * @example
     *     await client.generate({
     *         prompt: "Please explain to me how LLMs work"
     *     })
     */
    generate(request: Cohere.GenerateRequest, requestOptions?: CohereClient.RequestOptions): Promise<Cohere.Generation>;
    /**
     * This endpoint returns text embeddings. An embedding is a list of floating point numbers that captures semantic information about the text that it represents.
     *
     * Embeddings can be used to create text classifiers as well as empower semantic search. To learn more about embeddings, see the embedding page.
     *
     * If you want to learn more how to use the embedding model, have a look at the [Semantic Search Guide](/docs/semantic-search).
     *
     * @param {Cohere.EmbedRequest} request
     * @param {CohereClient.RequestOptions} requestOptions - Request-specific configuration.
     *
     * @throws {@link Cohere.BadRequestError}
     * @throws {@link Cohere.UnauthorizedError}
     * @throws {@link Cohere.ForbiddenError}
     * @throws {@link Cohere.NotFoundError}
     * @throws {@link Cohere.UnprocessableEntityError}
     * @throws {@link Cohere.TooManyRequestsError}
     * @throws {@link Cohere.ClientClosedRequestError}
     * @throws {@link Cohere.InternalServerError}
     * @throws {@link Cohere.NotImplementedError}
     * @throws {@link Cohere.ServiceUnavailableError}
     * @throws {@link Cohere.GatewayTimeoutError}
     *
     * @example
     *     await client.embed()
     */
    embed(request?: Cohere.EmbedRequest, requestOptions?: CohereClient.RequestOptions): Promise<Cohere.EmbedResponse>;
    /**
     * This endpoint takes in a query and a list of texts and produces an ordered array with each text assigned a relevance score.
     *
     * @param {Cohere.RerankRequest} request
     * @param {CohereClient.RequestOptions} requestOptions - Request-specific configuration.
     *
     * @throws {@link Cohere.BadRequestError}
     * @throws {@link Cohere.UnauthorizedError}
     * @throws {@link Cohere.ForbiddenError}
     * @throws {@link Cohere.NotFoundError}
     * @throws {@link Cohere.UnprocessableEntityError}
     * @throws {@link Cohere.TooManyRequestsError}
     * @throws {@link Cohere.ClientClosedRequestError}
     * @throws {@link Cohere.InternalServerError}
     * @throws {@link Cohere.NotImplementedError}
     * @throws {@link Cohere.ServiceUnavailableError}
     * @throws {@link Cohere.GatewayTimeoutError}
     *
     * @example
     *     await client.rerank({
     *         query: "query",
     *         documents: ["documents"]
     *     })
     */
    rerank(request: Cohere.RerankRequest, requestOptions?: CohereClient.RequestOptions): Promise<Cohere.RerankResponse>;
    /**
     * This endpoint makes a prediction about which label fits the specified text inputs best. To make a prediction, Classify uses the provided `examples` of text + label pairs as a reference.
     * Note: [Fine-tuned models](https://docs.cohere.com/docs/classify-fine-tuning) trained on classification examples don't require the `examples` parameter to be passed in explicitly.
     *
     * @param {Cohere.ClassifyRequest} request
     * @param {CohereClient.RequestOptions} requestOptions - Request-specific configuration.
     *
     * @throws {@link Cohere.BadRequestError}
     * @throws {@link Cohere.UnauthorizedError}
     * @throws {@link Cohere.ForbiddenError}
     * @throws {@link Cohere.NotFoundError}
     * @throws {@link Cohere.UnprocessableEntityError}
     * @throws {@link Cohere.TooManyRequestsError}
     * @throws {@link Cohere.ClientClosedRequestError}
     * @throws {@link Cohere.InternalServerError}
     * @throws {@link Cohere.NotImplementedError}
     * @throws {@link Cohere.ServiceUnavailableError}
     * @throws {@link Cohere.GatewayTimeoutError}
     *
     * @example
     *     await client.classify({
     *         inputs: ["inputs"]
     *     })
     */
    classify(request: Cohere.ClassifyRequest, requestOptions?: CohereClient.RequestOptions): Promise<Cohere.ClassifyResponse>;
    /**
     * <Warning>
     * This API is marked as "Legacy" and is no longer maintained. Follow the [migration guide](/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
     * </Warning>
     * Generates a summary in English for a given text.
     *
     * @param {Cohere.SummarizeRequest} request
     * @param {CohereClient.RequestOptions} requestOptions - Request-specific configuration.
     *
     * @throws {@link Cohere.BadRequestError}
     * @throws {@link Cohere.UnauthorizedError}
     * @throws {@link Cohere.ForbiddenError}
     * @throws {@link Cohere.NotFoundError}
     * @throws {@link Cohere.UnprocessableEntityError}
     * @throws {@link Cohere.TooManyRequestsError}
     * @throws {@link Cohere.ClientClosedRequestError}
     * @throws {@link Cohere.InternalServerError}
     * @throws {@link Cohere.NotImplementedError}
     * @throws {@link Cohere.ServiceUnavailableError}
     * @throws {@link Cohere.GatewayTimeoutError}
     *
     * @example
     *     await client.summarize({
     *         text: "text"
     *     })
     */
    summarize(request: Cohere.SummarizeRequest, requestOptions?: CohereClient.RequestOptions): Promise<Cohere.SummarizeResponse>;
    /**
     * This endpoint splits input text into smaller units called tokens using byte-pair encoding (BPE). To learn more about tokenization and byte pair encoding, see the tokens page.
     *
     * @param {Cohere.TokenizeRequest} request
     * @param {CohereClient.RequestOptions} requestOptions - Request-specific configuration.
     *
     * @throws {@link Cohere.BadRequestError}
     * @throws {@link Cohere.UnauthorizedError}
     * @throws {@link Cohere.ForbiddenError}
     * @throws {@link Cohere.NotFoundError}
     * @throws {@link Cohere.UnprocessableEntityError}
     * @throws {@link Cohere.TooManyRequestsError}
     * @throws {@link Cohere.ClientClosedRequestError}
     * @throws {@link Cohere.InternalServerError}
     * @throws {@link Cohere.NotImplementedError}
     * @throws {@link Cohere.ServiceUnavailableError}
     * @throws {@link Cohere.GatewayTimeoutError}
     *
     * @example
     *     await client.tokenize({
     *         text: "tokenize me! :D",
     *         model: "command"
     *     })
     */
    tokenize(request: Cohere.TokenizeRequest, requestOptions?: CohereClient.RequestOptions): Promise<Cohere.TokenizeResponse>;
    /**
     * This endpoint takes tokens using byte-pair encoding and returns their text representation. To learn more about tokenization and byte pair encoding, see the tokens page.
     *
     * @param {Cohere.DetokenizeRequest} request
     * @param {CohereClient.RequestOptions} requestOptions - Request-specific configuration.
     *
     * @throws {@link Cohere.BadRequestError}
     * @throws {@link Cohere.UnauthorizedError}
     * @throws {@link Cohere.ForbiddenError}
     * @throws {@link Cohere.NotFoundError}
     * @throws {@link Cohere.UnprocessableEntityError}
     * @throws {@link Cohere.TooManyRequestsError}
     * @throws {@link Cohere.ClientClosedRequestError}
     * @throws {@link Cohere.InternalServerError}
     * @throws {@link Cohere.NotImplementedError}
     * @throws {@link Cohere.ServiceUnavailableError}
     * @throws {@link Cohere.GatewayTimeoutError}
     *
     * @example
     *     await client.detokenize({
     *         tokens: [1],
     *         model: "model"
     *     })
     */
    detokenize(request: Cohere.DetokenizeRequest, requestOptions?: CohereClient.RequestOptions): Promise<Cohere.DetokenizeResponse>;
    /**
     * Checks that the api key in the Authorization header is valid and active
     *
     * @param {CohereClient.RequestOptions} requestOptions - Request-specific configuration.
     *
     * @throws {@link Cohere.BadRequestError}
     * @throws {@link Cohere.UnauthorizedError}
     * @throws {@link Cohere.ForbiddenError}
     * @throws {@link Cohere.NotFoundError}
     * @throws {@link Cohere.UnprocessableEntityError}
     * @throws {@link Cohere.TooManyRequestsError}
     * @throws {@link Cohere.ClientClosedRequestError}
     * @throws {@link Cohere.InternalServerError}
     * @throws {@link Cohere.NotImplementedError}
     * @throws {@link Cohere.ServiceUnavailableError}
     * @throws {@link Cohere.GatewayTimeoutError}
     *
     * @example
     *     await client.checkApiKey()
     */
    checkApiKey(requestOptions?: CohereClient.RequestOptions): Promise<Cohere.CheckApiKeyResponse>;
    protected _v2: V2 | undefined;
    get v2(): V2;
    protected _embedJobs: EmbedJobs | undefined;
    get embedJobs(): EmbedJobs;
    protected _datasets: Datasets | undefined;
    get datasets(): Datasets;
    protected _connectors: Connectors | undefined;
    get connectors(): Connectors;
    protected _models: Models | undefined;
    get models(): Models;
    protected _finetuning: Finetuning | undefined;
    get finetuning(): Finetuning;
    protected _getAuthorizationHeader(): Promise<string>;
}
