fix: type error

This commit is contained in:
ChenZhaoYu 2023-02-16 08:23:31 +08:00
parent 91f51b6338
commit 981c036542
1 changed files with 5 additions and 0 deletions

View File

@ -3,6 +3,11 @@ import 'isomorphic-fetch'
import type { ChatGPTAPI, SendMessageOptions } from 'chatgpt' import type { ChatGPTAPI, SendMessageOptions } from 'chatgpt'
import { sendResponse } from './utils' import { sendResponse } from './utils'
export interface ChatContext {
conversationId?: string
parentMessageId?: string
}
dotenv.config() dotenv.config()
const apiKey = process.env.OPENAI_API_KEY const apiKey = process.env.OPENAI_API_KEY