update
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user