Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/lobehub/lobe-chat
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Aug 21, 2024
2 parents 8fc7aad + 6b35a64 commit ba0fed5
Show file tree
Hide file tree
Showing 358 changed files with 23,445 additions and 1,745 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

services:
postgres:
image: postgres:16
image: pgvector/pgvector:pg16
env:
POSTGRES_PASSWORD: postgres
options: >-
Expand Down Expand Up @@ -40,6 +40,7 @@ jobs:
DATABASE_DRIVER: node
NEXT_PUBLIC_SERVICE_MODE: server
KEY_VAULTS_SECRET: LA7n9k3JdEcbSgml2sxfw+4TV1AzaaFU5+R176aQz4s=
NEXT_PUBLIC_S3_DOMAIN: https://example.com

- name: Test App Coverage
run: bun run test-app:coverage
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

services:
postgres:
image: postgres:16
image: pgvector/pgvector:pg16
env:
POSTGRES_PASSWORD: postgres
options: >-
Expand Down Expand Up @@ -39,6 +39,7 @@ jobs:
DATABASE_DRIVER: node
NEXT_PUBLIC_SERVICE_MODE: server
KEY_VAULTS_SECRET: LA7n9k3JdEcbSgml2sxfw+4TV1AzaaFU5+R176aQz4s=
NEXT_PUBLIC_S3_DOMAIN: https://example.com

- name: Upload Server coverage to Codecov
uses: codecov/codecov-action@v4
Expand Down
50 changes: 50 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,56 @@

# Changelog

### [Version 1.12.1](https://github.com/lobehub/lobe-chat/compare/v1.12.0...v1.12.1)

<sup>Released on **2024-08-21**</sup>

#### 🐛 Bug Fixes

- **misc**: Fix embeddings multi-insert when there is issues with async task.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's fixed

