feat: support bot prefix for coze

This commit is contained in:
JustSong 2024-04-21 18:04:56 +08:00
parent 8de489cf06
commit e5b3e37c46
2 changed files with 8 additions and 4 deletions

View File

@ -39,10 +39,7 @@ func ConvertRequest(textRequest model.GeneralOpenAIRequest) *Request {
cozeRequest := Request{
Stream: textRequest.Stream,
User: textRequest.User,
BotId: textRequest.Model,
}
if cozeRequest.User == "" {
cozeRequest.User = "One API User"
BotId: strings.TrimPrefix(textRequest.Model, "bot-"),
}
for i, message := range textRequest.Messages {
if i == len(textRequest.Messages)-1 {

View File

@ -355,6 +355,13 @@ const EditChannel = () => {
</Form.Field>
)
}
{
inputs.type === 34 && (
<Message>
对于 Coze 而言模型名称即 Bot ID你可以添加一个前缀 `bot-`例如`bot-123456`
</Message>
)
}
<Form.Field>
<Form.Dropdown
label='模型'