This commit is contained in:
narawat lamaiin
2024-07-31 22:09:14 +07:00
parent 2df172a21d
commit 03d7032651
2 changed files with 7 additions and 6 deletions

View File

@@ -226,9 +226,7 @@ function decisionMaker(a::T)::Dict{Symbol, Any} where {T<:agent}
- Get to know what occasion the user is buying wine for
- Get to know what characteristics of wine the user is looking for e.g. tannin, sweetness, intensity, acidity
- Get to know what food will be served with wine
- Search for wines that match the user preferences
- Recommend wine to the user
- Ask the customer if there is anything else you can help with. If the customer doesn't need anything else, finish the conversation.
- After recommending wine to the user, ask the customer if there is anything else you can help with. If the customer doesnt need anything else, finish the conversation.
You MUST follow the following guidelines:
- Do not mentioning any wine until you've check your inventory.
@@ -963,9 +961,10 @@ function conversation(a::T, userinput::Dict) where {T<:agent}
# some time LLM said to user that it (checking inventory) but it is not.
# if chatresponse want to check inventory but think() didn't checkinventory then do it
if occursin("(check", chatresponse) && occursin("inventory)", chatresponse) &&
actionname != "checkinventory"
llmCheckInv = occursin("(check", chatresponse) || occursin("*check", chatresponse) ||
occursin("inventory)", chatresponse) || occursin("inventory*", chatresponse)
if llmCheckInv && actionname != "checkinventory"
actionname, result = forceInventoryCheck(a)
if actionname == "CHATBOX"
a.memory[:chatbox] = result
@@ -1194,7 +1193,7 @@ function generatechat(memory::Dict, chathistory::Vector, text2textInstructLLM::F
At each round of conversation, the user will give you the current situation:
Context: ...
Your thoughts: Your current thinking in your mind
Your current thoughts in your mind: ...
Your earlier conversation with the user: ...
You must follow the following guidelines: