This commit is contained in:
2026-07-12 10:54:15 +07:00
parent 3c72373b85
commit fdec34832d
2 changed files with 10 additions and 125 deletions
+6 -1
View File
@@ -139,6 +139,11 @@ function decisionMaker(a::T; recentevents::Integer=20, maxattempt=10
think, response = GeneralUtils.extractthink(response)
response = String(split(response, ", observation")[1]) # in case LLM generate observation key which it isn't supposed to
response = strip(response)
# dollar sign in Julia means string interpolation
while occursin('$', response)
response = replace(response, '$' => "USD")
end
responsedict = nothing
if occursin(requiredKeys[2], response)
@@ -467,8 +472,8 @@ function think(a::T)::NamedTuple{(:thoughtdict, :result_raw), Tuple{OrderedDict,
# end
# a.memory["shortmem"]["$(max_ind + 1)"] = thoughtdict
@info "YiemAgent think() 7 " @__LINE__
pprintln(thoughtdict)
@info "YiemAgent think() 7 " @__LINE__
return (thoughtdict=thoughtdict, result_raw=result_raw)
end