Merge branch 'v2' of https://github.com/maxkb-dev/maxkb into v2
This commit is contained in:
commit
fa5434cc79
@ -631,9 +631,10 @@ class ApplicationOperateSerializer(serializers.Serializer):
|
|||||||
if with_valid:
|
if with_valid:
|
||||||
self.is_valid(raise_exception=True)
|
self.is_valid(raise_exception=True)
|
||||||
McpServersSerializer(data=instance).is_valid(raise_exception=True)
|
McpServersSerializer(data=instance).is_valid(raise_exception=True)
|
||||||
if '"stdio"' in instance.get('mcp_servers'):
|
|
||||||
raise AppApiException(500, _('stdio is not supported'))
|
|
||||||
servers = json.loads(instance.get('mcp_servers'))
|
servers = json.loads(instance.get('mcp_servers'))
|
||||||
|
for server, config in servers.items():
|
||||||
|
if config.get('transport') not in ['sse', 'streamable_http']:
|
||||||
|
raise AppApiException(500, _('Only support transport=sse or transport=streamable_http'))
|
||||||
tools = []
|
tools = []
|
||||||
for server in servers:
|
for server in servers:
|
||||||
tools += [
|
tools += [
|
||||||
|
|||||||
@ -43,7 +43,6 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, watch } from 'vue'
|
import { ref, watch } from 'vue'
|
||||||
// import { Close } from '@element-plus/icons-vue'
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
time: {
|
time: {
|
||||||
type: Number,
|
type: Number,
|
||||||
|
|||||||
@ -91,14 +91,4 @@ function infoMessage() {
|
|||||||
MsgInfo(t('chat.noDocument'))
|
MsgInfo(t('chat.noDocument'))
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped></style>
|
||||||
// .paragraph-source-card-height {
|
|
||||||
// height: 300px;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// @media only screen and (max-width: 768px) {
|
|
||||||
// .paragraph-source-card-height {
|
|
||||||
// height: 285px;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
</style>
|
|
||||||
|
|||||||
@ -16,8 +16,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
// padding-left: var(--padding-left);
|
|
||||||
// padding-right: var(--padding-left);
|
|
||||||
|
|
||||||
:deep(ol) {
|
:deep(ol) {
|
||||||
margin-left: 16px !important;
|
margin-left: 16px !important;
|
||||||
|
|||||||
@ -316,11 +316,6 @@ const openChatId: () => Promise<string> = () => {
|
|||||||
return res.data
|
return res.data
|
||||||
})
|
})
|
||||||
.catch((res) => {
|
.catch((res) => {
|
||||||
// if (res.response.status === 403) {
|
|
||||||
// return application.asyncAppAuthentication(accessToken).then(() => {
|
|
||||||
// return openChatId()
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
return Promise.reject(res)
|
return Promise.reject(res)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -59,12 +59,6 @@ function initChart() {
|
|||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
valueFormatter: (value: any) => numberFormat(value),
|
valueFormatter: (value: any) => numberFormat(value),
|
||||||
// axisPointer: {
|
|
||||||
// type: 'cross',
|
|
||||||
// label: {
|
|
||||||
// backgroundColor: '#6a7985'
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
right: 0,
|
right: 0,
|
||||||
|
|||||||
@ -30,11 +30,6 @@ const props = defineProps<{
|
|||||||
|
|
||||||
const toModelValue = computed(() => (props.valueField ? props.data[props.valueField] : props.data))
|
const toModelValue = computed(() => (props.valueField ? props.data[props.valueField] : props.data))
|
||||||
|
|
||||||
// const isChecked = computed({
|
|
||||||
// get: () => props.modelValue.includes(toModelValue.value)),
|
|
||||||
// set: (val) => val
|
|
||||||
// })
|
|
||||||
|
|
||||||
const emit = defineEmits(['update:modelValue', 'change'])
|
const emit = defineEmits(['update:modelValue', 'change'])
|
||||||
|
|
||||||
const checked = () => {
|
const checked = () => {
|
||||||
|
|||||||
@ -165,7 +165,6 @@ onMounted(() => {
|
|||||||
formValue.value.minlength = 0
|
formValue.value.minlength = 0
|
||||||
formValue.value.maxlength = 200
|
formValue.value.maxlength = 200
|
||||||
formValue.value.default_value = ''
|
formValue.value.default_value = ''
|
||||||
// console.log(formValue.value.show_default_value)
|
|
||||||
if (formValue.value.show_default_value === undefined) {
|
if (formValue.value.show_default_value === undefined) {
|
||||||
formValue.value.show_default_value = true
|
formValue.value.show_default_value = true
|
||||||
}
|
}
|
||||||
|
|||||||
@ -183,16 +183,6 @@ watch(dialogVisible, (bool) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// watch(
|
|
||||||
// () => form.value.authentication,
|
|
||||||
// (b) => {
|
|
||||||
// if (b) {
|
|
||||||
// applicationApi.getChatUserAuthType().then((ok) => {
|
|
||||||
// auth_list.value = ok.data
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// )
|
|
||||||
const open = (data: any) => {
|
const open = (data: any) => {
|
||||||
form.value.access_num = data.access_num
|
form.value.access_num = data.access_num
|
||||||
form.value.white_active = data.white_active
|
form.value.white_active = data.white_active
|
||||||
|
|||||||
@ -260,20 +260,6 @@ const isWorkflowType = ref(false)
|
|||||||
|
|
||||||
watch(dialogVisible, (bool) => {
|
watch(dialogVisible, (bool) => {
|
||||||
if (!bool) {
|
if (!bool) {
|
||||||
// form.value = {
|
|
||||||
// knowledge_setting: {
|
|
||||||
// search_mode: 'embedding',
|
|
||||||
// top_n: 3,
|
|
||||||
// similarity: 0.6,
|
|
||||||
// max_paragraph_char_number: 5000,
|
|
||||||
// no_references_setting: {
|
|
||||||
// status: 'ai_questioning',
|
|
||||||
// value: '{question}'
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// problem_optimization: false,
|
|
||||||
// problem_optimization_prompt: ''
|
|
||||||
// }
|
|
||||||
noReferencesform.value = {
|
noReferencesform.value = {
|
||||||
ai_questioning: defaultValue['ai_questioning'],
|
ai_questioning: defaultValue['ai_questioning'],
|
||||||
designated_answer: defaultValue['designated_answer'],
|
designated_answer: defaultValue['designated_answer'],
|
||||||
|
|||||||
@ -509,7 +509,6 @@ async function openExecutionDetail(row: any) {
|
|||||||
async function openKnowledgeSource(row: any) {
|
async function openKnowledgeSource(row: any) {
|
||||||
rightPanelTitle.value = t('chat.KnowledgeSource.title')
|
rightPanelTitle.value = t('chat.KnowledgeSource.title')
|
||||||
rightPanelType.value = 'knowledgeSource'
|
rightPanelType.value = 'knowledgeSource'
|
||||||
// TODO 数据
|
|
||||||
rightPanelDetail.value = row
|
rightPanelDetail.value = row
|
||||||
rightPanelSize.value = 400
|
rightPanelSize.value = 400
|
||||||
}
|
}
|
||||||
|
|||||||
@ -40,7 +40,6 @@ const props = defineProps<{ tabs: Tab[] }>()
|
|||||||
const activeKey = ref('')
|
const activeKey = ref('')
|
||||||
const allConfigs = ref<PlatformConfig[]>([])
|
const allConfigs = ref<PlatformConfig[]>([])
|
||||||
const config = ref<Config>({ app_key: '', app_secret: '' })
|
const config = ref<Config>({ app_key: '', app_secret: '' })
|
||||||
// const logoUrl = ref('')
|
|
||||||
const { login } = useStore()
|
const { login } = useStore()
|
||||||
async function getPlatformInfo() {
|
async function getPlatformInfo() {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@ -222,7 +222,6 @@ const update_field = () => {
|
|||||||
set(props.nodeModel.properties, 'status', 500)
|
set(props.nodeModel.properties, 'status', 500)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// todo
|
|
||||||
applicationApi
|
applicationApi
|
||||||
.getApplicationDetail(props.nodeModel.properties.node_data.application_id)
|
.getApplicationDetail(props.nodeModel.properties.node_data.application_id)
|
||||||
.then((ok) => {
|
.then((ok) => {
|
||||||
|
|||||||
@ -127,7 +127,6 @@ const update_field = () => {
|
|||||||
set(props.nodeModel.properties, 'status', 500)
|
set(props.nodeModel.properties, 'status', 500)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
//todo
|
|
||||||
ToolApi.getToolById(props.nodeModel.properties.node_data.tool_lib_id)
|
ToolApi.getToolById(props.nodeModel.properties.node_data.tool_lib_id)
|
||||||
.then((ok) => {
|
.then((ok) => {
|
||||||
const old_input_field_list = props.nodeModel.properties.node_data.input_field_list
|
const old_input_field_list = props.nodeModel.properties.node_data.input_field_list
|
||||||
|
|||||||
@ -36,12 +36,10 @@ export default defineConfig((conf: any) => {
|
|||||||
const ENV = loadEnv(mode, envDir)
|
const ENV = loadEnv(mode, envDir)
|
||||||
const proxyConf: Record<string, string | ProxyOptions> = {}
|
const proxyConf: Record<string, string | ProxyOptions> = {}
|
||||||
proxyConf['/admin/api'] = {
|
proxyConf['/admin/api'] = {
|
||||||
// target: 'http://47.92.195.88:8080/',
|
|
||||||
target: 'http://127.0.0.1:8080',
|
target: 'http://127.0.0.1:8080',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
}
|
}
|
||||||
proxyConf['/chat/api'] = {
|
proxyConf['/chat/api'] = {
|
||||||
// target: 'http://47.92.195.88:8080/',
|
|
||||||
target: 'http://127.0.0.1:8080',
|
target: 'http://127.0.0.1:8080',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user