update
This commit is contained in:
@@ -1217,11 +1217,11 @@ function generatechat(memory::Dict, chathistory::Vector, text2textInstructLLM::F
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
context_1 = length(memory[:shortmem]) > 0 ? vectorOfDictToText(memory[:shortmem], withkey=false) : "None"
|
context_1 = length(memory[:shortmem]) > 0 ? vectorOfDictToText(memory[:shortmem], withkey=false) : "None"
|
||||||
chathistory = vectorOfDictToText(a.chathistory)
|
_chathistory = vectorOfDictToText(chathistory)
|
||||||
usermsg =
|
usermsg =
|
||||||
"""
|
"""
|
||||||
Context: $context_1
|
Context: $context_1
|
||||||
Your earlier conversation with the user: $chathistory)
|
Your earlier conversation with the user: $_chathistory)
|
||||||
Your thoughts: $(memory[:chatbox])
|
Your thoughts: $(memory[:chatbox])
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@@ -289,12 +289,12 @@ julia> result = checkinventory(agent, input)
|
|||||||
"""
|
"""
|
||||||
function checkinventory(a::T1, input::T2
|
function checkinventory(a::T1, input::T2
|
||||||
)::NamedTuple{(:result, :success, :errormsg), Tuple{String, Bool, Union{String, Nothing}}} where {T1<:agent, T2<:AbstractString}
|
)::NamedTuple{(:result, :success, :errormsg), Tuple{String, Bool, Union{String, Nothing}}} where {T1<:agent, T2<:AbstractString}
|
||||||
|
println("--> checkinventory input: $input ", @__FILE__, " ", @__LINE__)
|
||||||
wineattributes_1 = extractWineAttributes_1(a, input)
|
wineattributes_1 = extractWineAttributes_1(a, input)
|
||||||
wineattributes_2 = extractWineAttributes_2(a, input)
|
wineattributes_2 = extractWineAttributes_2(a, input)
|
||||||
|
|
||||||
inventoryquery = "$wineattributes_1, $wineattributes_2"
|
inventoryquery = "$wineattributes_1, $wineattributes_2"
|
||||||
println("--> checkinventory: $inventoryquery")
|
println("--> checkinventory: $inventoryquery ", @__FILE__, " ", @__LINE__)
|
||||||
result = SQLLLM.query(inventoryquery, a.executeSQL, a.text2textInstructLLM)
|
result = SQLLLM.query(inventoryquery, a.executeSQL, a.text2textInstructLLM)
|
||||||
return (result=result, success=true, errormsg=nothing)
|
return (result=result, success=true, errormsg=nothing)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user