update
This commit is contained in:
@@ -454,15 +454,17 @@ function selfAwareness(a::agentReflex)
|
||||
The user wants to buy an electric SUV car under 20000 dollars.
|
||||
</Your earlier work>
|
||||
<Your keyword memory>
|
||||
{\"car type\": null, \"color\": null, \"financing\": null}
|
||||
{\"car type\": null, \"engine type\": null, \"price\": null, \"color\": null, \"financing\": null}
|
||||
</Your keyword memory>
|
||||
<|assistant|>
|
||||
Info extraction:
|
||||
- The user is buying an electric SUV car.
|
||||
- price is under 20000 dollars
|
||||
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}
|
||||
- "SUV" could matches "car type" key
|
||||
- "electric" could matches "engine type" key
|
||||
- "under 20000 dollars" could match "price" key
|
||||
Info matching: {\"car type\": \"SUV\", \"engine type\": \"electric motor\", \"price\": \"under 20000\", \"color\": null, \"financing\": null}
|
||||
</|assistant|>
|
||||
</Example>
|
||||
</s>
|
||||
@@ -473,7 +475,7 @@ function selfAwareness(a::agentReflex)
|
||||
$(JSON3.write(a.memory[:keyword]))
|
||||
</Your keyword memory>
|
||||
<|assistant|>
|
||||
Info extraction:
|
||||
Info extraction:
|
||||
"""
|
||||
response = sendReceivePrompt(a, prompt, max_tokens=1024, temperature=0.2, timeout=180,
|
||||
stopword=["/n/n", "END", "End", "Obs", "<|", "</"])
|
||||
@@ -806,6 +808,15 @@ function actor_mistral_openorca(a::agentReflex, selfaware=nothing)
|
||||
winestocksearchresult = "\n"
|
||||
end
|
||||
|
||||
keywordmemory = ""
|
||||
for (k, v) in a.memory[:keyword]
|
||||
if v === nothing
|
||||
keywordmemory *= "- I have no info on $k \n"
|
||||
else
|
||||
keywordmemory *= "- $k is $v \n"
|
||||
end
|
||||
end
|
||||
|
||||
# prompt =
|
||||
# """
|
||||
# <|system|>
|
||||
@@ -848,7 +859,7 @@ function actor_mistral_openorca(a::agentReflex, selfaware=nothing)
|
||||
- No info on the car color yet
|
||||
- No info on the financing method yet
|
||||
- Luxury level is high
|
||||
{\"car type\": "SUV",\"brand\":\"Lexus\",\"price\":\"20k dollar\",\"color\": null,\"financing method\": null, \"luxury level\":\"high\"}
|
||||
{\"car type\": "SUV",\"brand\":\"Lexus\",\"price\":\"200000\",\"color\": null,\"financing method\": null, \"luxury level\":\"high\"}
|
||||
"""
|
||||
|
||||
prompt =
|
||||
@@ -864,9 +875,9 @@ function actor_mistral_openorca(a::agentReflex, selfaware=nothing)
|
||||
</You have access to the following tools>
|
||||
<Your job>
|
||||
Use the following format:
|
||||
Thought: considering what you know about the user thoroughly then you should think about what to do next according to your plan while prioritize what you don't know (null means don't know) first. (PS. 1. let's think a single step. 2. pay attention to correct numeral calculation and commonsense.)
|
||||
Thought: considering what you know about the user thoroughly then you should think about what to do next according to your plan while prioritize what you don't know (null means don't know) first. (PS. 1. let's think only one thing at a time. 2. 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 (pay attention to the tool's input)
|
||||
Actinput: your input to the action using JSON format (pay attention to the tool's input)
|
||||
Obs: observed result of the action
|
||||
</Your job>
|
||||
</|system|>
|
||||
@@ -893,7 +904,7 @@ function actor_mistral_openorca(a::agentReflex, selfaware=nothing)
|
||||
$(a.memory[:shortterm]["Plan 1:"])
|
||||
</My plan>
|
||||
<What I know about the user>
|
||||
$(readKeywordMemory(a))
|
||||
$keywordmemory)
|
||||
</What I know about the user>
|
||||
<|assistant|>
|
||||
Thought:
|
||||
|
||||
Reference in New Issue
Block a user