@lobehub/lobehub 2.0.0-next.51 → 2.0.0-next.52
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.
- package/CHANGELOG.md +25 -0
- package/apps/desktop/src/main/controllers/LocalFileCtr.ts +25 -5
- package/apps/desktop/src/main/controllers/__tests__/LocalFileCtr.test.ts +4 -1
- package/apps/desktop/src/main/modules/fileSearch/__tests__/macOS.integration.test.ts +357 -0
- package/apps/desktop/src/main/modules/fileSearch/impl/macOS.ts +30 -22
- package/changelog/v1.json +9 -0
- package/locales/ar/models.json +119 -126
- package/locales/ar/plugin.json +1 -1
- package/locales/bg-BG/models.json +104 -132
- package/locales/bg-BG/plugin.json +1 -1
- package/locales/de-DE/models.json +119 -126
- package/locales/de-DE/plugin.json +1 -1
- package/locales/en-US/models.json +167 -126
- package/locales/en-US/plugin.json +1 -1
- package/locales/es-ES/models.json +119 -126
- package/locales/es-ES/plugin.json +1 -1
- package/locales/fa-IR/models.json +119 -126
- package/locales/fa-IR/plugin.json +1 -1
- package/locales/fr-FR/models.json +119 -126
- package/locales/fr-FR/plugin.json +1 -1
- package/locales/it-IT/models.json +119 -126
- package/locales/it-IT/plugin.json +1 -1
- package/locales/ja-JP/models.json +119 -126
- package/locales/ja-JP/plugin.json +1 -1
- package/locales/ko-KR/models.json +119 -126
- package/locales/ko-KR/plugin.json +1 -1
- package/locales/nl-NL/models.json +119 -126
- package/locales/nl-NL/plugin.json +1 -1
- package/locales/pl-PL/models.json +119 -126
- package/locales/pl-PL/plugin.json +1 -1
- package/locales/pt-BR/models.json +119 -126
- package/locales/pt-BR/plugin.json +1 -1
- package/locales/ru-RU/models.json +119 -126
- package/locales/ru-RU/plugin.json +1 -1
- package/locales/tr-TR/models.json +119 -126
- package/locales/tr-TR/plugin.json +1 -1
- package/locales/vi-VN/models.json +119 -126
- package/locales/vi-VN/plugin.json +1 -1
- package/locales/zh-CN/models.json +173 -80
- package/locales/zh-CN/plugin.json +1 -1
- package/locales/zh-TW/models.json +119 -126
- package/locales/zh-TW/plugin.json +1 -1
- package/package.json +1 -1
- package/packages/electron-client-ipc/src/types/localSystem.ts +26 -2
- package/packages/model-runtime/src/core/contextBuilders/openai.test.ts +58 -0
- package/packages/model-runtime/src/core/contextBuilders/openai.ts +24 -10
- package/packages/model-runtime/src/core/openaiCompatibleFactory/index.ts +3 -2
- package/packages/model-runtime/src/providers/openai/index.test.ts +44 -0
- package/packages/types/src/tool/builtin.ts +6 -4
- package/src/features/Conversation/Messages/Assistant/Tool/Render/LoadingPlaceholder/index.tsx +3 -3
- package/src/features/Conversation/Messages/Group/Tool/Render/Intervention/index.tsx +2 -2
- package/src/features/Conversation/Messages/Group/Tool/Render/LoadingPlaceholder/index.tsx +3 -3
- package/src/features/PluginsUI/Render/BuiltinType/index.test.tsx +10 -4
- package/src/features/PluginsUI/Render/BuiltinType/index.tsx +2 -2
- package/src/locales/default/plugin.ts +1 -1
- package/src/services/chat/chat.test.ts +1 -0
- package/src/store/aiInfra/slices/aiProvider/__tests__/selectors.test.ts +62 -0
- package/src/store/aiInfra/slices/aiProvider/selectors.ts +1 -1
- package/src/tools/code-interpreter/Render/index.tsx +1 -1
- package/src/tools/interventions.ts +28 -4
- package/src/tools/local-system/Placeholder/ListFiles.tsx +3 -5
- package/src/tools/local-system/Placeholder/SearchFiles.tsx +2 -5
- package/src/tools/local-system/Render/ListFiles/index.tsx +16 -21
- package/src/tools/local-system/Render/RenameLocalFile/index.tsx +15 -20
- package/src/tools/local-system/Render/RunCommand/index.tsx +67 -70
- package/src/tools/local-system/Render/SearchFiles/SearchQuery/index.tsx +0 -1
- package/src/tools/local-system/Render/SearchFiles/index.tsx +15 -20
- package/src/tools/local-system/Render/WriteFile/index.tsx +2 -8
- package/src/tools/local-system/index.ts +4 -4
- package/src/tools/local-system/systemRole.ts +1 -1
- package/src/tools/placeholders.ts +39 -8
- package/src/tools/renders.ts +56 -9
- package/src/tools/web-browsing/Placeholder/{PageContent.tsx → CrawlMultiPages.tsx} +4 -1
- package/src/tools/web-browsing/Placeholder/CrawlSinglePage.tsx +12 -0
- package/src/tools/web-browsing/Placeholder/Search.tsx +4 -4
- package/src/tools/web-browsing/Render/CrawlMultiPages.tsx +15 -0
- package/src/tools/web-browsing/Render/CrawlSinglePage.tsx +15 -0
- package/src/tools/web-browsing/Render/Search/index.tsx +39 -44
- package/packages/database/migrations/0044_add_tool_intervention.sql +0 -1
- package/src/tools/local-system/Intervention/index.tsx +0 -17
- package/src/tools/local-system/Placeholder/index.tsx +0 -25
- package/src/tools/local-system/Render/index.tsx +0 -42
- package/src/tools/web-browsing/Placeholder/index.tsx +0 -40
- package/src/tools/web-browsing/Render/index.tsx +0 -57
|
@@ -1049,6 +1049,9 @@
|
|
|
1049
1049
|
"deepseek-r1-0528": {
|
|
1050
1050
|
"description": "685B 滿血版模型,2025年5月28日發布。DeepSeek-R1 在後訓練階段大規模使用了強化學習技術,在僅有極少標註資料的情況下,大幅提升了模型推理能力。在數學、程式碼、自然語言推理等任務上,性能較高,能力較強。"
|
|
1051
1051
|
},
|
|
1052
|
+
"deepseek-r1-250528": {
|
|
1053
|
+
"description": "DeepSeek R1 250528,完整版 DeepSeek-R1 推理模型,適用於高難度數學與邏輯任務。"
|
|
1054
|
+
},
|
|
1052
1055
|
"deepseek-r1-70b-fast-online": {
|
|
1053
1056
|
"description": "DeepSeek R1 70B 快速版,支持即時聯網搜索,在保持模型性能的同時提供更快的響應速度。"
|
|
1054
1057
|
},
|
|
@@ -1059,31 +1062,34 @@
|
|
|
1059
1062
|
"description": "deepseek-r1-distill-llama 是基於 Llama 從 DeepSeek-R1 蒸餾而來的模型。"
|
|
1060
1063
|
},
|
|
1061
1064
|
"deepseek-r1-distill-llama-70b": {
|
|
1062
|
-
"description": "DeepSeek R1
|
|
1065
|
+
"description": "DeepSeek R1 Distill Llama 70B,結合通用 R1 推理能力與 Llama 生態的蒸餾模型。"
|
|
1063
1066
|
},
|
|
1064
1067
|
"deepseek-r1-distill-llama-8b": {
|
|
1065
|
-
"description": "DeepSeek-R1-Distill
|
|
1068
|
+
"description": "DeepSeek-R1-Distill-Llama-8B 是一款基於 Llama-3.1-8B 的蒸餾大型語言模型,採用 DeepSeek R1 的輸出。"
|
|
1066
1069
|
},
|
|
1067
|
-
"deepseek-r1-distill-qianfan-
|
|
1068
|
-
"description": "
|
|
1070
|
+
"deepseek-r1-distill-qianfan-70b": {
|
|
1071
|
+
"description": "DeepSeek R1 Distill Qianfan 70B,基於 Qianfan-70B 的 R1 蒸餾模型,具高性價比。"
|
|
1072
|
+
},
|
|
1073
|
+
"deepseek-r1-distill-qianfan-8b": {
|
|
1074
|
+
"description": "DeepSeek R1 Distill Qianfan 8B,基於 Qianfan-8B 的 R1 蒸餾模型,適用於中小型應用。"
|
|
1069
1075
|
},
|
|
1070
|
-
"deepseek-r1-distill-qianfan-llama-
|
|
1071
|
-
"description": "
|
|
1076
|
+
"deepseek-r1-distill-qianfan-llama-70b": {
|
|
1077
|
+
"description": "DeepSeek R1 Distill Qianfan Llama 70B,基於 Llama-70B 的 R1 蒸餾模型。"
|
|
1072
1078
|
},
|
|
1073
1079
|
"deepseek-r1-distill-qwen": {
|
|
1074
1080
|
"description": "deepseek-r1-distill-qwen 是基於 Qwen 從 DeepSeek-R1 蒸餾而來的模型。"
|
|
1075
1081
|
},
|
|
1076
1082
|
"deepseek-r1-distill-qwen-1.5b": {
|
|
1077
|
-
"description": "DeepSeek
|
|
1083
|
+
"description": "DeepSeek R1 Distill Qwen 1.5B,超輕量 R1 蒸餾模型,適用於極低資源環境。"
|
|
1078
1084
|
},
|
|
1079
1085
|
"deepseek-r1-distill-qwen-14b": {
|
|
1080
|
-
"description": "DeepSeek
|
|
1086
|
+
"description": "DeepSeek R1 Distill Qwen 14B,中等規模 R1 蒸餾模型,適合多場景部署。"
|
|
1081
1087
|
},
|
|
1082
1088
|
"deepseek-r1-distill-qwen-32b": {
|
|
1083
|
-
"description": "DeepSeek
|
|
1089
|
+
"description": "DeepSeek R1 Distill Qwen 32B,基於 Qwen-32B 的 R1 蒸餾模型,兼顧效能與成本。"
|
|
1084
1090
|
},
|
|
1085
1091
|
"deepseek-r1-distill-qwen-7b": {
|
|
1086
|
-
"description": "DeepSeek
|
|
1092
|
+
"description": "DeepSeek R1 Distill Qwen 7B,輕量級 R1 蒸餾模型,適合邊緣與企業私有化部署環境。"
|
|
1087
1093
|
},
|
|
1088
1094
|
"deepseek-r1-fast-online": {
|
|
1089
1095
|
"description": "DeepSeek R1 滿血快速版,支持即時聯網搜索,結合了 671B 參數的強大能力和更快的響應速度。"
|
|
@@ -1112,12 +1118,24 @@
|
|
|
1112
1118
|
"deepseek-v3.1-terminus": {
|
|
1113
1119
|
"description": "DeepSeek-V3.1-Terminus 是深度求索推出的終端優化版本大型語言模型,專為終端設備優化。"
|
|
1114
1120
|
},
|
|
1121
|
+
"deepseek-v3.1-think-250821": {
|
|
1122
|
+
"description": "DeepSeek V3.1 Think 250821,對應 Terminus 版本的深度思考模型,適用於高效能推理場景。"
|
|
1123
|
+
},
|
|
1115
1124
|
"deepseek-v3.1:671b": {
|
|
1116
1125
|
"description": "DeepSeek V3.1:下一代推理模型,提升了複雜推理與鏈路思考能力,適合需要深入分析的任務。"
|
|
1117
1126
|
},
|
|
1118
1127
|
"deepseek-v3.2-exp": {
|
|
1119
1128
|
"description": "deepseek-v3.2-exp 引入稀疏注意力機制,旨在提升處理長文本時的訓練與推理效率,價格低於 deepseek-v3.1。"
|
|
1120
1129
|
},
|
|
1130
|
+
"deepseek-v3.2-think": {
|
|
1131
|
+
"description": "DeepSeek V3.2 Think,完整版深度思考模型,強化長鏈推理能力。"
|
|
1132
|
+
},
|
|
1133
|
+
"deepseek-vl2": {
|
|
1134
|
+
"description": "DeepSeek VL2,多模態模型,支援圖文理解與細緻視覺問答。"
|
|
1135
|
+
},
|
|
1136
|
+
"deepseek-vl2-small": {
|
|
1137
|
+
"description": "DeepSeek VL2 Small,輕量多模態版本,適用於資源受限與高併發場景。"
|
|
1138
|
+
},
|
|
1121
1139
|
"deepseek/deepseek-chat-v3-0324": {
|
|
1122
1140
|
"description": "DeepSeek V3 是一個 685B 參數的專家混合模型,是 DeepSeek 團隊旗艦聊天模型系列的最新迭代。\n\n它繼承了 [DeepSeek V3](/deepseek/deepseek-chat-v3) 模型,並在各種任務上表現出色。"
|
|
1123
1141
|
},
|
|
@@ -1253,83 +1271,89 @@
|
|
|
1253
1271
|
"emohaa": {
|
|
1254
1272
|
"description": "Emohaa是一個心理模型,具備專業諮詢能力,幫助用戶理解情感問題。"
|
|
1255
1273
|
},
|
|
1256
|
-
"ernie-
|
|
1257
|
-
"description": "
|
|
1258
|
-
},
|
|
1259
|
-
"ernie-3.5-8k": {
|
|
1260
|
-
"description": "百度自研的旗艦級大規模大語言模型,覆蓋海量中英文語料,具有強大的通用能力,可滿足絕大部分對話問答、創作生成、插件應用場景要求;支持自動對接百度搜索插件,保障問答信息時效。"
|
|
1261
|
-
},
|
|
1262
|
-
"ernie-3.5-8k-preview": {
|
|
1263
|
-
"description": "百度自研的旗艦級大規模大語言模型,覆蓋海量中英文語料,具有強大的通用能力,可滿足絕大部分對話問答、創作生成、插件應用場景要求;支持自動對接百度搜索插件,保障問答信息時效。"
|
|
1264
|
-
},
|
|
1265
|
-
"ernie-4.0-8k-latest": {
|
|
1266
|
-
"description": "百度自研的旗艦級超大規模大語言模型,相較ERNIE 3.5實現了模型能力全面升級,廣泛適用於各領域複雜任務場景;支持自動對接百度搜索插件,保障問答信息時效。"
|
|
1267
|
-
},
|
|
1268
|
-
"ernie-4.0-8k-preview": {
|
|
1269
|
-
"description": "百度自研的旗艦級超大規模大語言模型,相較ERNIE 3.5實現了模型能力全面升級,廣泛適用於各領域複雜任務場景;支持自動對接百度搜索插件,保障問答信息時效。"
|
|
1270
|
-
},
|
|
1271
|
-
"ernie-4.0-turbo-128k": {
|
|
1272
|
-
"description": "百度自研的旗艦級超大規模大語言模型,綜合效果表現出色,廣泛適用於各領域複雜任務場景;支持自動對接百度搜索插件,保障問答信息時效。相較於ERNIE 4.0在性能表現上更優秀"
|
|
1273
|
-
},
|
|
1274
|
-
"ernie-4.0-turbo-8k-latest": {
|
|
1275
|
-
"description": "百度自研的旗艦級超大規模大語言模型,綜合效果表現出色,廣泛適用於各領域複雜任務場景;支持自動對接百度搜索插件,保障問答信息時效。相較於ERNIE 4.0在性能表現上更優秀"
|
|
1276
|
-
},
|
|
1277
|
-
"ernie-4.0-turbo-8k-preview": {
|
|
1278
|
-
"description": "百度自研的旗艦級超大規模大語言模型,綜合效果表現出色,廣泛適用於各領域複雜任務場景;支持自動對接百度搜索插件,保障問答信息時效。相較於ERNIE 4.0在性能表現上更優秀"
|
|
1274
|
+
"ernie-4.5-0.3b": {
|
|
1275
|
+
"description": "ERNIE 4.5 0.3B,開源輕量版模型,適合作為本地與客製化部署方案。"
|
|
1279
1276
|
},
|
|
1280
1277
|
"ernie-4.5-21b-a3b": {
|
|
1281
|
-
"description": "ERNIE 4.5 21B A3B
|
|
1278
|
+
"description": "ERNIE 4.5 21B A3B,開源大參數模型,在理解與生成任務上表現更佳。"
|
|
1282
1279
|
},
|
|
1283
1280
|
"ernie-4.5-300b-a47b": {
|
|
1284
1281
|
"description": "ERNIE 4.5 300B A47B 是百度文心推出的超大規模混合專家模型,具備卓越的推理能力。"
|
|
1285
1282
|
},
|
|
1286
1283
|
"ernie-4.5-8k-preview": {
|
|
1287
|
-
"description": "
|
|
1284
|
+
"description": "ERNIE 4.5 8K Preview,8K 上下文預覽模型,用於體驗與測試文心 4.5 能力。"
|
|
1288
1285
|
},
|
|
1289
1286
|
"ernie-4.5-turbo-128k": {
|
|
1290
|
-
"description": "
|
|
1287
|
+
"description": "ERNIE 4.5 Turbo 128K,高效能通用模型,支援搜尋增強與工具調用,適用於問答、程式碼、智能體等多種業務場景。"
|
|
1288
|
+
},
|
|
1289
|
+
"ernie-4.5-turbo-128k-preview": {
|
|
1290
|
+
"description": "ERNIE 4.5 Turbo 128K 預覽版,提供與正式版一致的能力體驗,適合聯調與灰度測試。"
|
|
1291
1291
|
},
|
|
1292
1292
|
"ernie-4.5-turbo-32k": {
|
|
1293
|
-
"description": "
|
|
1293
|
+
"description": "ERNIE 4.5 Turbo 32K,中長上下文版本,適用於問答、知識庫檢索與多輪對話等場景。"
|
|
1294
|
+
},
|
|
1295
|
+
"ernie-4.5-turbo-latest": {
|
|
1296
|
+
"description": "ERNIE 4.5 Turbo 最新版,整體效能優化,適合作為生產環境通用主力模型。"
|
|
1297
|
+
},
|
|
1298
|
+
"ernie-4.5-turbo-vl": {
|
|
1299
|
+
"description": "ERNIE 4.5 Turbo VL,成熟多模態模型,適合生產環境中的圖文理解與識別任務。"
|
|
1294
1300
|
},
|
|
1295
1301
|
"ernie-4.5-turbo-vl-32k": {
|
|
1296
|
-
"description": "
|
|
1302
|
+
"description": "ERNIE 4.5 Turbo VL 32K,中長文本多模態版本,適用於長文檔與圖片的聯合理解。"
|
|
1303
|
+
},
|
|
1304
|
+
"ernie-4.5-turbo-vl-32k-preview": {
|
|
1305
|
+
"description": "ERNIE 4.5 Turbo VL 32K Preview,多模態 32K 預覽版,便於評估長上下文視覺能力。"
|
|
1306
|
+
},
|
|
1307
|
+
"ernie-4.5-turbo-vl-latest": {
|
|
1308
|
+
"description": "ERNIE 4.5 Turbo VL Latest,多模態最新版本,提供更佳圖文理解與推理效果。"
|
|
1309
|
+
},
|
|
1310
|
+
"ernie-4.5-turbo-vl-preview": {
|
|
1311
|
+
"description": "ERNIE 4.5 Turbo VL Preview,多模態預覽模型,支援圖文理解與生成,適合視覺問答與內容理解體驗。"
|
|
1312
|
+
},
|
|
1313
|
+
"ernie-4.5-vl-28b-a3b": {
|
|
1314
|
+
"description": "ERNIE 4.5 VL 28B A3B,多模態開源模型,支援圖文理解與推理任務。"
|
|
1315
|
+
},
|
|
1316
|
+
"ernie-5.0-thinking-preview": {
|
|
1317
|
+
"description": "文心 5.0 Thinking 預覽版,原生全模態旗艦模型,支援文字、圖像、音訊、影片統一建模,整體能力全面升級,適用於複雜問答、創作與智能體場景。"
|
|
1297
1318
|
},
|
|
1298
1319
|
"ernie-char-8k": {
|
|
1299
|
-
"description": "
|
|
1320
|
+
"description": "ERNIE Character 8K,角色人格對話模型,適合 IP 角色建構與長期陪伴對話。"
|
|
1300
1321
|
},
|
|
1301
1322
|
"ernie-char-fiction-8k": {
|
|
1302
|
-
"description": "
|
|
1323
|
+
"description": "ERNIE Character Fiction 8K,面向小說與劇情創作的人格模型,適合長文本故事生成。"
|
|
1324
|
+
},
|
|
1325
|
+
"ernie-char-fiction-8k-preview": {
|
|
1326
|
+
"description": "ERNIE Character Fiction 8K Preview,人物與劇情創作模型預覽版,用於功能體驗與測試。"
|
|
1303
1327
|
},
|
|
1304
1328
|
"ernie-irag-edit": {
|
|
1305
|
-
"description": "
|
|
1329
|
+
"description": "ERNIE iRAG Edit,支援圖片擦除、重繪與變體生成的圖像編輯模型。"
|
|
1306
1330
|
},
|
|
1307
1331
|
"ernie-lite-8k": {
|
|
1308
|
-
"description": "ERNIE Lite
|
|
1332
|
+
"description": "ERNIE Lite 8K,輕量級通用模型,適合對成本敏感的日常問答與內容生成場景。"
|
|
1309
1333
|
},
|
|
1310
1334
|
"ernie-lite-pro-128k": {
|
|
1311
|
-
"description": "
|
|
1335
|
+
"description": "ERNIE Lite Pro 128K,輕量高效能模型,適合對延遲與成本敏感的業務場景。"
|
|
1312
1336
|
},
|
|
1313
1337
|
"ernie-novel-8k": {
|
|
1314
|
-
"description": "
|
|
1338
|
+
"description": "ERNIE Novel 8K,長篇小說與 IP 劇情創作模型,擅長多角色、多線敘事。"
|
|
1315
1339
|
},
|
|
1316
1340
|
"ernie-speed-128k": {
|
|
1317
|
-
"description": "
|
|
1341
|
+
"description": "ERNIE Speed 128K,免輸入輸出費用的大模型,適合長文本理解與大規模試用場景。"
|
|
1342
|
+
},
|
|
1343
|
+
"ernie-speed-8k": {
|
|
1344
|
+
"description": "ERNIE Speed 8K,免費快速模型,適合日常對話與輕量文本任務。"
|
|
1318
1345
|
},
|
|
1319
1346
|
"ernie-speed-pro-128k": {
|
|
1320
|
-
"description": "
|
|
1347
|
+
"description": "ERNIE Speed Pro 128K,高併發高性價比模型,適合大規模線上服務與企業應用。"
|
|
1321
1348
|
},
|
|
1322
1349
|
"ernie-tiny-8k": {
|
|
1323
|
-
"description": "ERNIE Tiny
|
|
1324
|
-
},
|
|
1325
|
-
"ernie-x1-32k": {
|
|
1326
|
-
"description": "具備更強的理解、規劃、反思、進化能力。作為能力更全面的深度思考模型,文心X1兼具準確、創意和文采,在中文知識問答、文學創作、文稿寫作、日常對話、邏輯推理、複雜計算及工具調用等方面表現尤為出色。"
|
|
1327
|
-
},
|
|
1328
|
-
"ernie-x1-32k-preview": {
|
|
1329
|
-
"description": "文心大模型X1具備更強的理解、規劃、反思、進化能力。作為能力更全面的深度思考模型,文心X1兼具準確、創意和文采,在中文知識問答、文學創作、文稿寫作、日常對話、邏輯推理、複雜計算及工具調用等方面表現尤為出色。"
|
|
1350
|
+
"description": "ERNIE Tiny 8K,極輕量模型,適合簡單問答、分類等低成本推理場景。"
|
|
1330
1351
|
},
|
|
1331
1352
|
"ernie-x1-turbo-32k": {
|
|
1332
|
-
"description": "
|
|
1353
|
+
"description": "ERNIE X1 Turbo 32K,高速思考模型,32K 長上下文,適合複雜推理與多輪對話。"
|
|
1354
|
+
},
|
|
1355
|
+
"ernie-x1.1-preview": {
|
|
1356
|
+
"description": "ERNIE X1.1 Preview,ERNIE X1.1 思考模型預覽版,適合能力驗證與測試。"
|
|
1333
1357
|
},
|
|
1334
1358
|
"fal-ai/bytedance/seedream/v4": {
|
|
1335
1359
|
"description": "Seedream 4.0 圖片生成模型由字節跳動 Seed 團隊研發,支援文字與圖片輸入,提供高可控、高品質的圖片生成體驗。基於文字提示詞生成圖片。"
|
|
@@ -1389,7 +1413,7 @@
|
|
|
1389
1413
|
"description": "FLUX.1 [schnell] 作為目前開源最先進的少步模型,不僅超越了同類競爭者,甚至還優於諸如 Midjourney v6.0 和 DALL·E 3 (HD) 等強大的非精煉模型。該模型經過專門微調,以保留預訓練階段的全部輸出多樣性,相較於當前市場上的最先進模型,FLUX.1 [schnell] 顯著提升了在視覺品質、指令遵從、尺寸/比例變化、字體處理及輸出多樣性等方面的可能,為用戶帶來更為豐富多樣的創意圖像生成體驗。"
|
|
1390
1414
|
},
|
|
1391
1415
|
"flux.1-schnell": {
|
|
1392
|
-
"description": "
|
|
1416
|
+
"description": "FLUX.1-schnell,高效能圖像生成模型,適合快速生成多風格圖片。"
|
|
1393
1417
|
},
|
|
1394
1418
|
"gemini-1.0-pro-001": {
|
|
1395
1419
|
"description": "Gemini 1.0 Pro 001 (Tuning) 提供穩定並可調優的性能,是複雜任務解決方案的理想選擇。"
|
|
@@ -1538,6 +1562,9 @@
|
|
|
1538
1562
|
"glm-4-0520": {
|
|
1539
1563
|
"description": "GLM-4-0520是最新模型版本,專為高度複雜和多樣化任務設計,表現卓越。"
|
|
1540
1564
|
},
|
|
1565
|
+
"glm-4-32b-0414": {
|
|
1566
|
+
"description": "GLM-4 32B 0414,GLM 系列通用大型模型版本,支援多任務文本生成與理解。"
|
|
1567
|
+
},
|
|
1541
1568
|
"glm-4-9b-chat": {
|
|
1542
1569
|
"description": "GLM-4-9B-Chat 在語意、數學、推理、程式碼與知識等多方面均展現出高效能。還具備網頁瀏覽、程式碼執行、自訂工具調用與長文本推理能力。支援包括日語、韓語、德語在內的 26 種語言。"
|
|
1543
1570
|
},
|
|
@@ -2036,14 +2063,26 @@
|
|
|
2036
2063
|
"internlm3-latest": {
|
|
2037
2064
|
"description": "我們最新的模型系列,有著卓越的推理性能,領跑同量級開源模型。默認指向我們最新發布的 InternLM3 系列模型"
|
|
2038
2065
|
},
|
|
2066
|
+
"internvl2.5-38b-mpo": {
|
|
2067
|
+
"description": "InternVL2.5 38B MPO,多模態預訓練模型,支援複雜圖文推理任務。"
|
|
2068
|
+
},
|
|
2039
2069
|
"internvl2.5-latest": {
|
|
2040
2070
|
"description": "我們仍在維護的 InternVL2.5 版本,具備優異且穩定的性能。默認指向我們最新發布的 InternVL2.5 系列模型,當前指向 internvl2.5-78b。"
|
|
2041
2071
|
},
|
|
2072
|
+
"internvl3-14b": {
|
|
2073
|
+
"description": "InternVL3 14B,中等規模多模態模型,在效能與成本間取得平衡。"
|
|
2074
|
+
},
|
|
2075
|
+
"internvl3-1b": {
|
|
2076
|
+
"description": "InternVL3 1B,輕量多模態模型,適合資源受限環境部署。"
|
|
2077
|
+
},
|
|
2078
|
+
"internvl3-38b": {
|
|
2079
|
+
"description": "InternVL3 38B,大規模多模態開源模型,適用於高精度圖文理解任務。"
|
|
2080
|
+
},
|
|
2042
2081
|
"internvl3-latest": {
|
|
2043
2082
|
"description": "我們最新發布的多模態大模型,具備更強的圖文理解能力、長時序圖片理解能力,性能比肩頂尖閉源模型。默認指向我們最新發布的 InternVL 系列模型,當前指向 internvl3-78b。"
|
|
2044
2083
|
},
|
|
2045
2084
|
"irag-1.0": {
|
|
2046
|
-
"description": "
|
|
2085
|
+
"description": "ERNIE iRAG,圖像檢索增強生成模型,支援以圖搜圖、圖文檢索與內容生成。"
|
|
2047
2086
|
},
|
|
2048
2087
|
"jamba-large": {
|
|
2049
2088
|
"description": "我們最強大、最先進的模型,專為處理企業級複雜任務而設計,具備卓越的性能。"
|
|
@@ -2064,7 +2103,7 @@
|
|
|
2064
2103
|
"description": "kimi-k2-0905-preview 模型上下文長度為 256k,具備更強的 Agentic Coding 能力、更突出的前端程式碼的美觀度和實用性、以及更好的上下文理解能力。"
|
|
2065
2104
|
},
|
|
2066
2105
|
"kimi-k2-instruct": {
|
|
2067
|
-
"description": "Kimi K2 Instruct
|
|
2106
|
+
"description": "Kimi K2 Instruct,Kimi 官方推理模型,支援長上下文與程式碼、問答等多場景。"
|
|
2068
2107
|
},
|
|
2069
2108
|
"kimi-k2-turbo-preview": {
|
|
2070
2109
|
"description": "kimi-k2 是一款具備超強程式碼與 Agent 能力的 MoE 架構的基礎模型,總參數 1T,激活參數 32B。在通用知識推理、程式設計、數學與 Agent 等主要類別的基準效能測試中,K2 模型的表現超越其他主流開源模型。"
|
|
@@ -2885,9 +2924,7 @@
|
|
|
2885
2924
|
"qwen2.5-72b-instruct": {
|
|
2886
2925
|
"description": "通義千問2.5對外開源的72B規模的模型。"
|
|
2887
2926
|
},
|
|
2888
|
-
"qwen2.5-7b-instruct": {
|
|
2889
|
-
"description": "通義千問2.5對外開源的7B規模的模型。"
|
|
2890
|
-
},
|
|
2927
|
+
"qwen2.5-7b-instruct": {},
|
|
2891
2928
|
"qwen2.5-coder-1.5b-instruct": {
|
|
2892
2929
|
"description": "通義千問代碼模型開源版。"
|
|
2893
2930
|
},
|
|
@@ -2918,15 +2955,11 @@
|
|
|
2918
2955
|
"qwen2.5-omni-7b": {
|
|
2919
2956
|
"description": "Qwen-Omni 系列模型支援輸入多種模態的數據,包括視頻、音頻、圖片、文本,並輸出音頻與文本。"
|
|
2920
2957
|
},
|
|
2921
|
-
"qwen2.5-vl-32b-instruct": {
|
|
2922
|
-
"description": "Qwen2.5-VL 系列模型提升了模型的智能水準、實用性和適用性,使其在自然對話、內容創作、專業知識服務及程式碼開發等場景中表現更優。32B 版本使用了強化學習技術優化模型,與 Qwen2.5 VL 系列的其他模型相比,提供了更符合人類偏好的輸出風格、複雜數學問題的推理能力,以及影像細粒度理解與推理能力。"
|
|
2923
|
-
},
|
|
2958
|
+
"qwen2.5-vl-32b-instruct": {},
|
|
2924
2959
|
"qwen2.5-vl-72b-instruct": {
|
|
2925
2960
|
"description": "指令跟隨、數學、解題、代碼整體提升,萬物識別能力提升,支持多樣格式直接精準定位視覺元素,支持對長視頻文件(最長10分鐘)進行理解和秒級別的事件時刻定位,能理解時間先後和快慢,基於解析和定位能力支持操控OS或Mobile的Agent,關鍵信息抽取能力和Json格式輸出能力強,此版本為72B版本,本系列能力最強的版本。"
|
|
2926
2961
|
},
|
|
2927
|
-
"qwen2.5-vl-7b-instruct": {
|
|
2928
|
-
"description": "指令跟隨、數學、解題、代碼整體提升,萬物識別能力提升,支持多樣格式直接精準定位視覺元素,支持對長視頻文件(最長10分鐘)進行理解和秒級別的事件時刻定位,能理解時間先後和快慢,基於解析和定位能力支持操控OS或Mobile的Agent,關鍵信息抽取能力和Json格式輸出能力強,此版本為72B版本,本系列能力最強的版本。"
|
|
2929
|
-
},
|
|
2962
|
+
"qwen2.5-vl-7b-instruct": {},
|
|
2930
2963
|
"qwen2.5-vl-instruct": {
|
|
2931
2964
|
"description": "Qwen2.5-VL 是 Qwen 模型系列中最新版本的視覺語言模型。"
|
|
2932
2965
|
},
|
|
@@ -2951,48 +2984,22 @@
|
|
|
2951
2984
|
"qwen3": {
|
|
2952
2985
|
"description": "Qwen3 是阿里巴巴的新一代大規模語言模型,以優異的性能支持多元化的應用需求。"
|
|
2953
2986
|
},
|
|
2954
|
-
"qwen3-0.6b": {
|
|
2955
|
-
|
|
2956
|
-
},
|
|
2957
|
-
"qwen3-
|
|
2958
|
-
|
|
2959
|
-
},
|
|
2960
|
-
"qwen3-
|
|
2961
|
-
|
|
2962
|
-
},
|
|
2963
|
-
"qwen3-
|
|
2964
|
-
|
|
2965
|
-
},
|
|
2966
|
-
"qwen3-235b-a22b-instruct-2507": {
|
|
2967
|
-
"description": "基於 Qwen3 的非思考模式開源模型,相較上一版本(通義千問3-235B-A22B)主觀創作能力與模型安全性均有小幅度提升。"
|
|
2968
|
-
},
|
|
2969
|
-
"qwen3-235b-a22b-thinking-2507": {
|
|
2970
|
-
"description": "基於 Qwen3 的思考模式開源模型,相較上一版本(通義千問3-235B-A22B)邏輯能力、通用能力、知識增強及創作能力均有大幅提升,適用於高難度強推理場景。"
|
|
2971
|
-
},
|
|
2972
|
-
"qwen3-30b-a3b": {
|
|
2973
|
-
"description": "Qwen3是一款能力大幅提升的新一代通義千問大模型,在推理、通用、Agent和多語言等多個核心能力上均達到業界領先水平,並支持思考模式切換。"
|
|
2974
|
-
},
|
|
2975
|
-
"qwen3-30b-a3b-instruct-2507": {
|
|
2976
|
-
"description": "相較上一版本(Qwen3-30B-A3B)中英文和多語言整體通用能力有大幅提升。主觀開放類任務專項優化,顯著更加符合用戶偏好,能夠提供更有幫助性的回覆。"
|
|
2977
|
-
},
|
|
2978
|
-
"qwen3-30b-a3b-thinking-2507": {
|
|
2979
|
-
"description": "基於Qwen3的思考模式開源模型,相較上一版本(通義千問3-30B-A3B)邏輯能力、通用能力、知識增強及創作能力均有大幅提升,適用於高難度強推理場景。"
|
|
2980
|
-
},
|
|
2981
|
-
"qwen3-32b": {
|
|
2982
|
-
"description": "Qwen3是一款能力大幅提升的新一代通義千問大模型,在推理、通用、Agent和多語言等多個核心能力上均達到業界領先水平,並支持思考模式切換。"
|
|
2983
|
-
},
|
|
2984
|
-
"qwen3-4b": {
|
|
2985
|
-
"description": "Qwen3是一款能力大幅提升的新一代通義千問大模型,在推理、通用、Agent和多語言等多個核心能力上均達到業界領先水平,並支持思考模式切換。"
|
|
2986
|
-
},
|
|
2987
|
-
"qwen3-8b": {
|
|
2988
|
-
"description": "Qwen3是一款能力大幅提升的新一代通義千問大模型,在推理、通用、Agent和多語言等多個核心能力上均達到業界領先水平,並支持思考模式切換。"
|
|
2989
|
-
},
|
|
2987
|
+
"qwen3-0.6b": {},
|
|
2988
|
+
"qwen3-1.7b": {},
|
|
2989
|
+
"qwen3-14b": {},
|
|
2990
|
+
"qwen3-235b-a22b": {},
|
|
2991
|
+
"qwen3-235b-a22b-instruct-2507": {},
|
|
2992
|
+
"qwen3-235b-a22b-thinking-2507": {},
|
|
2993
|
+
"qwen3-30b-a3b": {},
|
|
2994
|
+
"qwen3-30b-a3b-instruct-2507": {},
|
|
2995
|
+
"qwen3-30b-a3b-thinking-2507": {},
|
|
2996
|
+
"qwen3-32b": {},
|
|
2997
|
+
"qwen3-4b": {},
|
|
2998
|
+
"qwen3-8b": {},
|
|
2990
2999
|
"qwen3-coder-30b-a3b-instruct": {
|
|
2991
3000
|
"description": "通義千問程式碼模型開源版。最新的 qwen3-coder-30b-a3b-instruct 是基於 Qwen3 的程式碼生成模型,具備強大的 Coding Agent 能力,擅長工具調用與環境互動,能夠實現自主編程,程式能力卓越,同時兼具通用能力。"
|
|
2992
3001
|
},
|
|
2993
|
-
"qwen3-coder-480b-a35b-instruct": {
|
|
2994
|
-
"description": "通義千問程式碼模型開源版。最新的 qwen3-coder-480b-a35b-instruct 是基於 Qwen3 的程式碼生成模型,具有強大的 Coding Agent 能力,擅長工具調用和環境互動,能夠實現自主程式設計、程式碼能力卓越的同時兼具通用能力。"
|
|
2995
|
-
},
|
|
3002
|
+
"qwen3-coder-480b-a35b-instruct": {},
|
|
2996
3003
|
"qwen3-coder-flash": {
|
|
2997
3004
|
"description": "通義千問程式碼模型。最新的 Qwen3-Coder 系列模型是基於 Qwen3 的程式碼生成模型,具有強大的Coding Agent能力,擅長工具調用和環境互動,能夠實現自主程式設計,程式碼能力卓越的同時兼具通用能力。"
|
|
2998
3005
|
},
|
|
@@ -3008,30 +3015,16 @@
|
|
|
3008
3015
|
"qwen3-next-80b-a3b-instruct": {
|
|
3009
3016
|
"description": "基於 Qwen3 的新一代非思考模式開源模型,相較上一版本(通義千問3-235B-A22B-Instruct-2507)中文文本理解能力更佳、邏輯推理能力有增強、文本生成類任務表現更好。"
|
|
3010
3017
|
},
|
|
3011
|
-
"qwen3-next-80b-a3b-thinking": {
|
|
3012
|
-
"description": "基於 Qwen3 的新一代思考模式開源模型,相較上一版本(通義千問3-235B-A22B-Thinking-2507)指令遵循能力有提升、模型總結回覆更加精簡。"
|
|
3013
|
-
},
|
|
3018
|
+
"qwen3-next-80b-a3b-thinking": {},
|
|
3014
3019
|
"qwen3-omni-flash": {
|
|
3015
3020
|
"description": "Qwen-Omni 模型能夠接收文字、圖片、音訊、影片等多種模態的組合輸入,並生成文字或語音形式的回應,提供多種擬人化音色,支援多語言與方言語音輸出,適用於文字創作、視覺辨識、語音助理等場景。"
|
|
3016
3021
|
},
|
|
3017
|
-
"qwen3-vl-235b-a22b-instruct": {
|
|
3018
|
-
|
|
3019
|
-
},
|
|
3020
|
-
"qwen3-vl-
|
|
3021
|
-
|
|
3022
|
-
},
|
|
3023
|
-
"qwen3-vl-30b-a3b-instruct": {
|
|
3024
|
-
"description": "Qwen3 VL 30B 非思考模式(Instruct),面向一般指令跟隨場景,維持優異的多模態理解與生成能力。"
|
|
3025
|
-
},
|
|
3026
|
-
"qwen3-vl-30b-a3b-thinking": {
|
|
3027
|
-
"description": "Qwen-VL(開源版)提供視覺理解與文字生成能力,支援智慧體互動、視覺編碼、空間感知、長影片理解與深度思考,並在複雜場景下具備更強的文字辨識與多語言支援。"
|
|
3028
|
-
},
|
|
3029
|
-
"qwen3-vl-8b-instruct": {
|
|
3030
|
-
"description": "Qwen3 VL 8B 非思考模式(Instruct),適合常規多模態生成與辨識任務。"
|
|
3031
|
-
},
|
|
3032
|
-
"qwen3-vl-8b-thinking": {
|
|
3033
|
-
"description": "Qwen3 VL 8B 思考模式,面向輕量級多模態推理與互動場景,保留長上下文理解能力。"
|
|
3034
|
-
},
|
|
3022
|
+
"qwen3-vl-235b-a22b-instruct": {},
|
|
3023
|
+
"qwen3-vl-235b-a22b-thinking": {},
|
|
3024
|
+
"qwen3-vl-30b-a3b-instruct": {},
|
|
3025
|
+
"qwen3-vl-30b-a3b-thinking": {},
|
|
3026
|
+
"qwen3-vl-8b-instruct": {},
|
|
3027
|
+
"qwen3-vl-8b-thinking": {},
|
|
3035
3028
|
"qwen3-vl-flash": {
|
|
3036
3029
|
"description": "Qwen3 VL Flash:輕量化高速推理版本,適用於對延遲敏感或大量請求的場景。"
|
|
3037
3030
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/lobehub",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.52",
|
|
4
4
|
"description": "LobeHub - an open-source,comprehensive AI Agent framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"framework",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable sort-keys-fix/sort-keys-fix, typescript-sort-keys/interface */
|
|
1
2
|
// Define types for local file operations
|
|
2
3
|
export interface LocalFileItem {
|
|
3
4
|
contentType?: string;
|
|
@@ -96,8 +97,31 @@ export interface LocalReadFileResult {
|
|
|
96
97
|
}
|
|
97
98
|
|
|
98
99
|
export interface LocalSearchFilesParams {
|
|
99
|
-
|
|
100
|
-
keywords: string;
|
|
100
|
+
// Basic search
|
|
101
|
+
keywords: string;
|
|
102
|
+
|
|
103
|
+
// Path options
|
|
104
|
+
directory?: string; // Limit search to specific directory
|
|
105
|
+
exclude?: string[]; // Paths to exclude from search
|
|
106
|
+
|
|
107
|
+
// File type options
|
|
108
|
+
fileTypes?: string[]; // File extensions to filter (e.g., ['pdf', 'docx'])
|
|
109
|
+
|
|
110
|
+
// Content options
|
|
111
|
+
contentContains?: string; // Search for files containing specific text
|
|
112
|
+
|
|
113
|
+
// Time options (ISO 8601 date strings)
|
|
114
|
+
createdAfter?: string;
|
|
115
|
+
createdBefore?: string;
|
|
116
|
+
modifiedAfter?: string;
|
|
117
|
+
modifiedBefore?: string;
|
|
118
|
+
|
|
119
|
+
// Result options
|
|
120
|
+
detailed?: boolean;
|
|
121
|
+
limit?: number;
|
|
122
|
+
liveUpdate?: boolean;
|
|
123
|
+
sortBy?: 'name' | 'date' | 'size';
|
|
124
|
+
sortDirection?: 'asc' | 'desc';
|
|
101
125
|
}
|
|
102
126
|
|
|
103
127
|
export interface OpenLocalFileParams {
|
|
@@ -150,6 +150,64 @@ describe('convertOpenAIMessages', () => {
|
|
|
150
150
|
|
|
151
151
|
expect(Promise.all).toHaveBeenCalledTimes(2); // 一次用于消息数组,一次用于内容数组
|
|
152
152
|
});
|
|
153
|
+
|
|
154
|
+
it('should filter out reasoning field from messages', async () => {
|
|
155
|
+
const messages = [
|
|
156
|
+
{
|
|
157
|
+
role: 'assistant',
|
|
158
|
+
content: 'Hello',
|
|
159
|
+
reasoning: { content: 'some reasoning', duration: 100 },
|
|
160
|
+
},
|
|
161
|
+
{ role: 'user', content: 'Hi' },
|
|
162
|
+
] as any;
|
|
163
|
+
|
|
164
|
+
const result = await convertOpenAIMessages(messages);
|
|
165
|
+
|
|
166
|
+
expect(result).toEqual([
|
|
167
|
+
{ role: 'assistant', content: 'Hello' },
|
|
168
|
+
{ role: 'user', content: 'Hi' },
|
|
169
|
+
]);
|
|
170
|
+
// Ensure reasoning field is removed
|
|
171
|
+
expect((result[0] as any).reasoning).toBeUndefined();
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
it('should filter out reasoning_content field from messages', async () => {
|
|
175
|
+
const messages = [
|
|
176
|
+
{
|
|
177
|
+
role: 'assistant',
|
|
178
|
+
content: 'Hello',
|
|
179
|
+
reasoning_content: 'some reasoning content',
|
|
180
|
+
},
|
|
181
|
+
{ role: 'user', content: 'Hi' },
|
|
182
|
+
] as any;
|
|
183
|
+
|
|
184
|
+
const result = await convertOpenAIMessages(messages);
|
|
185
|
+
|
|
186
|
+
expect(result).toEqual([
|
|
187
|
+
{ role: 'assistant', content: 'Hello' },
|
|
188
|
+
{ role: 'user', content: 'Hi' },
|
|
189
|
+
]);
|
|
190
|
+
// Ensure reasoning_content field is removed
|
|
191
|
+
expect((result[0] as any).reasoning_content).toBeUndefined();
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
it('should filter out both reasoning and reasoning_content fields from messages', async () => {
|
|
195
|
+
const messages = [
|
|
196
|
+
{
|
|
197
|
+
role: 'assistant',
|
|
198
|
+
content: 'Hello',
|
|
199
|
+
reasoning: { content: 'some reasoning', duration: 100 },
|
|
200
|
+
reasoning_content: 'some reasoning content',
|
|
201
|
+
},
|
|
202
|
+
] as any;
|
|
203
|
+
|
|
204
|
+
const result = await convertOpenAIMessages(messages);
|
|
205
|
+
|
|
206
|
+
expect(result).toEqual([{ role: 'assistant', content: 'Hello' }]);
|
|
207
|
+
// Ensure both fields are removed
|
|
208
|
+
expect((result[0] as any).reasoning).toBeUndefined();
|
|
209
|
+
expect((result[0] as any).reasoning_content).toBeUndefined();
|
|
210
|
+
});
|
|
153
211
|
});
|
|
154
212
|
|
|
155
213
|
describe('convertOpenAIResponseInputs', () => {
|
|
@@ -26,17 +26,31 @@ export const convertMessageContent = async (
|
|
|
26
26
|
|
|
27
27
|
export const convertOpenAIMessages = async (messages: OpenAI.ChatCompletionMessageParam[]) => {
|
|
28
28
|
return (await Promise.all(
|
|
29
|
-
messages.map(async (message) =>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
29
|
+
messages.map(async (message) => {
|
|
30
|
+
const msg = message as any;
|
|
31
|
+
|
|
32
|
+
// Explicitly map only valid ChatCompletionMessageParam fields
|
|
33
|
+
// Exclude reasoning and reasoning_content fields as they should not be sent in requests
|
|
34
|
+
const result: any = {
|
|
35
|
+
content:
|
|
36
|
+
typeof message.content === 'string'
|
|
37
|
+
? message.content
|
|
38
|
+
: await Promise.all(
|
|
39
|
+
(message.content || []).map((c) =>
|
|
40
|
+
convertMessageContent(c as OpenAI.ChatCompletionContentPart),
|
|
41
|
+
),
|
|
37
42
|
),
|
|
38
|
-
|
|
39
|
-
|
|
43
|
+
role: msg.role,
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
// Add optional fields if they exist
|
|
47
|
+
if (msg.name !== undefined) result.name = msg.name;
|
|
48
|
+
if (msg.tool_calls !== undefined) result.tool_calls = msg.tool_calls;
|
|
49
|
+
if (msg.tool_call_id !== undefined) result.tool_call_id = msg.tool_call_id;
|
|
50
|
+
if (msg.function_call !== undefined) result.function_call = msg.function_call;
|
|
51
|
+
|
|
52
|
+
return result;
|
|
53
|
+
}),
|
|
40
54
|
)) as OpenAI.ChatCompletionMessageParam[];
|
|
41
55
|
};
|
|
42
56
|
|
|
@@ -766,12 +766,12 @@ export const createOpenAICompatibleRuntime = <T extends Record<string, any> = an
|
|
|
766
766
|
|
|
767
767
|
const inputStartAt = Date.now();
|
|
768
768
|
|
|
769
|
-
const { messages, reasoning_effort, tools, reasoning, responseMode, ...res } =
|
|
769
|
+
const { messages, reasoning_effort, tools, reasoning, responseMode, max_tokens, ...res } =
|
|
770
770
|
responses?.handlePayload
|
|
771
771
|
? (responses?.handlePayload(payload, this._options) as ChatStreamPayload)
|
|
772
772
|
: payload;
|
|
773
773
|
|
|
774
|
-
// remove penalty params
|
|
774
|
+
// remove penalty params and chat completion specific params
|
|
775
775
|
delete res.apiMode;
|
|
776
776
|
delete res.frequency_penalty;
|
|
777
777
|
delete res.presence_penalty;
|
|
@@ -797,6 +797,7 @@ export const createOpenAICompatibleRuntime = <T extends Record<string, any> = an
|
|
|
797
797
|
}
|
|
798
798
|
: {}),
|
|
799
799
|
input,
|
|
800
|
+
...(max_tokens && { max_output_tokens: max_tokens }),
|
|
800
801
|
store: false,
|
|
801
802
|
stream: !isStreaming ? undefined : isStreaming,
|
|
802
803
|
tools: tools?.map((tool) => this.convertChatCompletionToolToResponseTool(tool)),
|