@lobehub/chat 1.34.0 → 1.34.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
CHANGED
@@ -2,6 +2,31 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.34.1](https://github.com/lobehub/lobe-chat/compare/v1.34.0...v1.34.1)
|
6
|
+
|
7
|
+
<sup>Released on **2024-11-26**</sup>
|
8
|
+
|
9
|
+
#### 🐛 Bug Fixes
|
10
|
+
|
11
|
+
- **misc**: Fix Qwen baseUrl calling.
|
12
|
+
|
13
|
+
<br/>
|
14
|
+
|
15
|
+
<details>
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
17
|
+
|
18
|
+
#### What's fixed
|
19
|
+
|
20
|
+
- **misc**: Fix Qwen baseUrl calling, closes [#4799](https://github.com/lobehub/lobe-chat/issues/4799) ([8fd7eb7](https://github.com/lobehub/lobe-chat/commit/8fd7eb7))
|
21
|
+
|
22
|
+
</details>
|
23
|
+
|
24
|
+
<div align="right">
|
25
|
+
|
26
|
+
[](#readme-top)
|
27
|
+
|
28
|
+
</div>
|
29
|
+
|
5
30
|
## [Version 1.34.0](https://github.com/lobehub/lobe-chat/compare/v1.33.5...v1.34.0)
|
6
31
|
|
7
32
|
<sup>Released on **2024-11-26**</sup>
|
package/changelog/v1.json
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.34.
|
3
|
+
"version": "1.34.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",
|
@@ -273,6 +273,16 @@ describe('initAgentRuntimeWithUserPayload method', () => {
|
|
273
273
|
expect(runtime['_runtime']).toBeInstanceOf(LobeQwenAI);
|
274
274
|
});
|
275
275
|
|
276
|
+
it('Qwen AI provider: without endpoint', async () => {
|
277
|
+
const jwtPayload: JWTPayload = { apiKey: 'user-qwen-key' };
|
278
|
+
const runtime = await initAgentRuntimeWithUserPayload(ModelProvider.Qwen, jwtPayload);
|
279
|
+
|
280
|
+
// 假设 LobeQwenAI 是 Qwen 提供者的实现类
|
281
|
+
expect(runtime['_runtime']).toBeInstanceOf(LobeQwenAI);
|
282
|
+
// endpoint 不存在,应返回 DEFAULT_BASE_URL
|
283
|
+
expect(runtime['_runtime'].baseURL).toBe('https://dashscope.aliyuncs.com/compatible-mode/v1');
|
284
|
+
});
|
285
|
+
|
276
286
|
it('Bedrock AI provider: without apikey', async () => {
|
277
287
|
const jwtPayload = {};
|
278
288
|
const runtime = await initAgentRuntimeWithUserPayload(ModelProvider.Bedrock, jwtPayload);
|
@@ -40,7 +40,7 @@ const getLlmOptionsFromPayload = (provider: string, payload: JWTPayload) => {
|
|
40
40
|
const apiKey = apiKeyManager.pick(payload?.apiKey || llmConfig[`${upperProvider}_API_KEY`]);
|
41
41
|
const baseURL = payload?.endpoint || process.env[`${upperProvider}_PROXY_URL`];
|
42
42
|
|
43
|
-
return { apiKey, baseURL };
|
43
|
+
return baseURL ? { apiKey, baseURL } : { apiKey };
|
44
44
|
}
|
45
45
|
|
46
46
|
case ModelProvider.Azure: {
|