Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ SELECT
END AS budget_status
FROM rag_search.llm_connections
WHERE connection_status <> 'deleted'
AND environment = 'testing'
-- AND environment = 'testing'
AND (:llm_platform IS NULL OR :llm_platform = '' OR llm_platform = :llm_platform)
AND (:llm_model IS NULL OR :llm_model = '' OR llm_model = :llm_model)
AND (:environment IS NULL OR :environment = '' OR environment = :environment)
Expand Down
38 changes: 38 additions & 0 deletions DSL/Ruuter.private/accounts/GET/user-role.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
declaration:
call: declare
version: 0.1
description: "Get user roles dynamically from TIM"
method: get
accepts: json
returns: json
namespace: rag-search
allowlist:
headers:
- field: cookie
type: string
description: "Cookie field"

get_user_info:
call: http.post
args:
url: "[#RAG_SEARCH_TIM]/jwt/custom-jwt-userinfo"
contentType: plaintext
headers:
cookie: ${incoming.headers.cookie}
plaintext: "customJwtCookie"
result: res
next: check_user_info_response

check_user_info_response:
switch:
- condition: ${200 <= res.response.statusCodeValue && res.response.statusCodeValue < 300}
next: return_result
next: return_empty_array

return_result:
return: ${res.response.body.authorities}
next: end

return_empty_array:
return: success
next: end
38 changes: 38 additions & 0 deletions DSL/Ruuter.public/rag-search/GET/accounts/user-role.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
declaration:
call: declare
version: 0.1
description: "Get user roles dynamically from TIM"
method: get
accepts: json
returns: json
namespace: backoffice
allowlist:
headers:
- field: cookie
type: string
description: "Cookie field"

get_user_info:
call: http.post
args:
url: "[#CKB_TIM]/jwt/custom-jwt-userinfo"
contentType: plaintext
headers:
cookie: ${incoming.headers.cookie}
plaintext: "customJwtCookie"
result: res
next: check_user_info_response

check_user_info_response:
switch:
- condition: ${200 <= res.response.statusCodeValue && res.response.statusCodeValue < 300}
next: return_result
next: return_empty_array

return_result:
return: ${res.response.body.authorities}
next: end

