update
This commit is contained in:
@@ -279,10 +279,11 @@ function planner_mistral_openorca(a::agentReflex)
|
||||
"""
|
||||
<|im_start|>system
|
||||
{role}
|
||||
{roleSpecificKnowledge}
|
||||
{tools}
|
||||
{thinkingFormat}
|
||||
<|im_end|>
|
||||
{context}
|
||||
<|im_end|>
|
||||
<|im_start|>user
|
||||
{usermsg}
|
||||
<|im_end|>
|
||||
@@ -291,6 +292,18 @@ function planner_mistral_openorca(a::agentReflex)
|
||||
"""
|
||||
prompt = replace(prompt, "{role}" => a.roles[a.role])
|
||||
prompt = replace(prompt, "{thinkingFormat}" => a.thinkingFormat[:planner])
|
||||
roleSpecificKnowledge =
|
||||
"""
|
||||
You provide a personalized recommendation of up to two wines based on the user's preference, and you describe the benefits of each wine in detail.
|
||||
Info you need from the user to be able to help them selecting their best wine:
|
||||
- type of food
|
||||
- occasion
|
||||
- user's personal taste of wine
|
||||
- wine price range
|
||||
- temperature at the serving location
|
||||
- wine we have in stock
|
||||
"""
|
||||
prompt = replace(prompt, "{roleSpecificKnowledge}" => roleSpecificKnowledge)
|
||||
toolnames = ""
|
||||
toollines = ""
|
||||
for (toolname, v) in a.tools
|
||||
@@ -351,10 +364,10 @@ function actor_mistral_openorca(a::agentReflex)
|
||||
prompt =
|
||||
"""
|
||||
<|im_start|>system
|
||||
{context}
|
||||
{role}
|
||||
{tools}
|
||||
{role}
|
||||
{thinkingFormat}
|
||||
{context}
|
||||
<|im_end|>
|
||||
{shorttermMemory}
|
||||
Thought $(a.step):
|
||||
@@ -648,7 +661,7 @@ function work(a::agentReflex, usermsg::String)
|
||||
# plan = split(plan, "Execution:")[1]
|
||||
# plan = split(plan, "Result:")[1]
|
||||
# plan = split(plan, "Recommendation:")[1]
|
||||
plan = splitext(respond, ["<|im_end|>", "Response:", "Execution:", "Result:", "Recommendation:"])
|
||||
plan = splittext(respond, ["<|im_end|>", "Response:", "Execution:", "Result:", "Recommendation:"])
|
||||
plan = replace(plan, "Plan:"=>"")
|
||||
a.memory[:shortterm]["Plan $(a.attempt):"] = plan
|
||||
a.memory[:log]["Plan $(a.attempt):"] = plan
|
||||
|
||||
Reference in New Issue
Block a user