mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-18 06:17:06 +00:00
修复星火domain错误
This commit is contained in:
parent
82af06a2da
commit
cb6eb9c1eb
1 changed files with 6 additions and 2 deletions
|
|
@ -181,7 +181,11 @@ export default class XinghuoClient {
|
||||||
// 获取ws链接
|
// 获取ws链接
|
||||||
const wsUrl = Config.xhmode == 'assistants' ? Config.xhAssistants : await this.getWsUrl()
|
const wsUrl = Config.xhmode == 'assistants' ? Config.xhAssistants : await this.getWsUrl()
|
||||||
if (!wsUrl) throw new Error('缺少依赖:crypto。请安装依赖后重试')
|
if (!wsUrl) throw new Error('缺少依赖:crypto。请安装依赖后重试')
|
||||||
|
let domain = 'general'
|
||||||
|
if (Config.xhmode == 'apiv2')
|
||||||
|
domain = "generalv2"
|
||||||
|
else if (Config.xhmode == 'apiv3')
|
||||||
|
domain = "generalv3"
|
||||||
// 编写消息内容
|
// 编写消息内容
|
||||||
const wsSendData = {
|
const wsSendData = {
|
||||||
header: {
|
header: {
|
||||||
|
|
@ -190,7 +194,7 @@ export default class XinghuoClient {
|
||||||
},
|
},
|
||||||
parameter: {
|
parameter: {
|
||||||
chat: {
|
chat: {
|
||||||
domain: Config.xhmode == 'api' ? "general" : "generalv2",
|
domain: domain,
|
||||||
temperature: Config.xhTemperature, // 核采样阈值
|
temperature: Config.xhTemperature, // 核采样阈值
|
||||||
max_tokens: Config.xhMaxTokens, // tokens最大长度
|
max_tokens: Config.xhMaxTokens, // tokens最大长度
|
||||||
chat_id: chatId,
|
chat_id: chatId,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue