update
This commit is contained in:
+3
-7
@@ -287,11 +287,11 @@ function search_wine_database!(a::T, thoughtdict::AbstractDict; useSQLLLM::Bool=
|
|||||||
)::NamedTuple{(:thoughtdict, :result_raw), Tuple{OrderedDict, Any}} where {T<:agent}
|
)::NamedTuple{(:thoughtdict, :result_raw), Tuple{OrderedDict, Any}} where {T<:agent}
|
||||||
|
|
||||||
println("\ncheckinventory order: $(thoughtdict["action_input"]) ", @__FILE__, ":", @__LINE__, " $(Dates.now())")
|
println("\ncheckinventory order: $(thoughtdict["action_input"]) ", @__FILE__, ":", @__LINE__, " $(Dates.now())")
|
||||||
# wineattributes_1 = extractWineAttributes_1(a, thoughtdict["action_input"])
|
wineattributes_1 = extractWineAttributes_1(a, thoughtdict["action_input"])
|
||||||
wineattributes_2 = extractWineAttributes_2(a, thoughtdict["action_input"])
|
wineattributes_2 = extractWineAttributes_2(a, thoughtdict["action_input"])
|
||||||
|
|
||||||
retrieve_attributes = ["winery", "wine_name", "wine_id", "vintage", "region", "country", "wine_type", "grape", "serving_temperature", "sweetness", "intensity", "tannin", "acidity", "tasting_notes", "price", "currency", "image_url", "retailer_name", "retailer_id"]
|
retrieve_attributes = ["winery", "wine_name", "wine_id", "vintage", "region", "country", "wine_type", "grape", "serving_temperature", "sweetness", "intensity", "tannin", "acidity", "tasting_notes", "price", "currency", "image_url", "retailer_name", "retailer_id"]
|
||||||
_inventoryquery = "$(thoughtdict["action_input"]), $wineattributes_2, retailer_name: $(a.retailername), retailerid: $(a.retailerid)"
|
_inventoryquery = "$(thoughtdict["action_input"]), $wineattributes_1, $wineattributes_2, retailer_name: $(a.retailername), retailerid: $(a.retailerid)"
|
||||||
inventoryquery = "Retrieves $retrieve_attributes of wines that match the following criteria - {$_inventoryquery}"
|
inventoryquery = "Retrieves $retrieve_attributes of wines that match the following criteria - {$_inventoryquery}"
|
||||||
println("\ncheckinventory input: $inventoryquery ", @__FILE__, ":", @__LINE__, " $(Dates.now())")
|
println("\ncheckinventory input: $inventoryquery ", @__FILE__, ":", @__LINE__, " $(Dates.now())")
|
||||||
|
|
||||||
@@ -698,7 +698,6 @@ function extractWineAttributes_1(a::T1, input::T2; maxattempt=10
|
|||||||
wine_name: name of the wine
|
wine_name: name of the wine
|
||||||
winery: name of the winery
|
winery: name of the winery
|
||||||
vintage: the year of the wine
|
vintage: the year of the wine
|
||||||
region: a region, such as Burgundy, Bordeaux, Champagne, Napa Valley, Tuscany, California, Oregon, etc. Use "or" if there are multiple regions.
|
|
||||||
country: a country where wine is produced. Can be "Austria", "Australia", "France", "Germany", "Italy", "Portugal", "Spain", "United States". Use "or" if there are multiple countries.
|
country: a country where wine is produced. Can be "Austria", "Australia", "France", "Germany", "Italy", "Portugal", "Spain", "United States". Use "or" if there are multiple countries.
|
||||||
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"
|
||||||
grape_varietal: the name of the primary grape used to make the wine
|
grape_varietal: the name of the primary grape used to make the wine
|
||||||
@@ -713,7 +712,6 @@ function extractWineAttributes_1(a::T1, input::T2; maxattempt=10
|
|||||||
"wine_name": "...",
|
"wine_name": "...",
|
||||||
"winery": "...",
|
"winery": "...",
|
||||||
"vintage": "...",
|
"vintage": "...",
|
||||||
"region": "...",
|
|
||||||
"country": "...",
|
"country": "...",
|
||||||
"wine_type": "...",
|
"wine_type": "...",
|
||||||
"grape_varietal": "...",
|
"grape_varietal": "...",
|
||||||
@@ -728,7 +726,6 @@ function extractWineAttributes_1(a::T1, input::T2; maxattempt=10
|
|||||||
"wine_name": "N/A",
|
"wine_name": "N/A",
|
||||||
"winery": "N/A",
|
"winery": "N/A",
|
||||||
"vintage": "N/A",
|
"vintage": "N/A",
|
||||||
"region": "Tuscany or Napa Valley",
|
|
||||||
"country": "Italy or United States",
|
"country": "Italy or United States",
|
||||||
"wine_type": "red or white",
|
"wine_type": "red or white",
|
||||||
"grape_varietal": "Chenin Blanc or Riesling",
|
"grape_varietal": "Chenin Blanc or Riesling",
|
||||||
@@ -742,7 +739,6 @@ function extractWineAttributes_1(a::T1, input::T2; maxattempt=10
|
|||||||
"wine_name": "Saumur Blanc",
|
"wine_name": "Saumur Blanc",
|
||||||
"winery": "Domaine du Collier",
|
"winery": "Domaine du Collier",
|
||||||
"vintage": "2019",
|
"vintage": "2019",
|
||||||
"region": "N/A",
|
|
||||||
"country": "France",
|
"country": "France",
|
||||||
"wine_type": "white",
|
"wine_type": "white",
|
||||||
"grape_varietal": "Merlot",
|
"grape_varietal": "Merlot",
|
||||||
@@ -753,7 +749,7 @@ function extractWineAttributes_1(a::T1, input::T2; maxattempt=10
|
|||||||
"food_to_be_paired_with_wine": "N/A"
|
"food_to_be_paired_with_wine": "N/A"
|
||||||
</here are some examples>
|
</here are some examples>
|
||||||
"""
|
"""
|
||||||
requiredKeys = ["wine_name", "winery", "vintage", "region", "country", "wine_type", "grape_varietal", "tasting_notes", "wine_price_min", "wine_price_max", "occasion", "food_to_be_paired_with_wine"]
|
requiredKeys = ["wine_name", "winery", "vintage", "country", "wine_type", "grape_varietal", "tasting_notes", "wine_price_min", "wine_price_max", "occasion", "food_to_be_paired_with_wine"]
|
||||||
errornote = ""
|
errornote = ""
|
||||||
context =
|
context =
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user