import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient";
import * as core from "../../../../core";
import * as Cohere from "../../../index";
export declare namespace V2 {
    interface Options extends BaseClientOptions {
    }
    interface RequestOptions extends BaseRequestOptions {
    }
}
export declare class V2 {
    protected readonly _options: V2.Options;
    constructor(_options?: V2.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/v2/docs/chat-api).
     *
     * Follow the [Migration Guide](https://docs.cohere.com/v2/docs/migrating-v1-to-v2) for instructions on moving from API v1 to API v2.
     */
    chatStream(request: Cohere.V2ChatStreamRequest, requestOptions?: V2.RequestOptions): core.HttpResponsePromise<core.Stream<Cohere.V2ChatStreamResponse>>;
    private __chatStream;
    /**
     * Generates a text response to a user message and streams it down, token by token. To learn how to use the Chat API with streaming follow our [Text Generation guides](https://docs.cohere.com/v2/docs/chat-api).
     *
     * Follow the [Migration Guide](https://docs.cohere.com/v2/docs/migrating-v1-to-v2) for instructions on moving from API v1 to API v2.
     *
     * @param {Cohere.V2ChatRequest} request
     * @param {V2.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.InvalidTokenError}
     * @throws {@link Cohere.ClientClosedRequestError}
     * @throws {@link Cohere.InternalServerError}
     * @throws {@link Cohere.NotImplementedError}
     * @throws {@link Cohere.ServiceUnavailableError}
     * @throws {@link Cohere.GatewayTimeoutError}
     *
     * @example
     *     await client.v2.chat({
     *         model: "command-a-03-2025",
     *         messages: [{
     *                 role: "user",
     *                 content: "Tell me about LLMs"
     *             }]
     *     })
     *
     * @example
     *     await client.v2.chat({
     *         model: "command-a-03-2025",
     *         documents: [{
     *                 data: {
     *                     "content": "CSPC: Backstreet Boys Popularity Analysis - ChartMasters",
     *                     "snippet": "\u2193 Skip to Main Content\n\nMusic industry \u2013 One step closer to being accurate\n\nCSPC: Backstreet Boys Popularity Analysis\n\nHern\u00E1n Lopez Posted on February 9, 2017 Posted in CSPC 72 Comments Tagged with Backstreet Boys, Boy band\n\nAt one point, Backstreet Boys defined success: massive albums sales across the globe, great singles sales, plenty of chart topping releases, hugely hyped tours and tremendous media coverage.\n\nIt is true that they benefited from extraordinarily good market conditions in all markets. After all, the all-time record year for the music business, as far as revenues in billion dollars are concerned, was actually 1999. That is, back when this five men group was at its peak."
     *                 }
     *             }, {
     *                 data: {
     *                     "content": "CSPC: NSYNC Popularity Analysis - ChartMasters",
     *                     "snippet": "\u2193 Skip to Main Content\n\nMusic industry \u2013 One step closer to being accurate\n\nCSPC: NSYNC Popularity Analysis\n\nMJD Posted on February 9, 2018 Posted in CSPC 27 Comments Tagged with Boy band, N'Sync\n\nAt the turn of the millennium three teen acts were huge in the US, the Backstreet Boys, Britney Spears and NSYNC. The latter is the only one we haven\u2019t study so far. It took 15 years and Adele to break their record of 2,4 million units sold of No Strings Attached in its first week alone.\n\nIt wasn\u2019t a fluke, as the second fastest selling album of the Soundscan era prior 2015, was also theirs since Celebrity debuted with 1,88 million units sold."
     *                 }
     *             }, {
     *                 data: {
     *                     "content": "CSPC: Backstreet Boys Popularity Analysis - ChartMasters",
     *                     "snippet": "1997, 1998, 2000 and 2001 also rank amongst some of the very best years.\nYet the way many music consumers \u2013 especially teenagers and young women\u2019s \u2013 embraced their output deserves its own chapter. If Jonas Brothers and more recently One Direction reached a great level of popularity during the past decade, the type of success achieved by Backstreet Boys is in a completely different level as they really dominated the business for a few years all over the world, including in some countries that were traditionally hard to penetrate for Western artists.\n\nWe will try to analyze the extent of that hegemony with this new article with final results which will more than surprise many readers."
     *                 }
     *             }, {
     *                 data: {
     *                     "content": "CSPC: NSYNC Popularity Analysis - ChartMasters",
     *                     "snippet": "Was the teen group led by Justin Timberlake really that big? Was it only in the US where they found success? Or were they a global phenomenon?\nAs usual, I\u2019ll be using the Commensurate Sales to Popularity Concept in order to relevantly gauge their results. This concept will not only bring you sales information for all NSYNC\u2018s albums, physical and download singles, as well as audio and video streaming, but it will also determine their true popularity. If you are not yet familiar with the CSPC method, the next page explains it with a short video. I fully recommend watching the video before getting into the sales figures."
     *                 }
     *             }],
     *         messages: [{
     *                 role: "user",
     *                 content: "Who is more popular: Nsync or Backstreet Boys?"
     *             }]
     *     })
     *
     * @example
     *     await client.v2.chat({
     *         model: "command-r",
     *         messages: [{
     *                 role: "user",
     *                 content: "Can you provide a sales summary for 29th September 2023, and also give me some details about the products in the 'Electronics' category, for example their prices and stock levels?"
     *             }],
     *         tools: [{
     *                 type: "function",
     *                 "function": {
     *                     name: "query_daily_sales_report",
     *                     description: "Connects to a database to retrieve overall sales volumes and sales information for a given day.",
     *                     parameters: {
     *                         "type": "object",
     *                         "properties": {
     *                             "day": {
     *                                 "description": "Retrieves sales data for this day, formatted as YYYY-MM-DD.",
     *                                 "type": "str"
     *                             }
     *                         },
     *                         "required": [
     *                             "day"
     *                         ],
     *                         "x-fern-type-name": "tools-by6k68"
     *                     }
     *                 }
     *             }, {
     *                 type: "function",
     *                 "function": {
     *                     name: "query_product_catalog",
     *                     description: "Connects to a a product catalog with information about all the products being sold, including categories, prices, and stock levels.",
     *                     parameters: {
     *                         "type": "object",
     *                         "properties": {
     *                             "category": {
     *                                 "description": "Retrieves product information data for all products in this category.",
     *                                 "type": "str"
     *                             }
     *                         },
     *                         "required": [
     *                             "category"
     *                         ],
     *                         "x-fern-type-name": "tools-o09qd6"
     *                     }
     *                 }
     *             }]
     *     })
     *
     * @example
     *     await client.v2.chat({
     *         model: "command-a-vision-07-2025",
     *         messages: [{
     *                 role: "user",
     *                 content: [{
     *                         type: "text",
     *                         text: "Describe this image"
     *                     }, {
     *                         type: "image_url",
     *                         imageUrl: {
     *                             url: "https://cohere.com/favicon-32x32.png",
     *                             detail: "auto"
     *                         }
     *                     }]
     *             }]
     *     })
     */
    chat(request: Cohere.V2ChatRequest, requestOptions?: V2.RequestOptions): core.HttpResponsePromise<Cohere.V2ChatResponse>;
    private __chat;
    /**
     * 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](https://docs.cohere.com/docs/semantic-search).
     *
     * @param {Cohere.V2EmbedRequest} request
     * @param {V2.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.InvalidTokenError}
     * @throws {@link Cohere.ClientClosedRequestError}
     * @throws {@link Cohere.InternalServerError}
     * @throws {@link Cohere.NotImplementedError}
     * @throws {@link Cohere.ServiceUnavailableError}
     * @throws {@link Cohere.GatewayTimeoutError}
     *
     * @example
     *     await client.v2.embed({
     *         texts: ["hello", "goodbye"],
     *         model: "embed-v4.0",
     *         inputType: "classification",
     *         embeddingTypes: ["float"]
     *     })
     *
     * @example
     *     await client.v2.embed({
     *         model: "embed-v4.0",
     *         inputType: "image",
     *         embeddingTypes: ["float"],
     *         images: ["data:image/jpeg;base64, "]
     *     })
     */
    embed(request: Cohere.V2EmbedRequest, requestOptions?: V2.RequestOptions): core.HttpResponsePromise<Cohere.EmbedByTypeResponse>;
    private __embed;
    /**
     * 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.V2RerankRequest} request
     * @param {V2.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.InvalidTokenError}
     * @throws {@link Cohere.ClientClosedRequestError}
     * @throws {@link Cohere.InternalServerError}
     * @throws {@link Cohere.NotImplementedError}
     * @throws {@link Cohere.ServiceUnavailableError}
     * @throws {@link Cohere.GatewayTimeoutError}
     *
     * @example
     *     await client.v2.rerank({
     *         documents: ["Carson City is the capital city of the American state of Nevada.", "The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.", "Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages.", "Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.", "Capital punishment has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states."],
     *         query: "What is the capital of the United States?",
     *         topN: 3,
     *         model: "rerank-v3.5"
     *     })
     */
    rerank(request: Cohere.V2RerankRequest, requestOptions?: V2.RequestOptions): core.HttpResponsePromise<Cohere.V2RerankResponse>;
    private __rerank;
    protected _getAuthorizationHeader(): Promise<string | undefined>;
}
