@lobehub/chat 1.7.2 → 1.7.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.7.3](https://github.com/lobehub/lobe-chat/compare/v1.7.2...v1.7.3)
6
+
7
+ <sup>Released on **2024-07-28**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Update minimax models.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's fixed
19
+
20
+ - **misc**: Update minimax models, closes [#3354](https://github.com/lobehub/lobe-chat/issues/3354) ([8113729](https://github.com/lobehub/lobe-chat/commit/8113729))
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.7.2](https://github.com/lobehub/lobe-chat/compare/v1.7.1...v1.7.2)
6
31
 
7
32
  <sup>Released on **2024-07-26**</sup>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "1.7.2",
3
+ "version": "1.7.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",
@@ -271,7 +271,7 @@
271
271
  "vitest": "~1.2.2",
272
272
  "vitest-canvas-mock": "^0.3.3"
273
273
  },
274
- "packageManager": "pnpm@9.5.0",
274
+ "packageManager": "pnpm@9.6.0",
275
275
  "publishConfig": {
276
276
  "access": "public",
277
277
  "registry": "https://registry.npmjs.org"
@@ -12,20 +12,20 @@ const Minimax: ModelProviderCard = {
12
12
  tokens: 245_760,
13
13
  },
14
14
  {
15
- description: '复杂场景,例如应用题计算、科学计算等场景',
16
- displayName: 'abab6.5',
15
+ description: '英文等多语种人设对话场景',
16
+ displayName: 'abab6.5g',
17
17
  enabled: true,
18
18
  functionCall: true,
19
- id: 'abab6.5-chat',
19
+ id: 'abab6.5g-chat',
20
20
  tokens: 8192,
21
21
  },
22
22
  {
23
- description: '更复杂的格式化文本生成',
24
- displayName: 'abab6',
23
+ description: '中文人设对话场景',
24
+ displayName: 'abab6.5t',
25
25
  enabled: true,
26
26
  functionCall: true,
27
- id: 'abab6-chat',
28
- tokens: 32_768,
27
+ id: 'abab6.5t-chat',
28
+ tokens: 8192,
29
29
  },
30
30
  {
31
31
  description: '生产力场景',
@@ -35,7 +35,7 @@ const Minimax: ModelProviderCard = {
35
35
  tokens: 16_384,
36
36
  },
37
37
  {
38
- description: '人设对话场景',
38
+ description: '中文人设对话场景',
39
39
  displayName: 'abab5.5s',
40
40
  enabled: true,
41
41
  id: 'abab5.5s-chat',
@@ -36,7 +36,10 @@ interface OpenAICompatibleFactoryOptions<T extends Record<string, any> = any> {
36
36
  error: any,
37
37
  options: ConstructorOptions<T>,
38
38
  ) => Omit<ChatCompletionErrorPayload, 'provider'> | undefined;
39
- handlePayload?: (payload: ChatStreamPayload) => OpenAI.ChatCompletionCreateParamsStreaming;
39
+ handlePayload?: (
40
+ payload: ChatStreamPayload,
41
+ options: ConstructorOptions<T>,
42
+ ) => OpenAI.ChatCompletionCreateParamsStreaming;
40
43
  };
41
44
  constructorOptions?: ConstructorOptions<T>;
42
45
  debug?: {
@@ -141,7 +144,7 @@ export const LobeOpenAICompatibleFactory = <T extends Record<string, any> = any>
141
144
  async chat(payload: ChatStreamPayload, options?: ChatCompetitionOptions) {
142
145
  try {
143
146
  const postPayload = chatCompletion?.handlePayload
144
- ? chatCompletion.handlePayload(payload)
147
+ ? chatCompletion.handlePayload(payload, this._options)
145
148
  : ({
146
149
  ...payload,
147
150
  stream: payload.stream ?? true,