import type * as Cohere from "../../../../index";
/**
 * @example
 *     {
 *         model: "command-a-03-2025",
 *         messages: [{
 *                 role: "user",
 *                 content: "Tell me about LLMs"
 *             }]
 *     }
 *
 * @example
 *     {
 *         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
 *     {
 *         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
 *     {
 *         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"
 *                         }
 *                     }]
 *             }]
 *     }
 */
export interface V2ChatRequest {
    /** The name of a compatible [Cohere model](https://docs.cohere.com/v2/docs/models). */
    model: string;
    messages: Cohere.ChatMessages;
    /**
     * A list of tools (functions) available to the model. The model response may contain 'tool_calls' to the specified tools.
     *
     * Learn more in the [Tool Use guide](https://docs.cohere.com/docs/tools).
     */
    tools?: Cohere.ToolV2[];
    /**
     * When set to `true`, tool calls in the Assistant message will be forced to follow the tool definition strictly. Learn more in the [Structured Outputs (Tools) guide](https://docs.cohere.com/docs/structured-outputs-json#structured-outputs-tools).
     *
     * **Note**: The first few requests with a new set of tools will take longer to process.
     */
    strictTools?: boolean;
    /** A list of relevant documents that the model can cite to generate a more accurate reply. Each document is either a string or document object with content and metadata. */
    documents?: Cohere.V2ChatRequestDocumentsItem[];
    citationOptions?: Cohere.CitationOptions;
    responseFormat?: Cohere.ResponseFormatV2;
    /**
     * Used to select the [safety instruction](https://docs.cohere.com/v2/docs/safety-modes) inserted into the prompt. Defaults to `CONTEXTUAL`.
     * When `OFF` is specified, the safety instruction will be omitted.
     *
     * Safety modes are not yet configurable in combination with `tools` and `documents` parameters.
     *
     * **Note**: This parameter is only compatible newer Cohere models, starting with [Command R 08-2024](https://docs.cohere.com/docs/command-r#august-2024-release) and [Command R+ 08-2024](https://docs.cohere.com/docs/command-r-plus#august-2024-release).
     *
     * **Note**: `command-r7b-12-2024` and newer models only support `"CONTEXTUAL"` and `"STRICT"` modes.
     */
    safetyMode?: Cohere.V2ChatRequestSafetyMode;
    /**
     * The maximum number of output tokens the model will generate in the response. If not set, `max_tokens` defaults to the model's maximum output token limit. You can find the maximum output token limits for each model in the [model documentation](https://docs.cohere.com/docs/models).
     *
     * **Note**: Setting a low value may result in incomplete generations. In such cases, the `finish_reason` field in the response will be set to `"MAX_TOKENS"`.
     *
     * **Note**: If `max_tokens` is set higher than the model's maximum output token limit, the generation will be capped at that model-specific maximum limit.
     */
    maxTokens?: number;
    /** A list of up to 5 strings that the model will use to stop generation. If the model generates a string that matches any of the strings in the list, it will stop generating tokens and return the generated text up to that point not including the stop sequence. */
    stopSequences?: string[];
    /**
     * Defaults to `0.3`.
     *
     * A non-negative float that tunes the degree of randomness in generation. Lower temperatures mean less random generations, and higher temperatures mean more random generations.
     *
     * Randomness can be further maximized by increasing the  value of the `p` parameter.
     */
    temperature?: number;
    /**
     * If specified, the backend will make a best effort to sample tokens
     * deterministically, such that repeated requests with the same
     * seed and parameters should return the same result. However,
     * determinism cannot be totally guaranteed.
     */
    seed?: number;
    /**
     * Defaults to `0.0`, min value of `0.0`, max value of `1.0`.
     * Used to reduce repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation.
     */
    frequencyPenalty?: number;
    /**
     * Defaults to `0.0`, min value of `0.0`, max value of `1.0`.
     * Used to reduce repetitiveness of generated tokens. Similar to `frequency_penalty`, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies.
     */
    presencePenalty?: number;
    /**
     * Ensures that only the top `k` most likely tokens are considered for generation at each step. When `k` is set to `0`, k-sampling is disabled.
     * Defaults to `0`, min value of `0`, max value of `500`.
     */
    k?: number;
    /**
     * Ensures that only the most likely tokens, with total probability mass of `p`, are considered for generation at each step. If both `k` and `p` are enabled, `p` acts after `k`.
     * Defaults to `0.75`. min value of `0.01`, max value of `0.99`.
     */
    p?: number;
    /** Defaults to `false`. When set to `true`, the log probabilities of the generated tokens will be included in the response. */
    logprobs?: boolean;
    /**
     * Used to control whether or not the model will be forced to use a tool when answering. When `REQUIRED` is specified, the model will be forced to use at least one of the user-defined tools, and the `tools` parameter must be passed in the request.
     * When `NONE` is specified, the model will be forced **not** to use one of the specified tools, and give a direct response.
     * If tool_choice isn't specified, then the model is free to choose whether to use the specified tools or not.
     *
     * **Note**: This parameter is only compatible with models [Command-r7b](https://docs.cohere.com/v2/docs/command-r7b) and newer.
     */
    toolChoice?: Cohere.V2ChatRequestToolChoice;
    thinking?: Cohere.Thinking;
    /**
     * The priority of the request (lower means earlier handling; default 0 highest priority).
     * Higher priority requests are handled first, and dropped last when the system is under load.
     */
    priority?: number;
}