- **misc**: Fix embeddings multi-insert when there is issues with async task, closes [#3530](https://github.com/lobehub/lobe-chat/issues/3530) ([e2cfff7](https://github.com/lobehub/lobe-chat/commit/e2cfff7))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>

## [Version 1.12.0](https://github.com/lobehub/lobe-chat/compare/v1.11.9...v1.12.0)

<sup>Released on **2024-08-21**</sup>

#### ✨ Features

- **misc**: Files and knowledge base.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's improved

- **misc**: Files and knowledge base, closes [#3487](https://github.com/lobehub/lobe-chat/issues/3487) ([6574c01](https://github.com/lobehub/lobe-chat/commit/6574c01))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>

### [Version 1.11.9](https://github.com/lobehub/lobe-chat/compare/v1.11.8...v1.11.9)

<sup>Released on **2024-08-19**</sup>
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile.database
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ COPY --from=builder /deps/node_modules/drizzle-orm /app/node_modules/drizzle-orm
# Copy database migrations
COPY --from=builder /app/src/database/server/migrations /app/migrations
COPY --from=builder /app/scripts/migrateServerDB/docker.cjs /app/docker.cjs
COPY --from=builder /app/scripts/migrateServerDB/errorHint.js /app/errorHint.js

## Production image, copy all the files and run next
FROM base
Expand All @@ -107,6 +108,7 @@ ENV HOSTNAME="0.0.0.0" \

# General Variables
ENV ACCESS_CODE="" \
APP_URL="" \
API_KEY_SELECT_MODE="" \
DEFAULT_AGENT_CONFIG="" \
SYSTEM_AGENT="" \
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,14 +266,14 @@ Our marketplace is not just a showcase platform but also a collaborative space.
<!-- AGENT LIST -->

| Recent Submits | Description |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [RO-SCIRAW Prompt Word Expert](https://chat-preview.lobehub.com/market?agent=rosciraw)<br/><sup>By **[kirklin](https://github.com/kirklin)** on **2024-08-06**</sup> | The RO-SCIRAW framework, created by Kirk Lin, is a methodology for prompt words that provides a new paradigm for building highly precise and efficient prompt words. Please enter the information for the persona you want to create.<br/>`prompt-word-framework` |
| [Social Media Sage](https://chat-preview.lobehub.com/market?agent=social-media-sage)<br/><sup>By **[thedivergentai](https://github.com/thedivergentai)** on **2024-08-06**</sup> | Social Media Marketing expert crafting winning strategies for brands and empowering businesses to thrive online<br/>`social-media-marketing` `branding` `growth-strategies` |
| [Omnipedia](https://chat-preview.lobehub.com/market?agent=omnipedia)<br/><sup>By **[thedivergentai](https://github.com/thedivergentai)** on **2024-08-02**</sup> | Expert in providing high-quality, well-researched information on various topics, including history, science, literature, art, and more. Skilled in summarizing complex topics, assisting with research tasks, and offering creative prompts<br/>`artificial-intelligence` `information` `education` `communication` |
| [Code Snark Master](https://chat-preview.lobehub.com/market?agent=code-snark-master)<br/><sup>By **[leter](https://github.com/leter)** on **2024-07-29**</sup> | Specializes in sharp criticism of code, sarcastically pointing out inefficiencies and readability issues<br/>`tech-leadership` `code-review` `sarcastic-style` `programming-consultation` |

> 📊 Total agents: [<kbd>**312**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
| Recent Submits | Description |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [Variable Name Conversion Expert](https://chat-preview.lobehub.com/market?agent=variable-name-conversion)<br/><sup>By **[zengyishou](https://github.com/zengyishou)** on **2024-08-21**</sup> | In software development, naming variables is a common yet relatively time-consuming task. This assistant can automatically convert Chinese variable names into English variable names that conform to camelCase, PascalCase, snake_case, kebab-case, and constant naming conventions based on specific naming rules. This not only improves code readability but also alleviates the frustration of variable naming.<br/>`software-development` `variable-naming` `chinese-to-english` `code-standards` `automatic-conversion` |
| [Commit Message Generator](https://chat-preview.lobehub.com/market?agent=commit-assistant)<br/><sup>By **[cyicz123](https://github.com/cyicz123)** on **2024-08-12**</sup> | Expert at generating precise Git commit messages<br/>`programming` `git` `commit-message` `code-review` |
| [RO-SCIRAW Prompt Word Expert](https://chat-preview.lobehub.com/market?agent=rosciraw)<br/><sup>By **[kirklin](https://github.com/kirklin)** on **2024-08-06**</sup> | The RO-SCIRAW framework, created by Kirk Lin, is a methodology for prompt words that provides a new paradigm for building highly precise and efficient prompt words. Please enter the information for the persona you want to create.<br/>`prompt-word-framework` |
| [Social Media Sage](https://chat-preview.lobehub.com/market?agent=social-media-sage)<br/><sup>By **[thedivergentai](https://github.com/thedivergentai)** on **2024-08-06**</sup> | Social Media Marketing expert crafting winning strategies for brands and empowering businesses to thrive online<br/>`social-media-marketing` `branding` `growth-strategies` |

> 📊 Total agents: [<kbd>**314**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
<!-- AGENT LIST -->

Expand Down
16 changes: 8 additions & 8 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,14 +254,14 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
<!-- AGENT LIST -->

| 最近新增 | 助手说明 |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [RO-SCIRAW 提示词专家](https://chat-preview.lobehub.com/market?agent=rosciraw)<br/><sup>By **[kirklin](https://github.com/kirklin)** on **2024-08-06**</sup> | RO-SCIRAW 框架是由 Kirk Lin 开创的提示词方法论,为构建高度精确和高效的提示词提供了一个全新的范式。请输入你要创建的分身信息。<br/>`提示词框架` |
| [社交媒体专家](https://chat-preview.lobehub.com/market?agent=social-media-sage)<br/><sup>By **[thedivergentai](https://github.com/thedivergentai)** on **2024-08-06**</sup> | 社交媒体营销专家,为品牌制定成功策略,帮助企业在线蓬勃发展<br/>`社交媒体营销` `品牌塑造` `增长策略` |
| [Omnipedia](https://chat-preview.lobehub.com/market?agent=omnipedia)<br/><sup>By **[thedivergentai](https://github.com/thedivergentai)** on **2024-08-02**</sup> | 专业提供高质量、深入研究的各种主题信息,包括历史、科学、文学、艺术等。擅长总结复杂主题,协助研究任务,并提供创意启示。<br/>`artificial-intelligence` `information` `education` `communication` |
| [代码毒舌大师](https://chat-preview.lobehub.com/market?agent=code-snark-master)<br/><sup>By **[leter](https://github.com/leter)** on **2024-07-29**</sup> | 擅长尖刻批评代码,讽刺性地指出低效和可读性问题<br/>`技术领导` `代码审查` `讽刺风格` `编程咨询` |

> 📊 Total agents: [<kbd>**312**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
| 最近新增 | 助手说明 |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [开发变量名转换专家](https://chat-preview.lobehub.com/market?agent=variable-name-conversion)<br/><sup>By **[zengyishou](https://github.com/zengyishou)** on **2024-08-21**</sup> | 在软件开发过程中,命名变量是一项常见却相对耗时的任务。本助手能够根据特定的命名规则自动将中文变量名转换为符合小驼峰、大驼峰、下划线、横线以及常量命名规范的英文变量名。这不仅提高了代码的可读性,还解决了变量命名的苦恼。<br/>`软件开发` `变量命名` `中文转英文` `代码规范` `自动转换` |
| [提交信息生成器](https://chat-preview.lobehub.com/market?agent=commit-assistant)<br/><sup>By **[cyicz123](https://github.com/cyicz123)** on **2024-08-12**</sup> | 擅长生成精准的 Git 提交信息<br/>`编程` `git` `提交信息` `代码审查` |
| [RO-SCIRAW 提示词专家](https://chat-preview.lobehub.com/market?agent=rosciraw)<br/><sup>By **[kirklin](https://github.com/kirklin)** on **2024-08-06**</sup> | RO-SCIRAW 框架是由 Kirk Lin 开创的提示词方法论,为构建高度精确和高效的提示词提供了一个全新的范式。请输入你要创建的分身信息。<br/>`提示词框架` |
| [社交媒体专家](https://chat-preview.lobehub.com/market?agent=social-media-sage)<br/><sup>By **[thedivergentai](https://github.com/thedivergentai)** on **2024-08-06**</sup> | 社交媒体营销专家,为品牌制定成功策略,帮助企业在线蓬勃发展<br/>`社交媒体营销` `品牌塑造` `增长策略` |

> 📊 Total agents: [<kbd>**314**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
<!-- AGENT LIST -->

Expand Down
65 changes: 65 additions & 0 deletions docs/self-hosting/advanced/knowledge-base.zh-CN.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# 知识库/文件上传

LobeChat 支持文件上传/知识库管理。该功能依赖于以下核心技术组件,了解这些组件将有助于你成功部署和维护知识库系统。

## 核心组件

### 1. PostgreSQL 与 PGVector

PostgreSQL 是一个强大的开源关系型数据库系统,而 PGVector 是其扩展,为向量操作提供支持。

- **用途**:存储结构化数据和向量索引
- **部署建议**:使用官方 Docker 镜像可以快速部署 PostgreSQL 和 PGVector

示例部署脚本:

```
docker run -p 5432:5432 -d --name pg -e POSTGRES_PASSWORD=mysecretpassword pgvector/pgvector:pg16
```

- **注意事项**:确保分配足够的资源以处理向量操作

### 2. S3 兼容的对象存储

S3(或兼容 S3 协议的存储服务)用于存储上传的文件。

- **用途**:存储原始文件
- **选项**:可以使用 AWS S3、MinIO 或其他兼容 S3 协议的存储服务
- **注意事项**:配置适当的访问权限和安全策略

### 3. OpenAI Embedding

OpenAI 的嵌入(Embedding)服务用于将文本转化为向量表示。

- **用途**:生成文本的向量表示,用于语义搜索
- **注意事项**
- 需要有效的 OpenAI API 密钥
- 实施适当的 API 调用限制和错误处理机制

### 4. Unstructured.io(可选)

Unstructured.io 是一个强大的文档处理工具。

- **用途**:处理复杂的文档格式,提取结构化信息
- **应用场景**:处理 PDF、Word 等非纯文本格式的文档
- **注意事项**:评估处理需求,根据文档复杂度决定是否部署

## 部署注意事项

1. **数据安全**:确保所有组件都有适当的安全措施,特别是涉及敏感数据时。

2. **性能优化**

- 为 PostgreSQL 和 PGVector 配置足够的计算资源
- 优化 S3 存储的访问策略和缓存机制

3. **可扩展性**:设计架构时考虑未来可能的数据增长和用户增加。

4. **监控与维护**

- 实施日志记录和监控系统
- 定期备份数据库和对象存储

5. **合规性**:确保部署符合相关的数据保护法规和隐私政策。

通过正确配置和集成这些核心组件,您可以为 LobeChat 构建一个强大、高效的知识库系统。每个组件都在整体架构中扮演着关键角色,共同支持高级的文档管理和智能检索功能。
16 changes: 13 additions & 3 deletions locales/ar/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"pin": "تثبيت",
"pinOff": "إلغاء التثبيت",
"rag": {
"referenceChunks": "مراجع",
"userQuery": {
"actions": {
"delete": "حذف الاستعلام",
Expand Down Expand Up @@ -155,9 +156,18 @@
},
"updateAgent": "تحديث معلومات المساعد",
"upload": {
"actionFiletip": "تحميل المستند",
"actionTooltip": "تحميل الصورة",
"disabled": "النموذج الحالي لا يدعم التعرف على الرؤية، يرجى تغيير النموذج المستخدم",
"action": {
"fileUpload": "رفع ملف",
"folderUpload": "رفع مجلد",
"imageDisabled": "النموذج الحالي لا يدعم التعرف على الصور، يرجى تغيير النموذج لاستخدامه",
"imageUpload": "رفع صورة",
"tooltip": "رفع"
},
"clientMode": {
"actionFiletip": "رفع ملف",
"actionTooltip": "رفع",
"disabled": "النموذج الحالي لا يدعم التعرف على الصور وتحليل الملفات، يرجى تغيير النموذج لاستخدامه"
},
"preview": {
"prepareTasks": "تحضير الأجزاء...",
"status": {
Expand Down
Loading

0 comments on commit ba0fed5

Please sign in to comment.