update
This commit is contained in:
@@ -556,56 +556,6 @@ function conversationSummary(a::T) where {T<:agent}
|
||||
return summary
|
||||
end
|
||||
|
||||
# function conversationSummary(a::T) where {T<:agent}
|
||||
# prompt =
|
||||
# """
|
||||
# <|im_start|>system
|
||||
# You are a helpful assistant.
|
||||
# <|im_end|>
|
||||
# Here are the context for the question:
|
||||
# {context}
|
||||
|
||||
# <|im_start|>user
|
||||
# Make a detailed bullet summary of the following earlier conversation between you and a user.
|
||||
|
||||
# {conversation}
|
||||
# <|im_end|>
|
||||
# <|im_start|>assistant
|
||||
|
||||
# """
|
||||
# conversation = ""
|
||||
# summary = "nothing"
|
||||
# if length(a.messages)!= 0
|
||||
# for msg in a.messages
|
||||
# role = msg[:role]
|
||||
# content = msg[:content]
|
||||
|
||||
# if role == "user"
|
||||
# conversation *= "$role: $content\n"
|
||||
# elseif role == "assistant"
|
||||
# conversation *= "I: $content\n"
|
||||
# else
|
||||
# error("undefied condition role = $role")
|
||||
# end
|
||||
# end
|
||||
# prompt = replace(prompt, "{conversation}" => conversation)
|
||||
# prompt = replace(prompt, "{context}" => a.context)
|
||||
# println("<<<<<")
|
||||
# @show prompt
|
||||
# result = sendReceivePrompt(a, prompt)
|
||||
# summary = result === nothing ? "nothing" : result
|
||||
# summary = replace(summary, "<|im_end|>" => "")
|
||||
# if summary[1:1] == "\n"
|
||||
# summary = summary[2:end]
|
||||
# end
|
||||
# @show summary
|
||||
# println(">>>>>")
|
||||
# error("-----")
|
||||
# end
|
||||
|
||||
# return summary
|
||||
# end
|
||||
|
||||
# function work2(a::agentReact, usermsg::String)
|
||||
# addNewMessage(a, "user", usermsg)
|
||||
# userIntent = identifyUserIntention(a, usermsg)
|
||||
|
||||
Reference in New Issue
Block a user