UNPKG

wechaty-weixin-openai

Version:
33 lines 1.23 kB
import { WechatyPlugin, Message } from 'wechaty'; import { matchers } from 'wechaty-plugin-contrib'; import { AIBotRequestResponse, SentimentData } from './openai'; export interface WechatyWeixinOpenAIConfig { /** * Effective scope related arguments */ contact?: matchers.ContactMatcherOptions; room?: matchers.RoomMatcherOptions; mention?: boolean; language?: matchers.LanguageMatcherOptions; skipMessage?: matchers.MessageMatcherOptions; /** * Authentication related arguments */ token?: string; encodingAESKey?: string; /** * Chatbot related arguments. Not implemented yet. * TODO: implement the argument logic below */ includeNlpResult?: boolean; minScore?: number; includeSentiment?: boolean; /** * Hook functions below allows you to interfere with the conversation with your own logic */ noAnswerHook?: (message: Message) => Promise<void>; preAnswerHook?: (message: Message, answer: AIBotRequestResponse, sentiment?: SentimentData) => Promise<boolean | void>; } declare function WechatyWeixinOpenAI(config: WechatyWeixinOpenAIConfig): WechatyPlugin; export { WechatyWeixinOpenAI }; //# sourceMappingURL=plugin.d.ts.map