@lobehub/chat 0.156.1 → 0.156.2

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,23 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 0.156.2](https://github.com/lobehub/lobe-chat/compare/v0.156.1...v0.156.2)
6
+
7
+ <sup>Released on **2024-05-10**</sup>
8
+
9
+ <br/>
10
+
11
+ <details>
12
+ <summary><kbd>Improvements and Fixes</kbd></summary>
13
+
14
+ </details>
15
+
16
+ <div align="right">
17
+
18
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
19
+
20
+ </div>
21
+
5
22
  ### [Version 0.156.1](https://github.com/lobehub/lobe-chat/compare/v0.156.0...v0.156.1)
6
23
 
7
24
  <sup>Released on **2024-05-10**</sup>
package/Dockerfile CHANGED
@@ -44,8 +44,11 @@ ENV NEXT_PUBLIC_ANALYTICS_UMAMI ""
44
44
  ENV NEXT_PUBLIC_UMAMI_SCRIPT_URL ""
45
45
  ENV NEXT_PUBLIC_UMAMI_WEBSITE_ID ""
46
46
 
47
+ # Node
48
+ ENV NODE_OPTIONS "--max-old-space-size=8192"
47
49
 
48
- RUN npm run build:docker # run build standalone for docker version
50
+ # run build standalone for docker version
51
+ RUN npm run build:docker
49
52
 
50
53
  ## Production image, copy all the files and run next
51
54
  FROM base AS runner
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "0.156.1",
3
+ "version": "0.156.2",
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",
@@ -81,27 +81,25 @@ export class LobeAzureOpenAI implements LobeRuntimeAI {
81
81
 
82
82
  // Convert object keys to camel case, copy from `@azure/openai` in `node_modules/@azure/openai/dist/index.cjs`
83
83
  private camelCaseKeys = (obj: any): any => {
84
- if (typeof obj !== "object" || !obj)
85
- return obj;
84
+ if (typeof obj !== 'object' || !obj) return obj;
86
85
  if (Array.isArray(obj)) {
87
86
  return obj.map((v) => this.camelCaseKeys(v));
88
- }
89
- else {
87
+ } else {
90
88
  for (const key of Object.keys(obj)) {
91
89
  const value = obj[key];
92
90
  const newKey = this.tocamelCase(key);
93
91
  if (newKey !== key) {
94
92
  delete obj[key];
95
93
  }
96
- obj[newKey] = typeof obj[newKey] === "object" ? this.camelCaseKeys(value) : value;
94
+ obj[newKey] = typeof obj[newKey] === 'object' ? this.camelCaseKeys(value) : value;
97
95
  }
98
96
  return obj;
99
97
  }
100
- }
98
+ };
101
99
 
102
100
  private tocamelCase = (str: string) => {
103
101
  return str
104
102
  .toLowerCase()
105
- .replaceAll(/(_[a-z])/g, (group) => group.toUpperCase().replace("_", ""));
106
- }
103
+ .replaceAll(/(_[a-z])/g, (group) => group.toUpperCase().replace('_', ''));
104
+ };
107
105
  }