update
This commit is contained in:
@@ -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:
|
You should then respond to the user with interleaving Thought, Plan, Action and Observation:
|
||||||
- thought:
|
- thought:
|
||||||
1) State your reasoning about the current situation.
|
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:
|
- 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.
|
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".
|
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".
|
||||||
|
|||||||
@@ -437,7 +437,7 @@ function extractWineAttributes(a::T1, input::T2
|
|||||||
|
|
||||||
You should then respond to the user with the following points:
|
You should then respond to the user with the following points:
|
||||||
- wine_type: Can be one of: red, white, sparkling, rose, dessert or fortified
|
- wine_type: Can be one of: red, white, sparkling, rose, dessert or fortified
|
||||||
- budget: ...
|
- price: ...
|
||||||
- occasion: ...
|
- occasion: ...
|
||||||
- food_pairing: food that will be served with wine
|
- food_pairing: food that will be served with wine
|
||||||
- country: wine's country of origin
|
- 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:
|
You should only respond in format as described below:
|
||||||
repeat: repeat the user's query
|
repeat: repeat the user's query
|
||||||
wine_type: ...
|
wine_type: ...
|
||||||
budget: ...
|
price: ...
|
||||||
occasion: ...
|
occasion: ...
|
||||||
food_pairing: ...
|
food_pairing: ...
|
||||||
country: ...
|
country: ...
|
||||||
@@ -465,10 +465,10 @@ function extractWineAttributes(a::T1, input::T2
|
|||||||
Here are some examples:
|
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"
|
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
|
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!
|
Let's begin!
|
||||||
"""
|
"""
|
||||||
@@ -492,7 +492,7 @@ function extractWineAttributes(a::T1, input::T2
|
|||||||
<|start_header_id|>assistant<|end_header_id|>
|
<|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
|
for attempt in 1:5
|
||||||
try
|
try
|
||||||
@@ -515,7 +515,7 @@ function extractWineAttributes(a::T1, input::T2
|
|||||||
|
|
||||||
result = ""
|
result = ""
|
||||||
for (k, v) in responsedict
|
for (k, v) in responsedict
|
||||||
if k != :repeat && v != "NA"
|
if k != :repeat && !occursin("NA", v)
|
||||||
result *= "$k: $v, "
|
result *= "$k: $v, "
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -94,7 +94,8 @@ end
|
|||||||
# main()
|
# main()
|
||||||
|
|
||||||
|
|
||||||
input = "query=\"off dry, medium tannin, French Rosé and spicy Thai food pairing under 30 dollars\""
|
input = "query=\"off dry, medium tannin, French Rosé\""
|
||||||
|
input = "wine_type: rose, country: France, sweetness: 2, tannin: 3"
|
||||||
YiemAgent.winestock(a, input)
|
YiemAgent.winestock(a, input)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user