@lobehub/chat 1.86.0 → 1.86.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.
- package/CHANGELOG.md +25 -0
- package/README.md +3 -3
- package/README.zh-CN.md +3 -3
- package/changelog/v1.json +9 -0
- package/package.json +1 -1
- package/src/app/(backend)/middleware/auth/index.test.ts +1 -1
- package/src/app/(backend)/middleware/auth/index.ts +1 -1
- package/src/app/(backend)/middleware/auth/utils.ts +1 -1
- package/src/app/(backend)/webapi/chat/[provider]/route.test.ts +1 -1
- package/src/app/(backend)/webapi/chat/[provider]/route.ts +1 -1
- package/src/app/(backend)/webapi/chat/vertexai/route.ts +2 -2
- package/src/app/(backend)/webapi/models/[provider]/pull/route.ts +1 -1
- package/src/app/(backend)/webapi/models/[provider]/route.ts +1 -1
- package/src/app/(backend)/webapi/plugin/gateway/route.ts +1 -1
- package/src/app/(backend)/webapi/text-to-image/[provider]/route.ts +2 -2
- package/src/app/[variants]/(main)/settings/llm/ProviderList/Azure/index.tsx +1 -1
- package/src/app/[variants]/(main)/settings/provider/(detail)/azure/page.tsx +1 -1
- package/src/app/[variants]/(main)/settings/provider/(detail)/azureai/page.tsx +1 -1
- package/src/const/settings/llm.ts +1 -1
- package/src/database/models/__tests__/aiProvider.test.ts +1 -1
- package/src/database/models/aiProvider.ts +1 -1
- package/src/features/Conversation/Error/APIKeyForm/Bedrock.tsx +1 -1
- package/src/features/Conversation/Error/APIKeyForm/index.tsx +1 -1
- package/src/features/Conversation/Error/index.tsx +1 -1
- package/src/libs/{agent-runtime → model-runtime}/AgentRuntime.test.ts +2 -2
- package/src/libs/{agent-runtime → model-runtime}/ai21/index.test.ts +2 -2
- package/src/libs/{agent-runtime → model-runtime}/ai360/index.test.ts +2 -2
- package/src/libs/{agent-runtime → model-runtime}/anthropic/index.test.ts +1 -1
- package/src/libs/{agent-runtime → model-runtime}/baichuan/index.test.ts +1 -1
- package/src/libs/{agent-runtime → model-runtime}/bedrock/index.test.ts +1 -1
- package/src/libs/{agent-runtime → model-runtime}/cloudflare/index.test.ts +1 -1
- package/src/libs/{agent-runtime → model-runtime}/deepseek/index.test.ts +2 -2
- package/src/libs/{agent-runtime → model-runtime}/fireworksai/index.test.ts +2 -2
- package/src/libs/{agent-runtime → model-runtime}/giteeai/index.test.ts +2 -2
- package/src/libs/{agent-runtime → model-runtime}/github/index.test.ts +2 -2
- package/src/libs/{agent-runtime → model-runtime}/google/index.test.ts +1 -1
- package/src/libs/{agent-runtime → model-runtime}/groq/index.test.ts +2 -2
- package/src/libs/{agent-runtime → model-runtime}/hunyuan/index.test.ts +2 -2
- package/src/libs/{agent-runtime → model-runtime}/internlm/index.test.ts +2 -2
- package/src/libs/{agent-runtime → model-runtime}/lmstudio/index.test.ts +2 -2
- package/src/libs/{agent-runtime → model-runtime}/mistral/index.test.ts +2 -2
- package/src/libs/{agent-runtime → model-runtime}/moonshot/index.test.ts +1 -1
- package/src/libs/{agent-runtime → model-runtime}/novita/index.test.ts +3 -3
- package/src/libs/{agent-runtime → model-runtime}/ollama/index.ts +1 -1
- package/src/libs/{agent-runtime → model-runtime}/openai/index.test.ts +1 -1
- package/src/libs/{agent-runtime → model-runtime}/openrouter/index.test.ts +2 -2
- package/src/libs/{agent-runtime → model-runtime}/perplexity/index.test.ts +2 -2
- package/src/libs/{agent-runtime → model-runtime}/ppio/index.test.ts +4 -4
- package/src/libs/{agent-runtime → model-runtime}/providerTestUtils.ts +1 -1
- package/src/libs/{agent-runtime → model-runtime}/qiniu/index.test.ts +2 -2
- package/src/libs/{agent-runtime → model-runtime}/qwen/index.test.ts +2 -2
- package/src/libs/{agent-runtime → model-runtime}/sensenova/index.test.ts +2 -2
- package/src/libs/{agent-runtime → model-runtime}/siliconcloud/index.ts +1 -6
- package/src/libs/{agent-runtime → model-runtime}/spark/index.test.ts +2 -2
- package/src/libs/{agent-runtime → model-runtime}/stepfun/index.test.ts +2 -2
- package/src/libs/{agent-runtime → model-runtime}/taichu/index.test.ts +2 -2
- package/src/libs/{agent-runtime → model-runtime}/tencentcloud/index.test.ts +1 -1
- package/src/libs/{agent-runtime → model-runtime}/togetherai/index.test.ts +1 -1
- package/src/libs/{agent-runtime → model-runtime}/upstage/index.test.ts +1 -1
- package/src/libs/{agent-runtime → model-runtime}/utils/openaiCompatibleFactory/index.test.ts +2 -2
- package/src/libs/{agent-runtime → model-runtime}/utils/openaiHelpers.ts +1 -1
- package/src/libs/{agent-runtime → model-runtime}/utils/streams/ollama.ts +1 -1
- package/src/libs/{agent-runtime → model-runtime}/utils/streams/openai.test.ts +1 -1
- package/src/libs/{agent-runtime → model-runtime}/utils/streams/qwen.test.ts +1 -1
- package/src/libs/{agent-runtime → model-runtime}/wenxin/index.test.ts +2 -2
- package/src/libs/{agent-runtime → model-runtime}/xai/index.test.ts +2 -2
- package/src/libs/{agent-runtime → model-runtime}/zeroone/index.test.ts +1 -1
- package/src/libs/{agent-runtime → model-runtime}/zhipu/index.test.ts +2 -2
- package/src/libs/trpc/client/lambda.ts +1 -1
- package/src/server/globalConfig/_deprecated.test.ts +1 -1
- package/src/server/globalConfig/_deprecated.ts +1 -1
- package/src/server/globalConfig/genServerAiProviderConfig.ts +1 -1
- package/src/server/modules/AgentRuntime/index.test.ts +4 -4
- package/src/server/modules/AgentRuntime/index.ts +1 -1
- package/src/server/modules/AgentRuntime/trace.ts +1 -1
- package/src/server/routers/async/ragEval.ts +1 -1
- package/src/services/__tests__/_auth.test.ts +1 -1
- package/src/services/__tests__/chat.test.ts +3 -3
- package/src/services/_auth.ts +1 -1
- package/src/services/chat.ts +1 -1
- package/src/services/textToImage.ts +1 -1
- package/src/services/upload.ts +1 -1
- package/src/store/user/slices/modelList/action.ts +1 -1
- package/src/types/fetch.ts +1 -1
- package/src/types/message/chat.ts +1 -1
- package/src/types/user/settings/modelProvider.ts +1 -1
- package/src/utils/errorResponse.test.ts +1 -1
- package/src/utils/errorResponse.ts +1 -1
- package/src/utils/fetch/fetchSSE.ts +1 -1
- package/src/utils/genUserLLMConfig.test.ts +1 -1
- package/src/utils/genUserLLMConfig.ts +1 -1
- /package/src/libs/{agent-runtime → model-runtime}/AgentRuntime.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/BaseAI.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/UniformRuntime/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/ai21/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/ai360/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/anthropic/handleAnthropicError.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/anthropic/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/azureOpenai/index.test.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/azureOpenai/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/azureai/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/baichuan/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/bedrock/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/cloudflare/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/cohere/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/deepseek/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/error.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/fireworksai/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/giteeai/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/github/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/google/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/groq/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/helpers/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/helpers/parseToolCalls.test.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/helpers/parseToolCalls.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/higress/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/huggingface/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/hunyuan/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/infiniai/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/internlm/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/jina/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/lmstudio/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/minimax/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/mistral/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/moonshot/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/novita/__snapshots__/index.test.ts.snap +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/novita/fixtures/models.json +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/novita/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/novita/type.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/nvidia/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/ollama/index.test.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/ollama/type.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/openai/__snapshots__/index.test.ts.snap +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/openai/fixtures/openai-models.json +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/openai/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/openrouter/__snapshots__/index.test.ts.snap +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/openrouter/fixtures/frontendModels.json +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/openrouter/fixtures/models.json +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/openrouter/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/openrouter/type.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/perplexity/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/ppio/__snapshots__/index.test.ts.snap +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/ppio/fixtures/models.json +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/ppio/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/ppio/type.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/providerTestUtils.test.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/qiniu/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/qwen/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/runtimeMap.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/sambanova/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/search1api/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/sensenova/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/spark/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/stepfun/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/taichu/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/tencentcloud/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/togetherai/fixtures/models.json +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/togetherai/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/togetherai/type.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/types/chat.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/types/embeddings.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/types/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/types/model.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/types/textToImage.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/types/tts.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/types/type.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/upstage/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/anthropicHelpers.test.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/anthropicHelpers.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/cloudflareHelpers.test.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/cloudflareHelpers.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/createError.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/debugStream.test.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/debugStream.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/desensitizeUrl.test.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/desensitizeUrl.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/handleOpenAIError.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/openaiCompatibleFactory/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/openaiHelpers.test.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/response.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/sensenovaHelpers.test.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/sensenovaHelpers.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/streams/__snapshots__/protocol.test.ts.snap +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/streams/anthropic.test.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/streams/anthropic.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/streams/bedrock/claude.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/streams/bedrock/common.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/streams/bedrock/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/streams/bedrock/llama.test.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/streams/bedrock/llama.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/streams/google-ai.test.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/streams/google-ai.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/streams/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/streams/model.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/streams/ollama.test.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/streams/openai.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/streams/protocol.test.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/streams/protocol.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/streams/qwen.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/streams/spark.test.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/streams/spark.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/streams/vertex-ai.test.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/streams/vertex-ai.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/uriParser.test.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/uriParser.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/usageConverter.test.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/utils/usageConverter.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/vertexai/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/vllm/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/volcengine/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/wenxin/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/xai/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/xinference/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/zeroone/index.ts +0 -0
- /package/src/libs/{agent-runtime → model-runtime}/zhipu/index.ts +0 -0
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,31 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.86.1](https://github.com/lobehub/lobe-chat/compare/v1.86.0...v1.86.1)
|
6
|
+
|
7
|
+
<sup>Released on **2025-05-15**</sup>
|
8
|
+
|
9
|
+
#### ♻ Code Refactoring
|
10
|
+
|
11
|
+
- **misc**: Refactor agent runtime to model runtime.
|
12
|
+
|
13
|
+
<br/>
|
14
|
+
|
15
|
+
<details>
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
17
|
+
|
18
|
+
#### Code refactoring
|
19
|
+
|
20
|
+
- **misc**: Refactor agent runtime to model runtime, closes [#7846](https://github.com/lobehub/lobe-chat/issues/7846) ([a3b9448](https://github.com/lobehub/lobe-chat/commit/a3b9448))
|
21
|
+
|
22
|
+
</details>
|
23
|
+
|
24
|
+
<div align="right">
|
25
|
+
|
26
|
+
[](#readme-top)
|
27
|
+
|
28
|
+
</div>
|
29
|
+
|
5
30
|
## [Version 1.86.0](https://github.com/lobehub/lobe-chat/compare/v1.85.10...v1.86.0)
|
6
31
|
|
7
32
|
<sup>Released on **2025-05-15**</sup>
|
package/README.md
CHANGED
@@ -196,7 +196,7 @@ We have implemented support for the following model service providers:
|
|
196
196
|
- **[OpenRouter](https://lobechat.com/discover/provider/openrouter)**: OpenRouter is a service platform providing access to various cutting-edge large model interfaces, supporting OpenAI, Anthropic, LLaMA, and more, suitable for diverse development and application needs. Users can flexibly choose the optimal model and pricing based on their requirements, enhancing the AI experience.
|
197
197
|
- **[Cloudflare Workers AI](https://lobechat.com/discover/provider/cloudflare)**: Run serverless GPU-powered machine learning models on Cloudflare's global network.
|
198
198
|
|
199
|
-
<details><summary><kbd>See more providers (+
|
199
|
+
<details><summary><kbd>See more providers (+31)</kbd></summary>
|
200
200
|
|
201
201
|
- **[GitHub](https://lobechat.com/discover/provider/github)**: With GitHub Models, developers can become AI engineers and leverage the industry's leading AI models.
|
202
202
|
- **[Novita](https://lobechat.com/discover/provider/novita)**: Novita AI is a platform providing a variety of large language models and AI image generation API services, flexible, reliable, and cost-effective. It supports the latest open-source models like Llama3 and Mistral, offering a comprehensive, user-friendly, and auto-scaling API solution for generative AI application development, suitable for the rapid growth of AI startups.
|
@@ -209,7 +209,6 @@ We have implemented support for the following model service providers:
|
|
209
209
|
- **[Ai21Labs](https://lobechat.com/discover/provider/ai21)**: AI21 Labs builds foundational models and AI systems for enterprises, accelerating the application of generative AI in production.
|
210
210
|
- **[Upstage](https://lobechat.com/discover/provider/upstage)**: Upstage focuses on developing AI models for various business needs, including Solar LLM and document AI, aiming to achieve artificial general intelligence (AGI) for work. It allows for the creation of simple conversational agents through Chat API and supports functional calling, translation, embedding, and domain-specific applications.
|
211
211
|
- **[xAI](https://lobechat.com/discover/provider/xai)**: xAI is a company dedicated to building artificial intelligence to accelerate human scientific discovery. Our mission is to advance our collective understanding of the universe.
|
212
|
-
- **[Qiniu](https://lobechat.com/discover/provider/qiniu)**: Qiniu, as a long-established cloud service provider, delivers cost-effective and reliable AI inference services for both real-time and batch processing, with a simple and user-friendly experience.
|
213
212
|
- **[Qwen](https://lobechat.com/discover/provider/qwen)**: Tongyi Qianwen is a large-scale language model independently developed by Alibaba Cloud, featuring strong natural language understanding and generation capabilities. It can answer various questions, create written content, express opinions, and write code, playing a role in multiple fields.
|
214
213
|
- **[Wenxin](https://lobechat.com/discover/provider/wenxin)**: An enterprise-level one-stop platform for large model and AI-native application development and services, providing the most comprehensive and user-friendly toolchain for the entire process of generative artificial intelligence model development and application development.
|
215
214
|
- **[Hunyuan](https://lobechat.com/discover/provider/hunyuan)**: A large language model developed by Tencent, equipped with powerful Chinese creative capabilities, logical reasoning abilities in complex contexts, and reliable task execution skills.
|
@@ -229,10 +228,11 @@ We have implemented support for the following model service providers:
|
|
229
228
|
- **[360 AI](https://lobechat.com/discover/provider/ai360)**: 360 AI is an AI model and service platform launched by 360 Company, offering various advanced natural language processing models, including 360GPT2 Pro, 360GPT Pro, 360GPT Turbo, and 360GPT Turbo Responsibility 8K. These models combine large-scale parameters and multimodal capabilities, widely applied in text generation, semantic understanding, dialogue systems, and code generation. With flexible pricing strategies, 360 AI meets diverse user needs, supports developer integration, and promotes the innovation and development of intelligent applications.
|
230
229
|
- **[Search1API](https://lobechat.com/discover/provider/search1api)**: Search1API provides access to the DeepSeek series of models that can connect to the internet as needed, including standard and fast versions, supporting a variety of model sizes.
|
231
230
|
- **[InfiniAI](https://lobechat.com/discover/provider/infiniai)**: Provides high-performance, easy-to-use, and secure large model services for application developers, covering the entire process from large model development to service deployment.
|
231
|
+
- **[Qiniu](https://lobechat.com/discover/provider/qiniu)**: Qiniu, as a long-established cloud service provider, delivers cost-effective and reliable AI inference services for both real-time and batch processing, with a simple and user-friendly experience.
|
232
232
|
|
233
233
|
</details>
|
234
234
|
|
235
|
-
> 📊 Total providers: [<kbd>**
|
235
|
+
> 📊 Total providers: [<kbd>**41**</kbd>](https://lobechat.com/discover/providers)
|
236
236
|
|
237
237
|
<!-- PROVIDER LIST -->
|
238
238
|
|
package/README.zh-CN.md
CHANGED
@@ -196,7 +196,7 @@ LobeChat 支持文件上传与知识库功能,你可以上传文件、图片
|
|
196
196
|
- **[OpenRouter](https://lobechat.com/discover/provider/openrouter)**: OpenRouter 是一个提供多种前沿大模型接口的服务平台,支持 OpenAI、Anthropic、LLaMA 及更多,适合多样化的开发和应用需求。用户可根据自身需求灵活选择最优的模型和价格,助力 AI 体验的提升。
|
197
197
|
- **[Cloudflare Workers AI](https://lobechat.com/discover/provider/cloudflare)**: 在 Cloudflare 的全球网络上运行由无服务器 GPU 驱动的机器学习模型。
|
198
198
|
|
199
|
-
<details><summary><kbd>See more providers (+
|
199
|
+
<details><summary><kbd>See more providers (+31)</kbd></summary>
|
200
200
|
|
201
201
|
- **[GitHub](https://lobechat.com/discover/provider/github)**: 通过 GitHub 模型,开发人员可以成为 AI 工程师,并使用行业领先的 AI 模型进行构建。
|
202
202
|
- **[Novita](https://lobechat.com/discover/provider/novita)**: Novita AI 是一个提供多种大语言模型与 AI 图像生成的 API 服务的平台,灵活、可靠且具有成本效益。它支持 Llama3、Mistral 等最新的开源模型,并为生成式 AI 应用开发提供了全面、用户友好且自动扩展的 API 解决方案,适合 AI 初创公司的快速发展。
|
@@ -209,7 +209,6 @@ LobeChat 支持文件上传与知识库功能,你可以上传文件、图片
|
|
209
209
|
- **[Ai21Labs](https://lobechat.com/discover/provider/ai21)**: AI21 Labs 为企业构建基础模型和人工智能系统,加速生成性人工智能在生产中的应用。
|
210
210
|
- **[Upstage](https://lobechat.com/discover/provider/upstage)**: Upstage 专注于为各种商业需求开发 AI 模型,包括 Solar LLM 和文档 AI,旨在实现工作的人造通用智能(AGI)。通过 Chat API 创建简单的对话代理,并支持功能调用、翻译、嵌入以及特定领域应用。
|
211
211
|
- **[xAI](https://lobechat.com/discover/provider/xai)**: xAI 是一家致力于构建人工智能以加速人类科学发现的公司。我们的使命是推动我们对宇宙的共同理解。
|
212
|
-
- **[Qiniu](https://lobechat.com/discover/provider/qiniu)**: 七牛作为老牌云服务厂商,提供高性价比稳定的实时、批量 AI 推理服务,简单易用。
|
213
212
|
- **[Qwen](https://lobechat.com/discover/provider/qwen)**: 通义千问是阿里云自主研发的超大规模语言模型,具有强大的自然语言理解和生成能力。它可以回答各种问题、创作文字内容、表达观点看法、撰写代码等,在多个领域发挥作用。
|
214
213
|
- **[Wenxin](https://lobechat.com/discover/provider/wenxin)**: 企业级一站式大模型与 AI 原生应用开发及服务平台,提供最全面易用的生成式人工智能模型开发、应用开发全流程工具链
|
215
214
|
- **[Hunyuan](https://lobechat.com/discover/provider/hunyuan)**: 由腾讯研发的大语言模型,具备强大的中文创作能力,复杂语境下的逻辑推理能力,以及可靠的任务执行能力
|
@@ -229,10 +228,11 @@ LobeChat 支持文件上传与知识库功能,你可以上传文件、图片
|
|
229
228
|
- **[360 AI](https://lobechat.com/discover/provider/ai360)**: 360 AI 是 360 公司推出的 AI 模型和服务平台,提供多种先进的自然语言处理模型,包括 360GPT2 Pro、360GPT Pro、360GPT Turbo 和 360GPT Turbo Responsibility 8K。这些模型结合了大规模参数和多模态能力,广泛应用于文本生成、语义理解、对话系统与代码生成等领域。通过灵活的定价策略,360 AI 满足多样化用户需求,支持开发者集成,推动智能化应用的革新和发展。
|
230
229
|
- **[Search1API](https://lobechat.com/discover/provider/search1api)**: Search1API 提供可根据需要自行联网的 DeepSeek 系列模型的访问,包括标准版和快速版本,支持多种参数规模的模型选择。
|
231
230
|
- **[InfiniAI](https://lobechat.com/discover/provider/infiniai)**: 为应用开发者提供高性能、易上手、安全可靠的大模型服务,覆盖从大模型开发到大模型服务化部署的全流程。
|
231
|
+
- **[Qiniu](https://lobechat.com/discover/provider/qiniu)**: 七牛作为老牌云服务厂商,提供高性价比稳定的实时、批量 AI 推理服务,简单易用。
|
232
232
|
|
233
233
|
</details>
|
234
234
|
|
235
|
-
> 📊 Total providers: [<kbd>**
|
235
|
+
> 📊 Total providers: [<kbd>**41**</kbd>](https://lobechat.com/discover/providers)
|
236
236
|
|
237
237
|
<!-- PROVIDER LIST -->
|
238
238
|
|
package/changelog/v1.json
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.86.
|
3
|
+
"version": "1.86.1",
|
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",
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
2
2
|
|
3
|
-
import { AgentRuntimeError } from '@/libs/
|
3
|
+
import { AgentRuntimeError } from '@/libs/model-runtime';
|
4
4
|
import { ChatErrorType } from '@/types/fetch';
|
5
5
|
import { createErrorResponse } from '@/utils/errorResponse';
|
6
6
|
import { getJWTPayload } from '@/utils/server/jwt';
|
@@ -2,8 +2,8 @@ import { AuthObject } from '@clerk/backend';
|
|
2
2
|
import { NextRequest } from 'next/server';
|
3
3
|
|
4
4
|
import { JWTPayload, LOBE_CHAT_AUTH_HEADER, OAUTH_AUTHORIZED, enableClerk } from '@/const/auth';
|
5
|
-
import { AgentRuntime, AgentRuntimeError, ChatCompletionErrorPayload } from '@/libs/agent-runtime';
|
6
5
|
import { ClerkAuth } from '@/libs/clerk-auth';
|
6
|
+
import { AgentRuntime, AgentRuntimeError, ChatCompletionErrorPayload } from '@/libs/model-runtime';
|
7
7
|
import { ChatErrorType } from '@/types/fetch';
|
8
8
|
import { createErrorResponse } from '@/utils/errorResponse';
|
9
9
|
import { getJWTPayload } from '@/utils/server/jwt';
|
@@ -2,7 +2,7 @@ import { type AuthObject } from '@clerk/backend';
|
|
2
2
|
|
3
3
|
import { getAppConfig } from '@/config/app';
|
4
4
|
import { enableClerk, enableNextAuth } from '@/const/auth';
|
5
|
-
import { AgentRuntimeError } from '@/libs/
|
5
|
+
import { AgentRuntimeError } from '@/libs/model-runtime';
|
6
6
|
import { ChatErrorType } from '@/types/fetch';
|
7
7
|
|
8
8
|
interface CheckAuthParams {
|
@@ -4,7 +4,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
4
4
|
|
5
5
|
import { checkAuthMethod } from '@/app/(backend)/middleware/auth/utils';
|
6
6
|
import { LOBE_CHAT_AUTH_HEADER, OAUTH_AUTHORIZED } from '@/const/auth';
|
7
|
-
import { AgentRuntime, LobeRuntimeAI } from '@/libs/
|
7
|
+
import { AgentRuntime, LobeRuntimeAI } from '@/libs/model-runtime';
|
8
8
|
import { ChatErrorType } from '@/types/fetch';
|
9
9
|
import { getJWTPayload } from '@/utils/server/jwt';
|
10
10
|
|
@@ -3,7 +3,7 @@ import {
|
|
3
3
|
AGENT_RUNTIME_ERROR_SET,
|
4
4
|
AgentRuntime,
|
5
5
|
ChatCompletionErrorPayload,
|
6
|
-
} from '@/libs/
|
6
|
+
} from '@/libs/model-runtime';
|
7
7
|
import { createTraceOptions, initAgentRuntimeWithUserPayload } from '@/server/modules/AgentRuntime';
|
8
8
|
import { ChatErrorType } from '@/types/fetch';
|
9
9
|
import { ChatStreamPayload } from '@/types/openai/chat';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { checkAuth } from '@/app/(backend)/middleware/auth';
|
2
|
-
import { AgentRuntime, ModelProvider } from '@/libs/
|
3
|
-
import { LobeVertexAI } from '@/libs/
|
2
|
+
import { AgentRuntime, ModelProvider } from '@/libs/model-runtime';
|
3
|
+
import { LobeVertexAI } from '@/libs/model-runtime/vertexai';
|
4
4
|
import { safeParseJSON } from '@/utils/safeParseJSON';
|
5
5
|
|
6
6
|
import { POST as UniverseRoute } from '../[provider]/route';
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { checkAuth } from '@/app/(backend)/middleware/auth';
|
2
|
-
import { ChatCompletionErrorPayload, PullModelParams } from '@/libs/
|
2
|
+
import { ChatCompletionErrorPayload, PullModelParams } from '@/libs/model-runtime';
|
3
3
|
import { initAgentRuntimeWithUserPayload } from '@/server/modules/AgentRuntime';
|
4
4
|
import { ChatErrorType } from '@/types/fetch';
|
5
5
|
import { createErrorResponse } from '@/utils/errorResponse';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { NextResponse } from 'next/server';
|
2
2
|
|
3
3
|
import { checkAuth } from '@/app/(backend)/middleware/auth';
|
4
|
-
import { ChatCompletionErrorPayload, ModelProvider } from '@/libs/
|
4
|
+
import { ChatCompletionErrorPayload, ModelProvider } from '@/libs/model-runtime';
|
5
5
|
import { initAgentRuntimeWithUserPayload } from '@/server/modules/AgentRuntime';
|
6
6
|
import { ChatErrorType } from '@/types/fetch';
|
7
7
|
import { createErrorResponse } from '@/utils/errorResponse';
|
@@ -4,7 +4,7 @@ import { createGatewayOnEdgeRuntime } from '@lobehub/chat-plugins-gateway';
|
|
4
4
|
import { getAppConfig } from '@/config/app';
|
5
5
|
import { LOBE_CHAT_AUTH_HEADER, OAUTH_AUTHORIZED, enableNextAuth } from '@/const/auth';
|
6
6
|
import { LOBE_CHAT_TRACE_ID, TraceNameMap } from '@/const/trace';
|
7
|
-
import { AgentRuntimeError } from '@/libs/
|
7
|
+
import { AgentRuntimeError } from '@/libs/model-runtime';
|
8
8
|
import { TraceClient } from '@/libs/traces';
|
9
9
|
import { ChatErrorType, ErrorType } from '@/types/fetch';
|
10
10
|
import { createErrorResponse } from '@/utils/errorResponse';
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { NextResponse } from 'next/server';
|
2
2
|
|
3
3
|
import { checkAuth } from '@/app/(backend)/middleware/auth';
|
4
|
-
import { ChatCompletionErrorPayload } from '@/libs/
|
5
|
-
import { TextToImagePayload } from '@/libs/
|
4
|
+
import { ChatCompletionErrorPayload } from '@/libs/model-runtime';
|
5
|
+
import { TextToImagePayload } from '@/libs/model-runtime/types';
|
6
6
|
import { initAgentRuntimeWithUserPayload } from '@/server/modules/AgentRuntime';
|
7
7
|
import { ChatErrorType } from '@/types/fetch';
|
8
8
|
import { createErrorResponse } from '@/utils/errorResponse';
|
@@ -5,7 +5,7 @@ import { createStyles } from 'antd-style';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
6
6
|
|
7
7
|
import { AzureProviderCard } from '@/config/modelProviders';
|
8
|
-
import { ModelProvider } from '@/libs/
|
8
|
+
import { ModelProvider } from '@/libs/model-runtime';
|
9
9
|
import { useUserStore } from '@/store/user';
|
10
10
|
import { modelProviderSelectors } from '@/store/user/selectors';
|
11
11
|
|
@@ -6,7 +6,7 @@ import { useTranslation } from 'react-i18next';
|
|
6
6
|
|
7
7
|
import { FormInput, FormPassword } from '@/components/FormInput';
|
8
8
|
import { AzureProviderCard } from '@/config/modelProviders';
|
9
|
-
import { ModelProvider } from '@/libs/
|
9
|
+
import { ModelProvider } from '@/libs/model-runtime';
|
10
10
|
import { aiProviderSelectors, useAiInfraStore } from '@/store/aiInfra';
|
11
11
|
import { useUserStore } from '@/store/user';
|
12
12
|
import { modelProviderSelectors } from '@/store/user/selectors';
|
@@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next';
|
|
4
4
|
|
5
5
|
import { FormInput, FormPassword } from '@/components/FormInput';
|
6
6
|
import { AzureAIProviderCard } from '@/config/modelProviders';
|
7
|
-
import { ModelProvider } from '@/libs/
|
7
|
+
import { ModelProvider } from '@/libs/model-runtime';
|
8
8
|
import { aiProviderSelectors, useAiInfraStore } from '@/store/aiInfra';
|
9
9
|
|
10
10
|
import { KeyVaultsConfigKey, LLMProviderApiTokenKey, LLMProviderBaseUrlKey } from '../../const';
|
@@ -3,7 +3,7 @@ import { eq } from 'drizzle-orm/expressions';
|
|
3
3
|
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
4
4
|
|
5
5
|
import { LobeChatDatabase } from '@/database/type';
|
6
|
-
import { ModelProvider } from '@/libs/
|
6
|
+
import { ModelProvider } from '@/libs/model-runtime';
|
7
7
|
import { sleep } from '@/utils/sleep';
|
8
8
|
|
9
9
|
import { aiProviders, users } from '../../schemas';
|
@@ -3,7 +3,7 @@ import { isEmpty } from 'lodash-es';
|
|
3
3
|
|
4
4
|
import { DEFAULT_MODEL_PROVIDER_LIST } from '@/config/modelProviders';
|
5
5
|
import { LobeChatDatabase } from '@/database/type';
|
6
|
-
import { ModelProvider } from '@/libs/
|
6
|
+
import { ModelProvider } from '@/libs/model-runtime';
|
7
7
|
import {
|
8
8
|
AiProviderDetailItem,
|
9
9
|
AiProviderListItem,
|
@@ -5,7 +5,7 @@ import { Network, ShieldPlus } from 'lucide-react';
|
|
5
5
|
import { memo, useState } from 'react';
|
6
6
|
import { useTranslation } from 'react-i18next';
|
7
7
|
|
8
|
-
import { ModelProvider } from '@/libs/
|
8
|
+
import { ModelProvider } from '@/libs/model-runtime';
|
9
9
|
import { useUserStore } from '@/store/user';
|
10
10
|
import { keyVaultsConfigSelectors } from '@/store/user/selectors';
|
11
11
|
|
@@ -4,7 +4,7 @@ import { memo, useMemo, useState } from 'react';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
5
5
|
import { Center, Flexbox } from 'react-layout-kit';
|
6
6
|
|
7
|
-
import { ModelProvider } from '@/libs/
|
7
|
+
import { ModelProvider } from '@/libs/model-runtime';
|
8
8
|
import { useChatStore } from '@/store/chat';
|
9
9
|
import { GlobalLLMProviderKey } from '@/types/user/settings';
|
10
10
|
|
@@ -6,7 +6,7 @@ import { Suspense, memo, useMemo } from 'react';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
7
7
|
|
8
8
|
import { useProviderName } from '@/hooks/useProviderName';
|
9
|
-
import { AgentRuntimeErrorType, ILobeAgentRuntimeErrorType } from '@/libs/
|
9
|
+
import { AgentRuntimeErrorType, ILobeAgentRuntimeErrorType } from '@/libs/model-runtime';
|
10
10
|
import { ChatErrorType, ErrorType } from '@/types/fetch';
|
11
11
|
import { ChatMessage, ChatMessageError } from '@/types/message';
|
12
12
|
|
@@ -6,8 +6,8 @@ import { beforeEach, describe, expect, it, vi } from 'vitest';
|
|
6
6
|
import * as langfuseCfg from '@/config/langfuse';
|
7
7
|
import { JWTPayload } from '@/const/auth';
|
8
8
|
import { TraceNameMap } from '@/const/trace';
|
9
|
-
import { AgentRuntime, ChatStreamPayload, LobeOpenAI, ModelProvider } from '@/libs/
|
10
|
-
import { providerRuntimeMap } from '@/libs/
|
9
|
+
import { AgentRuntime, ChatStreamPayload, LobeOpenAI, ModelProvider } from '@/libs/model-runtime';
|
10
|
+
import { providerRuntimeMap } from '@/libs/model-runtime/runtimeMap';
|
11
11
|
import { createTraceOptions } from '@/server/modules/AgentRuntime';
|
12
12
|
|
13
13
|
import { AgentChatOptions } from './AgentRuntime';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// @vitest-environment node
|
2
|
-
import { ModelProvider } from '@/libs/
|
3
|
-
import { testProvider } from '@/libs/
|
2
|
+
import { ModelProvider } from '@/libs/model-runtime';
|
3
|
+
import { testProvider } from '@/libs/model-runtime/providerTestUtils';
|
4
4
|
|
5
5
|
import { LobeAi21AI } from './index';
|
6
6
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// @vitest-environment node
|
2
|
-
import { ModelProvider } from '@/libs/
|
3
|
-
import { testProvider } from '@/libs/
|
2
|
+
import { ModelProvider } from '@/libs/model-runtime';
|
3
|
+
import { testProvider } from '@/libs/model-runtime/providerTestUtils';
|
4
4
|
|
5
5
|
import { LobeAi360AI } from './index';
|
6
6
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
// @vitest-environment node
|
2
2
|
import { Mock, afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
3
3
|
|
4
|
-
import { ChatCompletionTool, ChatStreamPayload } from '@/libs/
|
4
|
+
import { ChatCompletionTool, ChatStreamPayload } from '@/libs/model-runtime';
|
5
5
|
|
6
6
|
import * as anthropicHelpers from '../utils/anthropicHelpers';
|
7
7
|
import * as debugStreamModule from '../utils/debugStream';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
// @vitest-environment node
|
2
2
|
import { Mock } from 'vitest';
|
3
3
|
|
4
|
-
import { LobeOpenAICompatibleRuntime, ModelProvider } from '@/libs/
|
4
|
+
import { LobeOpenAICompatibleRuntime, ModelProvider } from '@/libs/model-runtime';
|
5
5
|
|
6
6
|
import { testProvider } from '../providerTestUtils';
|
7
7
|
import { LobeBaichuanAI } from './index';
|
@@ -2,7 +2,7 @@
|
|
2
2
|
import { InvokeModelWithResponseStreamCommand } from '@aws-sdk/client-bedrock-runtime';
|
3
3
|
import { Mock, afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
4
4
|
|
5
|
-
import { AgentRuntimeErrorType, ModelProvider } from '@/libs/
|
5
|
+
import { AgentRuntimeErrorType, ModelProvider } from '@/libs/model-runtime';
|
6
6
|
|
7
7
|
import * as debugStreamModule from '../utils/debugStream';
|
8
8
|
import { LobeBedrockAI } from './index';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
// @vitest-environment node
|
2
2
|
import { Mock, afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
3
3
|
|
4
|
-
import { ChatCompletionTool } from '@/libs/
|
4
|
+
import { ChatCompletionTool } from '@/libs/model-runtime';
|
5
5
|
|
6
6
|
import * as debugStreamModule from '../utils/debugStream';
|
7
7
|
import { LobeCloudflareAI } from './index';
|
@@ -6,8 +6,8 @@ import {
|
|
6
6
|
LLMRoleType,
|
7
7
|
LobeOpenAICompatibleRuntime,
|
8
8
|
ModelProvider,
|
9
|
-
} from '@/libs/
|
10
|
-
import { testProvider } from '@/libs/
|
9
|
+
} from '@/libs/model-runtime';
|
10
|
+
import { testProvider } from '@/libs/model-runtime/providerTestUtils';
|
11
11
|
|
12
12
|
import { LobeDeepSeekAI } from './index';
|
13
13
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// @vitest-environment node
|
2
|
-
import { ModelProvider } from '@/libs/
|
3
|
-
import { testProvider } from '@/libs/
|
2
|
+
import { ModelProvider } from '@/libs/model-runtime';
|
3
|
+
import { testProvider } from '@/libs/model-runtime/providerTestUtils';
|
4
4
|
|
5
5
|
import { LobeFireworksAI } from './index';
|
6
6
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// @vitest-environment node
|
2
|
-
import { ModelProvider } from '@/libs/
|
3
|
-
import { testProvider } from '@/libs/
|
2
|
+
import { ModelProvider } from '@/libs/model-runtime';
|
3
|
+
import { testProvider } from '@/libs/model-runtime/providerTestUtils';
|
4
4
|
|
5
5
|
import { LobeGiteeAI } from './index';
|
6
6
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// @vitest-environment node
|
2
|
-
import { ModelProvider } from '@/libs/
|
3
|
-
import { testProvider } from '@/libs/
|
2
|
+
import { ModelProvider } from '@/libs/model-runtime';
|
3
|
+
import { testProvider } from '@/libs/model-runtime/providerTestUtils';
|
4
4
|
|
5
5
|
import { LobeGithubAI } from './index';
|
6
6
|
|
@@ -3,7 +3,7 @@ import { FunctionDeclarationsTool } from '@google/generative-ai';
|
|
3
3
|
import OpenAI from 'openai';
|
4
4
|
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
5
5
|
|
6
|
-
import { OpenAIChatMessage } from '@/libs/
|
6
|
+
import { OpenAIChatMessage } from '@/libs/model-runtime';
|
7
7
|
import * as imageToBase64Module from '@/utils/imageToBase64';
|
8
8
|
|
9
9
|
import * as debugStreamModule from '../utils/debugStream';
|
@@ -1,8 +1,8 @@
|
|
1
1
|
// @vitest-environment node
|
2
2
|
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
3
3
|
|
4
|
-
import { LobeOpenAICompatibleRuntime } from '@/libs/
|
5
|
-
import { testProvider } from '@/libs/
|
4
|
+
import { LobeOpenAICompatibleRuntime } from '@/libs/model-runtime';
|
5
|
+
import { testProvider } from '@/libs/model-runtime/providerTestUtils';
|
6
6
|
|
7
7
|
import { LobeGroq } from './index';
|
8
8
|
|
@@ -1,8 +1,8 @@
|
|
1
1
|
// @vitest-environment node
|
2
2
|
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
3
3
|
|
4
|
-
import { LobeOpenAICompatibleRuntime, ModelProvider } from '@/libs/
|
5
|
-
import { testProvider } from '@/libs/
|
4
|
+
import { LobeOpenAICompatibleRuntime, ModelProvider } from '@/libs/model-runtime';
|
5
|
+
import { testProvider } from '@/libs/model-runtime/providerTestUtils';
|
6
6
|
|
7
7
|
import { LobeHunyuanAI } from './index';
|
8
8
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// @vitest-environment node
|
2
|
-
import { ModelProvider } from '@/libs/
|
3
|
-
import { testProvider } from '@/libs/
|
2
|
+
import { ModelProvider } from '@/libs/model-runtime';
|
3
|
+
import { testProvider } from '@/libs/model-runtime/providerTestUtils';
|
4
4
|
|
5
5
|
import { LobeInternLMAI } from './index';
|
6
6
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// @vitest-environment node
|
2
|
-
import { ModelProvider } from '@/libs/
|
3
|
-
import { testProvider } from '@/libs/
|
2
|
+
import { ModelProvider } from '@/libs/model-runtime';
|
3
|
+
import { testProvider } from '@/libs/model-runtime/providerTestUtils';
|
4
4
|
|
5
5
|
import { LobeLMStudioAI } from './index';
|
6
6
|
|
@@ -1,8 +1,8 @@
|
|
1
1
|
// @vitest-environment node
|
2
2
|
import { Mock, afterEach, beforeEach, expect, it, vi } from 'vitest';
|
3
3
|
|
4
|
-
import { LobeOpenAICompatibleRuntime } from '@/libs/
|
5
|
-
import { testProvider } from '@/libs/
|
4
|
+
import { LobeOpenAICompatibleRuntime } from '@/libs/model-runtime';
|
5
|
+
import { testProvider } from '@/libs/model-runtime/providerTestUtils';
|
6
6
|
|
7
7
|
import { LobeMistralAI } from './index';
|
8
8
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
// @vitest-environment node
|
2
2
|
import { Mock, afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
3
3
|
|
4
|
-
import { LobeOpenAICompatibleRuntime } from '@/libs/
|
5
|
-
import { ModelProvider } from '@/libs/
|
6
|
-
import { testProvider } from '@/libs/
|
4
|
+
import { LobeOpenAICompatibleRuntime } from '@/libs/model-runtime';
|
5
|
+
import { ModelProvider } from '@/libs/model-runtime';
|
6
|
+
import { testProvider } from '@/libs/model-runtime/providerTestUtils';
|
7
7
|
|
8
8
|
import models from './fixtures/models.json';
|
9
9
|
import { LobeNovitaAI } from './index';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Ollama, Tool } from 'ollama/browser';
|
2
2
|
import { ClientOptions } from 'openai';
|
3
3
|
|
4
|
-
import { ModelRequestOptions, OpenAIChatMessage } from '@/libs/
|
4
|
+
import { ModelRequestOptions, OpenAIChatMessage } from '@/libs/model-runtime';
|
5
5
|
import { ChatModelCard } from '@/types/llm';
|
6
6
|
import { createErrorResponse } from '@/utils/errorResponse';
|
7
7
|
|
@@ -3,7 +3,7 @@ import OpenAI from 'openai';
|
|
3
3
|
import { Mock, afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
4
4
|
|
5
5
|
// 引入模块以便于对函数进行spy
|
6
|
-
import { ChatStreamCallbacks, LobeOpenAICompatibleRuntime } from '@/libs/
|
6
|
+
import { ChatStreamCallbacks, LobeOpenAICompatibleRuntime } from '@/libs/model-runtime';
|
7
7
|
|
8
8
|
import * as debugStreamModule from '../utils/debugStream';
|
9
9
|
import officalOpenAIModels from './fixtures/openai-models.json';
|
@@ -1,8 +1,8 @@
|
|
1
1
|
// @vitest-environment node
|
2
2
|
import { Mock, afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
3
3
|
|
4
|
-
import { LobeOpenAICompatibleRuntime } from '@/libs/
|
5
|
-
import { testProvider } from '@/libs/
|
4
|
+
import { LobeOpenAICompatibleRuntime } from '@/libs/model-runtime';
|
5
|
+
import { testProvider } from '@/libs/model-runtime/providerTestUtils';
|
6
6
|
|
7
7
|
import frontendModels from './fixtures/frontendModels.json';
|
8
8
|
import models from './fixtures/models.json';
|
@@ -1,8 +1,8 @@
|
|
1
1
|
// @vitest-environment node
|
2
2
|
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
3
3
|
|
4
|
-
import { LobeOpenAICompatibleRuntime, ModelProvider } from '@/libs/
|
5
|
-
import { testProvider } from '@/libs/
|
4
|
+
import { LobeOpenAICompatibleRuntime, ModelProvider } from '@/libs/model-runtime';
|
5
|
+
import { testProvider } from '@/libs/model-runtime/providerTestUtils';
|
6
6
|
|
7
7
|
import { LobePerplexityAI } from './index';
|
8
8
|
|
@@ -2,10 +2,10 @@
|
|
2
2
|
import OpenAI from 'openai';
|
3
3
|
import { Mock, afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
4
4
|
|
5
|
-
import { LobeDeepSeekAI, LobeOpenAICompatibleRuntime } from '@/libs/
|
6
|
-
import { ModelProvider } from '@/libs/
|
7
|
-
import { AgentRuntimeErrorType } from '@/libs/
|
8
|
-
import { testProvider } from '@/libs/
|
5
|
+
import { LobeDeepSeekAI, LobeOpenAICompatibleRuntime } from '@/libs/model-runtime';
|
6
|
+
import { ModelProvider } from '@/libs/model-runtime';
|
7
|
+
import { AgentRuntimeErrorType } from '@/libs/model-runtime';
|
8
|
+
import { testProvider } from '@/libs/model-runtime/providerTestUtils';
|
9
9
|
|
10
10
|
import * as debugStreamModule from '../utils/debugStream';
|
11
11
|
import models from './fixtures/models.json';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import OpenAI from 'openai';
|
2
2
|
import { Mock, afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
3
3
|
|
4
|
-
import { LobeOpenAICompatibleRuntime } from '@/libs/
|
4
|
+
import { LobeOpenAICompatibleRuntime } from '@/libs/model-runtime';
|
5
5
|
|
6
6
|
import * as debugStreamModule from './utils/debugStream';
|
7
7
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// @vitest-environment node
|
2
|
-
import { ModelProvider } from '@/libs/
|
3
|
-
import { testProvider } from '@/libs/
|
2
|
+
import { ModelProvider } from '@/libs/model-runtime';
|
3
|
+
import { testProvider } from '@/libs/model-runtime/providerTestUtils';
|
4
4
|
|
5
5
|
import { LobeQiniuAI } from './index';
|
6
6
|
|