From d833d5d22e0a6c599a2d25804cfa50c482b470dc Mon Sep 17 00:00:00 2001 From: narawat lamaiin Date: Tue, 23 Apr 2024 10:58:34 +0700 Subject: [PATCH] update --- src/interface.jl | 8 ++++---- src/utils.jl | 16 +++++++++------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/interface.jl b/src/interface.jl index 61b3164..c6b3e54 100755 --- a/src/interface.jl +++ b/src/interface.jl @@ -141,8 +141,8 @@ function chat_mistral_openorca(a::agentReflex) $conversation <|assistant|> """ - - response = sendReceivePrompt(a, prompt, a.config[:text2text][:mqtttopic], + + response = sendReceivePrompt(a, prompt, a.config[:text2textchat][:mqtttopic], timeout=180, stopword=["<|", " 2" + aboutYourself = """ Your name is $(a.name) $(a.roles[a.role]) $(a.roleSpecificInstruction[a.role]) """ - @show "---> 3" + # assistant_plan_prompt = # """ # diff --git a/src/utils.jl b/src/utils.jl index d6ff4de..ea8475d 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -53,7 +53,7 @@ function sendReceivePrompt(a::T1, prompt::String, sendtopic::String; max_tokens::Integer=256, timeout::Integer=120, temperature::AbstractFloat=0.2, stopword::T2=["nostopwordyet"], seed=nothing) where {T1<:agent, T2<:Vector{<:AbstractString}} - + println("---> 4") # copy a.msgMeta instead of using GeneralUtils.generate_msgMeta because if I want to custom # msgMeta for some communication I can do it during that agent instantiation and the custom # msgMeta will effect all of the communication in that agent without effecting all agent @@ -68,11 +68,13 @@ function sendReceivePrompt(a::T1, prompt::String, sendtopic::String; outgoing_msg = Dict( :msgMeta=> msgMeta, - :text=> prompt, - :max_tokens=> max_tokens, - :temperature=> temperature, - :stopword=> stopword, - :seed=> seed, + :payload=> Dict( + :text=> prompt, + :max_tokens=> max_tokens, + :temperature=> temperature, + :stopword=> stopword, + :seed=> seed, + ), ) # send prompt @@ -430,7 +432,7 @@ function isUsePlans(a::agentReflex) isuseplan = true else # if LLM mentions any tools, use Plan/Thought/Act loop - response = sendReceivePrompt(a, prompt, a.config[:text2text][:mqtttopic], max_tokens=64, + response = sendReceivePrompt(a, prompt, a.config[:text2textchat][:mqtttopic], max_tokens=64, timeout=180, stopword=["<|", "