mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-02-04 18:13:29 +00:00
scoping stuff
This commit is contained in:
parent
0119a3df53
commit
dd1183eda4
17
web/dist/assets/index-BIdoK8Yo.css
vendored
Normal file
17
web/dist/assets/index-BIdoK8Yo.css
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
17
web/dist/assets/index-llyd--IR.css
vendored
17
web/dist/assets/index-llyd--IR.css
vendored
File diff suppressed because one or more lines are too long
4
web/dist/index.html
vendored
4
web/dist/index.html
vendored
@ -6,8 +6,8 @@
|
||||
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>LoLLMS WebUI</title>
|
||||
<script type="module" crossorigin src="/assets/index-CnTRzB7A.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-llyd--IR.css">
|
||||
<script type="module" crossorigin src="/assets/index-DD1gUR26.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-BIdoK8Yo.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
@ -232,7 +232,7 @@
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style scoped>
|
||||
.math {
|
||||
display: inline-block; /* this should allow inline math to display inline */
|
||||
}
|
||||
|
@ -276,7 +276,7 @@
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<style>
|
||||
<style scoped>
|
||||
.expand-button {
|
||||
margin-left: 10px;
|
||||
/* Add space between sender and expand button */
|
||||
|
@ -4676,42 +4676,42 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
triggerFileInput() {
|
||||
this.$refs.fileInput.click()
|
||||
this.$refs.fileInput.click()
|
||||
},
|
||||
async handleFileUpload(event) {
|
||||
const files = event.target.files
|
||||
if (!files.length) return
|
||||
const files = event.target.files
|
||||
if (!files.length) return
|
||||
|
||||
this.isUploading = true
|
||||
const formData = new FormData()
|
||||
|
||||
// Add database name
|
||||
formData.append('database_name', this.databaseName)
|
||||
|
||||
// Add all files
|
||||
Array.from(files).forEach(file => {
|
||||
formData.append('files', file)
|
||||
})
|
||||
|
||||
try {
|
||||
const response = await axios.post('/upload_files_2_rag_db', formData, {
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
},
|
||||
onUploadProgress: (progressEvent) => {
|
||||
const percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total)
|
||||
this.$emit('upload-progress', percentCompleted)
|
||||
}
|
||||
})
|
||||
this.isUploading = true
|
||||
const formData = new FormData()
|
||||
|
||||
this.$emit('upload-success', response.data)
|
||||
} catch (error) {
|
||||
console.error('Upload failed:', error)
|
||||
this.$emit('upload-error', error)
|
||||
} finally {
|
||||
this.isUploading = false
|
||||
event.target.value = ''
|
||||
}
|
||||
// Add database name
|
||||
formData.append('database_name', this.databaseName)
|
||||
|
||||
// Add all files
|
||||
Array.from(files).forEach(file => {
|
||||
formData.append('files', file)
|
||||
})
|
||||
|
||||
try {
|
||||
const response = await axios.post('/upload_files_2_rag_db', formData, {
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
},
|
||||
onUploadProgress: (progressEvent) => {
|
||||
const percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total)
|
||||
this.$emit('upload-progress', percentCompleted)
|
||||
}
|
||||
})
|
||||
|
||||
this.$emit('upload-success', response.data)
|
||||
} catch (error) {
|
||||
console.error('Upload failed:', error)
|
||||
this.$emit('upload-error', error)
|
||||
} finally {
|
||||
this.isUploading = false
|
||||
event.target.value = ''
|
||||
}
|
||||
},
|
||||
updateRagDatabase(index, value, field) {
|
||||
if (field) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user