MOON
Server: Apache
System: Linux nserver.cafsindia.com 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: cafsindia (1002)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: /home/cafsindia/ai_allyindian_com/node_modules/sarvamai/api/resources/chat/client/Client.d.ts
/**
 * This file was auto-generated by Fern from our API Definition.
 */
import * as environments from "../../../../environments";
import * as core from "../../../../core";
import * as SarvamAI from "../../../index";
export declare namespace Chat {
    interface Options {
        environment?: core.Supplier<environments.SarvamAIEnvironment | string>;
        /** Specify a custom URL to connect the client to. */
        baseUrl?: core.Supplier<string>;
        apiSubscriptionKey?: core.Supplier<string>;
    }
    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;
        /** Additional headers to include in the request. */
        headers?: Record<string, string>;
    }
}
export declare class Chat {
    protected readonly _options: Chat.Options;
    constructor(_options?: Chat.Options);
    /**
     * Calls Sarvam LLM API to get the chat completion. Supported model(s): `sarvam-m`.
     *
     * @param {SarvamAI.ChatCompletionsRequest} request
     * @param {Chat.RequestOptions} requestOptions - Request-specific configuration.
     *
     * @throws {@link SarvamAI.BadRequestError}
     * @throws {@link SarvamAI.ForbiddenError}
     * @throws {@link SarvamAI.UnprocessableEntityError}
     * @throws {@link SarvamAI.TooManyRequestsError}
     * @throws {@link SarvamAI.InternalServerError}
     *
     * @example
     *     await client.chat.completions({
     *         messages: [{
     *                 role: "assistant",
     *                 content: "content"
     *             }],
     *         model: "sarvam-m"
     *     })
     */
    completions(request: SarvamAI.ChatCompletionsRequest, requestOptions?: Chat.RequestOptions): Promise<SarvamAI.CreateChatCompletionResponse>;
    protected _getCustomAuthorizationHeaders(): Promise<{
        "api-subscription-key": string | undefined;
    }>;
}