mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
Merge branch 'main' into pr@main@application_flow
This commit is contained in:
commit
23a7b5e75e
|
|
@ -26,6 +26,8 @@ docker run -d --name=maxkb -p 8080:8080 -v ~/.maxkb:/var/lib/postgresql/data 1pa
|
|||
|
||||
你也可以通过 [1Panel 应用商店](https://apps.fit2cloud.com/1panel) 快速部署 MaxKB + Ollama + Llama 2,30 分钟内即可上线基于本地大模型的知识库问答系统,并嵌入到第三方业务系统中。
|
||||
|
||||
如果是内网环境,推荐使用 [离线安装包](https://community.fit2cloud.com/#/products/maxkb/downloads) 进行安装部署。
|
||||
|
||||
你也可以在线体验:[DataEase 小助手](https://dataease.io/docs/v2/),它是基于 MaxKB 搭建的智能问答系统,已经嵌入到 DataEase 产品及在线文档中。
|
||||
|
||||
如你有更多问题,可以查看使用手册,或者通过论坛与我们交流。
|
||||
|
|
|
|||
|
|
@ -179,13 +179,12 @@ class ChatMessageSerializer(serializers.Serializer):
|
|||
return chat_info
|
||||
|
||||
def chat(self):
|
||||
self.is_valid(raise_exception=True)
|
||||
chat_info = self.is_valid(raise_exception=True)
|
||||
message = self.data.get('message')
|
||||
re_chat = self.data.get('re_chat')
|
||||
stream = self.data.get('stream')
|
||||
client_id = self.data.get('client_id')
|
||||
client_type = self.data.get('client_type')
|
||||
chat_info = self.is_valid(raise_exception=True)
|
||||
pipeline_manage_builder = PipelineManage.builder()
|
||||
# 如果开启了问题优化,则添加上问题优化步骤
|
||||
if chat_info.application.problem_optimization:
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
"""
|
||||
import hashlib
|
||||
|
||||
from django.urls import re_path, path
|
||||
from django.urls import re_path, path, URLPattern
|
||||
from drf_yasg import openapi
|
||||
from drf_yasg.views import get_schema_view
|
||||
from rest_framework import permissions
|
||||
|
|
@ -46,11 +46,15 @@ def init_chat_doc(application_urlpatterns, patterns):
|
|||
public=True,
|
||||
permission_classes=[permissions.AllowAny],
|
||||
authentication_classes=[AnonymousAuthentication],
|
||||
patterns=[url for url in patterns if
|
||||
url.name is not None and ['application/message', 'application/open',
|
||||
'application/profile'].__contains__(
|
||||
url.name)]
|
||||
patterns=[
|
||||
URLPattern(pattern='api/' + str(url.pattern), callback=url.callback, default_args=url.default_args,
|
||||
name=url.name)
|
||||
for url in patterns if
|
||||
url.name is not None and ['application/message', 'application/open',
|
||||
'application/profile'].__contains__(
|
||||
url.name)]
|
||||
)
|
||||
|
||||
application_urlpatterns += [
|
||||
path('doc/chat/', chat_schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'),
|
||||
path('redoc/chat/', chat_schema_view.with_ui('redoc', cache_timeout=0), name='schema-redoc'),
|
||||
|
|
|
|||
|
|
@ -1,13 +1,22 @@
|
|||
<template>
|
||||
<el-dialog :title="$t('views.applicationOverview.appInfo.EmbedDialog.embedDialogTitle')" v-model="dialogVisible" width="900" class="embed-dialog">
|
||||
<el-dialog
|
||||
:title="$t('views.applicationOverview.appInfo.EmbedDialog.embedDialogTitle')"
|
||||
v-model="dialogVisible"
|
||||
width="900"
|
||||
class="embed-dialog"
|
||||
>
|
||||
<el-row :gutter="12">
|
||||
<el-col :span="12">
|
||||
<div class="border">
|
||||
<p class="title p-16 bold">{{$t('views.applicationOverview.appInfo.EmbedDialog.embedDialogTitle')}}</p>
|
||||
<p class="title p-16 bold">
|
||||
{{ $t('views.applicationOverview.appInfo.EmbedDialog.fullscreenModeTitle') }}
|
||||
</p>
|
||||
<img src="@/assets/window1.png" alt="" class="ml-8" />
|
||||
<div class="code layout-bg border-t p-16">
|
||||
<div class="flex-between">
|
||||
<span class="bold">{{$t('views.applicationOverview.appInfo.EmbedDialog.fullscreenModeTitle')}}</span>
|
||||
<span class="bold">{{
|
||||
$t('views.applicationOverview.appInfo.EmbedDialog.copyInstructions')
|
||||
}}</span>
|
||||
<el-button text @click="copyClick(source1)">
|
||||
<AppIcon iconName="app-copy"></AppIcon>
|
||||
</el-button>
|
||||
|
|
@ -20,11 +29,15 @@
|
|||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div class="border">
|
||||
<p class="title p-16 bold">{{$t('views.applicationOverview.appInfo.EmbedDialog.floatingModeTitle')}}</p>
|
||||
<p class="title p-16 bold">
|
||||
{{ $t('views.applicationOverview.appInfo.EmbedDialog.floatingModeTitle') }}
|
||||
</p>
|
||||
<img src="@/assets/window2.png" alt="" class="ml-8" />
|
||||
<div class="code border-t p-16">
|
||||
<div class="flex-between">
|
||||
<span class="bold">{{$t('views.applicationOverview.appInfo.EmbedDialog.copyInstructions')}}</span>
|
||||
<span class="bold">{{
|
||||
$t('views.applicationOverview.appInfo.EmbedDialog.copyInstructions')
|
||||
}}</span>
|
||||
<el-button text @click="copyClick(source2)">
|
||||
<AppIcon iconName="app-copy"></AppIcon>
|
||||
</el-button>
|
||||
|
|
|
|||
Loading…
Reference in New Issue