From cccc7bca10a3146e20ddb189a4ad50d272110a2a Mon Sep 17 00:00:00 2001 From: Thomas Hansen Date: Thu, 12 Oct 2023 10:38:34 +0300 Subject: [PATCH] Minor improvements --- backend/files/system/openai/create-bot.post.hl | 2 ++ .../magic.startup/crawling/magic.ai.url.scrape.hl | 10 +++------- .../system/openai/magic.startup/magic.ai.vectorise.hl | 7 +++---- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/backend/files/system/openai/create-bot.post.hl b/backend/files/system/openai/create-bot.post.hl index 363eda6a14..fddad70b1e 100644 --- a/backend/files/system/openai/create-bot.post.hl +++ b/backend/files/system/openai/create-bot.post.hl @@ -79,6 +79,7 @@ try args message:x:@strings.concat type:info + sleep:1000 // Informing client that we've successfully started crawling. strings.concat @@ -89,6 +90,7 @@ try args message:x:@strings.concat type:info + sleep:100 // Figuring out what to name our type. .type diff --git a/backend/files/system/openai/magic.startup/crawling/magic.ai.url.scrape.hl b/backend/files/system/openai/magic.startup/crawling/magic.ai.url.scrape.hl index 20e6b34476..79f0dfec71 100644 --- a/backend/files/system/openai/magic.startup/crawling/magic.ai.url.scrape.hl +++ b/backend/files/system/openai/magic.startup/crawling/magic.ai.url.scrape.hl @@ -547,11 +547,8 @@ slots.create:magic.ai.url.scrape meta:AINIRO-Website-Crawler else-if - and - neq:x:@data.read/0/*/completion - .: - eq:x:@data.read/0/*/prompt - .:"Common" + eq:x:@data.read/0/*/prompt + .:"Common" .lambda /* @@ -569,7 +566,6 @@ slots.create:magic.ai.url.scrape type:info sleep:10 - // Updating record in database. data.update table:ml_training_snippets @@ -654,7 +650,7 @@ slots.create:magic.ai.url.scrape // Successfully imported at least one snippet. strings.concat - .:"Done importing " + .:"Done importing or updating " get-value:x:@.imported .:" training snippets from page" unwrap:x:+/** diff --git a/backend/files/system/openai/magic.startup/magic.ai.vectorise.hl b/backend/files/system/openai/magic.startup/magic.ai.vectorise.hl index 104eb9e34a..8ab4c7d3a8 100644 --- a/backend/files/system/openai/magic.startup/magic.ai.vectorise.hl +++ b/backend/files/system/openai/magic.startup/magic.ai.vectorise.hl @@ -114,14 +114,14 @@ select id, prompt, completion message:x:@http.post/*/content/*/error/*/message error:x:@lambda2hyper strings.concat - .:"Could not create embeddings for, OpenAI failed '" + .:"OpenAI failed, could not create vectors for '" get-value:x:@.dp/#/*/prompt .:"'" unwrap:x:+/*/args/*/message sockets.signal:x:@.arguments/*/feedback-channel args message:x:@strings.concat - type:error + type:warning if and or @@ -148,9 +148,8 @@ select id, prompt, completion sockets.signal:magic.backend.message roles:root args - message:Aborting vectorisation + message:Could not vectorize snippet type:error - log.error:Aborting vectorisation process // Aborting while loop. set-value:x:@.continue