update
This commit is contained in:
@@ -384,8 +384,7 @@ function actor_mistral_openorca(a::agentReflex, usermsg::T) where {T<:AbstractSt
|
||||
prompt = replace(prompt, "{context}" => context)
|
||||
|
||||
prompt = replace(prompt, "{usermsg}" => "Stimulus: $usermsg")
|
||||
@show prompt
|
||||
error("actor_mistral_openorca done")
|
||||
|
||||
return prompt
|
||||
end
|
||||
|
||||
@@ -641,7 +640,12 @@ function work(a::agentReflex, usermsg::String)
|
||||
if a.step <= totalsteps
|
||||
stepdetail = extractStepFromPlan(a, plan, a.step)
|
||||
@show stepdetail
|
||||
respond = actor_mistral_openorca(a, stepdetail)
|
||||
prompt = actor_mistral_openorca(a, stepdetail)
|
||||
respond = sendReceivePrompt(a, prompt)
|
||||
respond = split(respond, "<|im_end|>")[1]
|
||||
@show respond
|
||||
#WORKING extract Act/ActInput
|
||||
|
||||
error("work done 1")
|
||||
else # finish all steps
|
||||
error("work done 2")
|
||||
@@ -1127,7 +1131,7 @@ function extractStepFromPlan(a::agent, plan::T, step::Int) where {T<:AbstractStr
|
||||
"""
|
||||
<|im_start|>system
|
||||
You are a helpful assistant.
|
||||
Your job is to extract step 2 in the user plan.
|
||||
Your job is to extract step $step in the user plan.
|
||||
|
||||
Use the following format only:
|
||||
{copy the step and put it here}
|
||||
|
||||
@@ -95,8 +95,7 @@ function agentReflex(
|
||||
Thought: your should always think about what to do (pay attention to correct numeral calculation and commonsense).
|
||||
Act: the action to take that match your thought, should be one of [{toolnames}]
|
||||
ActInput: the input to the action (pay attention to the tool's input)
|
||||
|
||||
Begin!""",
|
||||
""",
|
||||
),
|
||||
tools::Dict=Dict(
|
||||
:chatbox=>Dict(
|
||||
|
||||
Reference in New Issue
Block a user