@lobehub/chat 1.47.19 → 1.47.20

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.20](https://github.com/lobehub/lobe-chat/compare/v1.47.19...v1.47.20)
6
+
7
+ <sup>Released on **2025-01-23**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Fix tts in new provider model.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's fixed
19
+
20
+ - **misc**: Fix tts in new provider model, closes [#5569](https://github.com/lobehub/lobe-chat/issues/5569) ([3fef83e](https://github.com/lobehub/lobe-chat/commit/3fef83e))
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.19](https://github.com/lobehub/lobe-chat/compare/v1.47.18...v1.47.19)
6
31
 
7
32
  <sup>Released on **2025-01-23**</sup>
package/changelog/v1.json CHANGED
@@ -1,4 +1,13 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "fixes": [
5
+ "Fix tts in new provider model."
6
+ ]
7
+ },
8
+ "date": "2025-01-23",
9
+ "version": "1.47.20"
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.19",
3
+ "version": "1.47.20",
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",
@@ -4,6 +4,8 @@ import {
4
4
  OPENAI_API_KEY_HEADER_KEY,
5
5
  OPENAI_END_POINT,
6
6
  } from '@/const/fetch';
7
+ import { isDeprecatedEdition } from '@/const/version';
8
+ import { aiProviderSelectors, useAiInfraStore } from '@/store/aiInfra';
7
9
  import { useUserStore } from '@/store/user';
8
10
  import { keyVaultsConfigSelectors } from '@/store/user/selectors';
9
11
 
@@ -14,14 +16,23 @@ import { keyVaultsConfigSelectors } from '@/store/user/selectors';
14
16
  // eslint-disable-next-line no-undef
15
17
  export const createHeaderWithOpenAI = (header?: HeadersInit): HeadersInit => {
16
18
  const state = useUserStore.getState();
17
- const openAIConfig = keyVaultsConfigSelectors.openAIConfig(state);
18
19
 
20
+ let keyVaults: Record<string, any> = {};
21
+
22
+ // TODO: remove this condition in V2.0
23
+ if (isDeprecatedEdition) {
24
+ keyVaults = keyVaultsConfigSelectors.getVaultByProvider('openai' as any)(
25
+ useUserStore.getState(),
26
+ );
27
+ } else {
28
+ keyVaults = aiProviderSelectors.providerKeyVaults('openai')(useAiInfraStore.getState()) || {};
29
+ }
19
30
  // eslint-disable-next-line no-undef
20
31
  return {
21
32
  ...header,
22
33
  [LOBE_CHAT_ACCESS_CODE]: keyVaultsConfigSelectors.password(state),
23
34
  [LOBE_USER_ID]: state.user?.id || '',
24
- [OPENAI_API_KEY_HEADER_KEY]: openAIConfig.apiKey || '',
25
- [OPENAI_END_POINT]: openAIConfig.baseURL || '',
35
+ [OPENAI_API_KEY_HEADER_KEY]: keyVaults.apiKey || '',
36
+ [OPENAI_END_POINT]: keyVaults.baseURL || '',
26
37
  };
27
38
  };