From 7ca4f5276d6000d911b2f6b08b0de97dd6997731 Mon Sep 17 00:00:00 2001 From: narawat lamaiin Date: Sat, 26 Apr 2025 06:20:09 +0700 Subject: [PATCH] update --- src/interface.jl | 2 +- test/test_1.jl | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/interface.jl b/src/interface.jl index 03386f4..9f4cf08 100644 --- a/src/interface.jl +++ b/src/interface.jl @@ -217,7 +217,7 @@ function decisionMaker(a::T; recent::Integer=10 You should follow the following guidelines: - When searching an inventory, search as broadly as possible based on the information you have gathered so far. - Encourage the customer to explore different options and try new things. - - Sometimes, the item a user desires might not be available in your inventory. In such cases, inform the user that the item is unavailable and suggest an alternative instead. + - If you are unable to locate the desired item after multiple attempts, it may not be available in your inventory. In such cases, inform the user that the item is unavailable and suggest an alternative instead. For your information: - Your store carries only wine. diff --git a/test/test_1.jl b/test/test_1.jl index 6500feb..f779d5c 100644 --- a/test/test_1.jl +++ b/test/test_1.jl @@ -36,7 +36,12 @@ function executeSQLVectorDB(sql) return result end -function text2textInstructLLM(prompt::String; maxattempt::Integer=2, modelsize::String="medium") +function text2textInstructLLM(prompt::String; maxattempt::Integer=3, modelsize::String="medium", + llmkwargs=Dict( + :num_ctx => 32768, + :temperature => 0.1, + ) + ) msgMeta = GeneralUtils.generate_msgMeta( config[:externalservice][:loadbalancer][:mqtttopic]; msgPurpose="inference", @@ -51,10 +56,7 @@ function text2textInstructLLM(prompt::String; maxattempt::Integer=2, modelsize:: :msgMeta => msgMeta, :payload => Dict( :text => prompt, - :kwargs => Dict( - :num_ctx => 16384, - :temperature => 0.2, - ) + :kwargs => llmkwargs ) ) @@ -195,7 +197,7 @@ function insertSommelierDecision(recentevents::T1, decision::T2; maxdistance::In row, col = size(df) distance = row == 0 ? Inf : df[1, :distance] if row == 0 || distance > maxdistance # no close enough SQL stored in the database - recentevents_embedding = a.func[:getEmbedding](recentevents)[1] + recentevents_embedding = getEmbedding(recentevents)[1] recentevents = replace(recentevents, "'" => "") decision_json = JSON3.write(decision) decision_base64 = base64encode(decision_json)