From 3975d14a7081236f81039ff944500dcff3375899 Mon Sep 17 00:00:00 2001 From: tonaerospace Date: Thu, 23 Nov 2023 11:49:47 +0000 Subject: [PATCH] update --- src/interface.jl | 18 ++++++++++-------- src/type.jl | 8 ++++---- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/interface.jl b/src/interface.jl index afa2438..f4a0809 100755 --- a/src/interface.jl +++ b/src/interface.jl @@ -161,7 +161,7 @@ function generatePrompt_mistral_openorca(a::T, usermsg::String, {tools} {thinkingMode} <|im_end|> - Here are the context for the assignment: + Here are the context for the stimulus: {context} """ prompt = replace(prompt, "{systemMsg}" => a.roles[a.role]) @@ -177,7 +177,7 @@ function generatePrompt_mistral_openorca(a::T, usermsg::String, prompt = replace(prompt, "{context}" => a.context) - prompt *= "<|im_start|>user\nAssignment: " * usermsg * "\n<|im_end|>\n" + prompt *= "<|im_start|>user\nStimulus: " * usermsg * "\n<|im_end|>\n" prompt *= "<|im_start|>assistant\n" return prompt @@ -240,7 +240,7 @@ function chat_mistral_openorca(a::agentReflex, usermsg::String) prompt = replace(prompt, "{context}" => context) - prompt = replace(prompt, "{usermsg}" => "Assignment: $usermsg") + prompt = replace(prompt, "{usermsg}" => "Stimulus: $usermsg") return prompt end @@ -312,7 +312,7 @@ function planner_mistral_openorca(a::agentReflex, usermsg::String) prompt = replace(prompt, "{context}" => context) - prompt = replace(prompt, "{usermsg}" => "Assignment: $usermsg") + prompt = replace(prompt, "{usermsg}" => "Stimulus: $usermsg") return prompt end @@ -384,7 +384,7 @@ function actor_mistral_openorca(a::agentReflex, usermsg::T) where {T<:AbstractSt prompt = replace(prompt, "{context}" => context) - prompt = replace(prompt, "{usermsg}" => "Assignment: $usermsg") + prompt = replace(prompt, "{usermsg}" => "Stimulus: $usermsg") return prompt end @@ -617,6 +617,8 @@ function work(a::agentReflex, usermsg::String) # plan a.attempt += 1 @show a.attempt + @show usermsg + # a.thoughtlog *= toolname = nothing toolinput = nothing prompt = planner_mistral_openorca(a, usermsg) @@ -810,11 +812,11 @@ function chooseThinkingMode(a::agentReflex, usermsg::String) {systemMsg} You have access to the following tools: {tools} - Your job is to determine whether you will use tools or actions to finish the assignment. + Your job is to determine whether you will use tools or actions to respond the stimulus. Choose one of the following choices: - If you don't need tools or actions to fininsh the assignment say, "{no}". - If you need tools or actions to finish the assignment say, "{yes}". + If you don't need tools or actions to respond to the stimulus say, "{no}". + If you need tools or actions to respond to the stimulus say, "{yes}". <|im_end|> <|im_start|>user diff --git a/src/type.jl b/src/type.jl index 6b4f493..9ce43b1 100644 --- a/src/type.jl +++ b/src/type.jl @@ -53,7 +53,7 @@ function agentReflex( roles::Dict=Dict( :assistant => """ - You are a helpful assistant who finish a user's assignment as best you can. + You are a helpful assistant who respond to a stimulus as best you can. """, :sommelier => """ @@ -86,12 +86,12 @@ function agentReflex( Begin!""", :planner=> """Use the following format: - Assignment: the input assignment your user is assigning and you must finish - Plan: first you should always think about the assignment and the info you have thoroughly then extract and devise a step by step plan to finish the assignment (pay attention to correct numeral calculation and commonsense). + Stimulus: the input given to you and you must respond + Plan: first you should always think about the stimulus and the info you have thoroughly then extract and devise a step by step plan to respond (pay attention to correct numeral calculation and commonsense). """, :actor=> """Use the following format: - Assignment: the input assignment your user is assigning and you must finish + Stimulus: the input given to you and you must respond 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)