add new dependency

This commit is contained in:
2023-11-03 07:27:33 +00:00
parent be1cd0350d
commit 884b6abbdc
3 changed files with 765 additions and 4 deletions

View File

@@ -5,7 +5,7 @@ export agent, addNewMessage, clearMessage, removeLatestMsg, generatePrompt_token
generatePrompt_tokenSuffix, conversation
using JSON3, DataStructures, Dates, UUIDs
using CommUtils
using CommUtils, GeneralUtils
# ---------------------------------------------------------------------------- #
# pythoncall setting #
@@ -276,7 +276,7 @@ function identifyUserIntention(a::agent, usermsg::String)
identify_usermsg = replace(identify_usermsg, "{input}" => usermsg)
result = sendPrompt(a, identify_usermsg)
result = sendReceivePrompt(a, identify_usermsg)
# msg = Dict(
# :msgMeta=> a.msgMeta,
@@ -314,7 +314,7 @@ function identifyUserIntention(a::agent, usermsg::String)
return answer
end
function sendPrompt(a::agent, prompt::String; timeout::Int=10)
function sendReceivePrompt(a::agent, prompt::String; timeout::Int=10)
a.msgMeta[:msgId] = "$(uuid4())" # new msg id for each msg
msg = Dict(
:msgMeta=> a.msgMeta,