@lobehub/chat 1.21.2 → 1.21.3

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.21.3](https://github.com/lobehub/lobe-chat/compare/v1.21.2...v1.21.3)
6
+
7
+ <sup>Released on **2024-10-01**</sup>
8
+
9
+ #### ♻ Code Refactoring
10
+
11
+ - **misc**: Move most `/api` to `/webapi`.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### Code refactoring
19
+
20
+ - **misc**: Move most `/api` to `/webapi`, closes [#4233](https://github.com/lobehub/lobe-chat/issues/4233) ([542c359](https://github.com/lobehub/lobe-chat/commit/542c359))
21
+
22
+ </details>
23
+
24
+ <div align="right">
25
+
26
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
27
+
28
+ </div>
29
+
5
30
  ### [Version 1.21.2](https://github.com/lobehub/lobe-chat/compare/v1.21.1...v1.21.2)
6
31
 
7
32
  <sup>Released on **2024-10-01**</sup>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "1.21.2",
3
+ "version": "1.21.3",
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",
@@ -33,7 +33,7 @@ describe('AssistantService', () => {
33
33
 
34
34
  // Assert
35
35
  expect(globalHelpers.getCurrentLanguage).toHaveBeenCalled();
36
- expect(fetch).toHaveBeenCalledWith('/api/assistant/store?locale=tt');
36
+ expect(fetch).toHaveBeenCalledWith('/webapi/assistant/store?locale=tt');
37
37
  expect(assistantList).toEqual(fakeResponse.agents);
38
38
  });
39
39
 
@@ -63,7 +63,7 @@ describe('AssistantService', () => {
63
63
 
64
64
  // Assert
65
65
  expect(globalHelpers.getCurrentLanguage).toHaveBeenCalled();
66
- expect(fetch).toHaveBeenCalledWith('/api/assistant/test-assisstant?locale=tt');
66
+ expect(fetch).toHaveBeenCalledWith('/webapi/assistant/test-assisstant?locale=tt');
67
67
  expect(assistant.identifier).toEqual(fakeResponse.identifier);
68
68
  });
69
69
 
@@ -35,7 +35,7 @@ describe('ToolService', () => {
35
35
 
36
36
  // Assert
37
37
  expect(globalHelpers.getCurrentLanguage).toHaveBeenCalled();
38
- expect(fetch).toHaveBeenCalledWith('/api/plugin/store?locale=tt');
38
+ expect(fetch).toHaveBeenCalledWith('/webapi/plugin/store?locale=tt');
39
39
  expect(pluginList).toEqual(fakeResponse.plugins);
40
40
  });
41
41
 
@@ -17,26 +17,26 @@ const mapWithBasePath = <T extends object>(apis: T): T => {
17
17
  };
18
18
 
19
19
  export const API_ENDPOINTS = mapWithBasePath({
20
- proxy: '/webapi/proxy',
20
+ // chat
21
+ chat: (provider: string) => withBasePath(`/api/chat/${provider}`),
22
+ chatModels: (provider: string) => withBasePath(`/api/chat/models/${provider}`),
21
23
  oauth: '/api/auth',
22
24
 
23
- // agent markets
24
- assistantStore: '/api/assistant/store',
25
- assistant: (identifier: string) => withBasePath(`/api/assistant/${identifier}`),
25
+ proxy: '/webapi/proxy',
26
+
27
+ // assistant
28
+ assistantStore: '/webapi/assistant/store',
29
+ assistant: (identifier: string) => withBasePath(`/webapi/assistant/${identifier}`),
26
30
 
27
31
  // plugins
28
- gateway: '/api/plugin/gateway',
29
- pluginStore: '/api/plugin/store',
30
-
31
- // chat
32
- chat: (provider: string) => withBasePath(`/api/chat/${provider}`),
33
- chatModels: (provider: string) => withBasePath(`/api/chat/models/${provider}`),
32
+ gateway: '/webapi/plugin/gateway',
33
+ pluginStore: '/webapi/plugin/store',
34
34
 
35
35
  // trace
36
- trace: '/api/trace',
36
+ trace: '/webapi/trace',
37
37
 
38
38
  // image
39
- images: '/api/text-to-image/openai',
39
+ images: '/webapi/api/text-to-image/openai',
40
40
 
41
41
  // STT
42
42
  stt: '/webapi/stt/openai',
File without changes
File without changes
File without changes
File without changes