@lobehub/chat 1.43.6 → 1.44.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (301) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/changelog/v1.json +18 -0
  3. package/docs/self-hosting/server-database/docker-compose.mdx +2 -2
  4. package/locales/ar/common.json +1 -0
  5. package/locales/ar/modelProvider.json +176 -0
  6. package/locales/ar/setting.json +1 -0
  7. package/locales/bg-BG/common.json +1 -0
  8. package/locales/bg-BG/modelProvider.json +176 -0
  9. package/locales/bg-BG/setting.json +1 -0
  10. package/locales/de-DE/common.json +1 -0
  11. package/locales/de-DE/modelProvider.json +176 -0
  12. package/locales/de-DE/setting.json +1 -0
  13. package/locales/en-US/common.json +1 -0
  14. package/locales/en-US/modelProvider.json +176 -0
  15. package/locales/en-US/setting.json +1 -0
  16. package/locales/es-ES/common.json +1 -0
  17. package/locales/es-ES/modelProvider.json +176 -0
  18. package/locales/es-ES/setting.json +1 -0
  19. package/locales/fa-IR/common.json +1 -0
  20. package/locales/fa-IR/modelProvider.json +176 -0
  21. package/locales/fa-IR/setting.json +1 -0
  22. package/locales/fr-FR/common.json +1 -0
  23. package/locales/fr-FR/modelProvider.json +176 -0
  24. package/locales/fr-FR/setting.json +1 -0
  25. package/locales/it-IT/common.json +1 -0
  26. package/locales/it-IT/modelProvider.json +176 -0
  27. package/locales/it-IT/setting.json +1 -0
  28. package/locales/ja-JP/common.json +1 -0
  29. package/locales/ja-JP/modelProvider.json +176 -0
  30. package/locales/ja-JP/setting.json +1 -0
  31. package/locales/ko-KR/common.json +1 -0
  32. package/locales/ko-KR/modelProvider.json +176 -0
  33. package/locales/ko-KR/setting.json +1 -0
  34. package/locales/nl-NL/common.json +1 -0
  35. package/locales/nl-NL/modelProvider.json +176 -0
  36. package/locales/nl-NL/setting.json +1 -0
  37. package/locales/pl-PL/common.json +1 -0
  38. package/locales/pl-PL/modelProvider.json +176 -0
  39. package/locales/pl-PL/setting.json +1 -0
  40. package/locales/pt-BR/common.json +1 -0
  41. package/locales/pt-BR/modelProvider.json +176 -0
  42. package/locales/pt-BR/setting.json +1 -0
  43. package/locales/ru-RU/common.json +1 -0
  44. package/locales/ru-RU/modelProvider.json +176 -0
  45. package/locales/ru-RU/setting.json +1 -0
  46. package/locales/tr-TR/common.json +1 -0
  47. package/locales/tr-TR/modelProvider.json +176 -0
  48. package/locales/tr-TR/setting.json +1 -0
  49. package/locales/vi-VN/common.json +1 -0
  50. package/locales/vi-VN/modelProvider.json +176 -0
  51. package/locales/vi-VN/setting.json +1 -0
  52. package/locales/zh-CN/common.json +1 -0
  53. package/locales/zh-CN/modelProvider.json +176 -0
  54. package/locales/zh-CN/setting.json +1 -0
  55. package/locales/zh-TW/common.json +1 -0
  56. package/locales/zh-TW/modelProvider.json +176 -0
  57. package/locales/zh-TW/setting.json +1 -0
  58. package/next.config.ts +1 -1
  59. package/package.json +4 -4
  60. package/src/app/(main)/(mobile)/me/settings/features/Category.tsx +1 -1
  61. package/src/app/(main)/(mobile)/me/settings/features/useCategory.tsx +12 -5
  62. package/src/app/(main)/changelog/features/VersionTag.tsx +1 -2
  63. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatList/ChatItem/Thread.tsx +1 -1
  64. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatList/ChatItem/ThreadItem.tsx +1 -2
  65. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatList/ChatItem/index.tsx +0 -1
  66. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatList/WelcomeChatItem/InboxWelcome/AgentsSuggest.tsx +1 -1
  67. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatList/WelcomeChatItem/InboxWelcome/QuestionSuggest.tsx +1 -1
  68. package/src/app/(main)/chat/(workspace)/@conversation/features/ZenModeToast/Toast.tsx +1 -1
  69. package/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/ThreadItem/index.tsx +0 -2
  70. package/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/TopicItem/index.tsx +0 -1
  71. package/src/app/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/Tags.tsx +2 -3
  72. package/src/app/(main)/chat/@session/features/SessionListContent/CollapseGroup/index.tsx +1 -1
  73. package/src/app/(main)/chat/features/Migration/Start.tsx +1 -1
  74. package/src/app/(main)/discover/(detail)/assistant/[slug]/features/ConversationExample/TopicList.tsx +4 -3
  75. package/src/app/(main)/discover/(detail)/assistant/[slug]/features/Header.tsx +1 -1
  76. package/src/app/(main)/discover/(detail)/features/ShareButton.tsx +2 -1
  77. package/src/app/(main)/discover/(detail)/model/[...slugs]/features/Header.tsx +1 -1
  78. package/src/app/(main)/discover/(detail)/plugin/[slug]/features/Header.tsx +1 -1
  79. package/src/app/(main)/discover/(detail)/provider/[slug]/features/Header.tsx +1 -1
  80. package/src/app/(main)/discover/(list)/_layout/Desktop/Nav.tsx +0 -1
  81. package/src/app/(main)/discover/(list)/assistants/features/Card.tsx +1 -1
  82. package/src/app/(main)/discover/(list)/models/features/Card.tsx +1 -1
  83. package/src/app/(main)/discover/(list)/plugins/features/Card.tsx +1 -1
  84. package/src/app/(main)/discover/(list)/providers/features/Card.tsx +1 -1
  85. package/src/app/(main)/discover/components/GridLoadingCard.tsx +2 -1
  86. package/src/app/(main)/discover/components/Title.tsx +1 -1
  87. package/src/app/(main)/files/(content)/@menu/features/KnowledgeBase/EmptyStatus.tsx +1 -1
  88. package/src/app/(main)/files/(content)/@menu/features/KnowledgeBase/Item/index.tsx +0 -1
  89. package/src/app/(main)/files/(content)/@modal/(.)[id]/FullscreenModal.tsx +2 -2
  90. package/src/app/(main)/files/(content)/NotSupportClient.tsx +2 -2
  91. package/src/app/(main)/profile/_layout/Desktop/SideBar.tsx +1 -1
  92. package/src/app/(main)/profile/stats/features/ShareButton/Preview.tsx +5 -5
  93. package/src/app/(main)/repos/[id]/evals/components/Container.tsx +1 -1
  94. package/src/app/(main)/repos/[id]/evals/dataset/DatasetList/Item.tsx +0 -1
  95. package/src/app/(main)/settings/_layout/Desktop/SideBar.tsx +1 -1
  96. package/src/app/(main)/settings/about/features/ItemCard.tsx +3 -3
  97. package/src/app/(main)/settings/about/features/Version.tsx +1 -1
  98. package/src/app/(main)/settings/hooks/useCategory.tsx +22 -9
  99. package/src/app/(main)/settings/llm/components/ProviderConfig/index.tsx +2 -1
  100. package/src/app/(main)/settings/llm/components/ProviderModelList/ModelFetcher.tsx +0 -1
  101. package/src/app/(main)/settings/provider/(detail)/[id]/index.tsx +19 -0
  102. package/src/app/(main)/settings/provider/(detail)/[id]/page.tsx +95 -0
  103. package/src/app/(main)/settings/provider/(detail)/azure/page.tsx +119 -0
  104. package/src/app/(main)/settings/provider/(detail)/bedrock/page.tsx +91 -0
  105. package/src/app/(main)/settings/provider/(detail)/cloudflare/page.tsx +58 -0
  106. package/src/app/(main)/settings/provider/(detail)/github/page.tsx +67 -0
  107. package/src/app/(main)/settings/provider/(detail)/huggingface/page.tsx +67 -0
  108. package/src/app/(main)/settings/provider/(detail)/ollama/Checker.tsx +73 -0
  109. package/src/app/(main)/settings/provider/(detail)/ollama/page.tsx +34 -0
  110. package/src/app/(main)/settings/provider/(detail)/openai/page.tsx +23 -0
  111. package/src/app/(main)/settings/provider/(detail)/wenxin/page.tsx +61 -0
  112. package/src/app/(main)/settings/provider/(list)/Footer.tsx +36 -0
  113. package/src/app/(main)/settings/provider/(list)/ProviderGrid/Card.tsx +134 -0
  114. package/src/app/(main)/settings/provider/(list)/ProviderGrid/index.tsx +91 -0
  115. package/src/app/(main)/settings/provider/(list)/index.tsx +19 -0
  116. package/src/app/(main)/settings/provider/ProviderMenu/AddNew.tsx +28 -0
  117. package/src/app/(main)/settings/provider/ProviderMenu/All.tsx +29 -0
  118. package/src/app/(main)/settings/provider/ProviderMenu/Item.tsx +69 -0
  119. package/src/app/(main)/settings/provider/ProviderMenu/List.tsx +76 -0
  120. package/src/app/(main)/settings/provider/ProviderMenu/SearchResult.tsx +43 -0
  121. package/src/app/(main)/settings/provider/ProviderMenu/SkeletonList.tsx +60 -0
  122. package/src/app/(main)/settings/provider/ProviderMenu/SortProviderModal/GroupItem.tsx +30 -0
  123. package/src/app/(main)/settings/provider/ProviderMenu/SortProviderModal/index.tsx +91 -0
  124. package/src/app/(main)/settings/provider/ProviderMenu/index.tsx +80 -0
  125. package/src/app/(main)/settings/provider/_layout/Desktop.tsx +37 -0
  126. package/src/app/(main)/settings/provider/_layout/Mobile.tsx +14 -0
  127. package/src/app/(main)/settings/provider/const.ts +20 -0
  128. package/src/app/(main)/settings/provider/features/CreateNewProvider/index.tsx +146 -0
  129. package/src/app/(main)/settings/provider/features/ModelList/CreateNewModelModal/Form.tsx +105 -0
  130. package/src/app/(main)/settings/provider/features/ModelList/CreateNewModelModal/index.tsx +69 -0
  131. package/src/app/(main)/settings/provider/features/ModelList/DisabledModels.tsx +29 -0
  132. package/src/app/(main)/settings/provider/features/ModelList/EmptyModels.tsx +101 -0
  133. package/src/app/(main)/settings/provider/features/ModelList/EnabledModelList/index.tsx +85 -0
  134. package/src/app/(main)/settings/provider/features/ModelList/ModelConfigModal/Form.tsx +109 -0
  135. package/src/app/(main)/settings/provider/features/ModelList/ModelConfigModal/index.tsx +76 -0
  136. package/src/app/(main)/settings/provider/features/ModelList/ModelItem.tsx +346 -0
  137. package/src/app/(main)/settings/provider/features/ModelList/ModelTitle/Search.tsx +37 -0
  138. package/src/app/(main)/settings/provider/features/ModelList/ModelTitle/index.tsx +145 -0
  139. package/src/app/(main)/settings/provider/features/ModelList/SearchResult.tsx +67 -0
  140. package/src/app/(main)/settings/provider/features/ModelList/SkeletonList.tsx +63 -0
  141. package/src/app/(main)/settings/provider/features/ModelList/SortModelModal/ListItem.tsx +20 -0
  142. package/src/app/(main)/settings/provider/features/ModelList/SortModelModal/index.tsx +96 -0
  143. package/src/app/(main)/settings/provider/features/ModelList/index.tsx +59 -0
  144. package/src/app/(main)/settings/provider/features/ProviderConfig/Checker.tsx +120 -0
  145. package/src/app/(main)/settings/provider/features/ProviderConfig/SkeletonInput.tsx +5 -0
  146. package/src/app/(main)/settings/provider/features/ProviderConfig/UpdateProviderInfo/SettingModal.tsx +137 -0
  147. package/src/app/(main)/settings/provider/features/ProviderConfig/UpdateProviderInfo/index.tsx +49 -0
  148. package/src/app/(main)/settings/provider/features/ProviderConfig/index.tsx +343 -0
  149. package/src/app/(main)/settings/provider/layout.tsx +21 -0
  150. package/src/app/(main)/settings/provider/page.tsx +17 -0
  151. package/src/app/(main)/settings/provider/type.ts +5 -0
  152. package/src/app/(main)/settings/sync/features/DeviceInfo/Card.tsx +1 -1
  153. package/src/app/(main)/settings/sync/features/DeviceInfo/index.tsx +1 -1
  154. package/src/app/@modal/(.)changelog/modal/features/ReadDetail.tsx +1 -1
  155. package/src/app/@modal/(.)changelog/modal/features/VersionTag.tsx +1 -2
  156. package/src/app/@modal/(.)changelog/modal/layout.tsx +1 -1
  157. package/src/components/Cell/index.tsx +1 -1
  158. package/src/components/DragUpload/index.tsx +2 -3
  159. package/src/components/FeatureList/index.tsx +1 -1
  160. package/src/components/FileParsingStatus/EmbeddingStatus.tsx +1 -1
  161. package/src/components/FileParsingStatus/index.tsx +1 -1
  162. package/src/components/FunctionModal/style.tsx +2 -2
  163. package/src/components/GoBack/index.tsx +1 -2
  164. package/src/components/HotKeys/index.tsx +1 -1
  165. package/src/components/InstantSwitch/index.tsx +28 -0
  166. package/src/components/Menu/index.tsx +1 -1
  167. package/src/components/ModelSelect/index.tsx +20 -10
  168. package/src/components/Notification/index.tsx +2 -1
  169. package/src/components/StatisticCard/index.tsx +5 -6
  170. package/src/config/aiModels/ai21.ts +38 -0
  171. package/src/config/aiModels/ai360.ts +71 -0
  172. package/src/config/aiModels/anthropic.ts +152 -0
  173. package/src/config/aiModels/azure.ts +86 -0
  174. package/src/config/aiModels/baichuan.ts +107 -0
  175. package/src/config/aiModels/bedrock.ts +315 -0
  176. package/src/config/aiModels/cloudflare.ts +88 -0
  177. package/src/config/aiModels/deepseek.ts +27 -0
  178. package/src/config/aiModels/fireworksai.ts +232 -0
  179. package/src/config/aiModels/giteeai.ts +137 -0
  180. package/src/config/aiModels/github.ts +273 -0
  181. package/src/config/aiModels/google.ts +317 -0
  182. package/src/config/aiModels/groq.ts +202 -0
  183. package/src/config/aiModels/higress.ts +2828 -0
  184. package/src/config/aiModels/huggingface.ts +56 -0
  185. package/src/config/aiModels/hunyuan.ts +151 -0
  186. package/src/config/aiModels/index.ts +98 -0
  187. package/src/config/aiModels/internlm.ts +40 -0
  188. package/src/config/aiModels/minimax.ts +55 -0
  189. package/src/config/aiModels/mistral.ts +172 -0
  190. package/src/config/aiModels/moonshot.ts +44 -0
  191. package/src/config/aiModels/novita.ts +124 -0
  192. package/src/config/aiModels/ollama.ts +412 -0
  193. package/src/config/aiModels/openai.ts +537 -0
  194. package/src/config/aiModels/openrouter.ts +252 -0
  195. package/src/config/aiModels/perplexity.ts +67 -0
  196. package/src/config/aiModels/qwen.ts +302 -0
  197. package/src/config/aiModels/sensenova.ts +114 -0
  198. package/src/config/aiModels/siliconcloud.ts +679 -0
  199. package/src/config/aiModels/spark.ts +68 -0
  200. package/src/config/aiModels/stepfun.ts +153 -0
  201. package/src/config/aiModels/taichu.ts +19 -0
  202. package/src/config/aiModels/togetherai.ts +334 -0
  203. package/src/config/aiModels/upstage.ts +37 -0
  204. package/src/config/aiModels/wenxin.ts +171 -0
  205. package/src/config/aiModels/xai.ts +72 -0
  206. package/src/config/aiModels/zeroone.ts +156 -0
  207. package/src/config/aiModels/zhipu.ts +235 -0
  208. package/src/config/featureFlags/schema.ts +3 -0
  209. package/src/config/modelProviders/anthropic.ts +1 -0
  210. package/src/config/modelProviders/github.ts +0 -1
  211. package/src/config/modelProviders/google.ts +1 -0
  212. package/src/config/modelProviders/stepfun.ts +2 -0
  213. package/src/database/migrations/0013_add_ai_infra.sql +44 -0
  214. package/src/database/migrations/meta/0013_snapshot.json +3598 -0
  215. package/src/database/migrations/meta/_journal.json +7 -0
  216. package/src/database/repositories/aiInfra/index.ts +117 -0
  217. package/src/database/schemas/aiInfra.ts +69 -0
  218. package/src/database/schemas/index.ts +1 -0
  219. package/src/database/server/models/__tests__/aiModel.test.ts +318 -0
  220. package/src/database/server/models/__tests__/aiProvider.test.ts +373 -0
  221. package/src/database/server/models/aiModel.ts +251 -0
  222. package/src/database/server/models/aiProvider.ts +234 -0
  223. package/src/features/AgentSetting/AgentPrompt/index.tsx +2 -2
  224. package/src/features/ChatInput/ActionBar/Token/TokenTag.tsx +2 -1
  225. package/src/features/ChatInput/ActionBar/Tools/index.tsx +2 -3
  226. package/src/features/ChatInput/ActionBar/Upload/ServerMode.tsx +2 -3
  227. package/src/features/ChatInput/Desktop/FilePreview/FileItem/index.tsx +3 -2
  228. package/src/features/ChatInput/Desktop/FilePreview/FileList.tsx +2 -2
  229. package/src/features/ChatInput/Mobile/Files/FileItem/File.tsx +2 -2
  230. package/src/features/ChatInput/Mobile/InputArea/index.tsx +1 -1
  231. package/src/features/ChatInput/STT/common.tsx +1 -1
  232. package/src/features/Conversation/Error/style.tsx +2 -2
  233. package/src/features/Conversation/Messages/Assistant/FileChunks/Item/style.ts +2 -2
  234. package/src/features/Conversation/Messages/Assistant/FileChunks/index.tsx +1 -1
  235. package/src/features/Conversation/Messages/Assistant/ToolCallItem/Inspector/style.ts +2 -3
  236. package/src/features/Conversation/Messages/Assistant/ToolCallItem/style.ts +2 -3
  237. package/src/features/Conversation/Messages/User/FileListViewer/Item.tsx +0 -1
  238. package/src/features/Conversation/components/BackBottom/style.ts +2 -2
  239. package/src/features/Conversation/components/MarkdownElements/LobeArtifact/Render/Icon.tsx +2 -3
  240. package/src/features/Conversation/components/MarkdownElements/LobeArtifact/Render/index.tsx +3 -3
  241. package/src/features/Conversation/components/MarkdownElements/LobeThinking/Render.tsx +1 -1
  242. package/src/features/Conversation/components/OTPInput.tsx +2 -2
  243. package/src/features/DataImporter/Loading.tsx +1 -1
  244. package/src/features/FileManager/FileList/EmptyStatus.tsx +1 -1
  245. package/src/features/FileManager/FileList/index.tsx +1 -1
  246. package/src/features/FileManager/UploadDock/Item.tsx +1 -1
  247. package/src/features/FileManager/UploadDock/index.tsx +4 -4
  248. package/src/features/FileViewer/NotSupport/index.tsx +1 -1
  249. package/src/features/FileViewer/Renderer/MSDoc/index.tsx +0 -1
  250. package/src/features/FileViewer/Renderer/TXT/index.tsx +1 -1
  251. package/src/features/InitClientDB/EnableModal.tsx +1 -1
  252. package/src/features/InitClientDB/ErrorResult.tsx +1 -1
  253. package/src/features/InitClientDB/InitIndicator.tsx +1 -1
  254. package/src/features/KnowledgeBaseModal/AddFilesToKnowledgeBase/SelectForm.tsx +0 -1
  255. package/src/features/ModelSelect/index.tsx +8 -1
  256. package/src/features/ModelSwitchPanel/index.tsx +10 -3
  257. package/src/features/PluginsUI/Render/Loading.tsx +0 -1
  258. package/src/features/Portal/Home/Body/Files/FileList/Item.tsx +1 -1
  259. package/src/features/Portal/Home/Body/Plugins/ArtifactList/Item/style.ts +1 -2
  260. package/src/features/Setting/SettingContainer.tsx +8 -1
  261. package/src/features/ShareModal/ShareImage/style.ts +2 -2
  262. package/src/features/ShareModal/style.ts +2 -2
  263. package/src/features/User/DataStatistics.tsx +1 -1
  264. package/src/hooks/useEnabledChatModels.ts +10 -1
  265. package/src/hooks/useModelSupportToolUse.ts +15 -0
  266. package/src/hooks/useModelSupportVision.ts +15 -0
  267. package/src/layout/AuthProvider/Clerk/useAppearance.ts +3 -3
  268. package/src/layout/GlobalProvider/AppTheme.tsx +1 -1
  269. package/src/layout/GlobalProvider/StoreInitialization.tsx +5 -0
  270. package/src/locales/default/common.ts +1 -0
  271. package/src/locales/default/modelProvider.ts +178 -0
  272. package/src/locales/default/setting.ts +1 -0
  273. package/src/server/modules/KeyVaultsEncrypt/index.ts +1 -1
  274. package/src/server/routers/lambda/aiModel.ts +128 -0
  275. package/src/server/routers/lambda/aiProvider.ts +127 -0
  276. package/src/server/routers/lambda/index.ts +4 -0
  277. package/src/services/__tests__/_auth.test.ts +16 -49
  278. package/src/services/__tests__/chat.test.ts +2 -0
  279. package/src/services/_auth.ts +42 -25
  280. package/src/services/aiModel.ts +52 -0
  281. package/src/services/aiProvider.ts +47 -0
  282. package/src/services/chat.ts +62 -18
  283. package/src/store/aiInfra/index.ts +2 -0
  284. package/src/store/aiInfra/initialState.ts +11 -0
  285. package/src/store/aiInfra/selectors.ts +2 -0
  286. package/src/store/aiInfra/slices/aiModel/action.ts +146 -0
  287. package/src/store/aiInfra/slices/aiModel/index.ts +3 -0
  288. package/src/store/aiInfra/slices/aiModel/initialState.ts +14 -0
  289. package/src/store/aiInfra/slices/aiModel/selectors.ts +63 -0
  290. package/src/store/aiInfra/slices/aiProvider/action.ts +208 -0
  291. package/src/store/aiInfra/slices/aiProvider/index.ts +3 -0
  292. package/src/store/aiInfra/slices/aiProvider/initialState.ts +32 -0
  293. package/src/store/aiInfra/slices/aiProvider/selectors.ts +99 -0
  294. package/src/store/aiInfra/store.ts +25 -0
  295. package/src/store/global/initialState.ts +1 -0
  296. package/src/store/serverConfig/selectors.test.ts +1 -0
  297. package/src/store/user/slices/modelList/selectors/modelProvider.ts +1 -0
  298. package/src/styles/global.ts +1 -1
  299. package/src/types/aiModel.ts +36 -6
  300. package/src/types/aiProvider.ts +14 -5
  301. package/src/utils/fetch/fetchSSE.ts +3 -1
