update
This commit is contained in:
@@ -205,7 +205,7 @@ function decisionMaker(a::T; recent::Integer=5)::Dict{Symbol,Any} where {T<:agen
|
|||||||
- Encourage the customer to explore different options and try new things.
|
- Encourage the customer to explore different options and try new things.
|
||||||
- Sometimes, the item a user desires might not be available in your inventory. In such cases, inform the user that the item is unavailable and suggest an alternative instead.
|
- Sometimes, the item a user desires might not be available in your inventory. In such cases, inform the user that the item is unavailable and suggest an alternative instead.
|
||||||
- If a customer requests information about discounts, quantity, rewards programs, promotions, delivery options, boxes, gift wrapping, packaging, or personalized messages, please inform them that they can contact our sales team at the store.
|
- If a customer requests information about discounts, quantity, rewards programs, promotions, delivery options, boxes, gift wrapping, packaging, or personalized messages, please inform them that they can contact our sales team at the store.
|
||||||
- Only recommend
|
- Do not discuss other stores with the user except for your own.
|
||||||
|
|
||||||
For your information:
|
For your information:
|
||||||
- vintage 0 means non-vintage.
|
- vintage 0 means non-vintage.
|
||||||
@@ -873,7 +873,7 @@ function think(a::T)::NamedTuple{(:actionname, :result),Tuple{String,String}} wh
|
|||||||
elseif actionname == "CHECKINVENTORY"
|
elseif actionname == "CHECKINVENTORY"
|
||||||
if rawresponse !== nothing
|
if rawresponse !== nothing
|
||||||
vd = GeneralUtils.dfToVectorDict(rawresponse)
|
vd = GeneralUtils.dfToVectorDict(rawresponse)
|
||||||
if length(a.memory[:shortmem][:available_wine]) == 0
|
if length(a.memory[:shortmem][:available_wine]) != 0
|
||||||
a.memory[:shortmem][:available_wine] = vcat(a.memory[:shortmem][:available_wine], vd)
|
a.memory[:shortmem][:available_wine] = vcat(a.memory[:shortmem][:available_wine], vd)
|
||||||
else
|
else
|
||||||
a.memory[:shortmem][:available_wine] = vd
|
a.memory[:shortmem][:available_wine] = vd
|
||||||
@@ -933,9 +933,10 @@ function generatechat(a::sommelier, thoughtDict)
|
|||||||
1) Given the situation, convey your thoughts to the user.
|
1) Given the situation, convey your thoughts to the user.
|
||||||
|
|
||||||
Your responsibility excludes:
|
Your responsibility excludes:
|
||||||
1) Asking or guiding the user to make a purchase
|
1) Asking or guiding the user to make an order or purchase
|
||||||
2) Processing sales orders or engaging in any other sales-related activities
|
2) Processing sales orders or engaging in any other sales-related activities
|
||||||
3) Answering questions and offering additional services beyond just recommendations, such as delivery, box, gift wrapping, personalized messages. Customers can reach out to our sales at the store.
|
3) Answering questions beyond just recommendations.
|
||||||
|
4) Offering additional services beyond just recommendations.
|
||||||
|
|
||||||
At each round of conversation, you will be given the current situation:
|
At each round of conversation, you will be given the current situation:
|
||||||
Your ongoing conversation with the user: ...
|
Your ongoing conversation with the user: ...
|
||||||
@@ -950,6 +951,7 @@ function generatechat(a::sommelier, thoughtDict)
|
|||||||
- If the user interrupts, prioritize the user
|
- If the user interrupts, prioritize the user
|
||||||
- Be honest
|
- Be honest
|
||||||
- Medium and full-bodied red wines should not be paired with spicy foods.
|
- Medium and full-bodied red wines should not be paired with spicy foods.
|
||||||
|
- Do not discuss other stores with the user except for your own.
|
||||||
|
|
||||||
You should then respond to the user with:
|
You should then respond to the user with:
|
||||||
1) Chat: Given the situation, How would you respond to the user to express your thoughts honestly and keep the conversation going smoothly?
|
1) Chat: Given the situation, How would you respond to the user to express your thoughts honestly and keep the conversation going smoothly?
|
||||||
@@ -1054,8 +1056,8 @@ function generatechat(a::sommelier, thoughtDict)
|
|||||||
# then the agent is not supposed to recommend the wine
|
# then the agent is not supposed to recommend the wine
|
||||||
if isWineInEvent == false
|
if isWineInEvent == false
|
||||||
|
|
||||||
errornote = "Previously: You recommend a wine that is not in your inventory which is not allowed."
|
errornote = "Previously, You recommend wines that is not in your inventory which is not allowed."
|
||||||
error("Previously: You recommend a wine that is not in your inventory which is not allowed.")
|
error("Previously, You recommend wines that is not in your inventory which is not allowed.")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -1225,6 +1227,13 @@ function generatequestion(a, text2textInstructLLM::Function; recent=nothing)::St
|
|||||||
Let's begin!
|
Let's begin!
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
context =
|
||||||
|
if length(a.memory[:shortmem][:available_wine]) != 0
|
||||||
|
"Wines previously found in your inventory: $(availableWineToText(a.memory[:shortmem][:available_wine]))"
|
||||||
|
else
|
||||||
|
"N/A"
|
||||||
|
end
|
||||||
|
|
||||||
totalevents = length(a.memory[:events])
|
totalevents = length(a.memory[:events])
|
||||||
ind =
|
ind =
|
||||||
if totalevents > recent
|
if totalevents > recent
|
||||||
@@ -1247,7 +1256,7 @@ function generatequestion(a, text2textInstructLLM::Function; recent=nothing)::St
|
|||||||
|
|
||||||
recap =
|
recap =
|
||||||
if length(a.memory[:recap]) <= recent
|
if length(a.memory[:recap]) <= recent
|
||||||
"None"
|
"N/A"
|
||||||
else
|
else
|
||||||
recapkeys = keys(a.memory[:recap])
|
recapkeys = keys(a.memory[:recap])
|
||||||
recapkeys_vec = [i for i in recapkeys]
|
recapkeys_vec = [i for i in recapkeys]
|
||||||
@@ -1267,6 +1276,7 @@ function generatequestion(a, text2textInstructLLM::Function; recent=nothing)::St
|
|||||||
"""
|
"""
|
||||||
Recap: $recap)
|
Recap: $recap)
|
||||||
Your recent events: $timeline
|
Your recent events: $timeline
|
||||||
|
Context: $context
|
||||||
$errornote
|
$errornote
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user