mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 21:37:11 +00:00
添加SLACK CLAUDE配置 (#359)
* 修复后台API反代地址未能正确显示的问题 * 更新渲染页面配置 * 添加个人聊天模式配置 * 将用户数据获取改到common中 * 修复错误的渲染页面参数 * 修复bug * 添加Live2D * 修复渲染页面错误 * 修复渲染传入值 * 更新渲染 * 修复图表渲染bug * 调整live2d模型大小 * 修复live2d无法关闭问题 * 修复错误的传值 * 修复ai命名 * 更新渲染 * 添加用户独立设定
This commit is contained in:
parent
40b72989e4
commit
e758b37d4a
63 changed files with 1776 additions and 125 deletions
|
|
@ -316,6 +316,7 @@ export async function renderUrl (e, url, renderCfg = {}) {
|
|||
width: 1280,
|
||||
height: 720
|
||||
})
|
||||
await page.waitForTimeout(renderCfg.wait || 1000)
|
||||
let buff = base64 = await page.screenshot({ fullPage: true })
|
||||
base64 = segment.image(buff)
|
||||
await page.close().catch((err) => logger.error(err))
|
||||
|
|
@ -610,3 +611,26 @@ export async function getPublicIP () {
|
|||
return '127.0.0.1'
|
||||
}
|
||||
}
|
||||
|
||||
export async function getUserData (user) {
|
||||
const dir = 'resources/ChatGPTCache/user'
|
||||
const filename = `${user}.json`
|
||||
const filepath = path.join(dir, filename)
|
||||
try {
|
||||
let data = fs.readFileSync(filepath, 'utf8')
|
||||
return JSON.parse(data)
|
||||
} catch (error) {
|
||||
return {
|
||||
user: user,
|
||||
passwd: '',
|
||||
chat: [],
|
||||
mode: '',
|
||||
cast: {
|
||||
api: '', //API设定
|
||||
bing: '', //必应设定
|
||||
bing_resource: '', //必应扩展资料
|
||||
slack: '', //Slack设定
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue