Skip to content

Commit

Permalink
Minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
polterguy committed Oct 12, 2023
1 parent e71cb01 commit cccc7bc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
2 changes: 2 additions & 0 deletions backend/files/system/openai/create-bot.post.hl
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ try
args
message:x:@strings.concat
type:info
sleep:1000

// Informing client that we've successfully started crawling.
strings.concat
Expand All @@ -89,6 +90,7 @@ try
args
message:x:@strings.concat
type:info
sleep:100

// Figuring out what to name our type.
.type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

/*
Expand All @@ -569,7 +566,6 @@ slots.create:magic.ai.url.scrape
type:info
sleep:10


// Updating record in database.
data.update
table:ml_training_snippets
Expand Down Expand Up @@ -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:+/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit cccc7bc

Please sign in to comment.