音视频前端支持分段参数
This commit is contained in:
parent
18068f76ff
commit
3bbdbca861
@ -14,6 +14,7 @@ services:
|
|||||||
# 持久化数据
|
# 持久化数据
|
||||||
- ~/.maxkb:/opt/maxkb/
|
- ~/.maxkb:/opt/maxkb/
|
||||||
- ../apps:/opt/maxkb-app/apps
|
- ../apps:/opt/maxkb-app/apps
|
||||||
|
- ../ui:/opt/maxkb-app/ui
|
||||||
- /tmp/maxkb:/tmp
|
- /tmp/maxkb:/tmp
|
||||||
environment:
|
environment:
|
||||||
# 开启调试模式
|
# 开启调试模式
|
||||||
|
|||||||
@ -169,7 +169,13 @@ function submit() {
|
|||||||
const documents = [] as any
|
const documents = [] as any
|
||||||
console.log('Submit called, documentsType:', documentsType.value)
|
console.log('Submit called, documentsType:', documentsType.value)
|
||||||
console.log('mediaModels from store:', knowledge.mediaModels)
|
console.log('mediaModels from store:', knowledge.mediaModels)
|
||||||
SetRulesRef.value?.paragraphList.map((item: any) => {
|
console.log('SetRulesRef.value:', SetRulesRef.value)
|
||||||
|
|
||||||
|
// 处理段落列表
|
||||||
|
const paragraphList = SetRulesRef.value?.paragraphList || []
|
||||||
|
console.log('paragraphList length:', paragraphList.length)
|
||||||
|
|
||||||
|
paragraphList.map((item: any) => {
|
||||||
if (!SetRulesRef.value?.checkedConnect) {
|
if (!SetRulesRef.value?.checkedConnect) {
|
||||||
item.content.map((v: any) => {
|
item.content.map((v: any) => {
|
||||||
delete v['problem_list']
|
delete v['problem_list']
|
||||||
@ -210,18 +216,17 @@ function submit() {
|
|||||||
}
|
}
|
||||||
// 传递分段规则(如果有)
|
// 传递分段规则(如果有)
|
||||||
if (SetRulesRef.value?.form) {
|
if (SetRulesRef.value?.form) {
|
||||||
|
console.log('SetRulesRef.value.form:', SetRulesRef.value.form)
|
||||||
|
|
||||||
// 传递patterns
|
// 传递patterns
|
||||||
if (SetRulesRef.value.form.patterns) {
|
if (SetRulesRef.value.form.patterns) {
|
||||||
doc.split_patterns = SetRulesRef.value.form.patterns
|
doc.split_patterns = SetRulesRef.value.form.patterns
|
||||||
}
|
}
|
||||||
// 传递limit
|
// 传递limit (总是传递,即使是默认值)
|
||||||
if (SetRulesRef.value.form.limit !== undefined) {
|
doc.split_limit = SetRulesRef.value.form.limit
|
||||||
doc.split_limit = SetRulesRef.value.form.limit
|
// 传递with_filter (总是传递,即使是默认值)
|
||||||
}
|
doc.split_with_filter = SetRulesRef.value.form.with_filter
|
||||||
// 传递with_filter
|
|
||||||
if (SetRulesRef.value.form.with_filter !== undefined) {
|
|
||||||
doc.split_with_filter = SetRulesRef.value.form.with_filter
|
|
||||||
}
|
|
||||||
console.log('Media chunking params:', {
|
console.log('Media chunking params:', {
|
||||||
split_patterns: doc.split_patterns,
|
split_patterns: doc.split_patterns,
|
||||||
split_limit: doc.split_limit,
|
split_limit: doc.split_limit,
|
||||||
|
|||||||
@ -250,6 +250,7 @@ defineExpose({
|
|||||||
paragraphList,
|
paragraphList,
|
||||||
checkedConnect,
|
checkedConnect,
|
||||||
loading,
|
loading,
|
||||||
|
form,
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@ -437,6 +437,7 @@ const visionModels = ref<any[]>([])
|
|||||||
const sttModels = ref<any[]>([])
|
const sttModels = ref<any[]>([])
|
||||||
|
|
||||||
watch(form.value, (value) => {
|
watch(form.value, (value) => {
|
||||||
|
console.log('UploadComponent fileType changed:', value.fileType)
|
||||||
knowledge.saveDocumentsType(value.fileType)
|
knowledge.saveDocumentsType(value.fileType)
|
||||||
knowledge.saveDocumentsFile(value.fileList)
|
knowledge.saveDocumentsFile(value.fileList)
|
||||||
if (value.fileType === 'mineru') {
|
if (value.fileType === 'mineru') {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user