Make Knowledgebase RAG functional (almost)

This commit is contained in:
mudler
2024-04-10 17:38:16 +02:00
parent 48d17b6952
commit 73524adfce
10 changed files with 178 additions and 32 deletions

View File

@@ -28,6 +28,7 @@ type options struct {
permanentGoal string
periodicRuns time.Duration
kbResults int
ragdb RAGDB
// callbacks
reasoningCallback func(ActionCurrentState) bool
@@ -102,6 +103,13 @@ var EnablePersonality = func(o *options) error {
return nil
}
func WithRAGDB(db RAGDB) Option {
return func(o *options) error {
o.ragdb = db
return nil
}
}
func WithLLMAPIURL(url string) Option {
return func(o *options) error {
o.LLMAPI.APIURL = url