diff --git a/src/interface.jl b/src/interface.jl index da6a13c..56bef54 100755 --- a/src/interface.jl +++ b/src/interface.jl @@ -903,7 +903,7 @@ function actor_mistral_openorca(a::agentReflex, selfaware=nothing) keywordmemory = "" for (k, v) in a.memory[:keyword] if v === nothing - keywordmemory *= "- I have no info on $k yet.\n" + keywordmemory *= "- I didn't know about the user preferred $k yet.\n" else keywordmemory *= "- The user preferred $k is $v \n" end @@ -917,7 +917,9 @@ function actor_mistral_openorca(a::agentReflex, selfaware=nothing) - No info on the financing method yet - Luxury level is high {\"car type\": "SUV",\"brand\":\"Lexus\",\"price\":\"200000\",\"color\": null,\"financing method\": null, \"luxury level\":\"high\"} + Thought: Based on the recall, you must address what you don't know first if you have one. Otherwise, you must think about what is the immediate next step to do according to the plan """ + #WORKING actor donot call final reapond after found matched wines because the current prompt # does not contain a.memory[:shortterm] and Thought: do not look for mached wine. Therefore, LLM # did not see matched wine info @@ -934,8 +936,8 @@ function actor_mistral_openorca(a::agentReflex, selfaware=nothing) Use the following format: - Recall: you must explicitly state each info you did't know about the user - Thought: Based on the recall, you must think about what is the immediate next step to do according to the plan and you must address what you didn't know urgently if you have one (PS. 1. pay attention to correct numeral calculation and commonsense.) + Recall: repeat each of the user info, if you didn't know say, which info I didn't know + Thought: based on the recall, you must address what you don't know first if you have one. Otherwise, you must think about what is the immediate next step to do according to the plan (PS. 1. pay attention to correct numeral calculation and commonsense.) Act: based on your thought what action to choose?, must be one of [{toolnames}]. Actinput: your input to the action using JSON format (pay attention to the tool's input) Obs: observed result of the action @@ -1067,16 +1069,14 @@ function actor_mistral_openorca(a::agentReflex, selfaware=nothing) # check whether the act has valid json check_7 = true - if occursin('{', response) - try - act = GeneralUtils.getStringBetweenCharacters(response, '{', '}', endCharLocation="end") - println("") - @show act - act = JSON3.read(act) - check_7 = true - catch - check_7 = false - end + try + act = GeneralUtils.getStringBetweenCharacters(response, '{', '}', endCharLocation="end") + println("") + @show act + act = JSON3.read(act) + check_7 = true + catch + check_7 = false end if check_1 && check_2 && check_3 && check_4 && check_5 && check_6 && check_7