update
This commit is contained in:
@@ -322,6 +322,16 @@ function actor_mistral_openorca(a::agentReflex, taskrecap="")
|
||||
aware = "Aware: check recap against the plan about current situation"
|
||||
end
|
||||
|
||||
winestockResult = ""
|
||||
if a.winestockResult != ""
|
||||
winestockResult =
|
||||
"""
|
||||
<winestock search result>
|
||||
$(a.winestockResult)
|
||||
</winestock search result>
|
||||
"""
|
||||
end
|
||||
|
||||
prompt =
|
||||
"""
|
||||
<|system|>
|
||||
@@ -335,6 +345,7 @@ function actor_mistral_openorca(a::agentReflex, taskrecap="")
|
||||
<Your earlier work's recap>
|
||||
$taskrecap
|
||||
</Your earlier work's recap>
|
||||
$winestockResult
|
||||
<Your job>
|
||||
Use the following format:
|
||||
$aware
|
||||
@@ -488,6 +499,8 @@ function conversation(a::agentReflex, usermsg::String; attemptlimit::Int=3)
|
||||
#TODO paraphrase msg so that it is human friendlier word.
|
||||
else
|
||||
response = chat_mistral_openorca(a)
|
||||
response = split(response, "\n\n")[1]
|
||||
@show response
|
||||
end
|
||||
|
||||
response = removeTrailingCharacters(response)
|
||||
@@ -661,9 +674,14 @@ function actor(a::agentReflex)
|
||||
f = a.tools[toolname][:func]
|
||||
toolresult = f(a, toolinput)
|
||||
@show toolresult
|
||||
|
||||
a.memory[:shortterm]["Obs $latestTask:"] = toolresult
|
||||
a.memory[:log]["Obs $latestTask:"] = toolresult
|
||||
# if toolname == "winestock"
|
||||
# a.winestockResult = toolresult
|
||||
# a.memory[:shortterm]["Obs $latestTask:"] = "winestock search done"
|
||||
# a.memory[:log]["Obs $latestTask:"] = "winestock search done"
|
||||
# else
|
||||
# a.memory[:shortterm]["Obs $latestTask:"] = toolresult
|
||||
# a.memory[:log]["Obs $latestTask:"] = toolresult
|
||||
# end
|
||||
end
|
||||
|
||||
|
||||
|
||||
@@ -103,6 +103,9 @@ julia> agent = ChatAgent.agentReflex(
|
||||
:longterm=> OrderedDict{String, Any}(),
|
||||
:log=> OrderedDict{String, Any}(), # span from user stimulus -> multiples attempts -> final respond
|
||||
)
|
||||
|
||||
# LLM function related
|
||||
winestockResult = ""
|
||||
end
|
||||
|
||||
function agentReflex(
|
||||
|
||||
Reference in New Issue
Block a user