Commit 5e8217db by creamlike1024

use channel bot id

parent ee7cdae0
......@@ -240,5 +240,7 @@ func SetupContextForSelectedChannel(c *gin.Context, channel *model.Channel, mode
c.Set("api_version", channel.Other)
case common.ChannelTypeMokaAI:
c.Set("api_version", channel.Other)
case common.ChannelTypeCoze:
c.Set("bot_id", channel.Other)
}
}
......@@ -30,7 +30,7 @@ func convertCozeChatRequest(c *gin.Context, request dto.GeneralOpenAIRequest) *C
}
cozeRequest := &CozeChatRequest{
// TODO: model to botid
BotId: "1",
BotId: c.GetString("bot_id"),
UserId: c.GetString("id"),
AdditionalMessages: messages,
Stream: request.Stream,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment