update
This commit is contained in:
@@ -529,7 +529,7 @@ function actor_mistral_openorca(a::agentReflex, selfaware=nothing)
|
||||
"Answer:", "Conclusion:", "Summary:"]
|
||||
response = replaceHeaders(response, headerToDetect, latestTask)
|
||||
println("")
|
||||
@show actor_response_1 = response
|
||||
|
||||
headerToDetect = ["Plan $(a.attempt):",
|
||||
"Thought $latestTask:",
|
||||
"Act $latestTask:",
|
||||
@@ -541,7 +541,7 @@ function actor_mistral_openorca(a::agentReflex, selfaware=nothing)
|
||||
chunkedtext = delete!(chunkedtext, "Self-awareness $latestTask")
|
||||
act = GeneralUtils.getStringBetweenCharacters(response, '{', '}', endCharLocation="end")
|
||||
println("")
|
||||
@show actor_response_2 = act
|
||||
@show actor_response_1 = act
|
||||
act = Dict(JSON3.read(act))
|
||||
|
||||
chunkedtext["Act $latestTask:"] = toolname
|
||||
|
||||
@@ -2,7 +2,7 @@ module llmfunction
|
||||
|
||||
export wikisearch, winestock
|
||||
|
||||
using HTTP, JSON3
|
||||
using HTTP, JSON3, URIs
|
||||
using GeneralUtils
|
||||
using ..type, ..utils
|
||||
#------------------------------------------------------------------------------------------------100
|
||||
@@ -116,7 +116,55 @@ end
|
||||
"""
|
||||
function winestockDB(a::agentReflex, query::T) where {T<:AbstractString}
|
||||
@show query
|
||||
prompt =
|
||||
"""
|
||||
<|system|>
|
||||
<About yourself>
|
||||
Your are a helpful assistant.
|
||||
</About yourself>
|
||||
|
||||
<You have the following wine classification info>
|
||||
Intensity level:
|
||||
intensity = 1, light bodied
|
||||
intensity = 2, light-medium bodied
|
||||
intensity = 3, medium bodied
|
||||
intensity = 4, medium-full bodied
|
||||
intensity = 5, full bodied
|
||||
Sweetness level:
|
||||
sweetness = 1, dry
|
||||
sweetness = 2, off-dry
|
||||
sweetness = 3, semi-sweet
|
||||
sweetness = 4, sweet
|
||||
sweetness = 5, very sweet
|
||||
Tannin level:
|
||||
tannin = 1, low tannin
|
||||
tannin = 2, low-medium tannin
|
||||
tannin = 3, medium tannin
|
||||
tannin = 4, medium-high tannin
|
||||
tannin = 5, high tannin
|
||||
Acidity level:
|
||||
acidity = 1, low acidity
|
||||
acidity = 2, low-medium acidity
|
||||
acidity = 3, medium acidity
|
||||
acidity = 4, medium-high acidity
|
||||
acidity = 5, high acidity
|
||||
</You have the following wine classification info>
|
||||
<Your job>
|
||||
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\"}}}"
|
||||
assistant: SELECT * FROM White WHERE intensity = 5 AND sweetness = 2 AND acidity = 1 AND tannin = 3 AND price <= 50;
|
||||
</Example 1>
|
||||
</s>
|
||||
<|query|>
|
||||
query: $query
|
||||
</s>
|
||||
<|assistant|>
|
||||
"""
|
||||
|
||||
response = sendReceivePrompt(a, prompt, max_tokens=1024, temperature=0.4,
|
||||
stopword=["/n/n", "END", "End", "Obs", "<|", "</"])
|
||||
|
||||
|
||||
error("winestockDB done")
|
||||
|
||||
Reference in New Issue
Block a user