1
1
mirror of https://github.com/leon-ai/leon.git synced 2024-12-24 01:04:28 +03:00

fix(scripts): always update manifest on LLM setup

This commit is contained in:
louistiti 2024-04-28 10:10:57 +08:00
parent a38eee71f0
commit 57923f83ee
No known key found for this signature in database
GPG Key ID: 92CD6A2E497E1669
4 changed files with 62 additions and 55 deletions

View File

@ -52,6 +52,53 @@
"route": "/api/action/games/rochambeau/rematch",
"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",
@ -138,53 +185,6 @@
"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",
@ -251,11 +251,6 @@
"route": "/api/action/utilities/translator-poc/setup",
"params": []
},
{
"method": "GET",
"route": "/api/action/utilities/translator-poc/setup_2",
"params": []
},
{
"method": "GET",
"route": "/api/action/utilities/translator-poc/translate",

View File

@ -95,7 +95,7 @@
"getos": "3.2.1",
"googleapis": "67.1.1",
"ibm-watson": "6.1.1",
"node-llama-cpp": "3.0.0-beta.16",
"node-llama-cpp": "3.0.0-beta.17",
"node-wav": "0.0.2",
"os-name": "4.0.1",
"pretty-bytes": "5.6.0",

View File

@ -81,6 +81,18 @@ async function downloadLLM(retryWithMirror = false) {
response.data.pipe(llmWriter)
await stream.promises.finished(llmWriter)
await FileHelper.createManifestFile(
LLM_MANIFEST_PATH,
LLM_NAME,
LLM_VERSION,
{
llamaCPPVersion: manifest.llamaCPPVersion
? manifest.llamaCPPVersion
: null
}
)
LogHelper.success('Manifest file updated')
LogHelper.success(`${LLM_NAME_WITH_VERSION} downloaded`)
LogHelper.success(`${LLM_NAME_WITH_VERSION} ready`)
} else {
@ -141,8 +153,8 @@ async function downloadAndCompileLlamaCPP() {
llamaCPPVersion: LLM_LLAMA_CPP_RELEASE_TAG
}
)
LogHelper.success('Manifest file updated')
LogHelper.success('Manifest file created')
LogHelper.success(`llama.cpp downloaded and compiled`)
LogHelper.success('The LLM is ready to go')
} else {

View File

@ -197,7 +197,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 = 'b2665'
export const LLM_LLAMA_CPP_RELEASE_TAG = 'b2717'
/**
* Misc