Skip to content

Commit 7a3d384

Browse files
Merge branch 'main' of https://github.com/maxkb-dev/maxkb
2 parents 2dc4218 + 6ea2cf1 commit 7a3d384

File tree

4 files changed

+64
-8
lines changed

4 files changed

+64
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</p>
1111
<hr/>
1212

13-
MaxKB = Max Knowledge Base, it is a ready-to-use AI chatbot that integrates Retrieval-Augmented Generation (RAG) pipelines, supports robust workflows, and provides advanced MCP tool-use capabilities. MaxKB is widely applied in scenarios such as intelligent customer service, corporate internal knowledge bases, academic research, and education.
13+
MaxKB = Max Knowledge Brain, it is a ready-to-use AI chatbot that integrates Retrieval-Augmented Generation (RAG) pipelines, supports robust workflows, and provides advanced MCP tool-use capabilities. MaxKB is widely applied in scenarios such as intelligent customer service, corporate internal knowledge bases, academic research, and education.
1414

1515
- **RAG Pipeline**: Supports direct uploading of documents / automatic crawling of online documents, with features for automatic text splitting, vectorization, and RAG (Retrieval-Augmented Generation). This effectively reduces hallucinations in large models, providing a superior smart Q&A interaction experience.
1616
- **Flexible Orchestration**: Equipped with a powerful workflow engine, function library and MCP tool-use, enabling the orchestration of AI processes to meet the needs of complex business scenarios.

README_CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</p>
1515
<hr/>
1616

17-
MaxKB = Max Knowledge Base,是一款开箱即用的 RAG Chatbot,具备强大的工作流和 MCP 工具调用能力。它支持对接各种主流大语言模型(LLMs),广泛应用于智能客服、企业内部知识库、学术研究与教育等场景。
17+
MaxKB = Max Knowledge Brain,是一款开箱即用的 RAG Chatbot,具备强大的工作流和 MCP 工具调用能力。它支持对接各种主流大语言模型(LLMs),广泛应用于智能客服、企业内部知识库、学术研究与教育等场景。
1818

1919
- **开箱即用**:支持直接上传文档 / 自动爬取在线文档,支持文本自动拆分、向量化和 RAG(检索增强生成),有效减少大模型幻觉,智能问答交互体验好;
2020
- **模型中立**:支持对接各种大模型,包括本地私有大模型(DeepSeek R1 / Llama 3 / Qwen 2 等)、国内公共大模型(通义千问 / 腾讯混元 / 字节豆包 / 百度千帆 / 智谱 AI / Kimi 等)和国外公共大模型(OpenAI / Claude / Gemini 等);

apps/application/serializers/application_serializers.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,6 +1071,7 @@ def edit(self, instance: Dict, with_valid=True):
10711071
for update_key in update_keys:
10721072
if update_key in instance and instance.get(update_key) is not None:
10731073
application.__setattr__(update_key, instance.get(update_key))
1074+
print(application.name)
10741075
application.save()
10751076

10761077
if 'dataset_id_list' in instance:
@@ -1089,6 +1090,7 @@ def edit(self, instance: Dict, with_valid=True):
10891090
chat_cache.clear_by_application_id(application_id)
10901091
application_access_token = QuerySet(ApplicationAccessToken).filter(application_id=application_id).first()
10911092
# 更新缓存数据
1093+
print(application.name)
10921094
get_application_access_token(application_access_token.access_token, False)
10931095
return self.one(with_valid=False)
10941096

@@ -1141,6 +1143,8 @@ def get_work_flow_model(instance):
11411143
instance['file_upload_enable'] = node_data['file_upload_enable']
11421144
if 'file_upload_setting' in node_data:
11431145
instance['file_upload_setting'] = node_data['file_upload_setting']
1146+
if 'name' in node_data:
1147+
instance['name'] = node_data['name']
11441148
break
11451149

11461150
def speech_to_text(self, file, with_valid=True):

ui/src/workflow/nodes/mcp-node/index.vue

