@lobehub/chat 1.28.0 → 1.28.2
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/package.json +1 -1
- package/src/app/(backend)/webapi/chat/anthropic/route.ts +0 -12
- package/src/app/(backend)/webapi/chat/google/route.ts +0 -11
- package/src/app/(backend)/webapi/chat/wenxin/route.ts +2 -2
- package/src/app/(main)/settings/llm/components/ProviderConfig/index.tsx +9 -6
- package/src/database/server/migrations/0010_add_accessed_at_and_clean_tables.sql +26 -0
- package/src/database/server/migrations/meta/0010_snapshot.json +3184 -0
- package/src/database/server/migrations/meta/_journal.json +7 -0
- package/src/database/server/models/__tests__/session.test.ts +0 -2
- package/src/database/server/models/__tests__/topic.test.ts +2 -0
- package/src/database/server/schemas/lobechat/_helpers.ts +8 -0
- package/src/database/server/schemas/lobechat/agent.ts +6 -7
- package/src/database/server/schemas/lobechat/asyncTask.ts +2 -3
- package/src/database/server/schemas/lobechat/file.ts +5 -5
- package/src/database/server/schemas/lobechat/index.ts +0 -1
- package/src/database/server/schemas/lobechat/message.ts +2 -3
- package/src/database/server/schemas/lobechat/rag.ts +4 -6
- package/src/database/server/schemas/lobechat/ragEvals.ts +5 -7
- package/src/database/server/schemas/lobechat/relations.ts +0 -33
- package/src/database/server/schemas/lobechat/session.ts +3 -5
- package/src/database/server/schemas/lobechat/topic.ts +7 -8
- package/src/database/server/schemas/lobechat/user.ts +3 -5
- package/src/server/globalConfig/index.ts +1 -1
- package/src/server/modules/AgentRuntime/index.ts +6 -2
- package/src/types/llm.ts +4 -0
- package/src/database/server/schemas/lobechat/discover.ts +0 -84
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,56 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.28.2](https://github.com/lobehub/lobe-chat/compare/v1.28.1...v1.28.2)
|
6
|
+
|
7
|
+
<sup>Released on **2024-11-06**</sup>
|
8
|
+
|
9
|
+
#### ♻ Code Refactoring
|
10
|
+
|
11
|
+
- **misc**: Refactor and clean some code.
|
12
|
+
|
13
|
+
<br/>
|
14
|
+
|
15
|
+
<details>
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
17
|
+
|
18
|
+
#### Code refactoring
|
19
|
+
|
20
|
+
- **misc**: Refactor and clean some code, closes [#4629](https://github.com/lobehub/lobe-chat/issues/4629) ([ad3a154](https://github.com/lobehub/lobe-chat/commit/ad3a154))
|
21
|
+
|
22
|
+
</details>
|
23
|
+
|
24
|
+
<div align="right">
|
25
|
+
|
26
|
+
[](#readme-top)
|
27
|
+
|
28
|
+
</div>
|
29
|
+
|
30
|
+
### [Version 1.28.1](https://github.com/lobehub/lobe-chat/compare/v1.28.0...v1.28.1)
|
31
|
+
|
32
|
+
<sup>Released on **2024-11-06**</sup>
|
33
|
+
|
34
|
+
#### ♻ Code Refactoring
|
35
|
+
|
36
|
+
- **misc**: Update database fields.
|
37
|
+
|
38
|
+
<br/>
|
39
|
+
|
40
|
+
<details>
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
42
|
+
|
43
|
+
#### Code refactoring
|
44
|
+
|
45
|
+
- **misc**: Update database fields, closes [#4626](https://github.com/lobehub/lobe-chat/issues/4626) ([b851c35](https://github.com/lobehub/lobe-chat/commit/b851c35))
|
46
|
+
|
47
|
+
</details>
|
48
|
+
|
49
|
+
<div align="right">
|
50
|
+
|
51
|
+
[](#readme-top)
|
52
|
+
|
53
|
+
</div>
|
54
|
+
|
5
55
|
## [Version 1.28.0](https://github.com/lobehub/lobe-chat/compare/v1.27.3...v1.28.0)
|
6
56
|
|
7
57
|
<sup>Released on **2024-11-05**</sup>
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.28.
|
3
|
+
"version": "1.28.2",
|
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,17 +1,5 @@
|
|
1
1
|
import { POST as UniverseRoute } from '../[provider]/route';
|
2
2
|
|
3
|
-
// due to the Chinese region does not support accessing Google
|
4
|
-
// we need to use proxy to access it
|
5
|
-
// refs: https://github.com/google/generative-ai-js/issues/29#issuecomment-1866246513
|
6
|
-
// if (process.env.HTTP_PROXY_URL) {
|
7
|
-
// const { setGlobalDispatcher, ProxyAgent } = require('undici');
|
8
|
-
//
|
9
|
-
// console.log(process.env.HTTP_PROXY_URL)
|
10
|
-
// setGlobalDispatcher(new ProxyAgent({ uri: process.env.HTTP_PROXY_URL }));
|
11
|
-
// }
|
12
|
-
|
13
|
-
// but undici only can be used in NodeJS
|
14
|
-
// so if you want to use with proxy, you need comment the code below
|
15
3
|
export const runtime = 'edge';
|
16
4
|
|
17
5
|
export const preferredRegion = [
|
@@ -1,16 +1,5 @@
|
|
1
1
|
import { POST as UniverseRoute } from '../[provider]/route';
|
2
2
|
|
3
|
-
// due to the Chinese region does not support accessing Google
|
4
|
-
// we need to use proxy to access it
|
5
|
-
// refs: https://github.com/google/generative-ai-js/issues/29#issuecomment-1866246513
|
6
|
-
// if (process.env.HTTP_PROXY_URL) {
|
7
|
-
// const { setGlobalDispatcher, ProxyAgent } = require('undici');
|
8
|
-
//
|
9
|
-
// setGlobalDispatcher(new ProxyAgent({ uri: process.env.HTTP_PROXY_URL }));
|
10
|
-
// }
|
11
|
-
|
12
|
-
// but undici only can be used in NodeJS
|
13
|
-
// so if you want to use with proxy, you need comment the code below
|
14
3
|
export const runtime = 'edge';
|
15
4
|
|
16
5
|
// due to Gemini-1.5-pro is not available in Hong Kong, we need to set the preferred region to exclude "Hong Kong (hkg1)".
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { getLLMConfig } from '@/config/llm';
|
2
|
-
import { AgentRuntime } from '@/libs/agent-runtime';
|
2
|
+
import { AgentRuntime, ModelProvider } from '@/libs/agent-runtime';
|
3
3
|
import LobeWenxinAI from '@/libs/agent-runtime/wenxin';
|
4
4
|
|
5
5
|
import { POST as UniverseRoute } from '../[provider]/route';
|
@@ -26,5 +26,5 @@ export const POST = async (req: Request) =>
|
|
26
26
|
|
27
27
|
return new AgentRuntime(instance);
|
28
28
|
},
|
29
|
-
params: { provider:
|
29
|
+
params: { provider: ModelProvider.Wenxin },
|
30
30
|
});
|
@@ -116,6 +116,7 @@ const ProviderConfig = memo<ProviderConfigProps>(
|
|
116
116
|
className,
|
117
117
|
name,
|
118
118
|
showAceGcm = true,
|
119
|
+
showChecker = true,
|
119
120
|
extra,
|
120
121
|
}) => {
|
121
122
|
const { t } = useTranslation('setting');
|
@@ -219,12 +220,14 @@ const ProviderConfig = memo<ProviderConfigProps>(
|
|
219
220
|
label: t('llm.modelList.title'),
|
220
221
|
name: [LLMProviderConfigKey, id, LLMProviderModelListKey],
|
221
222
|
},
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
223
|
+
showChecker
|
224
|
+
? (checkerItem ?? {
|
225
|
+
children: <Checker model={checkModel!} provider={id} />,
|
226
|
+
desc: t('llm.checker.desc'),
|
227
|
+
label: t('llm.checker.title'),
|
228
|
+
minWidth: undefined,
|
229
|
+
})
|
230
|
+
: undefined,
|
228
231
|
showAceGcm && isServerMode && aceGcmItem,
|
229
232
|
].filter(Boolean) as FormItemProps[];
|
230
233
|
|
@@ -0,0 +1,26 @@
|
|
1
|
+
DROP TABLE "agents_tags" CASCADE;--> statement-breakpoint
|
2
|
+
DROP TABLE "market" CASCADE;--> statement-breakpoint
|
3
|
+
DROP TABLE "plugins" CASCADE;--> statement-breakpoint
|
4
|
+
DROP TABLE "plugins_tags" CASCADE;--> statement-breakpoint
|
5
|
+
DROP TABLE "tags" CASCADE;--> statement-breakpoint
|
6
|
+
ALTER TABLE "agents" ADD COLUMN "accessed_at" timestamp with time zone DEFAULT now() NOT NULL;--> statement-breakpoint
|
7
|
+
ALTER TABLE "agents_files" ADD COLUMN "accessed_at" timestamp with time zone DEFAULT now() NOT NULL;--> statement-breakpoint
|
8
|
+
ALTER TABLE "agents_knowledge_bases" ADD COLUMN "accessed_at" timestamp with time zone DEFAULT now() NOT NULL;--> statement-breakpoint
|
9
|
+
ALTER TABLE "async_tasks" ADD COLUMN "accessed_at" timestamp with time zone DEFAULT now() NOT NULL;--> statement-breakpoint
|
10
|
+
ALTER TABLE "files" ADD COLUMN "accessed_at" timestamp with time zone DEFAULT now() NOT NULL;--> statement-breakpoint
|
11
|
+
ALTER TABLE "global_files" ADD COLUMN "accessed_at" timestamp with time zone DEFAULT now() NOT NULL;--> statement-breakpoint
|
12
|
+
ALTER TABLE "knowledge_bases" ADD COLUMN "accessed_at" timestamp with time zone DEFAULT now() NOT NULL;--> statement-breakpoint
|
13
|
+
ALTER TABLE "messages" ADD COLUMN "accessed_at" timestamp with time zone DEFAULT now() NOT NULL;--> statement-breakpoint
|
14
|
+
ALTER TABLE "chunks" ADD COLUMN "accessed_at" timestamp with time zone DEFAULT now() NOT NULL;--> statement-breakpoint
|
15
|
+
ALTER TABLE "unstructured_chunks" ADD COLUMN "accessed_at" timestamp with time zone DEFAULT now() NOT NULL;--> statement-breakpoint
|
16
|
+
ALTER TABLE "rag_eval_dataset_records" ADD COLUMN "accessed_at" timestamp with time zone DEFAULT now() NOT NULL;--> statement-breakpoint
|
17
|
+
ALTER TABLE "rag_eval_dataset_records" ADD COLUMN "updated_at" timestamp with time zone DEFAULT now() NOT NULL;--> statement-breakpoint
|
18
|
+
ALTER TABLE "rag_eval_datasets" ADD COLUMN "accessed_at" timestamp with time zone DEFAULT now() NOT NULL;--> statement-breakpoint
|
19
|
+
ALTER TABLE "rag_eval_evaluations" ADD COLUMN "accessed_at" timestamp with time zone DEFAULT now() NOT NULL;--> statement-breakpoint
|
20
|
+
ALTER TABLE "rag_eval_evaluation_records" ADD COLUMN "accessed_at" timestamp with time zone DEFAULT now() NOT NULL;--> statement-breakpoint
|
21
|
+
ALTER TABLE "rag_eval_evaluation_records" ADD COLUMN "updated_at" timestamp with time zone DEFAULT now() NOT NULL;--> statement-breakpoint
|
22
|
+
ALTER TABLE "session_groups" ADD COLUMN "accessed_at" timestamp with time zone DEFAULT now() NOT NULL;--> statement-breakpoint
|
23
|
+
ALTER TABLE "sessions" ADD COLUMN "accessed_at" timestamp with time zone DEFAULT now() NOT NULL;--> statement-breakpoint
|
24
|
+
ALTER TABLE "topics" ADD COLUMN "accessed_at" timestamp with time zone DEFAULT now() NOT NULL;--> statement-breakpoint
|
25
|
+
ALTER TABLE "user_installed_plugins" ADD COLUMN "accessed_at" timestamp with time zone DEFAULT now() NOT NULL;--> statement-breakpoint
|
26
|
+
ALTER TABLE "users" ADD COLUMN "accessed_at" timestamp with time zone DEFAULT now() NOT NULL;
|