update
This commit is contained in:
+6
-1
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user