@@ -0,0 +1,537 @@
1
+ import {
2
+ AIChatModelCard,
3
+ AIEmbeddingModelCard,
4
+ AIRealtimeModelCard,
5
+ AISTTModelCard,
6
+ AITTSModelCard,
7
+ AIText2ImageModelCard,
8
+ } from '@/types/aiModel';
9
+
10
+ export const openaiChatModels: AIChatModelCard[] = [
11
+ {
12
+ contextWindowTokens: 128_000,
13
+ description:
14
+ 'o1-mini是一款针对编程、数学和科学应用场景而设计的快速、经济高效的推理模型。该模型具有128K上下文和2023年10月的知识截止日期。',
15
+ displayName: 'OpenAI o1-mini',
16
+ enabled: true,
17
+ id: 'o1-mini',
18
+ maxOutput: 65_536,
19
+ pricing: {
20
+ input: 3,
21
+ output: 12,
22
+ },
23
+ releasedAt: '2024-09-12',
24
+ type: 'chat',
25
+ },
26
+ {
27
+ contextWindowTokens: 128_000,
28
+ description:
29
+ 'o1是OpenAI新的推理模型,适用于需要广泛通用知识的复杂任务。该模型具有128K上下文和2023年10月的知识截止日期。',
30
+ displayName: 'OpenAI o1-preview',
31
+ enabled: true,
32
+ id: 'o1-preview',
33
+ maxOutput: 32_768,
34
+ pricing: {
35
+ input: 15,
36
+ output: 60,
37
+ },
38
+ releasedAt: '2024-09-12',
39
+ type: 'chat',
40
+ },
41
+ {
42
+ abilities: {
43
+ functionCall: true,
44
+ vision: true,
45
+ },
46
+ contextWindowTokens: 128_000,
47
+ description:
48
+ 'GPT-4o mini是OpenAI在GPT-4 Omni之后推出的最新模型,支持图文输入并输出文本。作为他们最先进的小型模型,它比其他近期的前沿模型便宜很多,并且比GPT-3.5 Turbo便宜超过60%。它保持了最先进的智能,同时具有显著的性价比。GPT-4o mini在MMLU测试中获得了 82% 的得分,目前在聊天偏好上排名高于 GPT-4。',
49
+ displayName: 'GPT-4o mini',
50
+ enabled: true,
51
+ id: 'gpt-4o-mini',
52
+ maxOutput: 16_385,
53
+ pricing: {
54
+ input: 0.15,
55
+ output: 0.6,
56
+ },
57
+ releasedAt: '2024-07-18',
58
+ type: 'chat',
59
+ },
60
+ {
61
+ abilities: {
62
+ functionCall: true,
63
+ vision: true,
64
+ },
65
+ contextWindowTokens: 128_000,
66
+ description:
67
+ 'ChatGPT-4o 是一款动态模型,实时更新以保持当前最新版本。它结合了强大的语言理解与生成能力,适合于大规模应用场景,包括客户服务、教育和技术支持。',
68
+ displayName: 'GPT-4o 1120',
69
+ enabled: true,
70
+ id: 'gpt-4o-2024-11-20',
71
+ pricing: {
72
+ input: 2.5,
73
+ output: 10,
74
+ },
75
+ releasedAt: '2024-11-20',
76
+ type: 'chat',
77
+ },
78
+ {
79
+ abilities: {
80
+ functionCall: true,
81
+ vision: true,
82
+ },
83
+ contextWindowTokens: 128_000,
84
+ description:
85
+ 'ChatGPT-4o 是一款动态模型,实时更新以保持当前最新版本。它结合了强大的语言理解与生成能力,适合于大规模应用场景,包括客户服务、教育和技术支持。',
86
+ displayName: 'GPT-4o',
87
+ enabled: true,
88
+ id: 'gpt-4o',
89
+ pricing: {
90
+ input: 2.5,
91
+ output: 10,
92
+ },
93
+ releasedAt: '2024-05-13',
94
+ type: 'chat',
95
+ },
96
+ {
97
+ abilities: {
98
+ functionCall: true,
99
+ vision: true,
100
+ },
101
+ contextWindowTokens: 128_000,
102
+ description:
103
+ 'ChatGPT-4o 是一款动态模型,实时更新以保持当前最新版本。它结合了强大的语言理解与生成能力,适合于大规模应用场景,包括客户服务、教育和技术支持。',
104
+ displayName: 'GPT-4o 0806',
105
+ id: 'gpt-4o-2024-08-06',
106
+ pricing: {
107
+ input: 2.5,
108
+ output: 10,
109
+ },
110
+ releasedAt: '2024-08-06',
111
+ type: 'chat',
112
+ },
113
+ {
114
+ abilities: {
115
+ functionCall: true,
116
+ vision: true,
117
+ },
118
+ contextWindowTokens: 128_000,
119
+ description:
120
+ 'ChatGPT-4o 是一款动态模型,实时更新以保持当前最新版本。它结合了强大的语言理解与生成能力,适合于大规模应用场景,包括客户服务、教育和技术支持。',
121
+ displayName: 'GPT-4o 0513',
122
+ id: 'gpt-4o-2024-05-13',
123
+ pricing: {
124
+ input: 5,
125
+ output: 15,
126
+ },
127
+ releasedAt: '2024-05-13',
128
+ type: 'chat',
129
+ },
130
+ {
131
+ contextWindowTokens: 128_000,
132
+ description: 'GPT-4o Audio 模型,支持音频输入输出',
133
+ displayName: 'GPT-4o Audio',
134
+ id: 'gpt-4o-audio-preview',
135
+ maxOutput: 16_384,
136
+ pricing: {
137
+ input: 2.5,
138
+ output: 10,
139
+ },
140
+ releasedAt: '2024-10-01',
141
+ type: 'chat',
142
+ },
143
+ {
144
+ abilities: {
145
+ vision: true,
146
+ },
147
+ contextWindowTokens: 128_000,
148
+ description:
149
+ 'ChatGPT-4o 是一款动态模型,实时更新以保持当前最新版本。它结合了强大的语言理解与生成能力,适合于大规模应用场景,包括客户服务、教育和技术支持。',
150
+ displayName: 'ChatGPT-4o',
151
+ enabled: true,
152
+ id: 'chatgpt-4o-latest',
153
+ pricing: {
154
+ input: 5,
155
+ output: 15,
156
+ },
157
+ releasedAt: '2024-08-14',
158
+ type: 'chat',
159
+ },
160
+ {
161
+ abilities: {
162
+ functionCall: true,
163
+ vision: true,
164
+ },
165
+ contextWindowTokens: 128_000,
166
+ description:
167
+ '最新的 GPT-4 Turbo 模型具备视觉功能。现在,视觉请求可以使用 JSON 模式和函数调用。 GPT-4 Turbo 是一个增强版本,为多模态任务提供成本效益高的支持。它在准确性和效率之间找到平衡,适合需要进行实时交互的应用程序场景。',
168
+ displayName: 'GPT-4 Turbo',
169
+ id: 'gpt-4-turbo',
170
+ pricing: {
171
+ input: 10,
172
+ output: 30,
173
+ },
174
+ type: 'chat',
175
+ },
176
+ {
177
+ abilities: {
178
+ functionCall: true,
179
+ vision: true,
180
+ },
181
+ contextWindowTokens: 128_000,
182
+ description:
183
+ '最新的 GPT-4 Turbo 模型具备视觉功能。现在,视觉请求可以使用 JSON 模式和函数调用。 GPT-4 Turbo 是一个增强版本,为多模态任务提供成本效益高的支持。它在准确性和效率之间找到平衡,适合需要进行实时交互的应用程序场景。',
184
+ displayName: 'GPT-4 Turbo Vision 0409',
185
+ id: 'gpt-4-turbo-2024-04-09',
186
+ pricing: {
187
+ input: 10,
188
+ output: 30,
189
+ },
190
+ releasedAt: '2024-04-09',
191
+ type: 'chat',
192
+ },
193
+ {
194
+ abilities: {
195
+ functionCall: true,
196
+ },
197
+ contextWindowTokens: 128_000,
198
+ description:
199
+ '最新的 GPT-4 Turbo 模型具备视觉功能。现在,视觉请求可以使用 JSON 模式和函数调用。 GPT-4 Turbo 是一个增强版本,为多模态任务提供成本效益高的支持。它在准确性和效率之间找到平衡,适合需要进行实时交互的应用程序场景。',
200
+ displayName: 'GPT-4 Turbo Preview',
201
+ id: 'gpt-4-turbo-preview',
202
+ pricing: {
203
+ input: 10,
204
+ output: 30,
205
+ },
206
+ type: 'chat',
207
+ },
208
+ {
209
+ abilities: {
210
+ functionCall: true,
211
+ },
212
+ contextWindowTokens: 128_000,
213
+ description:
214
+ '最新的 GPT-4 Turbo 模型具备视觉功能。现在,视觉请求可以使用 JSON 模式和函数调用。 GPT-4 Turbo 是一个增强版本,为多模态任务提供成本效益高的支持。它在准确性和效率之间找到平衡,适合需要进行实时交互的应用程序场景。',
215
+ displayName: 'GPT-4 Turbo Preview 0125',
216
+ id: 'gpt-4-0125-preview',
217
+ pricing: {
218
+ input: 10,
219
+ output: 30,
220
+ },
221
+ releasedAt: '2024-01-25',
222
+ type: 'chat',
223
+ },
224
+ {
225
+ abilities: {
226
+ functionCall: true,
227
+ },
228
+ contextWindowTokens: 128_000,
229
+ description:
230
+ '最新的 GPT-4 Turbo 模型具备视觉功能。现在,视觉请求可以使用 JSON 模式和函数调用。 GPT-4 Turbo 是一个增强版本,为多模态任务提供成本效益高的支持。它在准确性和效率之间找到平衡,适合需要进行实时交互的应用程序场景。',
231
+ displayName: 'GPT-4 Turbo Preview 1106',
232
+ id: 'gpt-4-1106-preview',
233
+ pricing: {
234
+ input: 10,
235
+ output: 30,
236
+ },
237
+ releasedAt: '2023-11-06',
238
+ type: 'chat',
239
+ },
240
+ {
241
+ abilities: {
242
+ functionCall: true,
243
+ },
244
+ contextWindowTokens: 8192,
245
+ description:
246
+ 'GPT-4 提供了一个更大的上下文窗口,能够处理更长的文本输入,适用于需要广泛信息整合和数据分析的场景。',
247
+ displayName: 'GPT-4',
248
+ id: 'gpt-4',
249
+ pricing: {
250
+ input: 30,
251
+ output: 60,
252
+ },
253
+ type: 'chat',
254
+ },
255
+ {
256
+ abilities: {
257
+ functionCall: true,
258
+ },
259
+ contextWindowTokens: 8192,
260
+ description:
261
+ 'GPT-4 提供了一个更大的上下文窗口,能够处理更长的文本输入,适用于需要广泛信息整合和数据分析的场景。',
262
+ displayName: 'GPT-4 0613',
263
+ id: 'gpt-4-0613',
264
+ pricing: {
265
+ input: 30,
266
+ output: 60,
267
+ },
268
+ releasedAt: '2023-06-13',
269
+ type: 'chat',
270
+ },
271
+ {
272
+ abilities: {
273
+ functionCall: true,
274
+ },
275
+ contextWindowTokens: 32_768,
276
+
277
+ description:
278
+ 'GPT-4 提供了一个更大的上下文窗口,能够处理更长的文本输入,适用于需要广泛信息整合和数据分析的场景。',
279
+ displayName: 'GPT-4 32K',
280
+ id: 'gpt-4-32k',
281
+ // Will be discontinued on June 6, 2025
282
+ legacy: true,
283
+ pricing: {
284
+ input: 60,
285
+ output: 120,
286
+ },
287
+ type: 'chat',
288
+ },
289
+ {
290
+ abilities: {
291
+ functionCall: true,
292
+ },
293
+ contextWindowTokens: 32_768,
294
+ description:
295
+ 'GPT-4 提供了一个更大的上下文窗口,能够处理更长的文本输入,适用于需要广泛信息整合和数据分析的场景。',
296
+ displayName: 'GPT-4 32K 0613',
297
+ id: 'gpt-4-32k-0613',
298
+ pricing: {
299
+ input: 60,
300
+ output: 120,
301
+ },
302
+ releasedAt: '2023-06-13',
303
+ type: 'chat',
304
+ },
305
+ {
306
+ abilities: {
307
+ functionCall: true,
308
+ },
309
+ contextWindowTokens: 16_385,
310
+ description:
311
+ 'GPT 3.5 Turbo,适用于各种文本生成和理解任务,Currently points to gpt-3.5-turbo-0125',
312
+ displayName: 'GPT-3.5 Turbo',
313
+ id: 'gpt-3.5-turbo',
314
+ pricing: {
315
+ input: 0.5,
316
+ output: 1.5,
317
+ },
318
+ type: 'chat',
319
+ },
320
+ {
321
+ abilities: {
322
+ functionCall: true,
323
+ },
324
+ contextWindowTokens: 16_385,
325
+ description:
326
+ 'GPT 3.5 Turbo,适用于各种文本生成和理解任务,Currently points to gpt-3.5-turbo-0125',
327
+ displayName: 'GPT-3.5 Turbo 0125',
328
+ id: 'gpt-3.5-turbo-0125',
329
+ pricing: {
330
+ input: 0.5,
331
+ output: 1.5,
332
+ },
333
+ releasedAt: '2024-01-25',
334
+ type: 'chat',
335
+ },
336
+ {
337
+ abilities: {
338
+ functionCall: true,
339
+ },
340
+ contextWindowTokens: 16_385,
341
+ description:
342
+ 'GPT 3.5 Turbo,适用于各种文本生成和理解任务,Currently points to gpt-3.5-turbo-0125',
343
+ displayName: 'GPT-3.5 Turbo 1106',
344
+ id: 'gpt-3.5-turbo-1106',
345
+ pricing: {
346
+ input: 1,
347
+ output: 2,
348
+ },
349
+ releasedAt: '2023-11-06',
350
+ type: 'chat',
351
+ },
352
+ {
353
+ contextWindowTokens: 4096,
354
+ description:
355
+ 'GPT 3.5 Turbo,适用于各种文本生成和理解任务,Currently points to gpt-3.5-turbo-0125',
356
+ displayName: 'GPT-3.5 Turbo Instruct',
357
+ id: 'gpt-3.5-turbo-instruct',
358
+ pricing: {
359
+ input: 1.5,
360
+ output: 2,
361
+ },
362
+ type: 'chat',
363
+ },
364
+ ];
365
+
366
+ export const openaiEmbeddingModels: AIEmbeddingModelCard[] = [
367
+ {
368
+ contextWindowTokens: 8192,
369
+ description: '最强大的向量化模型,适用于英文和非英文任务',
370
+ displayName: 'Text Embedding 3 Large',
371
+ id: 'text-embedding-3-large',
372
+ maxDimension: 3072,
373
+ pricing: {
374
+ currency: 'USD',
375
+ input: 0.13,
376
+ },
377
+ releasedAt: '2024-01-25',
378
+ type: 'embedding',
379
+ },
380
+ {
381
+ contextWindowTokens: 8192,
382
+ description: '高效且经济的新一代 Embedding 模型,适用于知识检索、RAG 应用等场景',
383
+ displayName: 'Text Embedding 3 Small',
384
+ id: 'text-embedding-3-small',
385
+ maxDimension: 1536,
386
+ pricing: {
387
+ currency: 'USD',
388
+ input: 0.02,
389
+ },
390
+ releasedAt: '2024-01-25',
391
+ type: 'embedding',
392
+ },
393
+ ];
394
+
395
+ // 语音合成模型
396
+ export const openaiTTSModels: AITTSModelCard[] = [
397
+ {
398
+ description: '最新的文本转语音模型,针对实时场景优化速度',
399
+ displayName: 'TTS-1',
400
+ id: 'tts-1',
401
+ pricing: {
402
+ input: 15,
403
+ },
404
+ type: 'tts',
405
+ },
406
+ {
407
+ description: '最新的文本转语音模型,针对质量进行优化',
408
+ displayName: 'TTS-1 HD',
409
+ id: 'tts-1-hd',
410
+ pricing: {
411
+ input: 30,
412
+ },
413
+ type: 'tts',
414
+ },
415
+ ];
416
+
417
+ // 语音识别模型
418
+ export const openaiSTTModels: AISTTModelCard[] = [
419
+ {
420
+ description: '通用语音识别模型,支持多语言语音识别、语音翻译和语言识别',
421
+ displayName: 'Whisper',
422
+ id: 'whisper-1',
423
+ pricing: {
424
+ input: 0.006, // per minute
425
+ },
426
+ type: 'stt',
427
+ },
428
+ ];
429
+
430
+ // 图像生成模型
431
+ export const openaiImageModels: AIText2ImageModelCard[] = [
432
+ {
433
+ description:
434
+ '最新的 DALL·E 模型,于2023年11月发布。支持更真实、准确的图像生成,具有更强的细节表现力',
435
+ displayName: 'DALL·E 3',
436
+ id: 'dall-e-3',
437
+ pricing: {
438
+ hd: 0.08,
439
+ standard: 0.04,
440
+ },
441
+ resolutions: ['1024x1024', '1024x1792', '1792x1024'],
442
+ type: 'image',
443
+ },
444
+ {
445
+ description: '第二代 DALL·E 模型,支持更真实、准确的图像生成,分辨率是第一代的4倍',
446
+ displayName: 'DALL·E 2',
447
+ id: 'dall-e-2',
448
+ pricing: {
449
+ input: 0.02, // $0.020 per image (1024×1024)
450
+ },
451
+ resolutions: ['256x256', '512x512', '1024x1024'],
452
+ type: 'image',
453
+ },
454
+ ];
455
+
456
+ // GPT-4o 和 GPT-4o-mini 实时模型
457
+ export const openaiRealtimeModels: AIRealtimeModelCard[] = [
458
+ {
459
+ contextWindowTokens: 128_000,
460
+ description: 'GPT-4o 实时版本,支持音频和文本实时输入输出',
461
+ displayName: 'GPT-4o Realtime',
462
+ id: 'gpt-4o-realtime-preview',
463
+ maxOutput: 4096,
464
+ pricing: {
465
+ audioInput: 100,
466
+ audioOutput: 200,
467
+ cachedAudioInput: 20,
468
+ cachedInput: 2.5,
469
+ input: 5,
470
+ output: 20,
471
+ },
472
+ releasedAt: '2024-10-01',
473
+ type: 'realtime',
474
+ },
475
+ {
476
+ contextWindowTokens: 128_000,
477
+ description: 'GPT-4o 实时版本,支持音频和文本实时输入输出',
478
+ displayName: 'GPT-4o Realtime 10-01',
479
+ id: 'gpt-4o-realtime-preview-2024-10-01',
480
+ maxOutput: 4096,
481
+ pricing: {
482
+ audioInput: 100,
483
+ audioOutput: 200,
484
+ cachedAudioInput: 20,
485
+ cachedInput: 2.5,
486
+ input: 5,
487
+ output: 20,
488
+ },
489
+ releasedAt: '2024-10-01',
490
+ type: 'realtime',
491
+ },
492
+ {
493
+ contextWindowTokens: 128_000,
494
+ description: 'GPT-4o 实时版本,支持音频和文本实时输入输出',
495
+ displayName: 'GPT-4o Realtime 12-17',
496
+ id: 'gpt-4o-realtime-preview-2024-12-17',
497
+ maxOutput: 4096,
498
+ pricing: {
499
+ audioInput: 40,
500
+ audioOutput: 80,
501
+ cachedAudioInput: 2.5,
502
+ cachedInput: 2.5,
503
+ input: 5,
504
+ output: 20,
505
+ },
506
+ releasedAt: '2024-12-17',
507
+ type: 'realtime',
508
+ },
509
+ {
510
+ contextWindowTokens: 128_000,
511
+ description: 'GPT-4o-mini 实时版本,支持音频和文本实时输入输出',
512
+ displayName: 'GPT-4o Mini Realtime',
513
+ id: 'gpt-4o-mini-realtime-preview',
514
+ maxOutput: 4096,
515
+ pricing: {
516
+ audioInput: 10,
517
+ audioOutput: 20,
518
+ cachedAudioInput: 0.3,
519
+ cachedInput: 0.3,
520
+ input: 0.6,
521
+ output: 2.4,
522
+ },
523
+ releasedAt: '2024-12-17',
524
+ type: 'realtime',
525
+ },
526
+ ];
527
+
528
+ export const allModels = [
529
+ ...openaiChatModels,
530
+ ...openaiEmbeddingModels,
531
+ ...openaiTTSModels,
532
+ ...openaiSTTModels,
533
+ ...openaiImageModels,
534
+ ...openaiRealtimeModels,
535
+ ];
536
+
537
+ export default allModels;