/** * This file was auto-generated by Fern from our API Definition. */ import * as environments from "../../../../environments"; import * as core from "../../../../core"; import * as OctoAI from "../../../index"; export declare namespace TextGen { interface Options { environment?: core.Supplier; apiKey?: core.Supplier; fetcher?: core.FetchFunction; } interface RequestOptions { timeoutInSeconds?: number; maxRetries?: number; abortSignal?: AbortSignal; } } export declare class TextGen { protected readonly _options: TextGen.Options; constructor(_options?: TextGen.Options); /** * Create a Chat Completion. */ createChatCompletionStream(request: OctoAI.textGen.CreateChatCompletionStreamRequest, requestOptions?: TextGen.RequestOptions): Promise>; /** * Create a Chat Completion. * * @param {OctoAI.textGen.CreateChatCompletionRequest} request * @param {TextGen.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link OctoAI.textGen.UnprocessableEntityError} * @throws {@link OctoAI.textGen.InternalServerError} * * @example * await client.textGen.createChatCompletion({ * messages: [{ * role: "role" * }], * model: "model" * }) */ createChatCompletion(request: OctoAI.textGen.CreateChatCompletionRequest, requestOptions?: TextGen.RequestOptions): Promise; /** * Create a Completion. */ createCompletionStream(request: OctoAI.textGen.CreateCompletionStreamRequest, requestOptions?: TextGen.RequestOptions): Promise>; /** * Create a Completion. * * @param {OctoAI.textGen.CreateCompletionRequest} request * @param {TextGen.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link OctoAI.textGen.UnprocessableEntityError} * @throws {@link OctoAI.textGen.InternalServerError} * * @example * await client.textGen.createCompletion({ * model: "model" * }) */ createCompletion(request: OctoAI.textGen.CreateCompletionRequest, requestOptions?: TextGen.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; }