This commit is contained in:
2023-11-03 07:23:01 +00:00
parent 47efc84bb3
commit be1cd0350d

View File

@@ -276,7 +276,7 @@ function identifyUserIntention(a::agent, usermsg::String)
identify_usermsg = replace(identify_usermsg, "{input}" => usermsg)
result = sendPrompt(a, identify_usermsg, )
result = sendPrompt(a, identify_usermsg)
# msg = Dict(
# :msgMeta=> a.msgMeta,
@@ -315,7 +315,7 @@ function identifyUserIntention(a::agent, usermsg::String)
end
function sendPrompt(a::agent, prompt::String; timeout::Int=10)
a.msgMeta[:msgId] = "$(uuid4())"
a.msgMeta[:msgId] = "$(uuid4())" # new msg id for each msg
msg = Dict(
:msgMeta=> a.msgMeta,
:txt=> prompt,
@@ -345,6 +345,8 @@ function sendPrompt(a::agent, prompt::String; timeout::Int=10)
error("undefined condition $(@__LINE__)")
end
end
return result
end
# function getStringBetweenCurlyBraces(s::AbstractString)