use channel bot id

This commit is contained in:
creamlike1024
2025-05-13 22:23:38 +08:00
parent 29c95c598e
commit 108b67be6c
2 changed files with 3 additions and 1 deletions

View File

@@ -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)
}
}

View File

@@ -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,