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 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 characteristics of wine the user is looking for e.g. tannin, sweetness, intensity, acidity
- Get to know what food will be served with wine - Get to know what food will be served with wine
- Search for wines that match the user preferences - 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.
- 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.
You MUST follow the following guidelines: You MUST follow the following guidelines:
- Do not mentioning any wine until you've check your inventory. - 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. # 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 chatresponse want to check inventory but think() didn't checkinventory then do it
if occursin("(check", chatresponse) && occursin("inventory)", chatresponse) && llmCheckInv = occursin("(check", chatresponse) || occursin("*check", chatresponse) ||
actionname != "checkinventory" occursin("inventory)", chatresponse) || occursin("inventory*", chatresponse)
if llmCheckInv && actionname != "checkinventory"
actionname, result = forceInventoryCheck(a) actionname, result = forceInventoryCheck(a)
if actionname == "CHATBOX" if actionname == "CHATBOX"
a.memory[:chatbox] = result 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: At each round of conversation, the user will give you the current situation:
Context: ... Context: ...
Your thoughts: Your current thinking in your mind Your current thoughts in your mind: ...
Your earlier conversation with the user: ... Your earlier conversation with the user: ...
You must follow the following guidelines: You must follow the following guidelines:

View File

@@ -474,12 +474,14 @@ function extractWineAttributes_2(a::T1, input::T2
3) Do not generate other comments. 3) Do not generate other comments.
You should then respond to the user with the following points: You should then respond to the user with the following points:
- repeat: repeat the user query exactly
- sweetness: S where S are integers represent the range of sweetness levels e.g. 1-2 - sweetness: S where S are integers represent the range of sweetness levels e.g. 1-2
- acidity: D where D are integers represent the range of acidity level e.g. 3-4 - acidity: D where D are integers represent the range of acidity level e.g. 3-4
- tannin: T where T are integers represent the range of tannin level e.g. 4-5 - tannin: T where T are integers represent the range of tannin level e.g. 4-5
- intensity: I where I are integers represent the range of intensity level e.g. 3-4 - intensity: I where I are integers represent the range of intensity level e.g. 3-4
You should only respond in the form as described below: You should only respond in the form as described below:
repeat: ...
sweetness: ... sweetness: ...
acidity: ... acidity: ...
tannin: ... tannin: ...