mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 13:27:08 +00:00
feat: support node-fetch in API mode
This commit is contained in:
parent
db3c7ef573
commit
22d85b5d98
1 changed files with 3 additions and 1 deletions
|
|
@ -11,6 +11,7 @@ import { getMessageById, makeForwardMsg, tryTimes, upsertMessage, pTimeout } fro
|
|||
import { ChatGPTPuppeteer } from '../utils/browser.js'
|
||||
import { KeyvFile } from 'keyv-file'
|
||||
import { OfficialChatGPTClient } from '../utils/message.js'
|
||||
import fetch from 'node-fetch'
|
||||
// import puppeteer from '../utils/browser.js'
|
||||
// import showdownKatex from 'showdown-katex'
|
||||
const blockWords = Config.blockWords
|
||||
|
|
@ -492,7 +493,8 @@ export class chatgpt extends plugin {
|
|||
upsertMessage,
|
||||
getMessageById,
|
||||
completionParams,
|
||||
assistantLabel: Config.assistantLabel
|
||||
assistantLabel: Config.assistantLabel,
|
||||
fetch
|
||||
})
|
||||
const currentDate = new Date().toISOString().split('T')[0]
|
||||
let promptPrefix = `You are ${Config.assistantLabel}, a large language model trained by OpenAI. ${Config.promptPrefixOverride || defaultPropmtPrefix}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue