add frontend display, more model
This commit is contained in:
@@ -1,8 +1,30 @@
|
|||||||
package coze
|
package coze
|
||||||
|
|
||||||
var ModelList = []string{
|
var ModelList = []string{
|
||||||
// TODO: 完整列表
|
"moonshot-v1-8k",
|
||||||
|
"moonshot-v1-32k",
|
||||||
|
"moonshot-v1-128k",
|
||||||
|
"Baichuan4",
|
||||||
|
"abab6.5s-chat-pro",
|
||||||
|
"glm-4-0520",
|
||||||
|
"qwen-max",
|
||||||
|
"deepseek-r1",
|
||||||
"deepseek-v3",
|
"deepseek-v3",
|
||||||
|
"deepseek-r1-distill-qwen-32b",
|
||||||
|
"deepseek-r1-distill-qwen-7b",
|
||||||
|
"step-1v-8k",
|
||||||
|
"step-1.5v-mini",
|
||||||
|
"Doubao-pro-32k",
|
||||||
|
"Doubao-pro-256k",
|
||||||
|
"Doubao-lite-128k",
|
||||||
|
"Doubao-lite-32k",
|
||||||
|
"Doubao-vision-lite-32k",
|
||||||
|
"Doubao-vision-pro-32k",
|
||||||
|
"Doubao-1.5-pro-vision-32k",
|
||||||
|
"Doubao-1.5-lite-32k",
|
||||||
|
"Doubao-1.5-pro-32k",
|
||||||
|
"Doubao-1.5-thinking-pro",
|
||||||
|
"Doubao-1.5-pro-256k",
|
||||||
}
|
}
|
||||||
|
|
||||||
var ChannelName = "coze"
|
var ChannelName = "coze"
|
||||||
|
|||||||
@@ -28,10 +28,13 @@ func convertCozeChatRequest(c *gin.Context, request dto.GeneralOpenAIRequest) *C
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
user := request.User
|
||||||
|
if user == "" {
|
||||||
|
user = helper.GetResponseID(c)
|
||||||
|
}
|
||||||
cozeRequest := &CozeChatRequest{
|
cozeRequest := &CozeChatRequest{
|
||||||
// TODO: model to botid
|
|
||||||
BotId: c.GetString("bot_id"),
|
BotId: c.GetString("bot_id"),
|
||||||
UserId: c.GetString("id"),
|
UserId: user,
|
||||||
AdditionalMessages: messages,
|
AdditionalMessages: messages,
|
||||||
Stream: request.Stream,
|
Stream: request.Stream,
|
||||||
}
|
}
|
||||||
@@ -172,6 +175,6 @@ func doRequest(req *http.Request, info *common.RelayInfo) (*http.Response, error
|
|||||||
if err != nil { // 增加对 client.Do(req) 返回错误的检查
|
if err != nil { // 增加对 client.Do(req) 返回错误的检查
|
||||||
return nil, fmt.Errorf("client.Do failed: %w", err)
|
return nil, fmt.Errorf("client.Do failed: %w", err)
|
||||||
}
|
}
|
||||||
_ = resp.Body.Close()
|
// _ = resp.Body.Close()
|
||||||
return resp, nil
|
return resp, nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,6 +118,11 @@ export const CHANNEL_OPTIONS = [
|
|||||||
{
|
{
|
||||||
value: 48,
|
value: 48,
|
||||||
color: 'blue',
|
color: 'blue',
|
||||||
label: 'xAI'
|
label: 'xAI',
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
value: 49,
|
||||||
|
color: 'blue',
|
||||||
|
label: 'Coze',
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -838,6 +838,22 @@ const EditChannel = (props) => {
|
|||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
{inputs.type === 49 && (
|
||||||
|
<>
|
||||||
|
<div style={{ marginTop: 10 }}>
|
||||||
|
<Typography.Text strong>智能体ID:</Typography.Text>
|
||||||
|
</div>
|
||||||
|
<Input
|
||||||
|
name='other'
|
||||||
|
placeholder={'请输入智能体ID,例如:7342866812345'}
|
||||||
|
onChange={(value) => {
|
||||||
|
handleInputChange('other', value);
|
||||||
|
}}
|
||||||
|
value={inputs.other}
|
||||||
|
autoComplete='new-password'
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
<div style={{ marginTop: 10 }}>
|
<div style={{ marginTop: 10 }}>
|
||||||
<Typography.Text strong>{t('模型')}:</Typography.Text>
|
<Typography.Text strong>{t('模型')}:</Typography.Text>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user