This commit is contained in:
2023-11-17 06:36:10 +00:00
parent 60e8719c40
commit 3bb4264c7b

View File

@@ -425,13 +425,30 @@ end
function work(a::T, prompt::String) where {T<:agent}
respond = nothing
while true
toolname = nothing
toolinput = nothing
respond = sendReceivePrompt(a, prompt)
@show respond
headers = detectCharacters(respond,
["QTS:", "Plan:", "Thought:", "Act:", "ActInput:", "Obs:", ".....", "ANS:"])
@show headers
break
respond = split(respond, "Obs:")[1]
chunkedtext = chunktext(respond, headers)
if headers[1][:char] == "ANS:"
respond = chunkedtext[1][:body]
a.thought = "nothing"
break
else
# check for chatbox
# function call
end