@lobehub/chat 1.15.27 → 1.15.28

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.

Potentially problematic release.


This version of @lobehub/chat might be problematic. Click here for more details.

package/CHANGELOG.md CHANGED
@@ -2,6 +2,31 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 1.15.28](https://github.com/lobehub/lobe-chat/compare/v1.15.27...v1.15.28)
6
+
7
+ <sup>Released on **2024-09-09**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Update baichuan param.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's fixed
19
+
20
+ - **misc**: Update baichuan param, closes [#3356](https://github.com/lobehub/lobe-chat/issues/3356) ([29bced1](https://github.com/lobehub/lobe-chat/commit/29bced1))
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.15.27](https://github.com/lobehub/lobe-chat/compare/v1.15.26...v1.15.27)
6
31
 
7
32
  <sup>Released on **2024-09-09**</sup>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "1.15.27",
3
+ "version": "1.15.28",
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",
@@ -7,22 +7,15 @@ export const LobeBaichuanAI = LobeOpenAICompatibleFactory({
7
7
  baseURL: 'https://api.baichuan-ai.com/v1',
8
8
  chatCompletion: {
9
9
  handlePayload: (payload: ChatStreamPayload) => {
10
- const { frequency_penalty, ...rest } = payload;
10
+ const { temperature, ...rest } = payload;
11
11
 
12
- let adjustedFrequencyPenalty = frequency_penalty ?? 1;
13
-
14
- if (frequency_penalty !== undefined) {
15
- if (frequency_penalty < 1) {
16
- // If less than 1 (including negative values), add 1 to bring it into the 1-2 range
17
- adjustedFrequencyPenalty = Math.min(Math.max(frequency_penalty + 1, 1), 2);
18
- } else if (frequency_penalty > 2) {
19
- // If greater than 2, cap it at 2
20
- adjustedFrequencyPenalty = 2;
21
- }
22
- // If between 1 and 2, keep the original value
23
- }
24
-
25
- return { ...rest, frequency_penalty: adjustedFrequencyPenalty } as OpenAI.ChatCompletionCreateParamsStreaming;
12
+ return {
13
+ ...rest,
14
+ temperature:
15
+ temperature !== undefined
16
+ ? temperature / 2
17
+ : undefined,
18
+ } as OpenAI.ChatCompletionCreateParamsStreaming;
26
19
  },
27
20
  },
28
21
  debug: {