mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-02-05 02:19:16 +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>
|
<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">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>LoLLMS WebUI</title>
|
<title>LoLLMS WebUI</title>
|
||||||
<script type="module" crossorigin src="/assets/index-CnTRzB7A.js"></script>
|
<script type="module" crossorigin src="/assets/index-DD1gUR26.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-llyd--IR.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-BIdoK8Yo.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
@ -232,7 +232,7 @@
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style scoped>
|
||||||
.math {
|
.math {
|
||||||
display: inline-block; /* this should allow inline math to display inline */
|
display: inline-block; /* this should allow inline math to display inline */
|
||||||
}
|
}
|
||||||
|
@ -276,7 +276,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<style>
|
<style scoped>
|
||||||
.expand-button {
|
.expand-button {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
/* Add space between sender and expand button */
|
/* Add space between sender and expand button */
|
||||||
|
@ -4676,42 +4676,42 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
triggerFileInput() {
|
triggerFileInput() {
|
||||||
this.$refs.fileInput.click()
|
this.$refs.fileInput.click()
|
||||||
},
|
},
|
||||||
async handleFileUpload(event) {
|
async handleFileUpload(event) {
|
||||||
const files = event.target.files
|
const files = event.target.files
|
||||||
if (!files.length) return
|
if (!files.length) return
|
||||||
|
|
||||||
this.isUploading = true
|
this.isUploading = true
|
||||||
const formData = new FormData()
|
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.$emit('upload-success', response.data)
|
// Add database name
|
||||||
} catch (error) {
|
formData.append('database_name', this.databaseName)
|
||||||
console.error('Upload failed:', error)
|
|
||||||
this.$emit('upload-error', error)
|
// Add all files
|
||||||
} finally {
|
Array.from(files).forEach(file => {
|
||||||
this.isUploading = false
|
formData.append('files', file)
|
||||||
event.target.value = ''
|
})
|
||||||
}
|
|
||||||
|
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) {
|
updateRagDatabase(index, value, field) {
|
||||||
if (field) {
|
if (field) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user