From da49a4dd8265783f82fd0ba80590cf601d3f4f31 Mon Sep 17 00:00:00 2001 From: louistiti Date: Thu, 18 Apr 2024 20:38:02 +0800 Subject: [PATCH] feat(scripts): llama.cpp compatible build --- core/skills-endpoints.json | 126 +++++++++--------- server/src/constants.ts | 2 +- skills/productivity/todo_list/config/en.json | 8 +- .../utilities/translator-poc/config/en.json | 12 +- .../src/actions/short_translate.ts | 2 +- 5 files changed, 74 insertions(+), 76 deletions(-) diff --git a/core/skills-endpoints.json b/core/skills-endpoints.json index e3643482..88950cb6 100644 --- a/core/skills-endpoints.json +++ b/core/skills-endpoints.json @@ -52,64 +52,6 @@ "route": "/api/action/games/rochambeau/rematch", "params": [] }, - { - "method": "POST", - "route": "/api/action/news/github_trends/run", - "params": ["number", "daterange"], - "entitiesType": "builtIn" - }, - { - "method": "GET", - "route": "/api/action/news/product_hunt_trends/run", - "params": [] - }, - { - "method": "POST", - "route": "/api/action/productivity/todo_list/create_list", - "params": ["list"], - "entitiesType": "trim" - }, - { - "method": "GET", - "route": "/api/action/productivity/todo_list/view_lists", - "params": [] - }, - { - "method": "POST", - "route": "/api/action/productivity/todo_list/view_list", - "params": ["list"], - "entitiesType": "trim" - }, - { - "method": "POST", - "route": "/api/action/productivity/todo_list/rename_list", - "params": ["old_list", "new_list"], - "entitiesType": "trim" - }, - { - "method": "POST", - "route": "/api/action/productivity/todo_list/delete_list", - "params": ["list"], - "entitiesType": "trim" - }, - { - "method": "POST", - "route": "/api/action/productivity/todo_list/add_todos", - "params": ["todos", "list"], - "entitiesType": "trim" - }, - { - "method": "POST", - "route": "/api/action/productivity/todo_list/complete_todos", - "params": ["todos", "list"], - "entitiesType": "trim" - }, - { - "method": "POST", - "route": "/api/action/productivity/todo_list/uncheck_todos", - "params": ["todos", "list"], - "entitiesType": "trim" - }, { "method": "GET", "route": "/api/action/leon/age/run", @@ -185,6 +127,64 @@ "route": "/api/action/leon/welcome/run", "params": [] }, + { + "method": "POST", + "route": "/api/action/news/github_trends/run", + "params": ["number", "daterange"], + "entitiesType": "builtIn" + }, + { + "method": "GET", + "route": "/api/action/news/product_hunt_trends/run", + "params": [] + }, + { + "method": "POST", + "route": "/api/action/productivity/todo_list/create_list", + "params": ["list"], + "entitiesType": "trim" + }, + { + "method": "GET", + "route": "/api/action/productivity/todo_list/view_lists", + "params": [] + }, + { + "method": "POST", + "route": "/api/action/productivity/todo_list/view_list", + "params": ["list"], + "entitiesType": "trim" + }, + { + "method": "POST", + "route": "/api/action/productivity/todo_list/rename_list", + "params": ["old_list", "new_list"], + "entitiesType": "trim" + }, + { + "method": "POST", + "route": "/api/action/productivity/todo_list/delete_list", + "params": ["list"], + "entitiesType": "trim" + }, + { + "method": "POST", + "route": "/api/action/productivity/todo_list/add_todos", + "params": ["todos", "list"], + "entitiesType": "trim" + }, + { + "method": "POST", + "route": "/api/action/productivity/todo_list/complete_todos", + "params": ["todos", "list"], + "entitiesType": "trim" + }, + { + "method": "POST", + "route": "/api/action/productivity/todo_list/uncheck_todos", + "params": ["todos", "list"], + "entitiesType": "trim" + }, { "method": "GET", "route": "/api/action/social_communication/mbti/setup", @@ -195,11 +195,6 @@ "route": "/api/action/social_communication/mbti/quiz", "params": [] }, - { - "method": "GET", - "route": "/api/action/unknown/widget-playground/run", - "params": [] - }, { "method": "GET", "route": "/api/action/utilities/date_time/current_date_time", @@ -251,6 +246,11 @@ "route": "/api/action/utilities/translator-poc/short_translate", "params": [null], "entitiesType": "trim" + }, + { + "method": "GET", + "route": "/api/action/unknown/widget-playground/run", + "params": [] } ] } diff --git a/server/src/constants.ts b/server/src/constants.ts index 091f93cf..136bfb90 100644 --- a/server/src/constants.ts +++ b/server/src/constants.ts @@ -183,7 +183,7 @@ export const LLM_MIRROR_DOWNLOAD_URL = /** * @see llama.cpp releases: https://github.com/ggerganov/llama.cpp/releases */ -export const LLM_LLAMA_CPP_RELEASE_TAG = 'b2681' +export const LLM_LLAMA_CPP_RELEASE_TAG = 'b2665' /** * Misc diff --git a/skills/productivity/todo_list/config/en.json b/skills/productivity/todo_list/config/en.json index b8446226..5e29028e 100644 --- a/skills/productivity/todo_list/config/en.json +++ b/skills/productivity/todo_list/config/en.json @@ -40,15 +40,13 @@ "view_list": { "type": "logic", "utterance_samples": [ - "What do I have [in|on] [the|my] @list list?", + "What do I have on my @list list?", "Show [my|the] @list list", "Tell me what is on my @list list", - "What is [in|on] [the|my] @list list?", + "What is on [the|my] @list list?", "Can you give me the content of my @list list?", "I'd like to know what is on the @list list", - "Give me the content of the @list list", - "I need you tell me what's on the @list list", - "Get me the @list list" + "Give me the content of the @list list" ], "entities": [ { diff --git a/skills/utilities/translator-poc/config/en.json b/skills/utilities/translator-poc/config/en.json index feb389bc..a175cbac 100644 --- a/skills/utilities/translator-poc/config/en.json +++ b/skills/utilities/translator-poc/config/en.json @@ -4,17 +4,17 @@ "short_translate": { "type": "logic", "utterance_samples": [ - "[Translate|Convert] @text_to_translate [to|in|into] @language", - "What is @text_to_translate in @language?", - "How [do|can] [I|we] say @text_to_translate in @language?", - "Can you tell [me|us] how to say @text_to_translate in @language?", - "[I|We] need to know how to say @text_to_translate in @language" + "[Translate|Convert] @text_to_parse [to|in|into] @language", + "What is @text_to_parse in @language?", + "How [do|can] [I|we] say @text_to_parse in @language?", + "Can you tell [me|us] how to say @text_to_parse in @language?", + "[I|We] need to know how to say @text_to_parse in @language" ], "entities": [ { "type": "llm", "schema": { - "text_to_translate": { + "text_to_parse": { "type": "string" } } diff --git a/skills/utilities/translator-poc/src/actions/short_translate.ts b/skills/utilities/translator-poc/src/actions/short_translate.ts index a0091b67..e5038d7b 100644 --- a/skills/utilities/translator-poc/src/actions/short_translate.ts +++ b/skills/utilities/translator-poc/src/actions/short_translate.ts @@ -8,7 +8,7 @@ export const run: ActionFunction = async function (params) { let targetLanguage = null for (const currentEntity of params.current_entities) { - if (currentEntity.entity === 'text_to_translate') { + if (currentEntity.entity === 'text_to_parse') { textToTranslate = currentEntity.resolution.value } if (currentEntity.entity === 'language') {