This commit is contained in:
youremail@yourdomain.com
2023-12-21 11:06:50 +00:00
parent 6d14accb05
commit 859d42c903
3 changed files with 142 additions and 51 deletions

View File

@@ -1015,7 +1015,21 @@ function experience(dict::T) where {T<:AbstractDict}
return s
end
""" Get the latest step number of short term memory
Arguments:
dict = a dictionary contain past experience
Return:
latest step number
# Example
```jldoctest
julia> dict = OrderedDict(
"Plan 1:" => "1. Ask about the type of food that will be served at the wedding party.")
julia>shortMemLatestStep(dict)
1
"""
function shortMemLatestStep(dict::T) where {T<:AbstractDict}
_latest_step = keys(dict)
_latest_step = [i for i in _latest_step]