update companion
This commit is contained in:
13
src/type.jl
13
src/type.jl
@@ -18,6 +18,7 @@ mutable struct companion <: agent
|
||||
chathistory::Vector{Dict{Symbol, Any}}
|
||||
memory::Dict{Symbol, Any}
|
||||
func::NamedTuple # NamedTuple of functions
|
||||
llmFormatName::String
|
||||
end
|
||||
|
||||
function companion(
|
||||
@@ -25,9 +26,10 @@ function companion(
|
||||
;
|
||||
systemmsg::Union{String, Nothing}= nothing,
|
||||
name::String= "Assistant",
|
||||
id::String= string(uuid4()),
|
||||
id::String= GeneralUtils.uuid4snakecase(),
|
||||
maxHistoryMsg::Integer= 20,
|
||||
chathistory::Vector{Dict{Symbol, String}} = Vector{Dict{Symbol, String}}(),
|
||||
llmFormatName::String= "granite3"
|
||||
)
|
||||
|
||||
if systemmsg === nothing
|
||||
@@ -41,12 +43,6 @@ function companion(
|
||||
- Focus on the latest conversation.
|
||||
- Your like to be short and concise.
|
||||
|
||||
You should then respond to the user with:
|
||||
Dialogue: Given the situation, what would you say to the user?
|
||||
|
||||
You should only respond format as described below:
|
||||
Dialogue: ...
|
||||
|
||||
Let's begin!
|
||||
"""
|
||||
end
|
||||
@@ -79,7 +75,8 @@ function companion(
|
||||
maxHistoryMsg,
|
||||
chathistory,
|
||||
memory,
|
||||
func
|
||||
func,
|
||||
llmFormatName
|
||||
)
|
||||
|
||||
return newAgent
|
||||
|
||||
Reference in New Issue
Block a user