feat: support cloudflare worker ai

This commit is contained in:
CalciumIon
2024-07-13 19:55:22 +08:00
parent c88f3741e6
commit 7b36a2b885
15 changed files with 296 additions and 28 deletions

View File

@@ -68,7 +68,8 @@ func GenRelayInfo(c *gin.Context) *RelayInfo {
info.ApiVersion = GetAPIVersion(c)
}
if info.ChannelType == common.ChannelTypeOpenAI || info.ChannelType == common.ChannelTypeAnthropic ||
info.ChannelType == common.ChannelTypeAws || info.ChannelType == common.ChannelTypeGemini {
info.ChannelType == common.ChannelTypeAws || info.ChannelType == common.ChannelTypeGemini ||
info.ChannelType == common.ChannelCloudflare {
info.SupportStreamOptions = true
}
return info