1
1
mirror of https://github.com/leon-ai/leon.git synced 2024-11-27 08:06:03 +03:00

feat(scripts): llama.cpp compatible build

This commit is contained in:
louistiti 2024-04-18 20:38:02 +08:00
parent cf02f0f91d
commit da49a4dd82
No known key found for this signature in database
GPG Key ID: 334C1BA3550BBDE5
5 changed files with 74 additions and 76 deletions

View File

@ -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": []
}
]
}

View File

@ -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

View File

@ -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": [
{

View File

@ -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"
}
}

View File

@ -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') {