get recap prompt from $RECAP_PROMPT

main
Bel LaPointe 2024-04-19 13:32:12 -06:00
parent 81793876f8
commit f27d416a5a
2 changed files with 3 additions and 1 deletions

View File

@ -25,6 +25,7 @@ type Config struct {
FillWithTestdata bool FillWithTestdata bool
OllamaUrl string OllamaUrl string
OllamaModel string OllamaModel string
RecapPrompt string
AssetPattern string AssetPattern string
DatacenterPattern string DatacenterPattern string
EventNamePattern string EventNamePattern string
@ -54,6 +55,7 @@ func newConfigFromEnv(ctx context.Context, getEnv func(string) string) (Config,
AssetPattern: renderAssetPattern, AssetPattern: renderAssetPattern,
DatacenterPattern: renderDatacenterPattern, DatacenterPattern: renderDatacenterPattern,
EventNamePattern: renderEventNamePattern, EventNamePattern: renderEventNamePattern,
RecapPrompt: "Summarize the Slack thread in 1 sentence. List any suggested follow ups.",
} }
var m map[string]any var m map[string]any

View File

@ -49,7 +49,7 @@ func newPersistenceToRecapProcess(cfg Config) processFunc {
continue continue
} }
prompt := []string{"Summarize the Slack thread in 1 sentence. List any suggested follow ups."} prompt := []string{cfg.RecapPrompt}
prompt = append(prompt, "---") prompt = append(prompt, "---")
for _, message := range messages { for _, message := range messages {
prompt = append(prompt, fmt.Sprintf("%s\n%s", message.Author, message.Plaintext)) prompt = append(prompt, fmt.Sprintf("%s\n%s", message.Author, message.Plaintext))