Skip to content

Commit

Permalink
Merge pull request #34 from TNG/DisableRag
Browse files Browse the repository at this point in the history
Disable RAG for Llama-cpp backend
  • Loading branch information
florianesser-tng authored Dec 19, 2024
2 parents 7e69bff + 78a12d0 commit 37b27f1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions WebUI/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,12 @@ import {useTheme} from "./assets/js/store/theme.ts";
import AddLLMDialog from "@/components/AddLLMDialog.vue";
import WarningDialog from "@/components/WarningDialog.vue";
import {useBackendServices} from "./assets/js/store/backendServices.ts";
import {useTextInference} from "@/assets/js/store/textInference.ts";
const backendServices = useBackendServices();
const theme = useTheme();
const globalSetup = useGlobalSetup();
const textInference = useTextInference()
const enhanceCompt = ref<InstanceType<typeof Enhance>>();
const answer = ref<InstanceType<typeof Answer>>();
Expand Down Expand Up @@ -254,6 +256,14 @@ function switchTab(index: number) {
}
}
watch(textInference, (newSetting, oldSetting) => {
if (newSetting.backend === 'LLAMA.CPP') {
answer.value!.disableRag();
} else {
answer.value!.restoreRagState();
}
})
function miniWindow() {
window.electronAPI.miniWindow();
}
Expand Down
2 changes: 1 addition & 1 deletion WebUI/src/views/Answer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
<span>{{ languages.DECREASE_FONT_SIZE }}</span>
</button>
</div>
<div class="flex justify-center items-center gap-2">
<div v-show="textInference.backend !== 'LLAMA.CPP'" class="flex justify-center items-center gap-2">
<div class="v-checkbox flex-none" type="button" :disabled="processing">
<button v-show="!ragData.processEnable" class="v-checkbox-control flex-none"
:class="{ 'v-checkbox-checked': ragData.enable }" @click="toggleRag(!ragData.enable)">
Expand Down

0 comments on commit 37b27f1

Please sign in to comment.