-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmpl.go
29 lines (21 loc) · 1.23 KB
/
tmpl.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package main
import (
"log"
"text/template"
)
var (
proposalSystemPrompt string
proposalUserTmpl *template.Template // User prompt template for summarizing a proposal.
threadSystemPrompt string
)
func init() {
var err error
generalTips := `Don't gloss over important details. Speak in specific, topic-relevant terminology. Focus on action items, deliverables, and major discussion points. Order your summary by importance, with the most important information first.`
// syntaxTip := `Mention user IDs with the "<@ID>" syntax. For example, the user ID 145386154785505280 would be formatted as <@145386154785505280>. Mention channels using the "<#ID>" syntax. For example, the channel ID 775859454780244031 would be formatted as <#775859454780244031>.`
proposalSystemPrompt = `Briefly summarize the provided governance proposal in 2-3 sentences. ` + generalTips
proposalUserStr := "Here is the proposal to summarize.\n\n{{ .Body }}"
if proposalUserTmpl, err = template.New("proposalUser").Parse(proposalUserStr); err != nil {
log.Fatalf("Error parsing proposal template: %v\n", err)
}
threadSystemPrompt = `Briefly summarize the provided discussion thread messages in a single paragraph with markdown formatting. ` + generalTips
}