/** * This file was auto-generated by Fern from our API Definition. */ import * as environments from "../../../../environments"; import * as core from "../../../../core"; import * as Vellum from "../../../index"; export declare namespace Prompts { interface Options { environment?: core.Supplier; /** Specify a custom URL to connect the client to. */ baseUrl?: core.Supplier; apiKey: core.Supplier; /** Override the X-API-Version header */ apiVersion?: core.Supplier; } 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-API-Version header */ apiVersion?: Vellum.ApiVersionEnum | undefined; /** Additional headers to include in the request. */ headers?: Record; } } export declare class Prompts { protected readonly _options: Prompts.Options; constructor(_options: Prompts.Options); /** * Used to pull the definition of a Prompt from Vellum. * * @param {string} id - The ID of the Prompt to pull from. Prompt Sandbox IDs are currently supported. * @param {Vellum.PromptsPullRequest} request * @param {Prompts.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vellum.BadRequestError} * @throws {@link Vellum.NotFoundError} * * @example * await client.prompts.pull("id") */ pull(id: string, request?: Vellum.PromptsPullRequest, requestOptions?: Prompts.RequestOptions): core.HttpResponsePromise; private __pull; /** * Used to push updates to a Prompt in Vellum. * * @param {Vellum.PromptPush} request * @param {Prompts.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vellum.BadRequestError} * @throws {@link Vellum.NotFoundError} * * @example * await client.prompts.push({ * execConfig: { * mlModel: "ml_model", * inputVariables: [{ * id: "x", * key: "key", * type: "STRING" * }, { * id: "x", * key: "key", * type: "STRING" * }], * parameters: {}, * blocks: [{ * blockType: "JINJA", * template: "template" * }, { * blockType: "JINJA", * template: "template" * }] * } * }) */ push(request: Vellum.PromptPush, requestOptions?: Prompts.RequestOptions): core.HttpResponsePromise; private __push; protected _getCustomAuthorizationHeaders(): Promise<{ "X-API-KEY": string; }>; }