@lobehub/chat 0.98.2 → 0.99.0

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/.dockerignore CHANGED
@@ -8,3 +8,4 @@ scripts
8
8
  docs
9
9
  .github
10
10
  *.md
11
+ .env.example
package/.env.example ADDED
@@ -0,0 +1,45 @@
1
+ # add a access code to lock your lobe-chat application, it should be a six length string
2
+ ACCESS_CODE=lobe66
3
+
4
+ # add your custom model name, multi model seperate by comma. for example gpt-3.5-1106,gpt-4-1106
5
+ # NEXT_PUBLIC_CUSTOM_MODELS=model1,model2,model3
6
+
7
+ # ---- only choose one from OpenAI Service and Azure OpenAI Service ---- #
8
+
9
+ ########################################
10
+ ############ OpenAI Service ############
11
+ ########################################
12
+
13
+ # you openai api key
14
+ OPENAI_API_KEY=sk-xxxxxxxxx
15
+
16
+ # use a proxy to connect to the OpenAI API
17
+ # OPENAI_PROXY_URL=https://api.openai.com/v1
18
+
19
+ ########################################
20
+ ######### Azure OpenAI Service #########
21
+ ########################################
22
+ # you can learn azure OpenAI Service on https://learn.microsoft.com/en-us/azure/ai-services/openai/overview
23
+
24
+ # use Azure OpenAI Service by uncomment the following line
25
+ # USE_AZURE_OPENAI=1
26
+
27
+ # The API key you applied for on the Azure OpenAI account page, which can be found in the "Keys and Endpoints" section.
28
+ # AZURE_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
29
+
30
+ # The endpoint you applied for on the Azure OpenAI account page, which can be found in the "Keys and Endpoints" section.
31
+ # OPENAI_PROXY_URL=https://docs-test-001.openai.azure.com
32
+
33
+ # Azure's API version, follows the YYYY-MM-DD format
34
+ # AZURE_API_VERSION=2023-08-01-preview
35
+
36
+ ########################################
37
+ ############ Market Service ############
38
+ ########################################
39
+
40
+ # The LobeChat plugins market index url
41
+ # PLUGINS_INDEX_URL=https://chat-plugins.lobehub.com
42
+
43
+ # The LobeChat agents market index url
44
+ # AGENTS_INDEX_URL=https://chat-agents.lobehub.com
45
+
@@ -8,6 +8,20 @@ permissions:
8
8
  contents: read
9
9
 
10
10
  jobs:
11
+ issue-check-inactive:
12
+ permissions:
13
+ issues: write # for actions-cool/issues-helper to update issues
14
+ pull-requests: write # for actions-cool/issues-helper to update PRs
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - name: check-inactive
18
+ uses: actions-cool/issues-helper@v3
19
+ with:
20
+ actions: 'check-inactive'
21
+ token: ${{ secrets.GH_TOKEN }}
22
+ inactive-label: 'Inactive'
23
+ inactive-day: 30
24
+
11
25
  issue-close-require:
12
26
  permissions:
13
27
  issues: write # for actions-cool/issues-helper to update issues
@@ -0,0 +1,14 @@
1
+ name: Issue Translate
2
+ on:
3
+ issue_comment:
4
+ types: [created]
5
+ issues:
6
+ types: [opened]
7
+
8
+ jobs:
9
+ build:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: usthe/issues-translate-action@v2.7
13
+ with:
14
+ BOT_GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
@@ -23,11 +23,22 @@ jobs:
23
23
  - name: Test
24
24
  run: bun run test
25
25
 
26
- - name: Workflow
27
- run: bun run workflow:readme
28
-
29
26
  - name: Release
30
27
  run: bun run release
31
28
  env:
32
29
  GH_TOKEN: ${{ secrets.GH_TOKEN }}
33
30
  NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
