update
This commit is contained in:
@@ -75,7 +75,7 @@ end
|
||||
|
||||
function clearMessage(a::T) where {T<:agent}
|
||||
for i in eachindex(a.messages)
|
||||
if length(a.messages) > 1 # system instruction will NOT be deleted
|
||||
if length(a.messages) > 0
|
||||
pop!(a.messages)
|
||||
else
|
||||
break
|
||||
@@ -83,6 +83,7 @@ function clearMessage(a::T) where {T<:agent}
|
||||
end
|
||||
a.memory[:shortterm] = OrderedDict{String, Any}()
|
||||
a.memory[:log] = OrderedDict{String, Any}()
|
||||
@show a.messages
|
||||
end
|
||||
|
||||
function removeLatestMsg(a::T) where {T<:agent}
|
||||
|
||||
Reference in New Issue
Block a user