From f27d416a5aa420332de1f2e20faf8f0d45d1a191 Mon Sep 17 00:00:00 2001 From: Bel LaPointe <153096461+breel-render@users.noreply.github.com> Date: Fri, 19 Apr 2024 13:32:12 -0600 Subject: [PATCH] get recap prompt from $RECAP_PROMPT --- config.go | 2 ++ recap.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config.go b/config.go index 049c105..271922c 100644 --- a/config.go +++ b/config.go @@ -25,6 +25,7 @@ type Config struct { FillWithTestdata bool OllamaUrl string OllamaModel string + RecapPrompt string AssetPattern string DatacenterPattern string EventNamePattern string @@ -54,6 +55,7 @@ func newConfigFromEnv(ctx context.Context, getEnv func(string) string) (Config, AssetPattern: renderAssetPattern, DatacenterPattern: renderDatacenterPattern, EventNamePattern: renderEventNamePattern, + RecapPrompt: "Summarize the Slack thread in 1 sentence. List any suggested follow ups.", } var m map[string]any diff --git a/recap.go b/recap.go index afe3e2b..c62f3b5 100644 --- a/recap.go +++ b/recap.go @@ -49,7 +49,7 @@ func newPersistenceToRecapProcess(cfg Config) processFunc { continue } - prompt := []string{"Summarize the Slack thread in 1 sentence. List any suggested follow ups."} + prompt := []string{cfg.RecapPrompt} prompt = append(prompt, "---") for _, message := range messages { prompt = append(prompt, fmt.Sprintf("%s\n%s", message.Author, message.Plaintext))