diff --git a/package-lock.json b/package-lock.json index 7a3a224..9647c28 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "sakai-vue", + "name": "Hermione", "version": "4.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "sakai-vue", + "name": "Hermione", "version": "4.0.0", "dependencies": { "@primevue/themes": "^4.0.0", diff --git a/src/layout/AppMenu.vue b/src/layout/AppMenu.vue index d92056b..134feb3 100644 --- a/src/layout/AppMenu.vue +++ b/src/layout/AppMenu.vue @@ -5,15 +5,10 @@ import AppMenuItem from './AppMenuItem.vue'; const model = ref([ { - label: 'Knowledge Source', - items: [{ label: 'Documents', icon: 'pi pi-fw pi-id-card', to: '/ksdocuments' }, - { label: 'Code Repository', icon: 'pi pi-fw pi-id-card', to: '/ks_code_repo' } + label: 'Scenarios', + items: [{ label: 'Scenario List', icon: 'pi pi-fw pi-id-card', to: '/scenario-list' } ] - }, - { - label: 'Vector Database', - items: [{ label: 'Dashboard', icon: 'pi pi-fw pi-home', to: '/' }] - }, + } ]); diff --git a/src/layout/AppTopbar.vue b/src/layout/AppTopbar.vue index e52fb88..72f00a7 100644 --- a/src/layout/AppTopbar.vue +++ b/src/layout/AppTopbar.vue @@ -26,7 +26,7 @@ const { onMenuToggle, toggleDarkMode, isDarkTheme } = useLayout(); /> - APOLLO + HERMIONE diff --git a/src/router/index.js b/src/router/index.js index a260335..9473142 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -9,16 +9,10 @@ const router = createRouter({ component: AppLayout, children: [ { - path: '/', - name: 'dashboard', - component: () => import('@/views/Dashboard.vue') - }, - { - path: '/ksdocuments', + path: '/scenario', children: [ - {path: '', name: 'ks-document', component: () => import('@/views/pages/KsDocuments.vue')}, - {path: 'new', name: 'ks-document-new', component: () => import('@/views/pages/KsDocumentForm.vue')}, - {path: ':id', name: 'ks-document-edit', component: () => import('@/views/pages/KsDocumentForm.vue')} + {path: 'list', name: 'scenario-list', component: () => import('@/views/pages/ScenarioExec.vue')}, + {path: ':id', name: 'scenario-exec', component: () => import('@/views/pages/ScenarioExec.vue')} ] diff --git a/src/service/Scenarios.js b/src/service/Scenarios.js new file mode 100644 index 0000000..1ffbb8b --- /dev/null +++ b/src/service/Scenarios.js @@ -0,0 +1,131 @@ +export const ScenarioService = { + + getScenari(){ + return { + "id": "66a5ff66fc2ae458a491f161", + "name": "simple rag for ATF", + "steps": [ + { + "type": "RAG_QUERY", + "description": null, + "name": "Query Vector DB Rag", + "order": 1, + "attributes": { + "rag_threasold": 0.8, + "rag_topk": 5, + "rag_filter": "KsApplicatioName == 'atf'", + "rag_output_variable": "rag_output", + "rag_input": "$shared.user_input$" + } + }, + { + "type": "SIMPLE_QUERY_AI", + "description": null, + "name": "Query AI", + "order": 2, + "attributes": { + "qai_system_prompt_template": "You are the most expert about ATF application. \nUse the following documentation to provide answer to the user question : \ncontext:\n\n$shared.rag_output$", + "qai_user_input": "$shared.user_input$", + "qai_output_variable": "scenario_output" + } + } + ], + "inputs": [ + { + "name": "input_question", + "type": "text", + "label": "Question" + } + ] + } + }, + getScenarios() { + return [ + { + "id": "66a5ff66fc2ae458a491f161", + "name": "simple rag for ATF", + "steps": [ + { + "type": "RAG_QUERY", + "description": null, + "name": "Query Vector DB Rag", + "order": 1, + "attributes": { + "rag_threasold": 0.8, + "rag_topk": 5, + "rag_filter": "KsApplicatioName == 'atf'", + "rag_output_variable": "rag_output", + "rag_input": "$shared.user_input$" + } + }, + { + "type": "SIMPLE_QUERY_AI", + "description": null, + "name": "Query AI", + "order": 2, + "attributes": { + "qai_system_prompt_template": "You are the most expert about ATF application. \nUse the following documentation to provide answer to the user question : \ncontext:\n\n$shared.rag_output$", + "qai_user_input": "$shared.user_input$", + "qai_output_variable": "scenario_output" + } + } + ], + "inputs": [ + { + "name": "input_question", + "type": "text", + "label": "Question" + } + ] + }, + { + "id": "66a7bbb7c5c2e1863e5d6db0", + "name": "better rag", + "steps": [ + { + "type": "SIMPLE_QUERY_AI", + "description": null, + "name": "Extract Keywords AI", + "order": 0, + "attributes": { + "qai_system_prompt_template": "You are able to identify all the keywords from user sentence or question. Reply to the user with only a list of the keywords seprated by spaces and nothing else.", + "qai_user_input": "$shared.user_input$", + "qai_output_variable": "keywords" + } + }, + { + "type": "RAG_QUERY", + "description": null, + "name": "Query Rag", + "order": 1, + "attributes": { + "rag_threasold": 0.7, + "rag_topk": 5, + "rag_filter": "KsApplicatioName == 'atf'", + "rag_output_variable": "rag_output", + "rag_input": "$shared.keywords$" + } + }, + { + "type": "SIMPLE_QUERY_AI", + "description": null, + "name": "Query AI", + "order": 2, + "attributes": { + "qai_system_prompt_template": "You are the most expert about ATF application. \nUse the following documentation to provide answer to the user question : \ncontext:\n\n$shared.rag_output$", + "qai_user_input": "$shared.user_input$", + "qai_output_variable": "scenario_output" + } + } + ], + "inputs": [ + { + "name": "input_question", + "type": "text", + "label": "Question" + } + ] + } + ]; + } +} \ No newline at end of file diff --git a/src/views/pages/KsDocuments.vue b/src/views/pages/KsDocuments.vue index 0e59a8b..3c92d65 100644 --- a/src/views/pages/KsDocuments.vue +++ b/src/views/pages/KsDocuments.vue @@ -38,10 +38,10 @@ import { onMounted } from 'vue' import axios from 'axios'; import { useRoute, useRouter } from 'vue-router' -import { data } from 'autoprefixer'; const router = useRouter() const ksdocuments = ref(null); +const scenario = ref([]) onMounted(() => { axios.get('http://localhost:8082/fe-api/ksdocuments') diff --git a/src/views/pages/ScenarioExec.vue b/src/views/pages/ScenarioExec.vue new file mode 100644 index 0000000..d0a1dbc --- /dev/null +++ b/src/views/pages/ScenarioExec.vue @@ -0,0 +1,6 @@ +