This commit is contained in:
narawat lamaiin
2025-04-29 18:45:52 +07:00
parent f19f302bd9
commit affb96f0cf
2 changed files with 4 additions and 4 deletions

View File

@@ -1508,7 +1508,7 @@ function generatechat(a::sommelier, thoughtDict)
end
# modify it to work with customer object
function generatechat(a::companion; converPartnerName::Union{String, Nothing}=nothing)
function generatechat(a::companion; converPartnerName::Union{String, Nothing}=nothing, maxattempt=10)
# header = ["Dialogue:"]
# dictkey = ["dialogue"]
@@ -1519,9 +1519,9 @@ function generatechat(a::companion; converPartnerName::Union{String, Nothing}=no
:num_ctx => 32768,
:temperature => 0.3,
)
for attempt in 1:10
for attempt in 1:maxattempt
if attempt > 1
println("\nYiemAgent generatechat() attempt $attempt/10 ", @__FILE__, ":", @__LINE__, " $(Dates.now())")
println("\nYiemAgent generatechat() attempt $attempt/$maxattempt ", @__FILE__, ":", @__LINE__, " $(Dates.now())")
end
systemmsg = a.systemmsg * "\nP.S. $errornote\n"

View File

@@ -42,7 +42,7 @@ function companion(
- Your like to be short and concise.
You should then respond to the user with:
Dialogue: Given the situation, what would you say to the sommelier?
Dialogue: Given the situation, what would you say to the user?
You should only respond format as described below:
Dialogue: ...