update
This commit is contained in:
@@ -220,7 +220,7 @@ function planner_mistral_openorca(a::agentReflex)
|
||||
Plan:
|
||||
"""
|
||||
|
||||
plan = sendReceivePrompt(a, assistant_plan_prompt, max_tokens=512, temperature=0.1, stopword=["<|", "</"])
|
||||
plan = sendReceivePrompt(a, assistant_plan_prompt, max_tokens=256, temperature=0.1, stopword=["<|", "</"])
|
||||
plan = split(plan, "<|")[1]
|
||||
# plan = split(plan, "\n\n")[1]
|
||||
|
||||
@@ -272,7 +272,7 @@ function updatePlan(a::agentReflex)
|
||||
Updated plan:
|
||||
"""
|
||||
|
||||
result = sendReceivePrompt(a, prompt, max_tokens=512, temperature=0.1)
|
||||
result = sendReceivePrompt(a, prompt, max_tokens=256, temperature=0.1)
|
||||
@show updatedPlan = result
|
||||
a.memory[:shortterm]["Plan 1:"] = result
|
||||
|
||||
@@ -323,7 +323,7 @@ function selfAwareness(a::agentReflex)
|
||||
<|assistant|>
|
||||
What I know:
|
||||
"""
|
||||
response = sendReceivePrompt(a, prompt, max_tokens=1024, temperature=0.4, timeout=180,
|
||||
response = sendReceivePrompt(a, prompt, max_tokens=256, temperature=0.4, timeout=180,
|
||||
stopword=["/n/n", "END", "End", "Obs", "<|", "</"])
|
||||
@show response
|
||||
|
||||
@@ -432,7 +432,7 @@ function actor_mistral_openorca(a::agentReflex, selfaware=nothing)
|
||||
<Your job>
|
||||
Use the following format:
|
||||
$thought
|
||||
Act: an action you intend to do according to your thought, must be one of [{toolnames}].
|
||||
Act: an action you intend to do based on your thought, must be one of [{toolnames}].
|
||||
Actinput: your input to the action (pay attention to the tool's input)
|
||||
Obs: observed result of the action
|
||||
</Your job>
|
||||
@@ -460,8 +460,8 @@ function actor_mistral_openorca(a::agentReflex, selfaware=nothing)
|
||||
while true # while Thought or Act is empty, run actor again
|
||||
tempcounter += 0.2
|
||||
@show tempcounter
|
||||
response = sendReceivePrompt(a, prompt, max_tokens=1024, temperature=tempcounter, timeout=180,
|
||||
stopword=["/n/n", "END", "End", "Obs", "<|", "</"])
|
||||
response = sendReceivePrompt(a, prompt, max_tokens=256, temperature=tempcounter, timeout=180,
|
||||
stopword=["Obs:", "<|system|>", "</s>"])
|
||||
response = splittext(response, ["/n/n", "END", "End", "Obs", "<|im_end|>"])
|
||||
|
||||
latestTask = shortMemLatestTask(a.memory[:shortterm]) +1
|
||||
@@ -974,7 +974,7 @@ function analyze(a)
|
||||
|
||||
"""
|
||||
|
||||
response = sendReceivePrompt(a, prompt, max_tokens=1024, timeout=180)
|
||||
response = sendReceivePrompt(a, prompt, max_tokens=256, timeout=180)
|
||||
|
||||
return response
|
||||
end
|
||||
@@ -1029,7 +1029,7 @@ function selfReflext(a, analysis::T) where {T<:AbstractString}
|
||||
<|im_end|>
|
||||
"""
|
||||
|
||||
response = sendReceivePrompt(a, prompt, max_tokens=2048)
|
||||
response = sendReceivePrompt(a, prompt, max_tokens=256)
|
||||
return response
|
||||
end
|
||||
|
||||
@@ -1248,7 +1248,7 @@ function checkTaskCompletion(a)
|
||||
"""
|
||||
response = nothing
|
||||
_response = nothing
|
||||
_response = sendReceivePrompt(a, prompt, max_tokens=512)
|
||||
_response = sendReceivePrompt(a, prompt, max_tokens=256)
|
||||
@show checkTaskCompletion_raw = _response
|
||||
_response = split(_response, "</")[1]
|
||||
_response = split(_response, "\n\n")[1]
|
||||
@@ -1344,7 +1344,7 @@ function recap(a)
|
||||
Extracted info:
|
||||
"""
|
||||
aware = "Self-awareness: map the info from the recap to the plan's tasks then state your mapping."
|
||||
response = sendReceivePrompt(a, prompt, max_tokens=512, temperature=0.0)
|
||||
response = sendReceivePrompt(a, prompt, max_tokens=256, temperature=0.0)
|
||||
response = split(response, "</")[1]
|
||||
response = split(response, "<|")[1]
|
||||
response = split(response, "\n\n")[1]
|
||||
|
||||
@@ -175,7 +175,7 @@ function winestockDB(a::agentReflex, query::T) where {T<:AbstractString}
|
||||
$(JSON3.write(insertdata));
|
||||
"""
|
||||
uri = URI(scheme="http", host="192.168.88.12", port="9010", path="/sql", userinfo="root:root")
|
||||
r = HTTP.request("POST", uri, ["Accept" => "application/json", "NS"=>"yiem", "DB"=>"Blossom"], body)
|
||||
r = HTTP.request("POST", uri, ["Accept" => "application/json", "NS"=>"yiem", "DB"=>"Blossom_wines"], body)
|
||||
println("")
|
||||
@show r.body
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ function agentReflex(
|
||||
- occasion: ask the user
|
||||
- type of food that will be served with wine: ask the user
|
||||
- ambient temperature at the serving location: ask the user
|
||||
- type of wine (Rose, White, Red and Sparkling): ask the user
|
||||
- type of wine (we have Rose, White, Red, Rose and Sparkling): ask the user
|
||||
- user's personal taste of wine characteristic: ask the user
|
||||
- wine price range: ask the user
|
||||
- wines we have in stock: use winestock tool
|
||||
|
||||
Reference in New Issue
Block a user