mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 13:57:10 +00:00
fix: remove useless thing
This commit is contained in:
parent
5c544a5ca7
commit
bd7aac0517
53 changed files with 350 additions and 2639 deletions
|
|
@ -1,28 +1,5 @@
|
|||
import { Config } from '../config.js'
|
||||
|
||||
let proxy
|
||||
if (Config.proxy) {
|
||||
try {
|
||||
proxy = (await import('https-proxy-agent')).default
|
||||
} catch (e) {
|
||||
console.warn('未安装https-proxy-agent,请在插件目录下执行pnpm add https-proxy-agent')
|
||||
}
|
||||
}
|
||||
|
||||
const newFetch = (url, options = {}) => {
|
||||
const defaultOptions = Config.proxy
|
||||
? {
|
||||
agent: proxy(Config.proxy)
|
||||
}
|
||||
: {}
|
||||
|
||||
const mergedOptions = {
|
||||
...defaultOptions,
|
||||
...options
|
||||
}
|
||||
|
||||
return fetch(url, mergedOptions)
|
||||
}
|
||||
import { newFetch } from '../proxy.js'
|
||||
|
||||
/**
|
||||
* 生成voxTTSMode下的wav音频
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue