This commit is contained in:
narawat lamaiin
2025-03-22 09:42:51 +07:00
parent 7d5bc14a09
commit 5a890860a6
3 changed files with 54 additions and 10 deletions

View File

@@ -36,7 +36,7 @@ function executeSQLVectorDB(sql)
return result
end
function text2textInstructLLM(prompt::String; maxattempt=3)
function text2textInstructLLM(prompt::String; maxattempt=2)
msgMeta = GeneralUtils.generate_msgMeta(
config[:externalservice][:loadbalancer][:mqtttopic];
msgPurpose="inference",
@@ -60,7 +60,7 @@ function text2textInstructLLM(prompt::String; maxattempt=3)
response = nothing
for attempts in 1:maxattempt
_response = GeneralUtils.sendReceiveMqttMsg(outgoingMsg; timeout=300, maxattempt=maxattempt)
_response = GeneralUtils.sendReceiveMqttMsg(outgoingMsg; timeout=180, maxattempt=maxattempt)
payload = _response[:response]
if _response[:success] && payload[:text] !== nothing
response = _response[:response][:text]
@@ -234,7 +234,7 @@ a = YiemAgent.sommelier(
)
while true
println("your respond: ")
print("your respond: ")
user_answer = readline()
response = YiemAgent.conversation(a, Dict(:text=> user_answer))
println("\n$response")