This commit is contained in:
Your Name
2024-02-11 14:25:37 +07:00
parent e38ae31d72
commit 1ee362f1e5
2 changed files with 25 additions and 21 deletions

View File

@@ -83,12 +83,11 @@ function clearMessage(a::T) where {T<:agent}
break
end
end
memory::Dict{Symbol, Any} = Dict(
:shortterm=> OrderedDict{String, Any}(),
:longterm=> OrderedDict{String, Any}(),
:log=> OrderedDict{String, Any}(), # span from user stimulus -> multiples attempts -> final respond
)
a.memory = newAgentMemory()
@show a.messages
@show a.memory
end
function removeLatestMsg(a::T) where {T<:agent}
@@ -350,7 +349,7 @@ function selfAwareness(a::agentReflex)
</About yourself>
<Your job>
Use the following format strictly:
Info extraction: from the latest observed result, breakdown all info into smaller one and repeat every important info thoroughly (PS. check <Required wine info> for more details)
Info extraction: from the latest observed result, breakdown each info into smaller one and repeat every one of them (PS. check <Required wine info> for more details)
Info mapping: based on extracted info, explicitly state what each info could match which keyword memory's key
Info matching: using JSON format, what key in my memory matches which info (Donot use nested JSON)
</Your job>
@@ -386,7 +385,7 @@ function selfAwareness(a::agentReflex)
<|assistant|>
Info extraction:
"""
response = sendReceivePrompt(a, prompt, max_tokens=1024, temperature=0.2, timeout=180,
response = sendReceivePrompt(a, prompt, max_tokens=1024, temperature=0.4, timeout=180,
stopword=["/n/n", "END", "End", "Obs", "<|", "</"])
response = split(response, "<|")[1]
response = split(response, "</")[1]