Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 

222 Zeilen
9.9 KiB

  1. package constant
  2. const (
  3. ChannelTypeUnknown = 0
  4. ChannelTypeOpenAI = 1
  5. ChannelTypeMidjourney = 2
  6. ChannelTypeAzure = 3
  7. ChannelTypeOllama = 4
  8. ChannelTypeMidjourneyPlus = 5
  9. ChannelTypeOpenAIMax = 6
  10. ChannelTypeOhMyGPT = 7
  11. ChannelTypeCustom = 8
  12. ChannelTypeAILS = 9
  13. ChannelTypeAIProxy = 10
  14. ChannelTypePaLM = 11
  15. ChannelTypeAPI2GPT = 12
  16. ChannelTypeAIGC2D = 13
  17. ChannelTypeAnthropic = 14
  18. ChannelTypeBaidu = 15
  19. ChannelTypeZhipu = 16
  20. ChannelTypeAli = 17
  21. ChannelTypeXunfei = 18
  22. ChannelType360 = 19
  23. ChannelTypeOpenRouter = 20
  24. ChannelTypeAIProxyLibrary = 21
  25. ChannelTypeFastGPT = 22
  26. ChannelTypeTencent = 23
  27. ChannelTypeGemini = 24
  28. ChannelTypeMoonshot = 25
  29. ChannelTypeZhipu_v4 = 26
  30. ChannelTypePerplexity = 27
  31. ChannelTypeLingYiWanWu = 31
  32. ChannelTypeAws = 33
  33. ChannelTypeCohere = 34
  34. ChannelTypeMiniMax = 35
  35. ChannelTypeSunoAPI = 36
  36. ChannelTypeDify = 37
  37. ChannelTypeJina = 38
  38. ChannelCloudflare = 39
  39. ChannelTypeSiliconFlow = 40
  40. ChannelTypeVertexAi = 41
  41. ChannelTypeMistral = 42
  42. ChannelTypeDeepSeek = 43
  43. ChannelTypeMokaAI = 44
  44. ChannelTypeVolcEngine = 45
  45. ChannelTypeBaiduV2 = 46
  46. ChannelTypeXinference = 47
  47. ChannelTypeXai = 48
  48. ChannelTypeCoze = 49
  49. ChannelTypeKling = 50
  50. ChannelTypeJimeng = 51
  51. ChannelTypeVidu = 52
  52. ChannelTypeSubmodel = 53
  53. ChannelTypeDoubaoVideo = 54
  54. ChannelTypeSora = 55
  55. ChannelTypeReplicate = 56
  56. ChannelTypeCodex = 57
  57. ChannelTypeDoubaoVideoCompatibleAiping = 58
  58. ChannelTypeKlingAiping = 59
  59. ChannelTypeDoubaoVideoCompatibleTianyiYun = 60
  60. ChannelTypeChinaMobileSeedance = 61
  61. ChannelTypeDummy // this one is only for count, do not add any channel after this
  62. )
  63. var ChannelBaseURLs = []string{
  64. "", // 0
  65. "https://api.openai.com", // 1
  66. "https://oa.api2d.net", // 2
  67. "", // 3
  68. "http://localhost:11434", // 4
  69. "https://api.openai-sb.com", // 5
  70. "https://api.openaimax.com", // 6
  71. "https://api.ohmygpt.com", // 7
  72. "", // 8
  73. "https://api.caipacity.com", // 9
  74. "https://api.aiproxy.io", // 10
  75. "", // 11
  76. "https://api.api2gpt.com", // 12
  77. "https://api.aigc2d.com", // 13
  78. "https://api.anthropic.com", // 14
  79. "https://aip.baidubce.com", // 15
  80. "https://open.bigmodel.cn", // 16
  81. "https://dashscope.aliyuncs.com", // 17
  82. "", // 18
  83. "https://api.360.cn", // 19
  84. "https://openrouter.ai/api", // 20
  85. "https://api.aiproxy.io", // 21
  86. "https://fastgpt.run/api/openapi", // 22
  87. "https://hunyuan.tencentcloudapi.com", //23
  88. "https://generativelanguage.googleapis.com", //24
  89. "https://api.moonshot.cn", //25
  90. "https://open.bigmodel.cn", //26
  91. "https://api.perplexity.ai", //27
  92. "", //28
  93. "", //29
  94. "", //30
  95. "https://api.lingyiwanwu.com", //31
  96. "", //32
  97. "", //33
  98. "https://api.cohere.ai", //34
  99. "https://api.minimax.chat", //35
  100. "", //36
  101. "https://api.dify.ai", //37
  102. "https://api.jina.ai", //38
  103. "https://api.cloudflare.com", //39
  104. "https://api.siliconflow.cn", //40
  105. "", //41
  106. "https://api.mistral.ai", //42
  107. "https://api.deepseek.com", //43
  108. "https://api.moka.ai", //44
  109. "https://ark.cn-beijing.volces.com", //45
  110. "https://qianfan.baidubce.com", //46
  111. "", //47
  112. "https://api.x.ai", //48
  113. "https://api.coze.cn", //49
  114. "https://api.klingai.com", //50
  115. "https://visual.volcengineapi.com", //51
  116. "https://api.vidu.cn", //52
  117. "https://llm.submodel.ai", //53
  118. "https://ark.cn-beijing.volces.com", //54
  119. "https://api.openai.com", //55
  120. "https://api.replicate.com", //56
  121. "https://chatgpt.com", //57
  122. "", //58
  123. "https://aiping.cn/api", //59
  124. "https://ai.ctaigw.cn", //60
  125. "https://zhenze-huhehaote.cmecloud.cn/api/v3", //61
  126. }
  127. var ChannelTypeNames = map[int]string{
  128. ChannelTypeUnknown: "Unknown",
  129. ChannelTypeOpenAI: "OpenAI",
  130. ChannelTypeMidjourney: "Midjourney",
  131. ChannelTypeAzure: "Azure",
  132. ChannelTypeOllama: "Ollama",
  133. ChannelTypeMidjourneyPlus: "MidjourneyPlus",
  134. ChannelTypeOpenAIMax: "OpenAIMax",
  135. ChannelTypeOhMyGPT: "OhMyGPT",
  136. ChannelTypeCustom: "Custom",
  137. ChannelTypeAILS: "AILS",
  138. ChannelTypeAIProxy: "AIProxy",
  139. ChannelTypePaLM: "PaLM",
  140. ChannelTypeAPI2GPT: "API2GPT",
  141. ChannelTypeAIGC2D: "AIGC2D",
  142. ChannelTypeAnthropic: "Anthropic",
  143. ChannelTypeBaidu: "Baidu",
  144. ChannelTypeZhipu: "Zhipu",
  145. ChannelTypeAli: "Ali",
  146. ChannelTypeXunfei: "Xunfei",
  147. ChannelType360: "360",
  148. ChannelTypeOpenRouter: "OpenRouter",
  149. ChannelTypeAIProxyLibrary: "AIProxyLibrary",
  150. ChannelTypeFastGPT: "FastGPT",
  151. ChannelTypeTencent: "Tencent",
  152. ChannelTypeGemini: "Gemini",
  153. ChannelTypeMoonshot: "Moonshot",
  154. ChannelTypeZhipu_v4: "ZhipuV4",
  155. ChannelTypePerplexity: "Perplexity",
  156. ChannelTypeLingYiWanWu: "LingYiWanWu",
  157. ChannelTypeAws: "AWS",
  158. ChannelTypeCohere: "Cohere",
  159. ChannelTypeMiniMax: "MiniMax",
  160. ChannelTypeSunoAPI: "SunoAPI",
  161. ChannelTypeDify: "Dify",
  162. ChannelTypeJina: "Jina",
  163. ChannelCloudflare: "Cloudflare",
  164. ChannelTypeSiliconFlow: "SiliconFlow",
  165. ChannelTypeVertexAi: "VertexAI",
  166. ChannelTypeMistral: "Mistral",
  167. ChannelTypeDeepSeek: "DeepSeek",
  168. ChannelTypeMokaAI: "MokaAI",
  169. ChannelTypeVolcEngine: "VolcEngine",
  170. ChannelTypeBaiduV2: "BaiduV2",
  171. ChannelTypeXinference: "Xinference",
  172. ChannelTypeXai: "xAI",
  173. ChannelTypeCoze: "Coze",
  174. ChannelTypeKling: "Kling",
  175. ChannelTypeJimeng: "Jimeng",
  176. ChannelTypeVidu: "Vidu",
  177. ChannelTypeSubmodel: "Submodel",
  178. ChannelTypeDoubaoVideo: "DoubaoVideo",
  179. ChannelTypeSora: "Sora",
  180. ChannelTypeReplicate: "Replicate",
  181. ChannelTypeCodex: "Codex",
  182. ChannelTypeDoubaoVideoCompatibleAiping: "DoubaoVideoCompatibleAiping",
  183. ChannelTypeKlingAiping: "KlingAiping",
  184. ChannelTypeDoubaoVideoCompatibleTianyiYun: "DoubaoVideoCompatibleTianyiYun",
  185. ChannelTypeChinaMobileSeedance: "ChinaMobileSeedance",
  186. }
  187. func GetChannelTypeName(channelType int) string {
  188. if name, ok := ChannelTypeNames[channelType]; ok {
  189. return name
  190. }
  191. return "Unknown"
  192. }
  193. type ChannelSpecialBase struct {
  194. ClaudeBaseURL string
  195. OpenAIBaseURL string
  196. }
  197. var ChannelSpecialBases = map[string]ChannelSpecialBase{
  198. "glm-coding-plan": {
  199. ClaudeBaseURL: "https://open.bigmodel.cn/api/anthropic",
  200. OpenAIBaseURL: "https://open.bigmodel.cn/api/coding/paas/v4",
  201. },
  202. "glm-coding-plan-international": {
  203. ClaudeBaseURL: "https://api.z.ai/api/anthropic",
  204. OpenAIBaseURL: "https://api.z.ai/api/coding/paas/v4",
  205. },
  206. "kimi-coding-plan": {
  207. ClaudeBaseURL: "https://api.kimi.com/coding",
  208. OpenAIBaseURL: "https://api.kimi.com/coding/v1",
  209. },
  210. "doubao-coding-plan": {
  211. ClaudeBaseURL: "https://ark.cn-beijing.volces.com/api/coding",
  212. OpenAIBaseURL: "https://ark.cn-beijing.volces.com/api/coding/v3",
  213. },
  214. }