import { type ClientOptions, OpenAIClient } from "@langchain/openai"; import { StructuredTool } from "@langchain/core/tools"; import { Runnable, RunnableConfig } from "@langchain/core/runnables"; import type { OpenAIAssistantFinish, OpenAIAssistantAction, OpenAIToolType } from "./schema.js"; type ThreadMessage = any; type RequiredActionFunctionToolCall = any; type ExtractRunOutput = AsAgent extends true ? OpenAIAssistantFinish | OpenAIAssistantAction[] : ThreadMessage[] | RequiredActionFunctionToolCall[]; export type OpenAIAssistantRunnableInput = { client?: OpenAIClient; clientOptions?: ClientOptions; assistantId: string; pollIntervalMs?: number; asAgent?: AsAgent; }; export declare class OpenAIAssistantRunnable = Record> extends Runnable> { lc_namespace: string[]; private client; assistantId: string; pollIntervalMs: number; asAgent?: AsAgent; constructor(fields: OpenAIAssistantRunnableInput); static createAssistant({ model, name, instructions, tools, client, clientOptions, asAgent, pollIntervalMs, fileIds, }: Omit, "assistantId"> & { model: string; name?: string; instructions?: string; tools?: OpenAIToolType | Array; fileIds?: string[]; }): Promise>>; invoke(input: RunInput, _options?: RunnableConfig): Promise>; /** * Delete an assistant. * * @link {https://platform.openai.com/docs/api-reference/assistants/deleteAssistant} * @returns {Promise} */ deleteAssistant(): Promise; /** * Retrieves an assistant. * * @link {https://platform.openai.com/docs/api-reference/assistants/getAssistant} * @returns {Promise} */ getAssistant(): Promise; /** * Modifies an assistant. * * @link {https://platform.openai.com/docs/api-reference/assistants/modifyAssistant} * @returns {Promise} */ modifyAssistant({ model, name, instructions, fileIds, }: Omit, "assistantId" | "tools"> & { model?: string; name?: string; instructions?: string; fileIds?: string[]; }): Promise; private _parseStepsInput; private _createRun; private _createThreadAndRun; private _waitForRun; private _getResponse; } export {};