return_empty_array:
return: success
next: end
4 changes: 3 additions & 1 deletion GUI/.env.development
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ REACT_APP_CUSTOMER_SERVICE_LOGIN=http://localhost:3004/et/dev-auth
REACT_APP_SERVICE_ID=conversations,settings,monitoring
REACT_APP_NOTIFICATION_NODE_URL=http://localhost:4040
REACT_APP_CSP=upgrade-insecure-requests; default-src 'self'; font-src 'self' data:; img-src 'self' data:; script-src 'self' 'unsafe-eval' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; object-src 'none'; connect-src 'self' http://localhost:8086 http://localhost:8088 http://localhost:3004 http://localhost:4040 ws://localhost;
REACT_APP_ENABLE_HIDDEN_FEATURES=TRUE
REACT_APP_ENABLE_HIDDEN_FEATURES=TRUE
REACT_APP_ENABLE_MULTI_DOMAIN=FALSE
REACT_APP_MENU_JSON= '[{"id":"conversations","label":{"et":"Vestlused","en":"Conversations"},"path":"/chat","children":[{"label":{"et":"Vastamata","en":"Unanswered"},"path":"/unanswered"},{"label":{"et":"Aktiivsed","en":"Active"},"path":"/active"},{"label":{"et":"Ootel","en":"Pending"},"path":"/pending"},{"label":{"et":"Ajalugu","en":"History"},"path":"/history"},{"label":{"et":"Valideerimised","en":"Validations"},"path":"/validations"}]},{"id":"training","label":{"et":"Treening","en":"Training"},"path":"/training","children":[{"label":{"et":"Treening","en":"Training"},"path":"/training","children":[{"label":{"et":"Teemad","en":"Themes"},"path":"/training/intents"},{"hidden":true,"label":{"et":"Avalikud teemad","en":"Public themes"},"path":"/training/common-intents"},{"label":{"et":"Teemade järeltreenimine","en":"Post training themes"},"path":"/training/intents-followup-training"},{"label":{"et":"Vastused","en":"Answers"},"path":"/training/responses"},{"label":{"et":"Reeglid","en":"Rules"},"path":"/training/rules"},{"hidden":true,"label":{"et":"Konfiguratsioon","en":"Configuration"},"path":"/training/configuration"},{"label":{"et":"Vormid","en":"Forms"},"path":"/training/forms"},{"label":{"et":"Mälukohad","en":"Slots"},"path":"/training/slots"}]},{"label":{"et":"Ajaloolised vestlused","en":"Historical conversations"},"path":"/history","children":[{"label":{"et":"Ajalugu","en":"History"},"path":"/history/history"},{"hidden":true,"label":{"et":"Pöördumised","en":"Appeals"},"path":"/history/appeal"}]},{"label":{"et":"Mudelipank ja analüütika","en":"Modelbank and analytics"},"path":"/analytics","children":[{"label":{"et":"Teemade ülevaade","en":"Overview of topics"},"path":"/analytics/overview"},{"label":{"et":"Mudelite võrdlus","en":"Comparison of models"},"path":"/analytics/models"},{"hidden":true,"label":{"et":"Testlood","en":"testTracks"},"path":"/analytics/testcases"}]},{"label":{"et":"Treeni uus mudel","en":"Train new model"},"path":"/train-new-model"}]},{"id":"analytics","label":{"et":"Analüütika","en":"Analytics"},"path":"/analytics","children":[{"label":{"et":"Ülevaade","en":"Overview"},"path":"/overview"},{"label":{"et":"Vestlused","en":"Chats"},"path":"/chats"},{"label":{"et":"Tagasiside","en":"Feedback"},"path":"/feedback"},{"label":{"et":"Avaandmed","en":"Reports"},"path":"/reports"}]},{"id":"services","hidden":true,"label":{"et":"Teenused","en":"Services"},"path":"/services","children":[{"label":{"et":"Ülevaade","en":"Overview"},"path":"/overview"},{"label":{"et":"Uus teenus","en":"New Service"},"path":"/newService"},{"label":{"et":"Probleemsed teenused","en":"Faulty Services"},"path":"/faultyServices"}]},{"id":"knowledge-center","label":{"et":"Teadmuskeskus","en":"Knowledge Center"},"path":"/knowledge-center","children":[{"id":"rag-search","label":{"et":"Mudelid ja seadistused","en":"Models management"},"path":"/rag-search","children":[{"label":{"et":"Mudelite ühendused","en":"LLM connections"},"path":"/llm-connections"},{"label":{"et":"Viiba Seaded","en":"Prompt Configurations"},"path":"/prompt-configurations"},{"label":{"et":"Testi mudelit","en":"Test LLM"},"path":"/test-llm"}]},{"id":"ckb","label":{"et":"Teadmusbaas","en":"Knowledge Base"},"path":"/ckb","children":[{"label":{"et":"Agentuur","en":"Agency"},"path":"/agency"},{"label":{"et":"Aruanded","en":"Reports"},"path":"/reports"},{"label":{"et":"API Integratsioonid","en":"API Integrations"},"path":"/api"}]}]},{"id":"settings","label":{"et":"Haldus","en":"Administration"},"path":"/settings","children":[{"label":{"et":"Kasutajad","en":"Users"},"path":"/users"},{"label":{"et":"Vestlusbot","en":"Chatbot"},"path":"/chatbot","children":[{"label":{"et":"Seaded","en":"Settings"},"path":"/chatbot/settings"},{"label":{"et":"Tervitussõnum","en":"Welcome message"},"path":"/chatbot/welcome-message"},{"label":{"et":"Välimus ja käitumine","en":"Appearance and behavior"},"path":"/chatbot/appearance"},{"label":{"et":"Erakorralised teated","en":"Emergency notices"},"path":"/chatbot/emergency-notices"},{"label":{"et":"Tagasiside","en":"Feedback"},"path":"/chatbot/feedback"}]},{"label":{"et":"Vestluste analüüs","en":"Chat analysis"},"path":"/chat-analysis"},{"label":{"et":"Asutuse tööaeg","en":"Office opening hours"},"path":"/working-time"},{"label":{"et":"Vestluse Kustutamine","en":"Delete Conversations"},"path":"/delete-conversations"},{"label":{"et":"Sessiooni pikkus","en":"Session length"},"path":"/session-length"},{"label":{"et":"SKMi konfiguratsioon","en":"SKM Configuration"},"path":"/skm-configuration"},{"label":{"et":"Anonümiseerija","en":"Anonymizer"},"path":"/anonymizer"}]},{"id":"monitoring","hidden":true,"label":{"et":"Seire","en":"Monitoring"},"path":"/monitoring","children":[{"label":{"et":"Aktiivaeg","en":"Working hours"},"path":"/uptime"}]}]'
80 changes: 79 additions & 1 deletion GUI/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion GUI/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
"prettier": "prettier --write \"{,!(node_modules)/**/}*.{ts,tsx,js,json,css,less,scss}\""
},
"dependencies": {
"@buerokratt-ria/header": "^0.1.52",
"@buerokratt-ria/menu": "^0.2.15",
"@buerokratt-ria/styles": "^0.0.1",
"@fontsource/roboto": "^4.5.8",
"@formkit/auto-animate": "^1.0.0-beta.5",
Expand Down Expand Up @@ -92,7 +94,7 @@
"eslint-plugin-typescript": "^0.14.0",
"mocksse": "^1.0.4",
"msw": "^0.49.2",
"prettier": "^2.8.1",
"prettier": "^2.8.8",
"sass": "^1.57.0",
"typescript": "^4.9.3",
"vite": "^4.0.0",
Expand Down
3 changes: 1 addition & 2 deletions GUI/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ const App: FC = () => {
<Route path="/create-llm-connection" element={<CreateLLMConnection />} />
<Route path="/view-llm-connection" element={<ViewLLMConnection />} />
<Route path="/prompt-configurations" element={<PromptConfigurations />} />
<Route path="/test-llm" element={<TestLLM />} />
<Route path="/test-production-llm" element={<TestProductionLLM />} />
<Route path="/test-llm" element={<TestProductionLLM />} />


</Route>
Expand Down
16 changes: 12 additions & 4 deletions GUI/src/components/Layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,23 @@ import { Outlet } from 'react-router-dom';
import useStore from 'store';
import './Layout.scss';
import { useToast } from '../../hooks/useToast';
import Header from 'components/Header';
import MainNavigation from 'components/MainNavigation';
import { MainNavigation } from '@buerokratt-ria/menu';
import { Header, useMenuCountConf } from '@buerokratt-ria/header';

const Layout: FC = () => {
const domainBarShowing = import.meta.env.REACT_APP_ENABLE_MULTI_DOMAIN?.toLowerCase() === 'true';
const menuCountConf = useMenuCountConf();

return (
<div className="layout">
<MainNavigation />
<MainNavigation countConf={menuCountConf}/>
<div className="layout__wrapper">
<Header toastContext={useToast()} user={useStore.getState().userInfo} />
<Header
toastContext={useToast()}
user={useStore.getState().userInfo}
setUserDomains={useStore.getState().setUserDomains}
isDomainSelectorVisible={domainBarShowing}
/>
<main className="layout__main">
<Outlet />
</main>
Expand Down
6 changes: 0 additions & 6 deletions GUI/src/components/MainNavigation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ const MainNavigation: FC = () => {
label: t('menu.testLLM'),
path: '/test-llm',
icon: <MdSearch />
},
{
id: 'testProductionLLM',
label: t('menu.testProductionLLM'),
path: '/test-production-llm',
icon: <MdSearch />
}
];

Expand Down
Loading
Loading