diff --git a/src/interface.jl b/src/interface.jl index 92b0e57..7a57a6f 100755 --- a/src/interface.jl +++ b/src/interface.jl @@ -214,27 +214,44 @@ 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). + Keyword memory: using JSON format, list all variables in the plan you need to find out P.S.1 each task of the plan should be a single action. + Plan: 1. Ask the user about how many miles per day they drive 2. Ask the user about what stuff they usually carry with 3. Ask the user about preferred type of car they want to buy (sedan, sport, SUV, etc) 8. Ask the user about their price range 9. Use inventory tool to find cars that match the user's preferences and are within their price range 10. Use finalanswer tool to present the recommended car to the user. + Keyword memory: {"mile per day": null, "carry item": null, "car type": null, "price range": null} $conversation <|assistant|> - Plan: + """ -# provide ecmaple that show good planning - plan = sendReceivePrompt(a, assistant_plan_prompt, max_tokens=1024, temperature=0.1, + + response = sendReceivePrompt(a, assistant_plan_prompt, max_tokens=1024, temperature=0.1, timeout=180, stopword=["<|user|>", " $work - - - $(a.memory[:shortterm]["Plan 1:"]) - + + $(JSON3.write(a.memory[:keyword])) + Use the following format strictly: - What I know: based on observed results, breakdown then repeat all information you got one by one - Info matching: using JSON format, explicitly state what information matches which variable name in my plan - What am I missing: based on Info matching, describe in detail what you are still missing based on the plan - P.S. do not mention any toolnames + Info extraction: repeat all keywords from the latest observed result thoroughly + Info mapping: based on extracted info, explicitly state what each keyword could match which keyword memory's key + Info matching: using JSON format, what key in my memory matches which info - What do I know: - - The user is buying an electric SUV car. + + The user wants to buy an electric SUV car. + + + {"car type": null, "color": null, "financing": null} + + Info extraction: + - The user is buying an electric SUV car. + Info mapping: + - SUV could matches "car type" key + - electric could matches "engine type" key Info matching: {"car type": "SUV", "engine type": "electric motor", "color": null, "financing": null} - What am I missing: - - The user's preferred color - - The user's financing method <|assistant|> - What I know: + Info extraction: """ response = sendReceivePrompt(a, prompt, max_tokens=1024, temperature=0.2, timeout=180, stopword=["/n/n", "END", "End", "Obs", "<|", " - - $aboutYourself - $(a.roleSpecificInstruction[a.role]) - + # prompt = + # """ + # <|system|> + # + # $aboutYourself + # $(a.roleSpecificInstruction[a.role]) + # - - $(a.memory[:shortterm]["Plan 1:"]) - - - Use the following format strictly: - What am I missing: based on Info matching, describe in detail what you are still missing according to the plan - P.S. do not mention any toolnames - - - Info matching: {"car type": "SUV", "engine type": "electric motor", "color": null, "financing": null} - What am I missing: - - The user's preferred color - - The user's financing method - - - <|assistant|> - Info matching: $(JSON3.write(a.memory[:keyword])) - What am I missing: - """ - response = "What am I missing:" * sendReceivePrompt(a, prompt, max_tokens=1024, temperature=0.4, timeout=180, - stopword=["/n/n", "END", "End", "Obs", "<|", " + # $(a.memory[:shortterm]["Plan 1:"]) + # + # + # Use the following format strictly: + # What I know: what you know in JSON format + # What am I missing: based on what I know, list all items I am missing + # P.S. do not mention any toolnames + # + # + # What I know: {"car type": "SUV", "engine type": "electric motor", "color": null, "financing": null} + # What am I missing: + # - The user's preferred color + # - The user's financing method + # + # + # <|assistant|> + # What I know: $(JSON3.write(a.memory[:keyword])) + # """ + # response = sendReceivePrompt(a, prompt, max_tokens=1024, temperature=0.4, timeout=180, + # stopword=["/n/n", "END", "End", "Obs", "<|", "