new rag api

This commit is contained in:
Saifeddine ALOUI 2024-12-21 01:28:03 +01:00
parent 936c3afc69
commit 4780b3b878
5 changed files with 18 additions and 9 deletions

@ -1 +1 @@
Subproject commit e8ffec9cd022260ea7debe57a85b233ed255f773 Subproject commit 192f57063eb7ad05fcb72cb1931f5ad045a88597

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4
web/dist/index.html vendored
View File

@ -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-BGxqI5br.js"></script> <script type="module" crossorigin src="/assets/index-DtQszzNk.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-BCXKQ2R_.css"> <link rel="stylesheet" crossorigin href="/assets/index-CrgoEYSL.css">
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>

View File

@ -484,9 +484,17 @@ export default {
return Array.isArray(this.dataSourceNames) && this.dataSourceNames.length > 0; return Array.isArray(this.dataSourceNames) && this.dataSourceNames.length > 0;
}, },
dataSourceNames() { dataSourceNames() {
console.log("dataSourceNames", this.$store.state.config.rag_databases); console.log("rag_databases", this.$store.state.config.rag_databases);
// Extract the names from the rag_databases array and transform them into the desired format console.log("remote_databases", this.$store.state.config.remote_databases);
const formattedDataSources = this.$store.state.config.rag_databases.map(dataSource => {
// Combine both rag_databases and remote_databases
const combinedDatabases = [
...this.$store.state.config.rag_databases,
...this.$store.state.config.remote_databases
];
// Extract the names from the combined array and transform them into the desired format
const formattedDataSources = combinedDatabases.map(dataSource => {
console.log("entry", dataSource); console.log("entry", dataSource);
const parts = dataSource.split('::'); const parts = dataSource.split('::');
console.log("extracted", parts[0]); console.log("extracted", parts[0]);
@ -503,9 +511,10 @@ export default {
help: 'mounts the database' help: 'mounts the database'
}; };
}); });
console.log("formatted data sources", formattedDataSources); console.log("formatted data sources", formattedDataSources);
return formattedDataSources; return formattedDataSources;
}, }
}, },
methods: { methods: {
showSendMenu() { showSendMenu() {