@lobehub/chat 0.133.2 → 0.133.4

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,56 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 0.133.4](https://github.com/lobehub/lobe-chat/compare/v0.133.3...v0.133.4)
6
+
7
+ <sup>Released on **2024-03-11**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Fix sitemap missing in docker building.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's fixed
19
+
20
+ - **misc**: Fix sitemap missing in docker building, closes [#1533](https://github.com/lobehub/lobe-chat/issues/1533) ([49752da](https://github.com/lobehub/lobe-chat/commit/49752da))
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
+
30
+ ### [Version 0.133.3](https://github.com/lobehub/lobe-chat/compare/v0.133.2...v0.133.3)
31
+
32
+ <sup>Released on **2024-03-10**</sup>
33
+
34
+ #### 🐛 Bug Fixes
35
+
36
+ - **misc**: Fix the max token of claude 3.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### What's fixed
44
+
45
+ - **misc**: Fix the max token of claude 3, closes [#1526](https://github.com/lobehub/lobe-chat/issues/1526) ([222fae3](https://github.com/lobehub/lobe-chat/commit/222fae3))
46
+
47
+ </details>
48
+
49
+ <div align="right">
50
+
51
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
52
+
53
+ </div>
54
+
5
55
  ### [Version 0.133.2](https://github.com/lobehub/lobe-chat/compare/v0.133.1...v0.133.2)
6
56
 
7
57
  <sup>Released on **2024-03-10**</sup>
@@ -8,6 +8,7 @@ import { Callout } from 'nextra/components';
8
8
 
9
9
  <Image
10
10
  alt={'Assistant Market'}
11
+ cover
11
12
  src={
12
13
  'https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/268670869-f1ffbf66-42b6-42cf-a937-9ce1f8328514.png'
13
14
  }
@@ -38,6 +39,4 @@ In LobeChat's Assistant Market, creators can discover a vibrant and innovative c
38
39
  | [Self-media Operation Expert](https://chat-preview.lobehub.com/market?agent=gl-zmtyy)<br /><sup>By **[guling-io](https://github.com/guling-io)** on **2024-02-14**</sup> | Proficient in self-media operation and content creation<br />`Self-media operation` `Social media` `Content creation` `Fan growth` `Brand promotion` |
39
40
  | [Product Description](https://chat-preview.lobehub.com/market?agent=product-description)<br /><sup>By **[pllz7](https://github.com/pllz7)** on **2024-02-14**</sup> | Create captivating product descriptions to improve e-commerce sales performance<br />`E-commerce` |
40
41
 
41
- > 📊 Total agents: [<kbd>**177**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
42
-
43
- [submit-agents-link]: https://github.com/lobehub/lobe-chat-agents
42
+ > 📊 Total agents: [<kbd>**177**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
@@ -7,6 +7,7 @@ title: Vision Recognition
7
7
 
8
8
  <Image
9
9
  alt={'Model Vision Recognition'}
10
+ cover
10
11
  src={
11
12
  'https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/284072129-382bdf30-e3d6-4411-b5a0-249710b8ba08.png'
12
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "0.133.2",
3
+ "version": "0.133.4",
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",
@@ -27,9 +27,10 @@
27
27
  "sideEffects": false,
28
28
  "scripts": {
29
29
  "build": "next build",
30
- "postbuild": "next-sitemap --config next-sitemap.config.mjs",
30
+ "postbuild": "npm run build-sitemap",
31
+ "build-sitemap": "next-sitemap --config next-sitemap.config.mjs",
31
32
  "build:analyze": "ANALYZE=true next build",
32
- "build:docker": "DOCKER=true next build",
33
+ "build:docker": "DOCKER=true next build && npm run build-sitemap",
33
34
  "dev": "next dev -p 3010",
34
35
  "docs": "lobe-i18n md && npm run workflow:docs",
35
36
  "i18n": "npm run workflow:i18n && lobe-i18n",
@@ -31,7 +31,6 @@ describe('LobeAnthropicAI', () => {
31
31
  });
32
32
 
33
33
  describe('chat', () => {
34
-
35
34
  it('should return a StreamingTextResponse on successful API call', async () => {
36
35
  const result = await instance.chat({
37
36
  messages: [{ content: 'Hello', role: 'user' }],
@@ -64,7 +63,7 @@ describe('LobeAnthropicAI', () => {
64
63
 
65
64
  // Assert
66
65
  expect(instance['client'].messages.create).toHaveBeenCalledWith({
67
- max_tokens: 1024,
66
+ max_tokens: 4096,
68
67
  messages: [{ content: 'Hello', role: 'user' }],
69
68
  model: 'claude-instant-1.2',
70
69
  stream: true,
@@ -97,7 +96,7 @@ describe('LobeAnthropicAI', () => {
97
96
 
98
97
  // Assert
99
98
  expect(instance['client'].messages.create).toHaveBeenCalledWith({
100
- max_tokens: 1024,
99
+ max_tokens: 4096,
101
100
  messages: [{ content: 'Hello', role: 'user' }],
102
101
  model: 'claude-instant-1.2',
103
102
  stream: true,
@@ -121,9 +120,7 @@ describe('LobeAnthropicAI', () => {
121
120
  // Act
122
121
  const result = await instance.chat({
123
122
  max_tokens: 2048,
124
- messages: [
125
- { content: 'Hello', role: 'user' },
126
- ],
123
+ messages: [{ content: 'Hello', role: 'user' }],
127
124
  model: 'claude-instant-1.2',
128
125
  temperature: 0.5,
129
126
  top_p: 1,
@@ -132,14 +129,12 @@ describe('LobeAnthropicAI', () => {
132
129
  // Assert
133
130
  expect(instance['client'].messages.create).toHaveBeenCalledWith({
134
131
  max_tokens: 2048,
135
- messages: [
136
- { content: 'Hello', role: 'user' },
137
- ],
132
+ messages: [{ content: 'Hello', role: 'user' }],
138
133
  model: 'claude-instant-1.2',
139
134
  stream: true,
140
135
  temperature: 0.5,
141
136
  top_p: 1,
142
- })
137
+ });
143
138
  expect(result).toBeInstanceOf(Response);
144
139
  });
145
140
 
@@ -158,9 +153,7 @@ describe('LobeAnthropicAI', () => {
158
153
  const result = await instance.chat({
159
154
  frequency_penalty: 0.5, // Unsupported option
160
155
  max_tokens: 2048,
161
- messages: [
162
- { content: 'Hello', role: 'user' },
163
- ],
156
+ messages: [{ content: 'Hello', role: 'user' }],
164
157
  model: 'claude-instant-1.2',
165
158
  presence_penalty: 0.5,
166
159
  temperature: 0.5,
@@ -170,14 +163,12 @@ describe('LobeAnthropicAI', () => {
170
163
  // Assert
171
164
  expect(instance['client'].messages.create).toHaveBeenCalledWith({
172
165
  max_tokens: 2048,
173
- messages: [
174
- { content: 'Hello', role: 'user' },
175
- ],
166
+ messages: [{ content: 'Hello', role: 'user' }],
176
167
  model: 'claude-instant-1.2',
177
168
  stream: true,
178
169
  temperature: 0.5,
179
170
  top_p: 1,
180
- })
171
+ });
181
172
  expect(result).toBeInstanceOf(Response);
182
173
  });
183
174
 
@@ -49,7 +49,7 @@ export class LobeAnthropicAI implements LobeRuntimeAI {
49
49
  const user_messages = messages.filter((m) => m.role !== 'system');
50
50
 
51
51
  const requestParams: Anthropic.MessageCreateParams = {
52
- max_tokens: max_tokens || 1024,
52
+ max_tokens: max_tokens || 4096,
53
53
  messages: this.buildAnthropicMessages(user_messages),
54
54
  model: model,
55
55
  stream: true,