update
This commit is contained in:
10
src/utils.jl
10
src/utils.jl
@@ -1,10 +1,10 @@
|
||||
module utils
|
||||
|
||||
export makeSummary, sendReceivePrompt, chunktext, extractStepFromPlan, checkTotalStepInPlan,
|
||||
export makeSummary, sendReceivePrompt, chunktext, extractStepFromPlan, checkTotalTaskInPlan,
|
||||
detectCharacters, findDetectedCharacter, extract_number, toolNameBeingCalled,
|
||||
isUsePlans, conversationSummary, checkReasonableness, replaceHeaders,
|
||||
addShortMem!, splittext, dictToString, removeHeaders, keepOnlyKeys, experience,
|
||||
messagesToString, messagesToString_nomark, removeTrailingCharacters, shortMemLatestStep
|
||||
messagesToString, messagesToString_nomark, removeTrailingCharacters, shortMemLatestTask
|
||||
|
||||
using UUIDs, Dates, DataStructures
|
||||
using CommUtils, GeneralUtils
|
||||
@@ -210,7 +210,7 @@ function extractStepFromPlan(a::agent, plan::T, step::Int) where {T<:AbstractStr
|
||||
return response
|
||||
end
|
||||
|
||||
function checkTotalStepInPlan(a::agent)
|
||||
function checkTotalTaskInPlan(a::agent)
|
||||
headers = []
|
||||
|
||||
for (k, v) in a.memory[:shortterm]
|
||||
@@ -1027,10 +1027,10 @@ Return:
|
||||
```jldoctest
|
||||
julia> dict = OrderedDict(
|
||||
"Plan 1:" => "1. Ask about the type of food that will be served at the wedding party.")
|
||||
julia>shortMemLatestStep(dict)
|
||||
julia>shortMemLatestTask(dict)
|
||||
1
|
||||
"""
|
||||
function shortMemLatestStep(dict::T) where {T<:AbstractDict}
|
||||
function shortMemLatestTask(dict::T) where {T<:AbstractDict}
|
||||
_latest_step = keys(dict)
|
||||
_latest_step = [i for i in _latest_step]
|
||||
_latest_step = _latest_step[end]
|
||||
|
||||
Reference in New Issue
Block a user