update
This commit is contained in:
@@ -59,36 +59,36 @@ end
|
||||
|
||||
|
||||
|
||||
function winestock(a::agentReflex, phrase::T) where {T<:AbstractString}
|
||||
result =
|
||||
"""
|
||||
I found the following wines
|
||||
{
|
||||
1: {
|
||||
Chateau: Louis Latou,
|
||||
name: Corton-Charlamagne,
|
||||
grape variety: chardonnay,
|
||||
year: 2014,
|
||||
price: 55 USD,
|
||||
stock ID: ws-114,
|
||||
Description: Corton-Charlemagne 2018 is a powerful, complex wine. Its nose is intense, with notes of white stone fruits such as white peach, fresh hazelnut, vanilla, and almond paste. The wine is full-bodied for the palate, and the vanilla is complemented by aromas of fresh almond and lime blossom. The experience ends with a very fine aromatic aftertaste that has subtle saline notes.,
|
||||
},
|
||||
2: {
|
||||
Chateau: Beaucastel,
|
||||
name: Malbec Argentino,
|
||||
grape variety: riesling,
|
||||
year: 2016,
|
||||
price: 39 USD,
|
||||
stock ID: ed-23,
|
||||
Description: The quintessence of Château de Beaucastel, Hommage à Jacques Perrin delights us every year, and the 2019 vintage is no exception. To the eye it offers a splendid deep red color, verging on black. Full of power and supremely elegant, the nose is of magnificent aromatic complexity with notes of black fruit and spices that offer all the characteristic expression of Mourvèdre. Perfectly balanced by an incredible freshness, the mouth is eminently elegant with intense and complex aromas of great subtlety, a full, refined texture, subtle tannins of great finesse, and infinite length. A great classic Hommage à Jacques Perrin.,
|
||||
}
|
||||
}
|
||||
"""
|
||||
return result
|
||||
end
|
||||
|
||||
# function winestock(a::agentReflex, phrase::T) where {T<:AbstractString}
|
||||
# result =
|
||||
# """
|
||||
# I found the following wines
|
||||
# {
|
||||
# 1: {
|
||||
# Chateau: Louis Latou,
|
||||
# name: Corton-Charlamagne,
|
||||
# grape variety: chardonnay,
|
||||
# year: 2014,
|
||||
# price: 55 USD,
|
||||
# stock ID: ws-114,
|
||||
# Description: Corton-Charlemagne 2018 is a powerful, complex wine. Its nose is intense, with notes of white stone fruits such as white peach, fresh hazelnut, vanilla, and almond paste. The wine is full-bodied for the palate, and the vanilla is complemented by aromas of fresh almond and lime blossom. The experience ends with a very fine aromatic aftertaste that has subtle saline notes.,
|
||||
# },
|
||||
# 2: {
|
||||
# Chateau: Beaucastel,
|
||||
# name: Malbec Argentino,
|
||||
# grape variety: riesling,
|
||||
# year: 2016,
|
||||
# price: 39 USD,
|
||||
# stock ID: ed-23,
|
||||
# Description: The quintessence of Château de Beaucastel, Hommage à Jacques Perrin delights us every year, and the 2019 vintage is no exception. To the eye it offers a splendid deep red color, verging on black. Full of power and supremely elegant, the nose is of magnificent aromatic complexity with notes of black fruit and spices that offer all the characteristic expression of Mourvèdre. Perfectly balanced by an incredible freshness, the mouth is eminently elegant with intense and complex aromas of great subtlety, a full, refined texture, subtle tannins of great finesse, and infinite length. A great classic Hommage à Jacques Perrin.,
|
||||
# }
|
||||
# }
|
||||
# """
|
||||
# return result
|
||||
# end
|
||||
|
||||
|
||||
#WORKING
|
||||
"""
|
||||
|
||||
Arguments:
|
||||
@@ -114,7 +114,7 @@ end
|
||||
julia> score = grading(agent, guideline, shorttermMemory)
|
||||
```
|
||||
"""
|
||||
function winestockDB(a::agentReflex, query::T) where {T<:AbstractString}
|
||||
function winestock(a::agentReflex, query::T) where {T<:AbstractString}
|
||||
@show query
|
||||
prompt =
|
||||
"""
|
||||
@@ -153,7 +153,7 @@ function winestockDB(a::agentReflex, query::T) where {T<:AbstractString}
|
||||
Write SQL command using data from query.
|
||||
</Your job>
|
||||
<Example 1>
|
||||
query: "{\"winestock\": {\"wine type\": \"white\", \"wine characteristics\": \"full-bodied | off-dry | low acidity | medium tannin\", \"price\": {\"max\": \"50\"}}}"
|
||||
query: "{\"wine type\": \"white\", \"wine characteristics\": \"full-bodied | off-dry | low acidity | medium tannin\", \"price\": {\"max\": \"50\"}}"
|
||||
assistant: SELECT * FROM White WHERE intensity = 5 AND sweetness = 2 AND acidity = 1 AND tannin = 3 AND price <= 50;
|
||||
</Example 1>
|
||||
</s>
|
||||
@@ -165,7 +165,7 @@ function winestockDB(a::agentReflex, query::T) where {T<:AbstractString}
|
||||
"""
|
||||
println("")
|
||||
@show db_prompt = prompt
|
||||
response = sendReceivePrompt(a, prompt, max_tokens=1024, temperature=0.4,
|
||||
response = sendReceivePrompt(a, prompt, max_tokens=256, temperature=0.4,
|
||||
stopword=["/n/n", "END", "End", "Obs", "<|", "</"])
|
||||
println("")
|
||||
@show db_response = response
|
||||
|
||||
Reference in New Issue
Block a user