@lobehub/chat 1.47.8 → 1.47.9

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.47.9](https://github.com/lobehub/lobe-chat/compare/v1.47.8...v1.47.9)
6
+
7
+ <sup>Released on **2025-01-20**</sup>
8
+
9
+ #### ♻ Code Refactoring
10
+
11
+ - **misc**: Improve error code.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### Code refactoring
19
+
20
+ - **misc**: Improve error code, closes [#5525](https://github.com/lobehub/lobe-chat/issues/5525) ([4fc4fa6](https://github.com/lobehub/lobe-chat/commit/4fc4fa6))
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.47.8](https://github.com/lobehub/lobe-chat/compare/v1.47.7...v1.47.8)
6
31
 
7
32
  <sup>Released on **2025-01-20**</sup>
package/changelog/v1.json CHANGED
@@ -1,4 +1,13 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "improvements": [
5
+ "Improve error code."
6
+ ]
7
+ },
8
+ "date": "2025-01-20",
9
+ "version": "1.47.9"
10
+ },
2
11
  {
3
12
  "children": {
4
13
  "improvements": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "1.47.8",
3
+ "version": "1.47.9",
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",
@@ -39,6 +39,9 @@ export const userSettings = pgTable('user_settings', {
39
39
  .primaryKey(),
40
40
 
41
41
  tts: jsonb('tts'),
42
+ /**
43
+ * @deprecated
44
+ */
42
45
  keyVaults: text('key_vaults'),
43
46
  general: jsonb('general'),
44
47
  languageModel: jsonb('language_model'),
@@ -12,6 +12,12 @@ export const genServerAiProvidersConfig = (specificConfig: Record<any, any>) =>
12
12
  (config, provider) => {
13
13
  const providerUpperCase = provider.toUpperCase();
14
14
  const providerCard = AiModels[provider] as AiFullModelCard[];
15
+
16
+ if (!providerCard)
17
+ throw new Error(
18
+ `Provider [${provider}] not found in aiModels, please make sure you have exported the provider in the \`aiModels/index.ts\``,
19
+ );
20
+
15
21
  const providerConfig = specificConfig[provider as keyof typeof specificConfig] || {};
16
22
  const providerModelList =
17
23
  process.env[providerConfig.modelListKey ?? `${providerUpperCase}_MODEL_LIST`];