import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"; import * as core from "../../../../core/index.js"; import * as SarvamAI from "../../../index.js"; export declare namespace DecisionsClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } export declare class DecisionsClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: DecisionsClient.Options); /** * Answers a set of typed questions about one input and returns a calibrated probability for every allowed option. The model does not generate text, so there is nothing to parse. * * **Models:** `sarvam-prism` (serverless) and `clef` (Provisioned Throughput; also reads images). * * Requires `api-subscription-key`, or `Authorization: Bearer `. * * **Question types:** `noul` (yes/no), `choice` (one of your options) and `score` (a level on your ordered scale). * * **Repeatability:** on `sarvam-prism`, probabilities can vary slightly between identical requests and the top answer is stable; the order of `choice` options does not affect the answer. On `clef`, identical requests return identical probabilities. * * **Images:** `clef` reads base64 images in `images`; image URLs return `400`. `sarvam-prism` refuses `images` (image URLs return `400`, inline images `422`). * * **Not supported:** streaming. `temperature` returns `422` on both models. `sarvam-prism` also refuses `max_tokens` and `stream` with `422`; `clef` accepts and ignores them. Unknown keys inside a question return `422`. * * **Limits:** * - `sarvam-prism`: 32,768 tokens per question (state + question + options), 2–255 options per `choice`, and 2–10 levels per `score`. If any one question breaks a limit, the whole request fails with `422`. * - `clef`: 65,536 tokens per request (state, every question and its options, and images), 1–255 options per `choice`, and 1–10 levels per `score`. A longer request fails with `400`. * * There is no cap on the number of questions, and the state is never truncated. * * **Timeout:** each request must finish within 60 seconds. A longer request fails with `503 model_overloaded`; split very large batches across several requests before retrying. * * **Errors:** every error carries a `message`, a `code` and a `request_id`. Validation errors also carry `param`, the path to the field at fault, such as `questions.urgent.noul.instruction`. * * @param {SarvamAI.SystemOneRequest} request * @param {DecisionsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link SarvamAI.BadRequestError} * @throws {@link SarvamAI.PaymentRequiredError} * @throws {@link SarvamAI.ForbiddenError} * @throws {@link SarvamAI.NotFoundError} * @throws {@link SarvamAI.UnprocessableEntityError} * @throws {@link SarvamAI.TooManyRequestsError} * @throws {@link SarvamAI.InternalServerError} * @throws {@link SarvamAI.BadGatewayError} * @throws {@link SarvamAI.ServiceUnavailableError} * * @example * await client.decisions.create({ * model: "sarvam-prism", * state: "My Stripe integration stopped working and all checkout payments are failing.", * questions: { * "urgent": { * type: "noul" * }, * "department": { * type: "choice", * criteria: {} * }, * "severity": { * type: "score", * criteria: ["trivial", "minor", "moderate", "major", "critical"] * } * } * }) */ create(request: SarvamAI.SystemOneRequest, requestOptions?: DecisionsClient.RequestOptions): core.HttpResponsePromise; private __create; }