import { GenerationChunk } from "@langchain/core/outputs";
import { BaseLLMParams, LLM } from "@langchain/core/language_models/llms";
import { CallbackManagerForLLMRun } from "@langchain/core/callbacks/manager";

//#region src/llms.d.ts

/**
 * Interface for CloudflareWorkersAI input parameters.
 */
interface CloudflareWorkersAIInput {
  cloudflareAccountId?: string;
  cloudflareApiToken?: string;
  model?: string;
  baseUrl?: string;
  streaming?: boolean;
}
/**
 * Class representing the CloudflareWorkersAI language model. It extends the LLM (Large
 * Language Model) class, providing a standard interface for interacting
 * with the CloudflareWorkersAI language model.
 */
declare class CloudflareWorkersAI extends LLM implements CloudflareWorkersAIInput {
  model: string;
  cloudflareAccountId?: string;
  cloudflareApiToken?: string;
  baseUrl: string;
  streaming: boolean;
  static lc_name(): string;
  lc_serializable: boolean;
  constructor(fields?: CloudflareWorkersAIInput & BaseLLMParams);
  /**
   * Method to validate the environment.
   */
  validateEnvironment(): void;
  /** Get the identifying parameters for this LLM. */
  get identifyingParams(): {
    model: string;
  };
  /**
   * Get the parameters used to invoke the model
   */
  invocationParams(): {
    model: string;
  };
  /** Get the type of LLM. */
  _llmType(): string;
  _request(prompt: string, options: this["ParsedCallOptions"], stream?: boolean): Promise<Response>;
  _streamResponseChunks(prompt: string, options: this["ParsedCallOptions"], runManager?: CallbackManagerForLLMRun): AsyncGenerator<GenerationChunk>;
  /** Call out to CloudflareWorkersAI's complete endpoint.
   Args:
       prompt: The prompt to pass into the model.
   Returns:
       The string generated by the model.
   Example:
   let response = CloudflareWorkersAI.call("Tell me a joke.");
   */
  _call(prompt: string, options: this["ParsedCallOptions"], runManager?: CallbackManagerForLLMRun): Promise<string>;
}
//#endregion
export { CloudflareWorkersAI, CloudflareWorkersAIInput };
//# sourceMappingURL=llms.d.ts.map