update
This commit is contained in:
@@ -214,12 +214,24 @@ function planner_mistral_openorca(a::agentReflex)
|
||||
Plan: first you should always think about your conversation with the user and your earlier work thoroughly then extract and devise a complete, task by task, plan to achieve your objective (pay attention to correct numeral calculation and commonsense).
|
||||
P.S.1 each task of the plan should be a single action.
|
||||
</Your job>
|
||||
<Example>
|
||||
1. Ask the user about the occasion for which they are choosing a wine
|
||||
2. Ask the user about the type of food that will be served with the wine
|
||||
3. Ask about preferred type of wine (Rose, White, Red, Rose or Sparkling) - If the user don't know, suggest a type of wine based on the user's earlier answers
|
||||
4. Ask the user about their preferred sweetness level (dry to very sweet)
|
||||
5. Ask the user about their preferred intensity level (light to full bodied)
|
||||
6. Ask the user about their preferred tannin level (low to high)
|
||||
7. Ask the user about their preferred acidity level (low to high)
|
||||
8. Ask the user about their wine price range
|
||||
9. Use winestock tool to find wines that match the user's preferences and are within their price range
|
||||
10. Use finalanswer tool to present the recommended wines to the user.
|
||||
</Example
|
||||
</s>
|
||||
$conversation
|
||||
<|assistant|>
|
||||
Plan:
|
||||
"""
|
||||
|
||||
# WORKING provide ecmaple that show good planning
|
||||
plan = sendReceivePrompt(a, assistant_plan_prompt, max_tokens=1024, temperature=0.1,
|
||||
timeout=180, stopword=["<|user|>", "</"])
|
||||
plan = split(plan, "<|")[1]
|
||||
@@ -372,7 +384,7 @@ function selfAwareness(a::agentReflex)
|
||||
<Your job>
|
||||
Use the following format strictly:
|
||||
What do I know: based on observed results, repeat all the information you got.
|
||||
Info match: explicitly state what information matches what variable in my plan.
|
||||
Info match: explicitly state what information matches which variable anme in my plan.
|
||||
What am I missing: based on observed results, describe in detail what you are still missing based on the plan.
|
||||
P.S. do not mention any toolnames
|
||||
</Your job>
|
||||
@@ -452,7 +464,7 @@ function actor_mistral_openorca(a::agentReflex, selfaware=nothing)
|
||||
# aware = "Self-awareness: Based on action's input and observed results, check your progress against the plan. Then, repeat all the details of what you have been gathered. Finally, describe in detail what you are missing."
|
||||
thought =
|
||||
"Self-awareness: $selfaware
|
||||
Thought: based on self-awareness, think about what to do next but focus on what you missed first. (P.S. 1) let's think a single step. 2) pay attention to correct numeral calculation and commonsense.)
|
||||
Thought: based on self-awareness, think about what to do next by prioritize what you missed first. (P.S. 1) let's think a single step. 2) pay attention to correct numeral calculation and commonsense.)
|
||||
"
|
||||
end
|
||||
|
||||
@@ -582,7 +594,7 @@ function actor_mistral_openorca(a::agentReflex, selfaware=nothing)
|
||||
end
|
||||
|
||||
|
||||
#check whether the act has valid json
|
||||
# check whether the act has valid json
|
||||
check_7 = true
|
||||
if occursin('{', response)
|
||||
try
|
||||
@@ -602,7 +614,7 @@ function actor_mistral_openorca(a::agentReflex, selfaware=nothing)
|
||||
#TODO paraphrase selfaware
|
||||
break
|
||||
end
|
||||
@show response
|
||||
@show retrying_actor = response
|
||||
end
|
||||
|
||||
toolname = toolNameBeingCalled(chunkedtext["Act $latestTask:"], a.tools)
|
||||
|
||||
Reference in New Issue
Block a user