This commit is contained in:
2025-01-30 21:28:49 +07:00
parent c56c3d02b0
commit 724b092bdb
2 changed files with 106 additions and 156 deletions
+18 -8
View File
@@ -183,7 +183,7 @@ function decisionMaker(a::T; recent::Integer=5)::Dict{Symbol,Any} where {T<:agen
2) Thanks the user when they don't need any further assistance and invite them to comeback next time
Your responsibility does NOT includes:
1) Asking the user to place an order or make a purchase. These are the job of our sales team at the store.
1) Requesting the user to place an order, make a purchase, or confirm the order. These are the job of our sales team at the store.
2) Processing sales orders or engaging in any other sales-related activities. These are the job of our sales team at the store.
3) Answering questions or offering additional services beyond those related to your store's wine recommendations such as discounts, quantity, rewards programs, promotions, delivery options, shipping, boxes, gift wrapping, packaging, personalized messages or something similar. These are the job of our sales team at the store.
@@ -968,9 +968,9 @@ function generatechat(a::sommelier, thoughtDict)
1) Given the situation, convey your thoughts to the user.
Your responsibility does NOT includes:
1) Asking the user to place an order or make a purchase. These are the job of our sales team at the store.
2) Processing sales orders or engaging in any other sales-related activities. These are the job of our sales team at the store.
3) Answering questions or offering additional services beyond those related to your store's wine recommendations such as discounts, quantity, rewards programs, promotions, delivery options, shipping, boxes, gift wrapping, packaging, personalized messages or something similar. These are the job of our sales team at the store.
1) Requesting the user to place an order, make a purchase, or confirm the order. These are the job of our sales team at the store.
2) Processing sales orders or engaging in any other sales-related activities. These are the job of our sales team at the store.
3) Answering questions or offering additional services beyond those related to your store's wine recommendations such as discounts, quantity, rewards programs, promotions, delivery options, shipping, boxes, gift wrapping, packaging, personalized messages or something similar. These are the job of our sales team at the store.
At each round of conversation, you will be given the current situation:
Your ongoing conversation with the user: ...
@@ -1011,11 +1011,21 @@ function generatechat(a::sommelier, thoughtDict)
errornote = ""
response = nothing # placeholder for show when error msg show up
yourthought = "$(thoughtDict[:understanding]) $(thoughtDict[:reasoning]) $(thoughtDict[:plan])"
yourthought1 = nothing
for attempt in 1:10
if attempt > 1 # use to prevent LLM generate the same respond over and over
yourthought1 = paraphrase(a.func[:text2textInstructLLM], yourthought)
else
yourthought1 = yourthought
end
usermsg = """
Your ongoing conversation with the user: $chathistory
Contex: $context
Your thoughts: $(thoughtDict[:understanding]) $(thoughtDict[:reasoning]) $(thoughtDict[:plan])
Your thoughts: $yourthought1
$errornote
"""
@@ -1177,9 +1187,9 @@ function generatequestion(a, text2textInstructLLM::Function; recent=nothing)::St
1) Ask yourself what to do about the current situation
Your responsibility does NOT includes:
1) Asking the user to place an order or make a purchase. These are the job of our sales team at the store.
2) Processing sales orders or engaging in any other sales-related activities. These are the job of our sales team at the store.
3) Answering questions or offering additional services beyond those related to your store's wine recommendations such as discounts, quantity, rewards programs, promotions, delivery options, shipping, boxes, gift wrapping, packaging, personalized messages or something similar. These are the job of our sales team at the store.
1) Requesting the user to place an order, make a purchase, or confirm the order. These are the job of our sales team at the store.
2) Processing sales orders or engaging in any other sales-related activities. These are the job of our sales team at the store.
3) Answering questions or offering additional services beyond those related to your store's wine recommendations such as discounts, quantity, rewards programs, promotions, delivery options, shipping, boxes, gift wrapping, packaging, personalized messages or something similar. These are the job of our sales team at the store.
At each round of conversation, you will be given the current situation:
Recap: recap of what has happened so far