hermione scenarios

This commit is contained in:
paola.trabucco
2024-08-01 15:36:09 +02:00
parent e466ff879e
commit fa96add05b
7 changed files with 195 additions and 150 deletions

View File

@@ -0,0 +1,8 @@
import axios from 'axios';
export const ScenarioService = {
getScenarios() {
return axios.get('http://localhost:8081/scenarios')
}
}

View File

@@ -1,131 +0,0 @@
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"
}
]
}
];
}
}