update
This commit is contained in:
@@ -687,26 +687,27 @@ function evaluator(state::T1, text2textInstructLLM::Function;
|
||||
thoughthistory *= "$k: $v\n"
|
||||
end
|
||||
|
||||
usermsg =
|
||||
"""
|
||||
Context: None
|
||||
Trajectories: $thoughthistory
|
||||
"""
|
||||
|
||||
_prompt =
|
||||
[
|
||||
Dict(:name=> "system", :text=> systemmsg),
|
||||
Dict(:name=> "user", :text=> usermsg)
|
||||
]
|
||||
|
||||
# put in model format
|
||||
prompt = GeneralUtils.formatLLMtext(_prompt; formatname="llama3instruct")
|
||||
prompt *=
|
||||
"""
|
||||
<|start_header_id|>assistant<|end_header_id|>
|
||||
"""
|
||||
|
||||
noise = ""
|
||||
for attempt in 1:5
|
||||
usermsg =
|
||||
"""
|
||||
Trajectories: $thoughthistory
|
||||
$noise
|
||||
"""
|
||||
|
||||
_prompt =
|
||||
[
|
||||
Dict(:name=> "system", :text=> systemmsg),
|
||||
Dict(:name=> "user", :text=> usermsg)
|
||||
]
|
||||
|
||||
# put in model format
|
||||
prompt = GeneralUtils.formatLLMtext(_prompt; formatname="llama3instruct")
|
||||
prompt *=
|
||||
"""
|
||||
<|start_header_id|>assistant<|end_header_id|>
|
||||
"""
|
||||
|
||||
try
|
||||
response = text2textInstructLLM(prompt)
|
||||
responsedict = GeneralUtils.textToDict(response,
|
||||
@@ -755,6 +756,7 @@ function evaluator(state::T1, text2textInstructLLM::Function;
|
||||
println("")
|
||||
println("Attempt $attempt. Error occurred: $errorMsg\n$st")
|
||||
println("")
|
||||
noise = noises(3, 5)
|
||||
end
|
||||
end
|
||||
error("evaluator failed to generate an evaluation")
|
||||
|
||||
Reference in New Issue
Block a user