Lines changed: 58 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,24 @@
9797
</div>
9898
</template>
9999
<el-input
100-
v-if="item.source === 'custom'"
100+
v-if="item.source === 'custom' && item.input_type === 'TextInput'"
101101
v-model="form_data.tool_params[form_data.params_nested][item.label.label]"
102102
/>
103+
<el-input-number
104+
v-else-if="item.source === 'custom' && item.input_type === 'NumberInput'"
105+
v-model="form_data.tool_params[form_data.params_nested][item.label.label]"
106+
/>
107+
<el-switch
108+
v-else-if="item.source === 'custom' && item.input_type === 'SwitchInput'"
109+
v-model="form_data.tool_params[form_data.params_nested][item.label.label]"
110+
/>
111+
<el-input
112+
v-else-if="item.source === 'custom' && item.input_type === 'JsonInput'"
113+
v-model="form_data.tool_params[form_data.params_nested][item.label.label]"
114+
type="textarea"
115+
/>
103116
<NodeCascader
104-
v-else
117+
v-if="item.source === 'referencing'"
105118
ref="nodeCascaderRef2"
106119
:nodeModel="nodeModel"
107120
class="w-full"
@@ -148,11 +161,24 @@
148161
</div>
149162
</template>
150163
<el-input
151-
v-if="item.source === 'custom'"
164+
v-if="item.source === 'custom' && item.input_type === 'TextInput'"
165+
v-model="form_data.tool_params[item.label.label]"
166+
/>
167+
<el-input-number
168+
v-else-if="item.source === 'custom' && item.input_type === 'NumberInput'"
169+
v-model="form_data.tool_params[item.label.label]"
170+
/>
171+
<el-switch
172+
v-else-if="item.source === 'custom' && item.input_type === 'SwitchInput'"
173+
v-model="form_data.tool_params[item.label.label]"
174+
/>
175+
<el-input
176+
v-else-if="item.source === 'custom' && item.input_type === 'JsonInput'"
152177
v-model="form_data.tool_params[item.label.label]"
178+
type="textarea"
153179
/>
154180
<NodeCascader
155-
v-else
181+
v-if="item.source === 'referencing'"
156182
ref="nodeCascaderRef2"
157183
:nodeModel="nodeModel"
158184
class="w-full"
@@ -244,6 +270,19 @@ function changeTool() {
244270
if (params) {
245271
form_data.value.params_nested = item
246272
for (const item2 in params) {
273+
let input_type = 'TextInput'
274+
if (params[item2].type === 'string') {
275+
input_type = 'TextInput'
276+
} else if (params[item2].type === 'number') {
277+
input_type = 'NumberInput'
278+
} else if (params[item2].type === 'boolean') {
279+
input_type = 'SwitchInput'
280+
} else if (params[item2].type === 'array') {
281+
input_type = 'JsonInput'
282+
} else if (params[item2].type === 'object') {
283+
input_type = 'JsonInput'
284+
}
285+
console.log(params[item2])
247286
form_data.value.tool_form_field.push({
248287
field: item2,
249288
label: {
@@ -252,7 +291,7 @@ function changeTool() {
252291
attrs: { tooltip: params[item2].description },
253292
props_info: {}
254293
},
255-
input_type: 'TextInput',
294+
input_type: input_type,
256295
source: 'referencing',
257296
required: args_schema.properties[item].required?.indexOf(item2) !== -1,
258297
props_info: {
@@ -268,6 +307,19 @@ function changeTool() {
268307
}
269308
} else {
270309
form_data.value.params_nested = ''
310+
let input_type = 'TextInput'
311+
if (args_schema.properties[item].type === 'string') {
312+
input_type = 'TextInput'
313+
} else if (args_schema.properties[item].type === 'number') {
314+
input_type = 'NumberInput'
315+
} else if (args_schema.properties[item].type === 'boolean') {
316+
input_type = 'SwitchInput'
317+
} else if (args_schema.properties[item].type === 'array') {
318+
input_type = 'JsonInput'
319+
} else if (args_schema.properties[item].type === 'object') {
320+
input_type = 'JsonInput'
321+
}
322+
console.log(args_schema.properties[item]);
271323
form_data.value.tool_form_field.push({
272324
field: item,
273325
label: {
@@ -276,7 +328,7 @@ function changeTool() {
276328
attrs: { tooltip: args_schema.properties[item].description },
277329
props_info: {}
278330
},
279-
input_type: 'TextInput',
331+
input_type: input_type,
280332
source: 'referencing',
281333
required: args_schema.required?.indexOf(item) !== -1,
282334
props_info: {

0 commit comments

Comments
 (0)