From 949d8e694b5af41e145b1bc128ef8a7cdd654f89 Mon Sep 17 00:00:00 2001 From: "youremail@yourdomain.com" Date: Sun, 24 Dec 2023 23:40:38 +0000 Subject: [PATCH] update --- src/interface.jl | 24 +++++++++++++++++++++--- src/type.jl | 3 +++ 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/src/interface.jl b/src/interface.jl index b7af5bd..cb3b9c7 100755 --- a/src/interface.jl +++ b/src/interface.jl @@ -322,6 +322,16 @@ function actor_mistral_openorca(a::agentReflex, taskrecap="") aware = "Aware: check recap against the plan about current situation" end + winestockResult = "" + if a.winestockResult != "" + winestockResult = + """ + + $(a.winestockResult) + + """ + end + prompt = """ <|system|> @@ -335,6 +345,7 @@ function actor_mistral_openorca(a::agentReflex, taskrecap="") $taskrecap + $winestockResult Use the following format: $aware @@ -488,6 +499,8 @@ function conversation(a::agentReflex, usermsg::String; attemptlimit::Int=3) #TODO paraphrase msg so that it is human friendlier word. else response = chat_mistral_openorca(a) + response = split(response, "\n\n")[1] + @show response end response = removeTrailingCharacters(response) @@ -661,9 +674,14 @@ function actor(a::agentReflex) f = a.tools[toolname][:func] toolresult = f(a, toolinput) @show toolresult - - a.memory[:shortterm]["Obs $latestTask:"] = toolresult - a.memory[:log]["Obs $latestTask:"] = toolresult + # if toolname == "winestock" + # a.winestockResult = toolresult + # a.memory[:shortterm]["Obs $latestTask:"] = "winestock search done" + # a.memory[:log]["Obs $latestTask:"] = "winestock search done" + # else + # a.memory[:shortterm]["Obs $latestTask:"] = toolresult + # a.memory[:log]["Obs $latestTask:"] = toolresult + # end end diff --git a/src/type.jl b/src/type.jl index f476785..9135691 100644 --- a/src/type.jl +++ b/src/type.jl @@ -103,6 +103,9 @@ julia> agent = ChatAgent.agentReflex( :longterm=> OrderedDict{String, Any}(), :log=> OrderedDict{String, Any}(), # span from user stimulus -> multiples attempts -> final respond ) + + # LLM function related + winestockResult = "" end function agentReflex(