This commit is contained in:
narawat lamaiin
2024-04-17 15:28:59 +07:00
parent bcd525a7d9
commit 4415bdbe91
2 changed files with 33 additions and 9 deletions

View File

@@ -84,9 +84,31 @@ using ..type, ..util, ..llmfunction
Signature\n
-----
"""
function conversation(a::agentReflex, usermsg::String; attemptlimit::Int=3)
a.attemptlimit = attemptlimit
""" #TODO update document
function conversation(a::T, usermsg::String) where {T<:agent}
#TODO add "newtopic" command to delete history
# add usermsg to a.chathistory
addNewMessage(a, "user", usermsg)
#WORKING if the last used tool is a chatbox
if a.plan[:currenttrajectory][end][:action] == "chatbox"
# usermsg -> observation and continue actor loop as planned
else # a new thinking
end
workstate = nothing
response = nothing