update
This commit is contained in:
@@ -687,10 +687,12 @@ function evaluator(state::T1, text2textInstructLLM::Function;
|
|||||||
thoughthistory *= "$k: $v\n"
|
thoughthistory *= "$k: $v\n"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
noise = ""
|
||||||
|
for attempt in 1:5
|
||||||
usermsg =
|
usermsg =
|
||||||
"""
|
"""
|
||||||
Context: None
|
|
||||||
Trajectories: $thoughthistory
|
Trajectories: $thoughthistory
|
||||||
|
$noise
|
||||||
"""
|
"""
|
||||||
|
|
||||||
_prompt =
|
_prompt =
|
||||||
@@ -706,7 +708,6 @@ function evaluator(state::T1, text2textInstructLLM::Function;
|
|||||||
<|start_header_id|>assistant<|end_header_id|>
|
<|start_header_id|>assistant<|end_header_id|>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
for attempt in 1:5
|
|
||||||
try
|
try
|
||||||
response = text2textInstructLLM(prompt)
|
response = text2textInstructLLM(prompt)
|
||||||
responsedict = GeneralUtils.textToDict(response,
|
responsedict = GeneralUtils.textToDict(response,
|
||||||
@@ -755,6 +756,7 @@ function evaluator(state::T1, text2textInstructLLM::Function;
|
|||||||
println("")
|
println("")
|
||||||
println("Attempt $attempt. Error occurred: $errorMsg\n$st")
|
println("Attempt $attempt. Error occurred: $errorMsg\n$st")
|
||||||
println("")
|
println("")
|
||||||
|
noise = noises(3, 5)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
error("evaluator failed to generate an evaluation")
|
error("evaluator failed to generate an evaluation")
|
||||||
|
|||||||
@@ -455,6 +455,7 @@ function getdata_decisionMaker(state::Dict, context::Dict, text2textInstructLLM:
|
|||||||
Let's begin!
|
Let's begin!
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
noise = ""
|
||||||
note_flag = ""
|
note_flag = ""
|
||||||
for attempt in 1:10
|
for attempt in 1:10
|
||||||
usermsg =
|
usermsg =
|
||||||
@@ -464,6 +465,7 @@ function getdata_decisionMaker(state::Dict, context::Dict, text2textInstructLLM:
|
|||||||
User intention: $(context[:userintention])
|
User intention: $(context[:userintention])
|
||||||
Code executed from the last round: $(state[:code])
|
Code executed from the last round: $(state[:code])
|
||||||
Execution error: $(state[:errormsg])
|
Execution error: $(state[:errormsg])
|
||||||
|
$noise
|
||||||
$note_flag
|
$note_flag
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -517,6 +519,7 @@ function getdata_decisionMaker(state::Dict, context::Dict, text2textInstructLLM:
|
|||||||
st = sprint((io, v) -> show(io, "text/plain", v), stacktrace(catch_backtrace()))
|
st = sprint((io, v) -> show(io, "text/plain", v), stacktrace(catch_backtrace()))
|
||||||
print("Attempt $attempt. Error occurred: $errorMsg\n$st")
|
print("Attempt $attempt. Error occurred: $errorMsg\n$st")
|
||||||
println("")
|
println("")
|
||||||
|
noise = GeneralUtils.randstrings(3, 5)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return (thought=nothing, code=nothing, success=false,
|
return (thought=nothing, code=nothing, success=false,
|
||||||
|
|||||||
Reference in New Issue
Block a user