Skip to content

Commit 02050a2

Browse files
committed
Merge branch 'main' into release-1.0
2 parents 117863e + b719946 commit 02050a2

File tree

90 files changed

+644
-229
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+644
-229
lines changed

.github/workflows/build-and-push.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
- name: Checkout
4949
uses: actions/checkout@v4
5050
with:
51-
ref: main
51+
ref: ${{ github.ref_name }}
5252
- name: Prepare
5353
id: prepare
5454
run: |
@@ -104,7 +104,7 @@ jobs:
104104
- name: Checkout
105105
uses: actions/checkout@v4
106106
with:
107-
ref: main
107+
ref: ${{ github.ref_name }}
108108
- name: Prepare
109109
id: prepare
110110
run: |

.github/workflows/typos_check.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Typos Check
2+
on: [push, pull_request]
3+
4+
jobs:
5+
run:
6+
name: Spell Check with Typos
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout Actions Repository
10+
uses: actions/checkout@v2
11+
12+
- name: Check spelling
13+
uses: crate-ci/typos@master

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ share/python-wheels/
4242
MANIFEST
4343

4444
# PyInstaller
45-
# Usually these files are written by a python script froms a template
45+
# Usually these files are written by a python script forms a template
4646
# before PyInstaller builds the exe, so as to inject date/other infos into it.
4747
*.manifest
4848
*.spec

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,22 @@ docker run -d --name=maxkb -p 8080:8080 -v ~/.maxkb:/var/lib/postgresql/data 1pa
5151

5252
- 前端:[Vue.js](https://cn.vuejs.org/)
5353
- 后端:[Python / Django](https://www.djangoproject.com/)
54-
- Langchain:[Langchain](https://www.langchain.com/)
54+
- LangChain:[LangChain](https://www.langchain.com/)
5555
- 向量数据库:[PostgreSQL / pgvector](https://www.postgresql.org/)
5656
- 大模型:Azure OpenAI、百度千帆大模型、[Ollama](https://github.com/ollama/ollama)
5757

5858
## Star History
5959

6060
[![Star History Chart](https://api.star-history.com/svg?repos=1Panel-dev/MaxKB&type=Date)](https://star-history.com/#1Panel-dev/MaxKB&Date)
6161

62+
## 我们的其他开源产品
63+
64+
- [JumpServer](https://github.com/jumpserver/jumpserver/) - 广受欢迎的开源堡垒机
65+
- [DataEase](https://github.com/dataease/dataease/) - 人人可用的开源数据可视化分析工具
66+
- [MeterSphere](https://github.com/metersphere/metersphere/) - 一站式开源自动化测试平台
67+
- [1Panel](https://github.com/1panel-dev/1panel/) - 现代化、开源的 Linux 服务器运维管理面板
68+
- [Halo](https://github.com/halo-dev/halo/) - 强大易用的开源建站工具
69+
6270
## License
6371

6472
Copyright (c) 2014-2024 飞致云 FIT2CLOUD, All rights reserved.

apps/application/serializers/application_serializers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ class Authentication(serializers.Serializer):
196196
access_token = serializers.CharField(required=True, error_messages=ErrMessage.char("access_token"))
197197

198198
def auth(self, request, with_valid=True):
199-
token = request.META.get('HTTP_AUTHORIZATION', None)
199+
token = request.META.get('HTTP_AUTHORIZATION')
200200
token_details = None
201201
try:
202202
# 校验token
@@ -257,7 +257,7 @@ def insert(self, application: Dict):
257257
application_model = ApplicationSerializer.Create.to_application_model(user_id, application)
258258
dataset_id_list = application.get('dataset_id_list', [])
259259
application_dataset_mapping_model_list = [
260-
ApplicationSerializer.Create.to_application_dateset_mapping(application_model.id, dataset_id) for
260+
ApplicationSerializer.Create.to_application_dataset_mapping(application_model.id, dataset_id) for
261261
dataset_id in dataset_id_list]
262262
# 插入应用
263263
application_model.save()
@@ -280,7 +280,7 @@ def to_application_model(user_id: str, application: Dict):
280280
)
281281

282282
@staticmethod
283-
def to_application_dateset_mapping(application_id: str, dataset_id: str):
283+
def to_application_dataset_mapping(application_id: str, dataset_id: str):
284284
return ApplicationDatasetMapping(id=uuid.uuid1(), application_id=application_id, dataset_id=dataset_id)
285285

286286
class HitTest(serializers.Serializer):

apps/application/serializers/chat_message_serializers.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,12 @@ def chat(self):
178178
client_id = self.data.get('client_id')
179179
client_type = self.data.get('client_type')
180180
chat_info = self.is_valid(raise_exception=True)
181-
pipline_manage_builder = PipelineManage.builder()
181+
pipeline_manage_builder = PipelineManage.builder()
182182
# 如果开启了问题优化,则添加上问题优化步骤
183183
if chat_info.application.problem_optimization:
184-
pipline_manage_builder.append_step(BaseResetProblemStep)
184+
pipeline_manage_builder.append_step(BaseResetProblemStep)
185185
# 构建流水线管理器
186-
pipline_message = (pipline_manage_builder.append_step(BaseSearchDatasetStep)
186+
pipeline_message = (pipeline_manage_builder.append_step(BaseSearchDatasetStep)
187187
.append_step(BaseGenerateHumanMessageStep)
188188
.append_step(BaseChatStep)
189189
.build())
@@ -198,8 +198,8 @@ def chat(self):
198198
params = chat_info.to_pipeline_manage_params(message, get_post_handler(chat_info), exclude_paragraph_id_list,
199199
client_id, client_type, stream)
200200
# 运行流水线作业
201-
pipline_message.run(params)
202-
return pipline_message.context['chat_result']
201+
pipeline_message.run(params)
202+
return pipeline_message.context['chat_result']
203203

204204
@staticmethod
205205
def re_open_chat(chat_id: str):

apps/application/template/embed.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ function initMaxkbStyle(root){
247247
#maxkb #maxkb-chat-container{
248248
z-index:10000;position: relative;
249249
border-radius: 8px;
250-
border: 1px solid var(--N300, #DEE0E3);
250+
border: 1px solid #ffffff;
251251
background: linear-gradient(188deg, rgba(235, 241, 255, 0.20) 39.6%, rgba(231, 249, 255, 0.20) 94.3%), #EFF0F1;
252252
box-shadow: 0px 4px 8px 0px rgba(31, 35, 41, 0.10);
253253
position: fixed;bottom: 20px;right: 45px;overflow: hidden;

apps/common/auth/authenticate.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ def get_token_details(self):
4747
class TokenAuth(TokenAuthentication):
4848
# 重新 authenticate 方法,自定义认证规则
4949
def authenticate(self, request):
50-
auth = request.META.get('HTTP_AUTHORIZATION', None
51-
)
50+
auth = request.META.get('HTTP_AUTHORIZATION')
5251
# 未认证
5352
if auth is None:
5453
raise AppAuthenticationFailed(1003, '未登录,请先登录')

apps/common/event/listener_manage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def delete_embedding_by_dataset_id_list(source_ids: List[str]):
215215

216216
@staticmethod
217217
@poxy
218-
def init_embedding_model(ags):
218+
def init_embedding_model(ages):
219219
EmbeddingModel.get_embedding_model()
220220

221221
def run(self):
File renamed without changes.

0 commit comments

Comments
 (0)