/** * 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 "./api/index"; import { Integrations } from "./api/resources/integrations/client/Client"; import { Events } from "./api/resources/events/client/Client"; import { AdHoc } from "./api/resources/adHoc/client/Client"; import { ContainerImages } from "./api/resources/containerImages/client/Client"; import { Deployments } from "./api/resources/deployments/client/Client"; import { DocumentIndexes } from "./api/resources/documentIndexes/client/Client"; import { Documents } from "./api/resources/documents/client/Client"; import { Environments } from "./api/resources/environments/client/Client"; import { FolderEntities } from "./api/resources/folderEntities/client/Client"; import { IntegrationAuthConfigs } from "./api/resources/integrationAuthConfigs/client/Client"; import { IntegrationProviders } from "./api/resources/integrationProviders/client/Client"; import { MetricDefinitions } from "./api/resources/metricDefinitions/client/Client"; import { MlModels } from "./api/resources/mlModels/client/Client"; import { Organizations } from "./api/resources/organizations/client/Client"; import { Prompts } from "./api/resources/prompts/client/Client"; import { Sandboxes } from "./api/resources/sandboxes/client/Client"; import { TestSuiteRuns } from "./api/resources/testSuiteRuns/client/Client"; import { TestSuites } from "./api/resources/testSuites/client/Client"; import { UploadedFiles } from "./api/resources/uploadedFiles/client/Client"; import { WorkflowDeployments } from "./api/resources/workflowDeployments/client/Client"; import { WorkflowExecutions } from "./api/resources/workflowExecutions/client/Client"; import { WorkflowSandboxes } from "./api/resources/workflowSandboxes/client/Client"; import { Workflows } from "./api/resources/workflows/client/Client"; import { WorkspaceSecrets } from "./api/resources/workspaceSecrets/client/Client"; import { Workspaces } from "./api/resources/workspaces/client/Client"; export declare namespace VellumClient { 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 VellumClient { protected readonly _options: VellumClient.Options; protected _integrations: Integrations | undefined; protected _events: Events | undefined; protected _adHoc: AdHoc | undefined; protected _containerImages: ContainerImages | undefined; protected _deployments: Deployments | undefined; protected _documentIndexes: DocumentIndexes | undefined; protected _documents: Documents | undefined; protected _environments: Environments | undefined; protected _folderEntities: FolderEntities | undefined; protected _integrationAuthConfigs: IntegrationAuthConfigs | undefined; protected _integrationProviders: IntegrationProviders | undefined; protected _metricDefinitions: MetricDefinitions | undefined; protected _mlModels: MlModels | undefined; protected _organizations: Organizations | undefined; protected _prompts: Prompts | undefined; protected _sandboxes: Sandboxes | undefined; protected _testSuiteRuns: TestSuiteRuns | undefined; protected _testSuites: TestSuites | undefined; protected _uploadedFiles: UploadedFiles | undefined; protected _workflowDeployments: WorkflowDeployments | undefined; protected _workflowExecutions: WorkflowExecutions | undefined; protected _workflowSandboxes: WorkflowSandboxes | undefined; protected _workflows: Workflows | undefined; protected _workspaceSecrets: WorkspaceSecrets | undefined; protected _workspaces: Workspaces | undefined; constructor(_options: VellumClient.Options); get integrations(): Integrations; get events(): Events; get adHoc(): AdHoc; get containerImages(): ContainerImages; get deployments(): Deployments; get documentIndexes(): DocumentIndexes; get documents(): Documents; get environments(): Environments; get folderEntities(): FolderEntities; get integrationAuthConfigs(): IntegrationAuthConfigs; get integrationProviders(): IntegrationProviders; get metricDefinitions(): MetricDefinitions; get mlModels(): MlModels; get organizations(): Organizations; get prompts(): Prompts; get sandboxes(): Sandboxes; get testSuiteRuns(): TestSuiteRuns; get testSuites(): TestSuites; get uploadedFiles(): UploadedFiles; get workflowDeployments(): WorkflowDeployments; get workflowExecutions(): WorkflowExecutions; get workflowSandboxes(): WorkflowSandboxes; get workflows(): Workflows; get workspaceSecrets(): WorkspaceSecrets; get workspaces(): Workspaces; /** * @param {Vellum.ExecuteApiRequest} request * @param {VellumClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.executeApi({ * url: "x" * }) */ executeApi(request: Vellum.ExecuteApiRequest, requestOptions?: VellumClient.RequestOptions): core.HttpResponsePromise; private __executeApi; /** * @param {Vellum.CodeExecutor} request * @param {VellumClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vellum.BadRequestError} * * @example * await client.executeCode({ * code: "x", * runtime: "PYTHON_3_11_6", * inputValues: [{ * name: "x", * type: "STRING", * value: "value" * }, { * name: "x", * type: "STRING", * value: "value" * }], * packages: [{ * version: "version", * name: "name" * }, { * version: "version", * name: "name" * }], * outputType: "STRING" * }) */ executeCode(request: Vellum.CodeExecutor, requestOptions?: VellumClient.RequestOptions): core.HttpResponsePromise; private __executeCode; /** * Executes a deployed Prompt and returns the result. * * @param {Vellum.ExecutePromptRequest} request * @param {VellumClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vellum.BadRequestError} * @throws {@link Vellum.ForbiddenError} * @throws {@link Vellum.NotFoundError} * @throws {@link Vellum.InternalServerError} * * @example * await client.executePrompt({ * inputs: [{ * name: "x", * type: "STRING", * value: "value" * }, { * name: "x", * type: "STRING", * value: "value" * }] * }) */ executePrompt(request: Vellum.ExecutePromptRequest, requestOptions?: VellumClient.RequestOptions): core.HttpResponsePromise; private __executePrompt; /** * Executes a deployed Prompt and streams back the results. */ executePromptStream(request: Vellum.ExecutePromptStreamRequest, requestOptions?: VellumClient.RequestOptions): core.HttpResponsePromise>; private __executePromptStream; /** * Executes a deployed Workflow and returns its outputs. * * @param {Vellum.ExecuteWorkflowRequest} request * @param {VellumClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vellum.BadRequestError} * @throws {@link Vellum.NotFoundError} * @throws {@link Vellum.InternalServerError} * * @example * await client.executeWorkflow({ * inputs: [{ * name: "x", * type: "STRING", * value: "value" * }, { * name: "x", * type: "STRING", * value: "value" * }] * }) */ executeWorkflow(request: Vellum.ExecuteWorkflowRequest, requestOptions?: VellumClient.RequestOptions): core.HttpResponsePromise; private __executeWorkflow; /** * Executes a deployed Workflow asynchronously and returns the execution ID. * * @param {Vellum.ExecuteWorkflowAsyncRequest} request * @param {VellumClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vellum.BadRequestError} * @throws {@link Vellum.NotFoundError} * @throws {@link Vellum.InternalServerError} * * @example * await client.executeWorkflowAsync({ * inputs: [{ * name: "x", * type: "STRING", * value: "value" * }, { * name: "x", * type: "STRING", * value: "value" * }] * }) */ executeWorkflowAsync(request: Vellum.ExecuteWorkflowAsyncRequest, requestOptions?: VellumClient.RequestOptions): core.HttpResponsePromise; private __executeWorkflowAsync; /** * Executes a deployed Workflow and streams back its results. */ executeWorkflowStream(request: Vellum.ExecuteWorkflowStreamRequest, requestOptions?: VellumClient.RequestOptions): core.HttpResponsePromise>; private __executeWorkflowStream; /** * Generate a completion using a previously defined deployment. * * Important: This endpoint is DEPRECATED and has been superseded by * [execute-prompt](/api-reference/api-reference/execute-prompt). * * @param {Vellum.GenerateBodyRequest} request * @param {VellumClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vellum.BadRequestError} * @throws {@link Vellum.ForbiddenError} * @throws {@link Vellum.NotFoundError} * @throws {@link Vellum.InternalServerError} * * @example * await client.generate({ * requests: [{ * inputValues: { * "input_values": { * "key": "value" * } * } * }, { * inputValues: { * "input_values": { * "key": "value" * } * } * }] * }) */ generate(request: Vellum.GenerateBodyRequest, requestOptions?: VellumClient.RequestOptions): core.HttpResponsePromise; private __generate; /** * Generate a stream of completions using a previously defined deployment. * * Important: This endpoint is DEPRECATED and has been superseded by * [execute-prompt-stream](/api-reference/api-reference/execute-prompt-stream). */ generateStream(request: Vellum.GenerateStreamBodyRequest, requestOptions?: VellumClient.RequestOptions): core.HttpResponsePromise>; private __generateStream; /** * Perform a search against a document index. * * @param {Vellum.SearchRequestBodyRequest} request * @param {VellumClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vellum.BadRequestError} * @throws {@link Vellum.NotFoundError} * @throws {@link Vellum.InternalServerError} * * @example * await client.search({ * query: "x" * }) */ search(request: Vellum.SearchRequestBodyRequest, requestOptions?: VellumClient.RequestOptions): core.HttpResponsePromise; private __search; /** * Used to submit feedback regarding the quality of previously generated completions. * * @param {Vellum.SubmitCompletionActualsRequest} request * @param {VellumClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Vellum.BadRequestError} * @throws {@link Vellum.NotFoundError} * @throws {@link Vellum.InternalServerError} * * @example * await client.submitCompletionActuals({ * actuals: [{}, {}] * }) */ submitCompletionActuals(request: Vellum.SubmitCompletionActualsRequest, requestOptions?: VellumClient.RequestOptions): core.HttpResponsePromise; private __submitCompletionActuals; /** * Used to submit feedback regarding the quality of previous workflow execution and its outputs. * * **Note:** Uses a base url of `https://predict.vellum.ai`. * * @param {Vellum.SubmitWorkflowExecutionActualsRequest} request * @param {VellumClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.submitWorkflowExecutionActuals({ * actuals: [{ * outputType: "STRING" * }, { * outputType: "STRING" * }] * }) */ submitWorkflowExecutionActuals(request: Vellum.SubmitWorkflowExecutionActualsRequest, requestOptions?: VellumClient.RequestOptions): core.HttpResponsePromise; private __submitWorkflowExecutionActuals; protected _getCustomAuthorizationHeaders(): Promise<{ "X-API-KEY": string; }>; }