better recap prompts by doing an intro with the OP
parent
f27d416a5a
commit
5785ea37ae
|
|
@ -25,6 +25,7 @@ type Config struct {
|
||||||
FillWithTestdata bool
|
FillWithTestdata bool
|
||||||
OllamaUrl string
|
OllamaUrl string
|
||||||
OllamaModel string
|
OllamaModel string
|
||||||
|
RecapPromptIntro string
|
||||||
RecapPrompt string
|
RecapPrompt string
|
||||||
AssetPattern string
|
AssetPattern string
|
||||||
DatacenterPattern string
|
DatacenterPattern string
|
||||||
|
|
@ -55,7 +56,8 @@ 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.",
|
RecapPromptIntro: "A Slack thread begin with the following original post.",
|
||||||
|
RecapPrompt: "Summarize all of the following Slack thread responses in 1 sentence without any leading text.",
|
||||||
}
|
}
|
||||||
|
|
||||||
var m map[string]any
|
var m map[string]any
|
||||||
|
|
|
||||||
12
recap.go
12
recap.go
|
|
@ -49,9 +49,15 @@ func newPersistenceToRecapProcess(cfg Config) processFunc {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
prompt := []string{cfg.RecapPrompt}
|
prompt := []string{
|
||||||
prompt = append(prompt, "---")
|
cfg.RecapPromptIntro,
|
||||||
for _, message := range messages {
|
"---",
|
||||||
|
messages[0].Plaintext,
|
||||||
|
"---",
|
||||||
|
cfg.RecapPrompt,
|
||||||
|
"---",
|
||||||
|
}
|
||||||
|
for _, message := range messages[1:] {
|
||||||
prompt = append(prompt, fmt.Sprintf("%s\n%s", message.Author, message.Plaintext))
|
prompt = append(prompt, fmt.Sprintf("%s\n%s", message.Author, message.Plaintext))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue