Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 

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