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