From 96689b0913f86bf7eae254b07c3b653c68abd515 Mon Sep 17 00:00:00 2001 From: narawat lamaiin Date: Wed, 24 Apr 2024 10:16:34 +0700 Subject: [PATCH] update --- src/type.jl | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/type.jl b/src/type.jl index d4ac39e..3beb072 100644 --- a/src/type.jl +++ b/src/type.jl @@ -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}(),