This commit is contained in:
narawat lamaiin
2024-07-19 20:18:27 +07:00
parent 102882d988
commit 197b1c3288
3 changed files with 9 additions and 8 deletions

View File

@@ -235,7 +235,7 @@ function decisionMaker(a::T)::Dict{Symbol, Any} where {T<:agent}
You should then respond to the user with interleaving Thought, Plan, Action and Observation:
- thought:
1) State your reasoning about the current situation.
- plan: Based on the current situation, what would you do to complete the task? Be specific.
- plan: Based on the current situation, state a complete plan to complete the task. Be specific.
- action (Must be aligned with your plan): Can be one of the following functions:
1) CHATBOX[text], which you can use to talk with the user. "text" is in verbal English.
2) WINESTOCK[query], which you can use to find info about wine in your inventory. "query" is a search term in verbal English. The best query must includes "budget", "type of wine", "characteristics of wine" and "food pairing".

View File

@@ -437,7 +437,7 @@ function extractWineAttributes(a::T1, input::T2
You should then respond to the user with the following points:
- wine_type: Can be one of: red, white, sparkling, rose, dessert or fortified
- budget: ...
- price: ...
- occasion: ...
- food_pairing: food that will be served with wine
- country: wine's country of origin
@@ -451,7 +451,7 @@ function extractWineAttributes(a::T1, input::T2
You should only respond in format as described below:
repeat: repeat the user's query
wine_type: ...
budget: ...
price: ...
occasion: ...
food_pairing: ...
country: ...
@@ -465,10 +465,10 @@ function extractWineAttributes(a::T1, input::T2
Here are some examples:
user: "price < 25, for wedding party, full-bodied white wine with sweetness level 2, apple and honey notes, low tannin level and medium acidity level, Pizza, France, Riesling"
assistant: repeat: ... \n wine_type: white\n budget: less than 25\n occasion: wedding party\n food_pairing: Pizza\n country: France\n grape_variety: Riesling\n tasting_notes: apple, honey\n sweetness: 2\n acidity: 3\n tannin: 1\n intensity: 5
assistant: repeat: ... \n wine_type: white\n price: less than 25\n occasion: wedding party\n food_pairing: Pizza\n country: France\n grape_variety: Riesling\n tasting_notes: apple, honey\n sweetness: 2\n acidity: 3\n tannin: 1\n intensity: 5
user: body=full-bodied, dry, acidity=medium and low tannin
assistant: repeat: ... \n wine_type: NA\n budget: NA\n occasion: NA\n food_pairing: NA\n country: NA\n grape_variety: NA\n tasting_notes: NA\n sweetness: 1\n acidity: 3\n tannin: 1\n intensity: 5
assistant: repeat: ... \n wine_type: NA\n price: NA\n occasion: NA\n food_pairing: NA\n country: NA\n grape_variety: NA\n tasting_notes: NA\n sweetness: 1\n acidity: 3\n tannin: 1\n intensity: 5
Let's begin!
"""
@@ -492,7 +492,7 @@ function extractWineAttributes(a::T1, input::T2
<|start_header_id|>assistant<|end_header_id|>
"""
attributes = ["repeat", "wine_type", "budget", "occasion", "food_pairing", "country", "grape_variety", "sweetness", "acidity", "tannin", "intensity"]
attributes = ["repeat", "wine_type", "price", "occasion", "food_pairing", "country", "grape_variety", "sweetness", "acidity", "tannin", "intensity"]
for attempt in 1:5
try
@@ -515,7 +515,7 @@ function extractWineAttributes(a::T1, input::T2
result = ""
for (k, v) in responsedict
if k != :repeat && v != "NA"
if k != :repeat && !occursin("NA", v)
result *= "$k: $v, "
end
end