import ModelOrch from '../../index'; /** * LangChain message interface */ interface LangChainMessage { content?: string; text?: string; role?: 'user' | 'assistant' | 'system'; _getType?: () => string; } /** * LangChain AIMessage response */ interface LangChainAIMessage { content: string; role: string; _getType: () => string; } /** * LangChain call options */ interface LangChainCallOptions { stop?: string[]; callbacks?: Record; } /** * LangChain Chat Model Adapter * * Provides backward compatibility with LangChain's BaseChatModel interface. * Drop-in replacement for LangChain chat models (ChatOpenAI, ChatAnthropic, etc.). * * @example * ```typescript * import { ModelOrchChatModel } from '@modelorch/sdk/adapters/langchain'; * import { HumanMessage, SystemMessage } from 'langchain/schema'; * * const client = new ModelOrch({ api_key: 'your-key' }); * const chat = new ModelOrchChatModel({ * client: client, * modelName: 'gpt-4', * }); * * const messages = [ * new SystemMessage('You are a helpful assistant.'), * new HumanMessage('What is AI?'), * ]; * * const response = await chat.call(messages); * ``` */ export declare class ModelOrchChatModel { private client; private modelName?; private temperature?; private maxTokens?; private policyId?; constructor(options: { client: ModelOrch; modelName?: string; temperature?: number; maxTokens?: number; policyId?: string; }); /** * Convert LangChain message format to ModelOrch format */ private convertMessages; /** * Convert ModelOrch response to LangChain format */ private convertResponse; /** * LangChain-compatible call method */ call(messages: LangChainMessage[], options?: LangChainCallOptions): Promise; /** * LangChain-compatible generate method */ generate(messagesList: LangChainMessage[][], options?: LangChainCallOptions): Promise<{ generations: Array>; }>; /** * LangChain-compatible predict method */ predict(text: string, options?: LangChainCallOptions): Promise; /** * LangChain-compatible predictMessages method */ predictMessages(messages: LangChainMessage[], options?: LangChainCallOptions): Promise; /** * Get model type */ get _llmType(): string; /** * Get identifying parameters */ get _identifyingParams(): Record; } export {}; //# sourceMappingURL=chat.d.ts.map