31
+
32
+ - name: Workflow
33
+ run: bun run workflow:readme
34
+
35
+ - name: Commit changes
36
+ run: |-
37
+ git diff
38
+ git config --global user.name "lobehubbot"
39
+ git config --global user.email "i@lobehub.com"
40
+ git add .
41
+ git commit -m "📝 docs(bot): Auto sync agents & plugin to readme" || exit 0
42
+ git push
43
+ env:
44
+ GH_TOKEN: ${{ secrets.GH_TOKEN }}
package/CHANGELOG.md CHANGED
@@ -2,6 +2,56 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ## [Version 0.99.0](https://github.com/lobehub/lobe-chat/compare/v0.98.3...v0.99.0)
6
+
7
+ <sup>Released on **2023-11-08**</sup>
8
+
9
+ #### ✨ Features
10
+
11
+ - **misc**: Add Environment Variable for custom model name when deploying.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's improved
19
+
20
+ - **misc**: Add Environment Variable for custom model name when deploying, closes [#429](https://github.com/lobehub/lobe-chat/issues/429) ([15f9fa2](https://github.com/lobehub/lobe-chat/commit/15f9fa2))
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.98.3](https://github.com/lobehub/lobe-chat/compare/v0.98.2...v0.98.3)
31
+
32
+ <sup>Released on **2023-11-07**</sup>
33
+
34
+ #### 🐛 Bug Fixes
35
+
36
+ - **misc**: Fix redirect to welcome problem when there are topics in inbox.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### What's fixed
44
+
45
+ - **misc**: Fix redirect to welcome problem when there are topics in inbox, closes [#422](https://github.com/lobehub/lobe-chat/issues/422) ([3d2588a](https://github.com/lobehub/lobe-chat/commit/3d2588a))
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.98.2](https://github.com/lobehub/lobe-chat/compare/v0.98.1...v0.98.2)
6
56
 
7
57
  <sup>Released on **2023-11-07**</sup>
package/README.md CHANGED
@@ -122,7 +122,7 @@ By establishing a versatile plugin system, ChatGPT becomes capable of delivering
122
122
 
123
123
  In our agent market. We have accumulated a large number of practical, prompt agents that have been used in daily work and study. You can also share your agents here and iterate and optimize your prompt agents with more people. You can submit your agents through [🤖/🏪 Submit Agents][submit-agents-link], and our automated i18n workflow will automatically translate your agents into multiple languages, allowing users worldwide to enjoy your wisdom.
124
124
 
125
- <!-- AGENT LIST -->
125
+ <!-- AGENT LIST -->
126
126
 
127
127
  | Recent Submits | Description |
128
128
  | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -297,7 +297,7 @@ Plugins provide a means to extend the [Function Calling][fc-link] capabilities o
297
297
  > - [x] [**Plugin Phase 2**](https://github.com/lobehub/lobe-chat/issues/97): The security and stability of the plugin's use, more accurately presenting abnormal states, the maintainability of the plugin architecture, and developer-friendly.
298
298
  > - [ ] [**Plugin Phase 3**](https://github.com/lobehub/lobe-chat/issues/149): Higher-level and more comprehensive customization capabilities, support for plugin authentication, and examples.
299
299
 
300
- <!-- PLUGIN LIST -->
300
+ <!-- PLUGIN LIST -->
301
301
 
302
302
  | Official Plugin | Repository | Description |
303
303
  | ------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
package/README.zh-CN.md CHANGED
@@ -120,14 +120,14 @@ LobeChat 是一个开源的、可扩展的([Function Calling][fc-link])高
120
120
 
121
121
  在我们的助手市场中,我们积累了大量实用的助手 Prompt,这些都是在日常工作和学习中得到实际应用的。你也可以在这里分享你的助手,与更多的人一起迭代和优化你的助手提示词。你可以通过 [🤖/🏪 提交助手][submit-agents-link] 来提交你的助手,我们构建的自动化 i18n 工作流将会自动将你的助手翻译成多语言版本,让多语种用户都能享受到你的智慧成果。
122
122
 
123
- <!-- AGENT LIST -->
123
+ <!-- AGENT LIST -->
124
124
 
125
- | 最近新增 | 助手说明 |
126
- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
127
- | [LobeChat 技术文档专家](https://chat-preview.lobehub.com/market?agent=lobe-chat-develop-doc-writter)<br/><sup>By **[arvinxx](https://github.com/arvinxx)** on **2023-11-05**</sup> | LobeChat是一个Next.js框架构建的AI会话应用,我将会帮你一起书写 LobeChat 的开发文档<br/>`开发文档` `技术介绍` `next-js` `react` `lobe-chat` |
128
- | [Sketch 特性总结专家](https://chat-preview.lobehub.com/market?agent=sketch-changelog-highlighter)<br/><sup>By **[arvinxx](https://github.com/arvinxx)** on **2023-11-02**</sup> | 擅长从 Sketch 的更新日志中提取关键变更要点<br/>`体验设计` `sketch` `更新` `特性` `文本总结` |
129
- | [抬杠高手](https://chat-preview.lobehub.com/market?agent=tqg-20231026)<br/><sup>By **[cake79](https://github.com/cake79)** on **2023-10-26**</sup> | 模拟那些喜欢抬杠的人, 能对用户输入的任何观点进行抬杠表达的角色<br/>`写作` `对话` |
130
- | [图表生成器](https://chat-preview.lobehub.com/market?agent=graph-generator)<br/><sup>By **[choldrim](https://github.com/choldrim)** on **2023-10-23**</sup> | 自动图表生成器<br/>`图表` |
125
+ | 最近新增 | 助手说明 |
126
+ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
127
+ | [LobeChat 技术文档专家](https://chat-preview.lobehub.com/market?agent=lobe-chat-develop-doc-writter)<br/><sup>By **[arvinxx](https://github.com/arvinxx)** on **2023-11-05**</sup> | LobeChat 是一个 Next.js 框架构建的 AI 会话应用,我将会帮你一起书写 LobeChat 的开发文档<br/>`开发文档` `技术介绍` `next-js` `react` `lobe-chat` |
128
+ | [Sketch 特性总结专家](https://chat-preview.lobehub.com/market?agent=sketch-changelog-highlighter)<br/><sup>By **[arvinxx](https://github.com/arvinxx)** on **2023-11-02**</sup> | 擅长从 Sketch 的更新日志中提取关键变更要点<br/>`体验设计` `sketch` `更新` `特性` `文本总结` |
129
+ | [抬杠高手](https://chat-preview.lobehub.com/market?agent=tqg-20231026)<br/><sup>By **[cake79](https://github.com/cake79)** on **2023-10-26**</sup> | 模拟那些喜欢抬杠的人,能对用户输入的任何观点进行抬杠表达的角色<br/>`写作` `对话` |
130
+ | [图表生成器](https://chat-preview.lobehub.com/market?agent=graph-generator)<br/><sup>By **[choldrim](https://github.com/choldrim)** on **2023-10-23**</sup> | 自动图表生成器<br/>`图表` |
131
131
 
132
132
  > 📊 Total agents: [<kbd>**38**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
133
133
 
@@ -299,14 +299,14 @@ $ docker run -d -p 3210:3210 \
299
299
  > - [x] [**插件二期**](https://github.com/lobehub/lobe-chat/issues/97): 插件的安全性与使用的稳定性,更加精准地呈现异常状态,插件架构的可维护性与开发者友好
300
300
  > - [ ] [**插件三期**](https://github.com/lobehub/lobe-chat/issues/149):更高阶与完善的自定义能力,支持插件鉴权与示例
301
301
 
302
- <!-- PLUGIN LIST -->
302
+ <!-- PLUGIN LIST -->
303
303
 
304
- | 官方插件 | 仓库 | 插件描述 |
305
- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | --------------------------- |
304
+ | 官方插件 | 仓库 | 插件描述 |
305
+ | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -------------------------------------------- |
306
306
  | [时钟时间](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **LobeHub** on **2023-11-01**</sup> | [lobehub/chat-plugin-clock-time](https://github.com/lobehub/chat-plugin-clock-time) | 显示一个时钟来展示当前时间<br/>`时钟` `时间` |
307
307
  | [网站爬虫](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **LobeHub** on **2023-08-17**</sup> | [lobehub/chat-plugin-web-crawler](https://github.com/lobehub/chat-plugin-web-crawler) | 从网页链接中提取内容<br/>`网页` `内容爬取器` |
308
- | [搜索引擎](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **LobeHub** on **2023-08-15**</sup> | [lobehub/chat-plugin-search-engine](https://github.com/lobehub/chat-plugin-search-engine) | 查询搜索引擎以获取信息<br/>`网络` `搜索` |
309
- | [实时天气](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **LobeHub** on **2023-08-12**</sup> | [lobehub/chat-plugin-realtime-weather](https://github.com/lobehub/chat-plugin-realtime-weather) | 获取实时天气信息<br/>`天气` `实时` |
308
+ | [搜索引擎](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **LobeHub** on **2023-08-15**</sup> | [lobehub/chat-plugin-search-engine](https://github.com/lobehub/chat-plugin-search-engine) | 查询搜索引擎以获取信息<br/>`网络` `搜索` |
309
+ | [实时天气](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **LobeHub** on **2023-08-12**</sup> | [lobehub/chat-plugin-realtime-weather](https://github.com/lobehub/chat-plugin-realtime-weather) | 获取实时天气信息<br/>`天气` `实时` |
310
310
 
311
311
  > 📊 Total plugins: [<kbd>**4**</kbd>](https://github.com/lobehub/lobe-chat-plugins)
312
312
 
@@ -6,6 +6,7 @@ LobeChat provides additional configuration options during deployment, which can
6
6
 
7
7
  - [General Variables](#general-variables)
8
8
  - [`ACCESS_CODE`](#access_code)
9
+ - [`NEXT_PUBLIC_CUSTOM_MODELS`](#next_public_custom_models)
9
10
  - [OpenAI](#openai)
10
11
  - [`OPENAI_API_KEY`](#openai_api_key)
11
12
  - [`OPENAI_PROXY_URL`](#openai_proxy_url)
@@ -18,6 +19,7 @@ LobeChat provides additional configuration options during deployment, which can
18
19
  - [Agent Service](#agent-service)
19
20
  - [`AGENTS_INDEX_URL`](#agents_index_url)
20
21
  - [Data Analytics](#data-analytics)
22
+ - [Vercel Analytics](#vercel-analytics)
21
23
  - [Posthog Analytics](#posthog-analytics)
22
24
 
23
25
  ## General Variables
@@ -26,10 +28,15 @@ LobeChat provides additional configuration options during deployment, which can
26
28
 
27
29
  - Type: Optional
28
30
  - Description: Add a password to access the LobeChat service, the password should be 6 digits or letters
29
- - Default: -
31
+ - Default: `-`
30
32
  - Example: `awCT74` or `e3@09!`
31
33
 
32
- <br/>
34
+ ### `NEXT_PUBLIC_CUSTOM_MODELS`
35
+
36
+ - Type: Optional
37
+ - Description: add your custom model name, multi model seperate by comma. for example: `gpt-3.5-1106,gpt-4-1106`
38
+ - Default: `-`
39
+ - Example: `model1,model2,model3`
33
40
 
34
41
  ## OpenAI
35
42
 
@@ -37,7 +44,7 @@ LobeChat provides additional configuration options during deployment, which can
37
44
 
38
45
  - Type: Required
39
46
  - Description: This is the API key you apply for on the OpenAI account page, you can go [here][openai-api-page] to view
40
- - Default: -
47
+ - Default: `-`
41
48
  - Example: `sk-xxxxxx...xxxxxx`
42
49
 
43
50
  ### `OPENAI_PROXY_URL`
@@ -57,14 +64,14 @@ If you need to use Azure OpenAI to provide model services, you can refer to the
57
64
 
58
65
  - Type: Optional
59
66
  - Description: Set this value to `1` to enable Azure OpenAI configuration
60
- - Default: -
67
+ - Default: `-`
61
68
  - Example: `1`
62
69
 
63
70
  ### `AZURE_API_KEY`
64
71
 
65
72
  - Type: Optional
66
73
  - Description: This is the API key you apply for on the Azure OpenAI account page
67
- - Default: -
74
+ - Default: `-`
68
75
  - Example: `c55168be3874490ef0565d9779ecd5a6`
69
76
 
70
77
  ### `AZURE_API_VERSION`
@@ -98,13 +105,29 @@ If you need to use Azure OpenAI to provide model services, you can refer to the
98
105
 
99
106
  ## Data Analytics
100
107
 
108
+ ### Vercel Analytics
109
+
110
+ #### `NEXT_PUBLIC_ANALYTICS_VERCEL`
111
+
112
+ - Type: Optional
113
+ - Description: Environment variable to enable [Vercel Analytics][vercel-analytics-url]. Set to `1` to enable Vercel Analytics.
114
+ - Default: `-`
115
+ - Example: `1`
116
+
117
+ #### `NEXT_PUBLIC_VERCEL_DEBUG`
118
+
119
+ - Type: Optional
120
+ - Description: Enable debug mode for Vercel Analytics.
121
+ - Default: `-`
122
+ - Example: `1`
123
+
101
124
  ### Posthog Analytics
102
125
 
103
126
  #### `NEXT_PUBLIC_ANALYTICS_POSTHOG`
104
127
 
105
128
  - Type: Optional
106
- - Description: Environment variable to enable \[PostHog Analytics]\[posthog-analytics-url]. Set to `1` to enable PostHog Analytics.
107
- - Default: -
129
+ - Description: Environment variable to enable [PostHog Analytics][posthog-analytics-url]. Set to `1` to enable PostHog Analytics.
130
+ - Default: `-`
108
131
  - Example: `1`
109
132
 
110
133
  #### `NEXT_PUBLIC_POSTHOG_KEY`
@@ -130,3 +153,5 @@ If you need to use Azure OpenAI to provide model services, you can refer to the
130
153
 
131
154
  [azure-api-verion-url]: https://docs.microsoft.com/zh-cn/azure/developer/javascript/api-reference/es-modules/azure-sdk/ai-translation/translationconfiguration?view=azure-node-latest#api-version
132
155
  [openai-api-page]: https://platform.openai.com/account/api-keys
156
+ [posthog-analytics-url]: https://posthog.com
157
+ [vercel-analytics-url]: https://vercel.com/analytics
@@ -6,6 +6,7 @@ LobeChat 在部署时提供了一些额外的配置项,使用环境变量进
6
6
 
7
7
  - [通用变量](#通用变量)
8
8
  - [`ACCESS_CODE`](#access_code)
9
+ - [`NEXT_PUBLIC_CUSTOM_MODELS`](#next_public_custom_models)
9
10
  - [OpenAI](#openai)
10
11
  - [`OPENAI_API_KEY`](#openai_api_key)
11
12
  - [`OPENAI_PROXY_URL`](#openai_proxy_url)
@@ -30,7 +31,12 @@ LobeChat 在部署时提供了一些额外的配置项,使用环境变量进
30
31
  - 默认值:-
31
32
  - 示例:`awCT74` 或 `e3@09!`
32
33
 
33
- <br/>
34
+ ### `NEXT_PUBLIC_CUSTOM_MODELS`
35
+
36
+ - 类型:可选
37
+ - 描述:添加自定义模型名称,多个模型需要使用逗号 `,` 隔开。 比如: `gpt-3.5-1106,gpt-4-1106`
38
+ - 默认值:`-`
39
+ - 示例:`model1,model2,model3`
34
40
 
35
41
  ## OpenAI
36
42
 
@@ -75,8 +81,6 @@ LobeChat 在部署时提供了一些额外的配置项,使用环境变量进
75
81
  - 默认值:`2023-08-01-preview`
76
82
  - 示例:`2023-05-15`,查阅[最新版本][azure-api-verion-url]
77
83
 
78
- <br/>
79
-
80
84
  ## 插件服务
81
85
 
82
86
  ### `PLUGINS_INDEX_URL`
@@ -85,8 +89,6 @@ LobeChat 在部署时提供了一些额外的配置项,使用环境变量进
85
89
  - 描述:LobeChat 插件市场的索引地址,如果你自行部署了插件市场的服务,可以使用该变量来覆盖默认的插件市场地址
86
90
  - 默认值:`https://chat-plugins.lobehub.com`
87
91
 
88
- <br/>
89
-
90
92
  ## 角色服务
91
93
 
92
94
  ### `AGENTS_INDEX_URL`
@@ -102,15 +104,15 @@ LobeChat 在部署时提供了一些额外的配置项,使用环境变量进
102
104
  #### `NEXT_PUBLIC_ANALYTICS_VERCEL`
103
105
 
104
106
  - 类型:可选
105
- - 描述:用于配置 Vercel Analytics 的环境变量,当设为 `0` 则关闭 Vercel Analytics
106
- - 默认值: -
107
- - 示例:`0`
107
+ - 描述:用于配置 Vercel Analytics 的环境变量,当设为 `1` 时开启 Vercel Analytics
108
+ - 默认值: `-`
109
+ - 示例:`1`
108
110
 
109
111
  #### `NEXT_PUBLIC_VERCEL_DEBUG`
110
112
 
111
113
  - 类型:可选
112
114
  - 描述:用于开启 Vercel Analytics 的调试模式
113
- - 默认值: -
115
+ - 默认值: `-`
114
116
  - 示例:`1`
115
117
 
116
118
  ### Posthog Analytics
@@ -119,14 +121,14 @@ LobeChat 在部署时提供了一些额外的配置项,使用环境变量进
119
121
 
120
122
  - 类型:可选
121
123
  - 描述:用于开启 [PostHog Analytics][posthog-analytics-url] 的环境变量,设为 `1` 时开启 PostHog Analytics
122
- - 默认值: -
124
+ - 默认值: `-`
123
125
  - 示例:`1`
124
126
 
125
127
  #### `NEXT_PUBLIC_POSTHOG_KEY`
126
128
 
127
129
  - 类型:可选
128
130
  - 描述:设置 PostHog 项目 Key
129
- - 默认值: -
131
+ - 默认值: `-`
130
132
  - 示例:`phc_xxxxxxxx`
131
133
 
132
134
  #### `NEXT_PUBLIC_POSTHOG_HOST`
@@ -140,7 +142,7 @@ LobeChat 在部署时提供了一些额外的配置项,使用环境变量进
140
142
 
141
143
  - 类型:可选
142
144
  - 描述:开启 PostHog 的调试模式
143
- - 默认值: -
145
+ - 默认值: `-`
144
146
  - 示例:`1`
145
147
 
146
148
  [azure-api-verion-url]: https://docs.microsoft.com/zh-cn/azure/developer/javascript/api-reference/es-modules/azure-sdk/ai-translation/translationconfiguration?view=azure-node-latest#api-version
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "0.98.2",
3
+ "version": "0.99.0",
4
4
  "description": "An open-source, extensible (Function Calling), high-performance chatbot framework. It supports one-click free deployment of your private ChatGPT/LLM web application",
5
5
  "keywords": [
6
6
  "chatbot",
@@ -73,7 +73,7 @@
73
73
  "@lobehub/ui": "latest",
74
74
  "@vercel/analytics": "^1",
75
75
  "ahooks": "^3",
76
- "ai": "^2",
76
+ "ai": "2.2.20",
77
77
  "antd": "^5",
78
78
  "antd-style": "^3",
79
79
  "brotli-wasm": "^1",
@@ -2,8 +2,6 @@ import { PluginRequestPayload } from '@lobehub/chat-plugin-sdk';
2
2
  import { Skeleton } from 'antd';
3
3
  import { memo, useRef, useState } from 'react';
4
4
 
5
- import { useOnPluginSettingsUpdate } from '@/app/chat/features/Conversation/ChatList/Plugins/Render/utils/pluginSettings';
6
- import { useOnPluginStateUpdate } from '@/app/chat/features/Conversation/ChatList/Plugins/Render/utils/pluginState';
7
5
  import { pluginSelectors, usePluginStore } from '@/store/plugin';
8
6
  import { useSessionStore } from '@/store/session';
9
7
  import { chatSelectors } from '@/store/session/selectors';
@@ -15,6 +13,8 @@ import {
15
13
  useOnPluginFetchPluginState,
16
14
  useOnPluginFillContent,
17
15
  } from '../utils/listenToPlugin';
16
+ import { useOnPluginSettingsUpdate } from '../utils/pluginSettings';
17
+ import { useOnPluginStateUpdate } from '../utils/pluginState';
18
18
  import {
19
19
  sendMessageContentToPlugin,
20
20
  sendPayloadToPlugin,
@@ -12,9 +12,9 @@ const Redirect = memo(() => {
12
12
  useEffect(() => {
13
13
  useSessionStore.persist.onFinishHydration(() => {
14
14
  const store = useSessionStore.getState();
15
- const hasSession = sessionSelectors.hasSessionList(store);
15
+ const hasConversion = sessionSelectors.hasConversion(store);
16
16
 
17
- if (hasSession) {
17
+ if (hasConversion) {
18
18
  router.push('/chat');
19
19
  store.switchSession();
20
20
  } else {
@@ -7,6 +7,8 @@ declare global {
7
7
  AGENTS_INDEX_URL?: string;
8
8
  PLUGINS_INDEX_URL?: string;
9
9
 
10
+ NEXT_PUBLIC_CUSTOM_MODELS?: string;
11
+
10
12
  NEXT_PUBLIC_ANALYTICS_VERCEL?: string;
11
13
  NEXT_PUBLIC_VERCEL_DEBUG?: string;
12
14
 
@@ -33,6 +35,8 @@ declare global {
33
35
  export const getClientConfig = () => ({
34
36
  AGENTS_INDEX_URL: process.env.AGENTS_INDEX_URL,
35
37
  PLUGINS_INDEX_URL: process.env.PLUGINS_INDEX_URL,
38
+ // custom model names
39
+ CUSTOM_MODELS: process.env.NEXT_PUBLIC_CUSTOM_MODELS,
36
40
 
37
41
  // Vercel Analytics
38
42
  ANALYTICS_VERCEL: process.env.NEXT_PUBLIC_ANALYTICS_VERCEL === '1',
@@ -1,3 +1,4 @@
1
+ import { getClientConfig } from '@/config/client';
1
2
  import { DEFAULT_OPENAI_MODEL_LIST } from '@/const/llm';
2
3
  import { DEFAULT_AGENT_META } from '@/const/meta';
3
4
  import { LanguageModel } from '@/types/llm';
@@ -34,6 +35,8 @@ export const DEFAULT_AGENT_CONFIG: LobeAgentConfig = {
34
35
  export const DEFAULT_LLM_CONFIG: GlobalLLMConfig = {
35
36
  openAI: {
36
37
  OPENAI_API_KEY: '',
38
+ // support user custom model names with env var
39
+ customModelName: getClientConfig().CUSTOM_MODELS,
37
40
  models: DEFAULT_OPENAI_MODEL_LIST,
38
41
  },
39
42
  };
@@ -1,11 +1,11 @@
1
1
  import { useState } from 'react';
2
2
 
3
+ import { sessionSelectors } from '../selectors';
3
4
  import { useSessionStore } from '../store';
4
5
  import { useEffectAfterSessionHydrated } from './useEffectAfterHydrated';
5
6
 
6
7
  export const useSessionHydrated = () => {
7
- // 根据 sessions 是否有值来判断是否已经初始化
8
- const hasInited = !!Object.values(useSessionStore.getState().sessions).length;
8
+ const hasInited = sessionSelectors.hasConversion(useSessionStore.getState());
9
9
 
10
10
  const [isInit, setInit] = useState(hasInited);
11
11
 
@@ -7,6 +7,7 @@ import {
7
7
  currentSessionSafe,
8
8
  getSessionById,
9
9
  getSessionMetaById,
10
+ hasConversion,
10
11
  hasPinnedSessionList,
11
12
  hasSessionList,
12
13
  pinnedSessionList,
@@ -24,6 +25,7 @@ export const sessionSelectors = {
24
25
  getExportAgent,
25
26
  getSessionById,
26
27
  getSessionMetaById,
28
+ hasConversion,
27
29
  hasPinnedSessionList,
28
30
  hasSessionList,
29
31
  isInboxSession,
@@ -92,3 +92,10 @@ export const getSessionMetaById =
92
92
  //
93
93
  // return sessionTree;
94
94
  // };
95
+
96
+ export const hasConversion = (s: SessionStore) => {
97
+ const hasCustomAgents = !!Object.keys(s.sessions).length;
98
+ const hasMessageInInbox = !!Object.keys(s.inbox.chats).length;
99
+
100
+ return hasCustomAgents || hasMessageInInbox;
101
+ };
@@ -1,23 +0,0 @@
1
- name: Issue Check Inactive
2
-
3
- on:
4
- schedule:
5
- - cron: '0 0 */15 * *'
6
-
7
- permissions:
8
- contents: read
9
-
10
- jobs:
11
- issue-check-inactive:
12
- permissions:
13
- issues: write # for actions-cool/issues-helper to update issues
14
- pull-requests: write # for actions-cool/issues-helper to update PRs
15
- runs-on: ubuntu-latest
16
- steps:
17
- - name: check-inactive
18
- uses: actions-cool/issues-helper@v3
19
- with:
20
- actions: 'check-inactive'
21
- token: ${{ secrets.GH_TOKEN }}
22
- inactive-label: 'Inactive'
23
- inactive-day: 30