feat(agent): shared state, allow to track conversations globally (#148)
* feat(agent): shared state, allow to track conversations globally Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * Cleanup Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * track conversations initiated by the bot Signed-off-by: Ettore Di Giacinto <mudler@localai.io> --------- Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
committed by
GitHub
parent
2b07dd79ec
commit
c23e655f44
@@ -64,6 +64,8 @@ type options struct {
|
||||
|
||||
observer Observer
|
||||
parallelJobs int
|
||||
|
||||
lastMessageDuration time.Duration
|
||||
}
|
||||
|
||||
func (o *options) SeparatedMultimodalModel() bool {
|
||||
@@ -151,6 +153,17 @@ func EnableKnowledgeBaseWithResults(results int) Option {
|
||||
}
|
||||
}
|
||||
|
||||
func WithLastMessageDuration(duration string) Option {
|
||||
return func(o *options) error {
|
||||
d, err := time.ParseDuration(duration)
|
||||
if err != nil {
|
||||
d = types.DefaultLastMessageDuration
|
||||
}
|
||||
o.lastMessageDuration = d
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func WithParallelJobs(jobs int) Option {
|
||||
return func(o *options) error {
|
||||
o.parallelJobs = jobs
|
||||
|
||||
Reference in New Issue
Block a user