UNPKG

@lobehub/chat

Version:

Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.

32 lines (25 loc) 729 B
import { ModelProvider } from 'model-bank'; import OpenAI from 'openai'; import { ChatStreamPayload } from './chat'; import { ILobeAgentRuntimeErrorType } from './error'; export interface AgentInitErrorPayload { error: object; errorType: string | number; } export interface ChatCompletionErrorPayload { [key: string]: any; endpoint?: string; error: object; errorType: ILobeAgentRuntimeErrorType; provider: string; } export interface CreateImageErrorPayload { error: object; errorType: ILobeAgentRuntimeErrorType; provider: string; } export interface CreateChatCompletionOptions { chatModel: OpenAI; payload: ChatStreamPayload; } export type ModelProviderKey = Lowercase<keyof typeof ModelProvider>;