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
2 changes: 1 addition & 1 deletion DSL/Liquibase/changelog.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
databaseChangeLog:
- includeAll:
path: ./changelog
path: ./changelog/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- liquibase formatted sql
-- changeset Vassili Moskaljov:20250103092720
ALTER TABLE user_page_preferences
ADD COLUMN selected_columns TEXT[] NULL;

This file was deleted.

17 changes: 0 additions & 17 deletions DSL/Liquibase/changelog/rollback/20250905124512_rollback.sql

This file was deleted.

3 changes: 1 addition & 2 deletions DSL/Liquibase/liquibase.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
changelogFile: ./changelog.yaml
# Below for local use
# url: jdbc:postgresql://database:5432/training_db
# url: jdbc:postgresql://localhost:5432/training_db ; For Local Use
url: jdbc:postgresql://171.22.247.13:5434/train_db
username: byk
password: 01234
Expand Down
2 changes: 1 addition & 1 deletion DSL/Resql/training/POST/get-intent-last-changed.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SELECT id, intent, status, created
FROM intent
WHERE intent = :intent AND status != 'DELETED'
WHERE intent = :intent AND status = 'ACTIVE'
ORDER BY created DESC
LIMIT 1;
2 changes: 1 addition & 1 deletion DSL/Resql/training/POST/get-intents-list-last-changed.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM intent i
INNER JOIN (
SELECT intent, MAX(created) AS max_created
FROM intent
WHERE intent IN (:intentsList) AND status != 'DELETED'
WHERE intent IN (:intentsList) AND status = 'ACTIVE'
GROUP BY intent
) subquery ON i.intent = subquery.intent AND i.created = subquery.max_created
ORDER BY i.created DESC;
2 changes: 2 additions & 0 deletions DSL/Resql/training/POST/mark-intent-for-service.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
INSERT INTO intent (intent, created, status, isForService)
VALUES (:intent, CURRENT_TIMESTAMP, :status, :isForService);
12 changes: 0 additions & 12 deletions DSL/Resql/training/POST/update-intent-name.sql

This file was deleted.

27 changes: 0 additions & 27 deletions DSL/Resql/training/POST/update-intent.sql

This file was deleted.

26 changes: 0 additions & 26 deletions DSL/Resql/training/POST/update-intents-status.sql

This file was deleted.

1 change: 1 addition & 0 deletions DSL/Ruuter.private/training/GET/rasa/intent-ids.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@ mapIntentsData:

returnSuccess:
return: ${intentsData.response.body}
# todo
wrapper: false
next: end
2 changes: 1 addition & 1 deletion DSL/Ruuter.private/training/GET/rasa/intents/by-id.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ getIntentListLastChanged:

assignResults:
assign:
# Ideally, should use a single object, not array
# TODO: Ideally, should use a single object, not array
intents:
intents: ${getIntentResult.response.body.hits.hits.filter((item) => item._id == intent)}
inmodel: ${getDomainDataResult.response.body.response.intents}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ validateIntentExists:
updateInDatabase:
call: http.post
args:
url: "[#TRAINING_RESQL]/update-intent"
url: "[#TRAINING_RESQL]/mark-intent-for-service"
body:
intent: ${intent}
isForService: ${isForService}
status: ""
status: "ACTIVE"
result: addIntentResult

returnSuccess:
Expand Down
2 changes: 1 addition & 1 deletion DSL/Ruuter.private/training/POST/rasa/intents/add.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ addInDatabase:
url: "[#TRAINING_RESQL]/add-intent"
body:
intent: ${incoming.body.name}
status: "NOT_TRAINED"
status: "ACTIVE"
result: addIntentResult

returnSuccess:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ addInDatabase:
url: "[#TRAINING_RESQL]/add-intent"
body:
intent: ${incoming.body.intentName}
status: "NOT_TRAINED"
status: "ACTIVE"
result: addInDatabaseResult

returnSuccess:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ addInDatabase:
url: "[#TRAINING_RESQL]/add-intent"
body:
intent: ${incoming.body.intentName}
status: "NOT_TRAINED"
status: "ACTIVE"
result: addInDatabaseResult

saveIntentFile:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ addInDatabase:
url: "[#TRAINING_RESQL]/add-intent"
body:
intent: ${incoming.body.intentName}
status: "NOT_TRAINED"
status: "ACTIVE"
result: addInDatabaseResult

saveIntentFile:
Expand Down
6 changes: 3 additions & 3 deletions DSL/Ruuter.private/training/POST/rasa/intents/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,10 @@ addNewIntentInPipeline:
addInDatabase:
call: http.post
args:
url: "[#TRAINING_RESQL]/update-intent-name"
url: "[#TRAINING_RESQL]/add-intent"
body:
oldIntent: ${incoming.body.oldName}
newIntent: ${incoming.body.newName}
intent: ${incoming.body.newName}
status: "ACTIVE"
result: addInDatabaseResult

