@lobehub/chat 1.50.2 → 1.50.4
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 +50 -0
- package/README.ja-JP.md +8 -8
- package/README.md +8 -8
- package/README.zh-CN.md +8 -8
- package/changelog/v1.json +18 -0
- package/docs/self-hosting/server-database/docker-compose.mdx +31 -31
- package/docs/self-hosting/server-database/docker-compose.zh-CN.mdx +32 -32
- package/locales/ar/models.json +22 -34
- package/locales/bg-BG/models.json +22 -34
- package/locales/de-DE/models.json +22 -34
- package/locales/en-US/models.json +22 -34
- package/locales/es-ES/models.json +22 -34
- package/locales/fa-IR/models.json +22 -34
- package/locales/fr-FR/models.json +22 -34
- package/locales/it-IT/models.json +22 -34
- package/locales/ja-JP/models.json +22 -34
- package/locales/ko-KR/models.json +25 -38
- package/locales/nl-NL/models.json +22 -34
- package/locales/pl-PL/models.json +22 -34
- package/locales/pt-BR/models.json +22 -34
- package/locales/ru-RU/models.json +22 -34
- package/locales/tr-TR/models.json +22 -34
- package/locales/vi-VN/models.json +22 -34
- package/locales/zh-CN/models.json +39 -51
- package/locales/zh-TW/models.json +22 -34
- package/package.json +1 -1
- package/src/database/repositories/dataImporter/index.ts +3 -1
- package/src/libs/langchain/loaders/pdf/index.ts +1 -1
- package/src/server/routers/async/file.ts +7 -7
- package/src/utils/sanitizeUTF8.test.ts +23 -0
- package/src/utils/sanitizeUTF8.ts +14 -0
@@ -323,80 +323,71 @@
|
|
323
323
|
"abab7-chat-preview": {
|
324
324
|
"description": "相对于abab6.5系列模型在长文、数学、写作等能力有大幅度提升。"
|
325
325
|
},
|
326
|
-
"accounts/fireworks/models/
|
327
|
-
"description": "
|
326
|
+
"accounts/fireworks/models/deepseek-r1": {
|
327
|
+
"description": "DeepSeek-R1 是一款最先进的大型语言模型,经过强化学习和冷启动数据的优化,具有出色的推理、数学和编程性能。"
|
328
328
|
},
|
329
|
-
"accounts/fireworks/models/
|
330
|
-
"description": "
|
331
|
-
},
|
332
|
-
"accounts/fireworks/models/firellava-13b": {
|
333
|
-
"description": "fireworks-ai/FireLLaVA-13b 是一款视觉语言模型,可以同时接收图像和文本输入,经过高质量数据训练,适合多模态任务。"
|
329
|
+
"accounts/fireworks/models/deepseek-v3": {
|
330
|
+
"description": "Deepseek 提供的强大 Mixture-of-Experts (MoE) 语言模型,总参数量为 671B,每个标记激活 37B 参数。"
|
334
331
|
},
|
335
332
|
"accounts/fireworks/models/llama-v3-70b-instruct": {
|
336
|
-
"description": "Llama 3 70B
|
337
|
-
},
|
338
|
-
"accounts/fireworks/models/llama-v3-70b-instruct-hf": {
|
339
|
-
"description": "Llama 3 70B 指令模型(HF 版本),与官方实现结果保持一致,适合高质量的指令跟随任务。"
|
333
|
+
"description": "Meta 开发并发布了 Meta Llama 3 系列大语言模型(LLM),该系列包含 8B 和 70B 参数规模的预训练和指令微调生成文本模型。Llama 3 指令微调模型专为对话应用场景优化,并在常见的行业基准测试中优于许多现有的开源聊天模型。"
|
340
334
|
},
|
341
335
|
"accounts/fireworks/models/llama-v3-8b-instruct": {
|
342
|
-
"description": "Llama 3 8B
|
336
|
+
"description": "Meta 开发并发布了 Meta Llama 3 系列大语言模型(LLM),这是一个包含 8B 和 70B 参数规模的预训练和指令微调生成文本模型的集合。Llama 3 指令微调模型专为对话应用场景优化,并在常见的行业基准测试中优于许多现有的开源聊天模型。"
|
343
337
|
},
|
344
338
|
"accounts/fireworks/models/llama-v3-8b-instruct-hf": {
|
345
|
-
"description": "Llama 3 8B
|
339
|
+
"description": "Meta Llama 3 指令微调模型专为对话应用场景优化,并在常见的行业基准测试中优于许多现有的开源聊天模型。Llama 3 8B Instruct(HF 版本)是 Llama 3 8B Instruct 的原始 FP16 版本,其结果应与官方 Hugging Face 实现一致。"
|
346
340
|
},
|
347
341
|
"accounts/fireworks/models/llama-v3p1-405b-instruct": {
|
348
|
-
"description": "Llama 3.1 405B
|
342
|
+
"description": "Meta Llama 3.1 系列是多语言大语言模型(LLM)集合,包含 8B、70B 和 405B 参数规模的预训练和指令微调生成模型。Llama 3.1 指令微调文本模型(8B、70B、405B)专为多语言对话场景优化,在常见的行业基准测试中优于许多现有的开源和闭源聊天模型。405B 是 Llama 3.1 家族中能力最强的模型。该模型采用 FP8 进行推理,与参考实现高度匹配。"
|
349
343
|
},
|
350
344
|
"accounts/fireworks/models/llama-v3p1-70b-instruct": {
|
351
|
-
"description": "Llama 3.1 70B
|
345
|
+
"description": "Meta Llama 3.1 系列是多语言大语言模型(LLM)集合,包含 8B、70B 和 405B 三种参数规模的预训练和指令微调生成模型。Llama 3.1 指令微调文本模型(8B、70B、405B)专为多语言对话应用优化,并在常见的行业基准测试中优于许多现有的开源和闭源聊天模型。"
|
352
346
|
},
|
353
347
|
"accounts/fireworks/models/llama-v3p1-8b-instruct": {
|
354
|
-
"description": "Llama 3.1 8B
|
348
|
+
"description": "Meta Llama 3.1 系列是多语言大语言模型(LLM)集合,包含 8B、70B 和 405B 三种参数规模的预训练和指令微调生成模型。Llama 3.1 指令微调文本模型(8B、70B、405B)专为多语言对话应用优化,并在常见的行业基准测试中优于许多现有的开源和闭源聊天模型。"
|
355
349
|
},
|
356
350
|
"accounts/fireworks/models/llama-v3p2-11b-vision-instruct": {
|
357
|
-
"description": "Meta
|
358
|
-
},
|
359
|
-
"accounts/fireworks/models/llama-v3p2-1b-instruct": {
|
360
|
-
"description": "Llama 3.2 1B 指令模型是Meta推出的一款轻量级多语言模型。该模型旨在提高效率,与更大型的模型相比,在延迟和成本方面提供了显著的改进。该模型的示例用例包括检索和摘要。"
|
351
|
+
"description": "Meta 推出的指令微调图像推理模型,拥有 110 亿参数。该模型针对视觉识别、图像推理、图片字幕生成以及图片相关的常规问答进行了优化。它能够理解视觉数据,如图表和图形,并通过生成文本描述图像细节,弥合视觉与语言之间的鸿沟。"
|
361
352
|
},
|
362
353
|
"accounts/fireworks/models/llama-v3p2-3b-instruct": {
|
363
|
-
"description": "Llama 3.2 3B
|
354
|
+
"description": "Llama 3.2 3B Instruct 是 Meta 推出的轻量级多语言模型。该模型专为高效运行而设计,相较于更大型的模型,具有显著的延迟和成本优势。其典型应用场景包括查询和提示重写,以及写作辅助。"
|
364
355
|
},
|
365
356
|
"accounts/fireworks/models/llama-v3p2-90b-vision-instruct": {
|
366
|
-
"description": "Meta
|
357
|
+
"description": "Meta 推出的指令微调图像推理模型,拥有 900 亿参数。该模型针对视觉识别、图像推理、图片字幕生成以及图片相关的常规问答进行了优化。它能够理解视觉数据,如图表和图形,并通过生成文本描述图像细节,弥合视觉与语言之间的鸿沟。注意:该模型目前作为无服务器模型进行实验性提供。如果用于生产环境,请注意 Fireworks 可能会在短时间内取消部署该模型。"
|
358
|
+
},
|
359
|
+
"accounts/fireworks/models/llama-v3p3-70b-instruct": {
|
360
|
+
"description": "Llama 3.3 70B Instruct 是 Llama 3.1 70B 的 12 月更新版本。该模型在 Llama 3.1 70B(于 2024 年 7 月发布)的基础上进行了改进,增强了工具调用、多语言文本支持、数学和编程能力。该模型在推理、数学和指令遵循方面达到了行业领先水平,并且能够提供与 3.1 405B 相似的性能,同时在速度和成本上具有显著优势。"
|
361
|
+
},
|
362
|
+
"accounts/fireworks/models/mistral-small-24b-instruct-2501": {
|
363
|
+
"description": "24B 参数模型,具备与更大型模型相当的最先进能力。"
|
367
364
|
},
|
368
365
|
"accounts/fireworks/models/mixtral-8x22b-instruct": {
|
369
|
-
"description": "Mixtral MoE 8x22B
|
366
|
+
"description": "Mixtral MoE 8x22B Instruct v0.1 是 Mixtral MoE 8x22B v0.1 的指令微调版本,已启用聊天完成功能 API。"
|
370
367
|
},
|
371
368
|
"accounts/fireworks/models/mixtral-8x7b-instruct": {
|
372
|
-
"description": "Mixtral MoE 8x7B
|
373
|
-
},
|
374
|
-
"accounts/fireworks/models/mixtral-8x7b-instruct-hf": {
|
375
|
-
"description": "Mixtral MoE 8x7B 指令模型(HF 版本),性能与官方实现一致,适合多种高效任务场景。"
|
369
|
+
"description": "Mixtral MoE 8x7B Instruct 是 Mixtral MoE 8x7B 的指令微调版本,已启用聊天完成功能 API。"
|
376
370
|
},
|
377
371
|
"accounts/fireworks/models/mythomax-l2-13b": {
|
378
|
-
"description": "
|
372
|
+
"description": "MythoMix 的改进版,可能是其更为完善的变体,是 MythoLogic-L2 和 Huginn 的合并,采用了高度实验性的张量类型合并技术。由于其独特的性质,该模型在讲故事和角色扮演方面表现出色。"
|
379
373
|
},
|
380
374
|
"accounts/fireworks/models/phi-3-vision-128k-instruct": {
|
381
|
-
"description": "Phi-3-Vision-128K-Instruct
|
375
|
+
"description": "Phi-3-Vision-128K-Instruct 是一个轻量级的、最先进的开放多模态模型,基于包括合成数据和筛选后的公开网站数据集构建,重点关注文本和视觉方面的高质量、推理密集型数据。该模型属于 Phi-3 模型家族,其多模态版本支持 128K 上下文长度(以标记为单位)。该模型经过严格的增强过程,包括监督微调和直接偏好优化,以确保精确的指令遵循和强大的安全措施。"
|
382
376
|
},
|
383
377
|
"accounts/fireworks/models/qwen-qwq-32b-preview": {
|
384
|
-
"description": "QwQ
|
378
|
+
"description": "Qwen QwQ 模型专注于推动 AI 推理,并展示了开放模型在推理能力上与闭源前沿模型匹敌的力量。QwQ-32B-Preview 是一个实验性发布版本,在 GPQA、AIME、MATH-500 和 LiveCodeBench 基准测试中,在分析和推理能力上可与 o1 相媲美,并超越 GPT-4o 和 Claude 3.5 Sonnet。注意:该模型目前作为无服务器模型进行实验性提供。如果用于生产环境,请注意 Fireworks 可能会在短时间内取消部署该模型。"
|
379
|
+
},
|
380
|
+
"accounts/fireworks/models/qwen2-vl-72b-instruct": {
|
381
|
+
"description": "Qwen-VL 模型的 72B 版本是阿里巴巴最新迭代的成果,代表了近一年的创新。"
|
385
382
|
},
|
386
383
|
"accounts/fireworks/models/qwen2p5-72b-instruct": {
|
387
|
-
"description": "Qwen2.5
|
384
|
+
"description": "Qwen2.5 是由 Qwen 团队和阿里云开发的一系列仅解码语言模型,提供 0.5B、1.5B、3B、7B、14B、32B 和 72B 不同参数规模,并包含基础版和指令微调版。"
|
388
385
|
},
|
389
386
|
"accounts/fireworks/models/qwen2p5-coder-32b-instruct": {
|
390
|
-
"description": "Qwen2.5
|
391
|
-
},
|
392
|
-
"accounts/fireworks/models/starcoder-16b": {
|
393
|
-
"description": "StarCoder 15.5B 模型,支持高级编程任务,多语言能力增强,适合复杂代码生成和理解。"
|
394
|
-
},
|
395
|
-
"accounts/fireworks/models/starcoder-7b": {
|
396
|
-
"description": "StarCoder 7B 模型,针对80多种编程语言训练,拥有出色的编程填充能力和语境理解。"
|
387
|
+
"description": "Qwen2.5-Coder 是最新一代专为代码设计的 Qwen 大型语言模型(前称为 CodeQwen)。注意:该模型目前作为无服务器模型进行实验性提供。如果用于生产环境,请注意 Fireworks 可能会在短时间内取消部署该模型。"
|
397
388
|
},
|
398
389
|
"accounts/yi-01-ai/models/yi-large": {
|
399
|
-
"description": "Yi-Large
|
390
|
+
"description": "Yi-Large 是顶尖的大型语言模型之一,在 LMSYS 基准测试排行榜上,其表现仅次于 GPT-4、Gemini 1.5 Pro 和 Claude 3 Opus。它在多语言能力方面表现卓越,特别是在西班牙语、中文、日语、德语和法语方面。Yi-Large 还具有用户友好性,采用与 OpenAI 相同的 API 定义,便于集成。"
|
400
391
|
},
|
401
392
|
"ai21-jamba-1.5-large": {
|
402
393
|
"description": "一个398B参数(94B活跃)的多语言模型,提供256K长上下文窗口、函数调用、结构化输出和基于事实的生成。"
|
@@ -887,30 +878,18 @@
|
|
887
878
|
"lite": {
|
888
879
|
"description": "Spark Lite 是一款轻量级大语言模型,具备极低的延迟与高效的处理能力,完全免费开放,支持实时在线搜索功能。其快速响应的特性使其在低算力设备上的推理应用和模型微调中表现出色,为用户带来出色的成本效益和智能体验,尤其在知识问答、内容生成及搜索场景下表现不俗。"
|
889
880
|
},
|
890
|
-
"llama-3.1-70b-instruct": {
|
891
|
-
"description": "Llama 3.1 70B Instruct 模型,具备70B参数,能在大型文本生成和指示任务中提供卓越性能。"
|
892
|
-
},
|
893
881
|
"llama-3.1-70b-versatile": {
|
894
882
|
"description": "Llama 3.1 70B 提供更强大的AI推理能力,适合复杂应用,支持超多的计算处理并保证高效和准确率。"
|
895
883
|
},
|
896
884
|
"llama-3.1-8b-instant": {
|
897
885
|
"description": "Llama 3.1 8B 是一款高效能模型,提供了快速的文本生成能力,非常适合需要大规模效率和成本效益的应用场景。"
|
898
886
|
},
|
899
|
-
"llama-3.1-8b-instruct": {
|
900
|
-
"description": "Llama 3.1 8B Instruct 模型,具备8B参数,支持画面指示任务的高效执行,提供优质的文本生成能力。"
|
901
|
-
},
|
902
887
|
"llama-3.1-sonar-huge-128k-online": {
|
903
888
|
"description": "Llama 3.1 Sonar Huge Online 模型,具备405B参数,支持约127,000个标记的上下文长度,设计用于复杂的在线聊天应用。"
|
904
889
|
},
|
905
|
-
"llama-3.1-sonar-large-128k-chat": {
|
906
|
-
"description": "Llama 3.1 Sonar Large Chat 模型,具备70B参数,支持约127,000个标记的上下文长度,适合于复杂的离线聊天任务。"
|
907
|
-
},
|
908
890
|
"llama-3.1-sonar-large-128k-online": {
|
909
891
|
"description": "Llama 3.1 Sonar Large Online 模型,具备70B参数,支持约127,000个标记的上下文长度,适用于高容量和多样化聊天任务。"
|
910
892
|
},
|
911
|
-
"llama-3.1-sonar-small-128k-chat": {
|
912
|
-
"description": "Llama 3.1 Sonar Small Chat 模型,具备8B参数,专为离线聊天设计,支持约127,000个标记的上下文长度。"
|
913
|
-
},
|
914
893
|
"llama-3.1-sonar-small-128k-online": {
|
915
894
|
"description": "Llama 3.1 Sonar Small Online 模型,具备8B参数,支持约127,000个标记的上下文长度,专为在线聊天设计,能高效处理各种文本交互。"
|
916
895
|
},
|
@@ -1355,6 +1334,15 @@
|
|
1355
1334
|
"solar-pro": {
|
1356
1335
|
"description": "Solar Pro 是 Upstage 推出的一款高智能LLM,专注于单GPU的指令跟随能力,IFEval得分80以上。目前支持英语,正式版本计划于2024年11月推出,将扩展语言支持和上下文长度。"
|
1357
1336
|
},
|
1337
|
+
"sonar": {
|
1338
|
+
"description": "基于搜索上下文的轻量级搜索产品,比 Sonar Pro 更快、更便宜。"
|
1339
|
+
},
|
1340
|
+
"sonar-pro": {
|
1341
|
+
"description": "支持搜索上下文的高级搜索产品,支持高级查询和跟进。"
|
1342
|
+
},
|
1343
|
+
"sonar-reasoning": {
|
1344
|
+
"description": "由 DeepSeek 推理模型提供支持的新 API 产品。"
|
1345
|
+
},
|
1358
1346
|
"step-1-128k": {
|
1359
1347
|
"description": "平衡性能与成本,适合一般场景。"
|
1360
1348
|
},
|
@@ -323,21 +323,15 @@
|
|
323
323
|
"abab7-chat-preview": {
|
324
324
|
"description": "相對於abab6.5系列模型在長文、數學、寫作等能力有大幅度提升。"
|
325
325
|
},
|
326
|
-
"accounts/fireworks/models/
|
327
|
-
"description": "
|
326
|
+
"accounts/fireworks/models/deepseek-r1": {
|
327
|
+
"description": "DeepSeek-R1 是一款最先進的大型語言模型,經過強化學習和冷啟動數據的優化,具有出色的推理、數學和編程性能。"
|
328
328
|
},
|
329
|
-
"accounts/fireworks/models/
|
330
|
-
"description": "
|
331
|
-
},
|
332
|
-
"accounts/fireworks/models/firellava-13b": {
|
333
|
-
"description": "fireworks-ai/FireLLaVA-13b 是一款視覺語言模型,可以同時接收圖像和文本輸入,經過高質量數據訓練,適合多模態任務。"
|
329
|
+
"accounts/fireworks/models/deepseek-v3": {
|
330
|
+
"description": "Deepseek 提供的強大 Mixture-of-Experts (MoE) 語言模型,總參數量為 671B,每個標記激活 37B 參數。"
|
334
331
|
},
|
335
332
|
"accounts/fireworks/models/llama-v3-70b-instruct": {
|
336
333
|
"description": "Llama 3 70B 指令模型,專為多語言對話和自然語言理解優化,性能優於多數競爭模型。"
|
337
334
|
},
|
338
|
-
"accounts/fireworks/models/llama-v3-70b-instruct-hf": {
|
339
|
-
"description": "Llama 3 70B 指令模型(HF 版本),與官方實現結果保持一致,適合高質量的指令跟隨任務。"
|
340
|
-
},
|
341
335
|
"accounts/fireworks/models/llama-v3-8b-instruct": {
|
342
336
|
"description": "Llama 3 8B 指令模型,優化用於對話及多語言任務,表現卓越且高效。"
|
343
337
|
},
|
@@ -356,24 +350,24 @@
|
|
356
350
|
"accounts/fireworks/models/llama-v3p2-11b-vision-instruct": {
|
357
351
|
"description": "Meta的11B參數指令調整圖像推理模型。該模型針對視覺識別、圖像推理、圖像描述和回答關於圖像的一般性問題進行了優化。該模型能夠理解視覺數據,如圖表和圖形,並通過生成文本描述圖像細節來弥合視覺與語言之間的差距。"
|
358
352
|
},
|
359
|
-
"accounts/fireworks/models/llama-v3p2-1b-instruct": {
|
360
|
-
"description": "Llama 3.2 1B 指令模型是Meta推出的一款輕量級多語言模型。該模型旨在提高效率,與更大型的模型相比,在延遲和成本方面提供了顯著的改進。該模型的示例用例包括檢索和摘要。"
|
361
|
-
},
|
362
353
|
"accounts/fireworks/models/llama-v3p2-3b-instruct": {
|
363
354
|
"description": "Llama 3.2 3B 指令模型是Meta推出的一款輕量級多語言模型。該模型旨在提高效率,與更大型的模型相比,在延遲和成本方面提供了顯著的改進。該模型的示例用例包括查詢和提示重寫以及寫作輔助。"
|
364
355
|
},
|
365
356
|
"accounts/fireworks/models/llama-v3p2-90b-vision-instruct": {
|
366
357
|
"description": "Meta的90B參數指令調整圖像推理模型。該模型針對視覺識別、圖像推理、圖像描述和回答關於圖像的一般性問題進行了優化。該模型能夠理解視覺數據,如圖表和圖形,並通過生成文本描述圖像細節來弥合視覺與語言之間的差距。"
|
367
358
|
},
|
359
|
+
"accounts/fireworks/models/llama-v3p3-70b-instruct": {
|
360
|
+
"description": "Llama 3.3 70B Instruct 是 Llama 3.1 70B 的 12 月更新版本。該模型在 Llama 3.1 70B(於 2024 年 7 月發布)的基礎上進行了改進,增強了工具調用、多語言文本支持、數學和編程能力。該模型在推理、數學和指令遵循方面達到了行業領先水平,並且能夠提供與 3.1 405B 相似的性能,同時在速度和成本上具有顯著優勢。"
|
361
|
+
},
|
362
|
+
"accounts/fireworks/models/mistral-small-24b-instruct-2501": {
|
363
|
+
"description": "24B 參數模型,具備與更大型模型相當的最先進能力。"
|
364
|
+
},
|
368
365
|
"accounts/fireworks/models/mixtral-8x22b-instruct": {
|
369
366
|
"description": "Mixtral MoE 8x22B 指令模型,大規模參數和多專家架構,全方位支持複雜任務的高效處理。"
|
370
367
|
},
|
371
368
|
"accounts/fireworks/models/mixtral-8x7b-instruct": {
|
372
369
|
"description": "Mixtral MoE 8x7B 指令模型,多專家架構提供高效的指令跟隨及執行。"
|
373
370
|
},
|
374
|
-
"accounts/fireworks/models/mixtral-8x7b-instruct-hf": {
|
375
|
-
"description": "Mixtral MoE 8x7B 指令模型(HF 版本),性能與官方實現一致,適合多種高效任務場景。"
|
376
|
-
},
|
377
371
|
"accounts/fireworks/models/mythomax-l2-13b": {
|
378
372
|
"description": "MythoMax L2 13B 模型,結合新穎的合併技術,擅長敘事和角色扮演。"
|
379
373
|
},
|
@@ -383,18 +377,15 @@
|
|
383
377
|
"accounts/fireworks/models/qwen-qwq-32b-preview": {
|
384
378
|
"description": "QwQ模型是由 Qwen 團隊開發的實驗性研究模型,專注於增強 AI 推理能力。"
|
385
379
|
},
|
380
|
+
"accounts/fireworks/models/qwen2-vl-72b-instruct": {
|
381
|
+
"description": "Qwen-VL 模型的 72B 版本是阿里巴巴最新迭代的成果,代表了近一年的創新。"
|
382
|
+
},
|
386
383
|
"accounts/fireworks/models/qwen2p5-72b-instruct": {
|
387
384
|
"description": "Qwen2.5 是由阿里雲 Qwen 團隊開發的一系列僅包含解碼器的語言模型。這些模型提供不同的大小,包括 0.5B、1.5B、3B、7B、14B、32B 和 72B,並且有基礎版(base)和指令版(instruct)兩種變體。"
|
388
385
|
},
|
389
386
|
"accounts/fireworks/models/qwen2p5-coder-32b-instruct": {
|
390
387
|
"description": "Qwen2.5 Coder 32B Instruct 是阿里雲發布的代碼特定大語言模型系列的最新版本。該模型在 Qwen2.5 的基礎上,通過 5.5 萬億個 tokens 的訓練,顯著提升了代碼生成、推理和修復能力。它不僅增強了編碼能力,還保持了數學和通用能力的優勢。模型為代碼智能體等實際應用提供了更全面的基礎"
|
391
388
|
},
|
392
|
-
"accounts/fireworks/models/starcoder-16b": {
|
393
|
-
"description": "StarCoder 15.5B 模型,支持高級編程任務,多語言能力增強,適合複雜代碼生成和理解。"
|
394
|
-
},
|
395
|
-
"accounts/fireworks/models/starcoder-7b": {
|
396
|
-
"description": "StarCoder 7B 模型,針對 80 多種編程語言訓練,擁有出色的編程填充能力和語境理解。"
|
397
|
-
},
|
398
389
|
"accounts/yi-01-ai/models/yi-large": {
|
399
390
|
"description": "Yi-Large 模型,具備卓越的多語言處理能力,可用於各類語言生成和理解任務。"
|
400
391
|
},
|
@@ -887,30 +878,18 @@
|
|
887
878
|
"lite": {
|
888
879
|
"description": "Spark Lite 是一款輕量級大語言模型,具備極低的延遲與高效的處理能力,完全免費開放,支持即時在線搜索功能。其快速響應的特性使其在低算力設備上的推理應用和模型微調中表現出色,為用戶帶來出色的成本效益和智能體驗,尤其在知識問答、內容生成及搜索場景下表現不俗。"
|
889
880
|
},
|
890
|
-
"llama-3.1-70b-instruct": {
|
891
|
-
"description": "Llama 3.1 70B Instruct 模型,具備 70B 參數,能在大型文本生成和指示任務中提供卓越性能。"
|
892
|
-
},
|
893
881
|
"llama-3.1-70b-versatile": {
|
894
882
|
"description": "Llama 3.1 70B 提供更強大的 AI 推理能力,適合複雜應用,支持超多的計算處理並保證高效和準確率。"
|
895
883
|
},
|
896
884
|
"llama-3.1-8b-instant": {
|
897
885
|
"description": "Llama 3.1 8B 是一款高效能模型,提供了快速的文本生成能力,非常適合需要大規模效率和成本效益的應用場景。"
|
898
886
|
},
|
899
|
-
"llama-3.1-8b-instruct": {
|
900
|
-
"description": "Llama 3.1 8B Instruct 模型,具備 8B 參數,支持畫面指示任務的高效執行,提供優質的文本生成能力。"
|
901
|
-
},
|
902
887
|
"llama-3.1-sonar-huge-128k-online": {
|
903
888
|
"description": "Llama 3.1 Sonar Huge Online 模型,具備 405B 參數,支持約 127,000 個標記的上下文長度,設計用於複雜的在線聊天應用。"
|
904
889
|
},
|
905
|
-
"llama-3.1-sonar-large-128k-chat": {
|
906
|
-
"description": "Llama 3.1 Sonar Large Chat 模型,具備 70B 參數,支持約 127,000 個標記的上下文長度,適合於複雜的離線聊天任務。"
|
907
|
-
},
|
908
890
|
"llama-3.1-sonar-large-128k-online": {
|
909
891
|
"description": "Llama 3.1 Sonar Large Online 模型,具備 70B 參數,支持約 127,000 個標記的上下文長度,適用於高容量和多樣化聊天任務。"
|
910
892
|
},
|
911
|
-
"llama-3.1-sonar-small-128k-chat": {
|
912
|
-
"description": "Llama 3.1 Sonar Small Chat 模型,具備 8B 參數,專為離線聊天設計,支持約 127,000 個標記的上下文長度。"
|
913
|
-
},
|
914
893
|
"llama-3.1-sonar-small-128k-online": {
|
915
894
|
"description": "Llama 3.1 Sonar Small Online 模型,具備 8B 參數,支持約 127,000 個標記的上下文長度,專為在線聊天設計,能高效處理各種文本交互。"
|
916
895
|
},
|
@@ -1355,6 +1334,15 @@
|
|
1355
1334
|
"solar-pro": {
|
1356
1335
|
"description": "Solar Pro 是 Upstage 推出的一款高智能LLM,專注於單GPU的指令跟隨能力,IFEval得分80以上。目前支持英語,正式版本計劃於2024年11月推出,將擴展語言支持和上下文長度。"
|
1357
1336
|
},
|
1337
|
+
"sonar": {
|
1338
|
+
"description": "基於搜索上下文的輕量級搜索產品,比 Sonar Pro 更快、更便宜。"
|
1339
|
+
},
|
1340
|
+
"sonar-pro": {
|
1341
|
+
"description": "支持搜索上下文的高級搜索產品,支持高級查詢和跟進。"
|
1342
|
+
},
|
1343
|
+
"sonar-reasoning": {
|
1344
|
+
"description": "由 DeepSeek 推理模型提供支持的新 API 產品。"
|
1345
|
+
},
|
1358
1346
|
"step-1-128k": {
|
1359
1347
|
"description": "平衡性能與成本,適合一般場景。"
|
1360
1348
|
},
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.50.
|
3
|
+
"version": "1.50.4",
|
4
4
|
"description": "Lobe Chat - an open-source, high-performance chatbot 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",
|
@@ -14,6 +14,7 @@ import {
|
|
14
14
|
import { LobeChatDatabase } from '@/database/type';
|
15
15
|
import { ImportResult } from '@/services/config';
|
16
16
|
import { ImporterEntryData } from '@/types/importer';
|
17
|
+
import { sanitizeUTF8 } from '@/utils/sanitizeUTF8';
|
17
18
|
|
18
19
|
export class DataImporterRepos {
|
19
20
|
private userId: string;
|
@@ -204,9 +205,10 @@ export class DataImporterRepos {
|
|
204
205
|
// 2. insert messages
|
205
206
|
if (shouldInsertMessages.length > 0) {
|
206
207
|
const inertValues = shouldInsertMessages.map(
|
207
|
-
({ id, extra, createdAt, updatedAt, sessionId, topicId, ...res }) => ({
|
208
|
+
({ id, extra, createdAt, updatedAt, sessionId, topicId, content, ...res }) => ({
|
208
209
|
...res,
|
209
210
|
clientId: id,
|
211
|
+
content: sanitizeUTF8(content),
|
210
212
|
createdAt: new Date(createdAt),
|
211
213
|
model: extra?.fromModel,
|
212
214
|
parentId: null,
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { PDFLoader } from '@langchain/community/document_loaders/fs/pdf';
|
2
2
|
|
3
3
|
export const PdfLoader = async (fileBlob: Blob) => {
|
4
|
-
const loader = new PDFLoader(fileBlob);
|
4
|
+
const loader = new PDFLoader(fileBlob, { splitPages: true });
|
5
5
|
|
6
6
|
return await loader.load();
|
7
7
|
};
|
@@ -24,6 +24,7 @@ import {
|
|
24
24
|
IAsyncTaskError,
|
25
25
|
} from '@/types/asyncTask';
|
26
26
|
import { safeParseJSON } from '@/utils/safeParseJSON';
|
27
|
+
import { sanitizeUTF8 } from '@/utils/sanitizeUTF8';
|
27
28
|
|
28
29
|
const fileProcedure = asyncAuthedProcedure.use(async (opts) => {
|
29
30
|
const { ctx } = opts;
|
@@ -95,16 +96,13 @@ export const fileRouter = router({
|
|
95
96
|
ctx.jwtPayload,
|
96
97
|
);
|
97
98
|
|
98
|
-
|
99
|
-
console.log(`执行第 ${number} 个任务`);
|
99
|
+
console.log(`run embedding task ${index + 1}`);
|
100
100
|
|
101
|
-
console.time(`任务[${number}]: embeddings`);
|
102
101
|
const embeddings = await agentRuntime.embeddings({
|
103
102
|
dimensions: 1024,
|
104
103
|
input: chunks.map((c) => c.text),
|
105
104
|
model,
|
106
105
|
});
|
107
|
-
console.timeEnd(`任务[${number}]: embeddings`);
|
108
106
|
|
109
107
|
const items: NewEmbeddingsItem[] =
|
110
108
|
embeddings?.map((e, idx) => ({
|
@@ -114,9 +112,7 @@ export const fileRouter = router({
|
|
114
112
|
model,
|
115
113
|
})) || [];
|
116
114
|
|
117
|
-
console.time(`任务[${number}]: insert db`);
|
118
115
|
await ctx.embeddingModel.bulkCreate(items);
|
119
|
-
console.timeEnd(`任务[${number}]: insert db`);
|
120
116
|
},
|
121
117
|
{ concurrency: CONCURRENCY },
|
122
118
|
);
|
@@ -215,7 +211,11 @@ export const fileRouter = router({
|
|
215
211
|
|
216
212
|
// after finish partition, we need to filter out some elements
|
217
213
|
const chunks = chunkResult.chunks.map(
|
218
|
-
(item): NewChunkItem => ({
|
214
|
+
({ text, ...item }): NewChunkItem => ({
|
215
|
+
...item,
|
216
|
+
text: text ? sanitizeUTF8(text) : '',
|
217
|
+
userId: ctx.userId,
|
218
|
+
}),
|
219
219
|
);
|
220
220
|
|
221
221
|
const duration = Date.now() - startAt;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { sanitizeUTF8 } from './sanitizeUTF8';
|
2
|
+
|
3
|
+
describe('UTF-8 Sanitization', () => {
|
4
|
+
it('should handle null bytes', () => {
|
5
|
+
const input = 'test\u0000string';
|
6
|
+
expect(sanitizeUTF8(input)).toBe('teststring');
|
7
|
+
});
|
8
|
+
|
9
|
+
it('should handle invalid UTF-8 sequences', () => {
|
10
|
+
const input = 'test\uD800string'; // 未配对的代理项
|
11
|
+
expect(sanitizeUTF8(input)).toBe('teststring');
|
12
|
+
});
|
13
|
+
|
14
|
+
it('should handle invalid UTF-8 content', () => {
|
15
|
+
const input = '\u0002\u0000\u0000\u0002�{\\"error\\":{\\"code\\":\\"resource_exhausted\\",';
|
16
|
+
expect(sanitizeUTF8(input)).toBe('{\\"error\\":{\\"code\\":\\"resource_exhausted\\",');
|
17
|
+
});
|
18
|
+
|
19
|
+
it('should preserve valid UTF-8 characters', () => {
|
20
|
+
const input = '你好,世界!';
|
21
|
+
expect(sanitizeUTF8(input)).toBe('你好,世界!');
|
22
|
+
});
|
23
|
+
});
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/**
|
2
|
+
* Sanitize UTF-8 string to remove all control characters and invalid code points.
|
3
|
+
* @param str
|
4
|
+
*/
|
5
|
+
export const sanitizeUTF8 = (str: string) => {
|
6
|
+
// 移除替换字符 (0xFFFD) 和其他非法字符
|
7
|
+
return (
|
8
|
+
str
|
9
|
+
.replaceAll('�', '') // 移除 Unicode 替换字符
|
10
|
+
// eslint-disable-next-line no-control-regex
|
11
|
+
.replaceAll(/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F-\u009F]/g, '') // 移除控制字符
|
12
|
+
.replaceAll(/[\uD800-\uDFFF]/g, '')
|
13
|
+
); // 移除未配对的代理项码点
|
14
|
+
};
|