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 .env.gui
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RELEASE=PRE-ALPHA-test
VERSION=3
BUILD=3
FIX=4-test
FIX=5-test
21 changes: 21 additions & 0 deletions DSL/Ruuter/services/POST/services/status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,27 @@ activate_all_mcq_services:
keyword: "${name}_mcq_"
format: "yml"
result: active_move_results
next: call_llm_enrich

call_llm_enrich:
call: http.post
args:
url: "[#LLM_RUUTER_PUBLIC]/services/enrich"
body:
service_id: ${id}
name: ${name}
description: ${service_data_result.response.body[0].description}
examples: ${service_data_result.response.body[0].examples}
entities: ${service_data_result.response.body[0].entities}
ruuter_type: ${ruuter_type}
current_state: ${new_state}
is_common: ${service_data_result.response.body[0].isCommon}
result: llm_enrich_result
error: llm_enrich_error
next: return_ok

llm_enrich_error:
log: "Error occurred while calling LLM enrich service for service id: ${id}"
next: return_ok

deactivate_service:
Expand Down
39 changes: 32 additions & 7 deletions DSL/Ruuter/services/TEMPLATES/jump-to-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,13 @@ get_service_status:
body:
service_name: ${incoming.body.serviceName}
result: service_status_res
next: assign_service_status
next: check_service_is_active

assign_service_status:
assign:
service_status: "${service_status_res.response.body[0] && service_status_res.response.body[0].currentState === 'active' ? 'active' : 'draft'}"
next: get_new_nonce
check_service_is_active:
switch:
- condition: ${service_status_res.response.body[0]?.currentState === 'active'}
next: get_new_nonce
next: insert_unavailable_service_message

get_new_nonce:
call: http.post
Expand All @@ -51,19 +52,43 @@ get_new_nonce:
trigger_service:
call: http.post
args:
url: "[#SERVICE_RUUTER]/services/${service_status}/${incoming.body.serviceName}"
url: "[#SERVICE_RUUTER]/services/active/${incoming.body.serviceName}"
headers:
x-ruuter-nonce: ${nonce_res.response.body[0].nonce}
body:
chatId: ${incoming.body.chatId}
authorId: ${incoming.body.authorId}
authorId: ${incoming.body.authorId}
input: ${incoming.body.input}
result: trigger_result

return_value:
return: ${trigger_result.response.body}
next: end

insert_unavailable_service_message:
call: http.post
args:
url: "[#SERVICE_DMAPPER_HBS]/bot_responses_to_messages"
headers:
type: json
body:
data:
{
"botMessages": [{"text": "Kahjuks see teenus ei ole praegu saadaval. Saate jätkata vestlust."}],
"chatId": "${incoming.body.chatId}",
"authorId": "${incoming.body.authorId}",
"authorFirstName": "",
"authorLastName": "",
"authorTimestamp": "${new Date().toISOString()}",
"created": "${new Date().toISOString()}",
}
result: unavailable_service_res
next: return_unavailable_service_message

return_unavailable_service_message:
return: ${unavailable_service_res.response.body ?? ''}
next: end

missing_service_name:
status: 400
return: 'serviceName - missing'
Expand Down
Loading
Loading