update
This commit is contained in:
@@ -4,7 +4,7 @@ module interface
|
||||
export agentReact, agentReflex,
|
||||
addNewMessage, clearMessage, removeLatestMsg, conversation, writeEvaluationGuideline,
|
||||
grading, analyze, selfReflext, actor_mistral_openorca2, formulateUserresponse,
|
||||
extractinfo, updateEnvState
|
||||
extractinfo, updateEnvState, chat_mistral_openorca
|
||||
|
||||
using JSON3, DataStructures, Dates, UUIDs, HTTP
|
||||
using CommUtils, GeneralUtils
|
||||
@@ -188,8 +188,7 @@ function generatePrompt_mistral_openorca(a::T, usermsg::String,
|
||||
return prompt
|
||||
end
|
||||
|
||||
#WORKING
|
||||
function chat_mistral_openorca(a::agentReflex, usermsg::String)
|
||||
function chat_mistral_openorca(a::agentReflex)
|
||||
"""
|
||||
general prompt format:
|
||||
|
||||
@@ -223,18 +222,15 @@ function chat_mistral_openorca(a::agentReflex, usermsg::String)
|
||||
$(a.roles[a.role])
|
||||
Your earlier talk with the user:
|
||||
$(a.earlierConversation)
|
||||
What you know about current situations:
|
||||
$(a.env)
|
||||
Begin!
|
||||
<|im_end|>
|
||||
<|im_start|>user
|
||||
$usermsg
|
||||
<|im_end|>
|
||||
$(messagesToString(a.messages))
|
||||
<|im_start|>assistant
|
||||
|
||||
"""
|
||||
|
||||
response = sendReceivePrompt(a, prompt)
|
||||
response = split(response, "<|im_end|>")[1]
|
||||
|
||||
return response
|
||||
end
|
||||
|
||||
@@ -443,7 +439,7 @@ function conversation(a::agentReflex, usermsg::String; attemptlimit::Int=3)
|
||||
a.attemptlimit = attemptlimit
|
||||
response = nothing
|
||||
|
||||
a.earlierConversation = conversationSummary(a)
|
||||
# a.earlierConversation = conversationSummary(a)
|
||||
_ = addNewMessage(a, "user", usermsg)
|
||||
isusetools = isUseTools(a, usermsg)
|
||||
newinfo = extractinfo(a, usermsg)
|
||||
@@ -454,8 +450,7 @@ function conversation(a::agentReflex, usermsg::String; attemptlimit::Int=3)
|
||||
# response = work(a, usermsg)
|
||||
# end
|
||||
|
||||
#WORKING
|
||||
response = chat_mistral_openorca(a, usermsg)
|
||||
response = chat_mistral_openorca(a)
|
||||
_ = addNewMessage(a, "assistant", response)
|
||||
|
||||
return response
|
||||
|
||||
Reference in New Issue
Block a user