deleteOldIntentFile:
Expand Down
43 changes: 1 addition & 42 deletions DSL/Ruuter.private/training/POST/rasa/model/trained-model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ declaration:
description: "Body field 'versionNumber'"
- field: name
type: string
description: "Trained model file name"
- field: previousModelName
type: string
description: "Model name that was previously active"
description: "Trained model file name"

getModelByFilenameFromDb:
call: http.post
Expand All @@ -42,44 +39,6 @@ updateInDatabase:
training_data_checksum: ""
result: dbModelResult

getPreviousModelFromDb:
call: http.post
args:
url: "[#TRAINING_RESQL]/get-llm-model-by-filename"
body:
fileName: ${incoming.body.previousModelName}
result: previousModelResult

compareModelIntents:
call: http.post
args:
url: "[#TRAINING_DMAPPER]/utils/compare-model-intent-reports"
body:
newModelReport: ${dbResult.response.body[0].crossValidationReport.intent_evaluation.report}
oldModelReport: ${previousModelResult.response.body[0].crossValidationReport.intent_evaluation.report}
result: compareModelIntentsResult

updateOldIntentsStatus:
call: http.post
args:
url: "[#TRAINING_RESQL]/update-intents-status"
body:
intents: ${compareModelIntentsResult.oldModelUniqueIntents}
status: "NOT_TRAINED"
result: updateOldIntentsResult

updateNewIntentsStatus:
call: http.post
args:
url: "[#TRAINING_RESQL]/update-intents-status"
body:
intents: ${compareModelIntentsResult.newModelUniqueIntents}
status: "TRAINED"
# Only update intents that were last modified before the new model was trained
# Otherwise, the model needs to be trained again to reflect changes in intents
cutoffDate: ${dbResult.response.body[0].trainedDate}
result: updateNewIntentsResult

loadTrainedModel:
call: http.post
args:
Expand Down
22 changes: 1 addition & 21 deletions DSL/Ruuter.private/training/POST/rasa/responses/add.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ declaration:
- field: response
type: string
description: "Body field 'response'"
- field: intent
type: string
description: "Intent name for the response"
header:
- field: cookie
type: string
Expand Down Expand Up @@ -89,25 +86,8 @@ updateOpenSearch:
args:
url: "[#TRAINING_PIPELINE]/bulk/domain"
body:
input: ${domainYaml.response.body.json}
input: ${domainYaml.response.body.json}
result: updateSearchResult
next: isIntentProvided

isIntentProvided:
switch:
- condition: ${incoming.body.intent}
next: updateIntentStatus
next: returnSuccess

updateIntentStatus:
call: http.post
args:
url: "[#TRAINING_RESQL]/update-intent"
body:
intent: ${intent}
isForService: ""
status: "NOT_TRAINED"
result: updateIntentStatusResult
next: returnSuccess

returnSuccess:
Expand Down
20 changes: 0 additions & 20 deletions DSL/Ruuter.private/training/POST/rasa/responses/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ declaration:
- field: response
type: object
description: "Body field 'response'"
- field: intent
type: string
description: "Intent name for the response"
header:
- field: cookie
type: string
Expand Down Expand Up @@ -91,23 +88,6 @@ updateOpenSearch:
body:
input: ${domainYaml.response.body.json}
result: updateSearchResult
next: isIntentProvided

isIntentProvided:
switch:
- condition: ${incoming.body.intent}
next: updateIntentStatus
next: returnSuccess

updateIntentStatus:
call: http.post
args:
url: "[#TRAINING_RESQL]/update-intent"
body:
intent: ${intent}
isForService: ""
status: "NOT_TRAINED"
result: updateIntentStatusResult
next: returnSuccess

returnSuccess:
Expand Down
21 changes: 0 additions & 21 deletions DSL/Ruuter.private/training/POST/rasa/rules/add.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ mergeRules:
iteratee: "rule"
result: mergedRules

# todo also: rules add AND update AND delete - under rules UI, check if add and remove intents to rules

convertJsonToYaml:
call: http.post
args:
Expand Down Expand Up @@ -120,25 +118,6 @@ updateOpenSearch:
body:
input: ${rulesYaml.response.body.json}
result: updateSearchResult
next: getRuleIntents

getRuleIntents:
call: http.post
args:
url: "[#TRAINING_DMAPPER]/utils/get-intents-from-rule-steps"
body:
steps: ${body.steps}
result: ruleIntentsResult
next: updateIntentsStatus

updateIntentsStatus:
call: http.post
args:
url: "[#TRAINING_RESQL]/update-intents-status"
body:
intents: ${ruleIntentsResult.response.body}
status: "NOT_TRAINED"
result: updateIntentsResult
next: returnSuccess

returnSuccess:
Expand Down
Loading
Loading