This commit is contained in:
narawat lamaiin
2024-04-24 10:16:34 +07:00
parent 445bb11592
commit 96689b0913

View File

@@ -85,10 +85,17 @@ abstract type agent end
thinkinglimit::Integer # thinking round limit
thinkingcount::Integer # used to count attempted round of a task
# memory
# Ref: Chat prompt format https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGML/discussions/3
# messages= [Dict(:role=>"system", :content=> "", :timestamp=> Dates.now()),]
chathistory::Vector{Dict{Symbol, Any}} = Vector{Dict{Symbol, Any}}() # store messages history in the format :name=>"message"
""" Memory
Ref: Chat prompt format https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGML/discussions/3
NO "system" message in chathistory because I want to add it at the inference time
chathistory= [
Dict(:name=>"user", :text=> "Wassup!", :timestamp=> Dates.now()),
Dict(:name=>"assistant", :text=> "Hi I'm your assistant.", :timestamp=> Dates.now()),
]
"""
chathistory::Vector{Dict{Symbol, Any}} = Vector{Dict{Symbol, Any}}()
maxHistoryMsg::Integer # 31th and earlier messages will get summarized
keywordinfo::Dict{Symbol, Any} = Dict{Symbol, Any}(
:userinfo => Dict{Symbol, Any}(),