Add customizable system prompt

This commit is contained in:
mudler
2024-04-10 20:35:04 +02:00
parent 0dda705017
commit 230d012915
4 changed files with 26 additions and 0 deletions

View File

@@ -30,6 +30,8 @@ type options struct {
kbResults int
ragdb RAGDB
systemPrompt string
// callbacks
reasoningCallback func(ActionCurrentState) bool
resultCallback func(ActionState)
@@ -110,6 +112,13 @@ func WithRAGDB(db RAGDB) Option {
}
}
func WithSystemPrompt(prompt string) Option {
return func(o *options) error {
o.systemPrompt = prompt
return nil
}
}
func WithLLMAPIURL(url string) Option {
return func(o *options) error {
o.LLMAPI.APIURL = url