Generate title prompt tweak
This commit is contained in:
parent
97cd047861
commit
a6522dbcd0
@ -150,13 +150,13 @@ func FormatForExternalPrompt(messages []model.Message, system bool) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func GenerateTitle(ctx *lmcli.Context, messages []model.Message) (string, error) {
|
func GenerateTitle(ctx *lmcli.Context, messages []model.Message) (string, error) {
|
||||||
const systemPrompt = `You will be shown a conversation between a user and an AI assistant. Your task is to generate a short title (8 words or less) for the provided conversation that reflects the conversation's topic.
|
const systemPrompt = `You will be shown a conversation between a user and an AI assistant. Your task is to generate a short title (8 words or less) for the provided conversation that reflects the conversation's topic. Your response is expected to be in JSON in the format shown below.
|
||||||
|
|
||||||
Example conversation:
|
Example conversation:
|
||||||
|
|
||||||
[{"role": "user", "content": "Can you help me with my math homework?"},{"role": "assistant", "content": "Sure, what topic are you struggling with?"}]
|
[{"role": "user", "content": "Can you help me with my math homework?"},{"role": "assistant", "content": "Sure, what topic are you struggling with?"}]
|
||||||
|
|
||||||
Your response (response only with JSON in the format shown):
|
Example response:
|
||||||
|
|
||||||
{"title": "Help with math homework"}
|
{"title": "Help with math homework"}
|
||||||
`
|
`
|
||||||
|
Loading…
Reference in New Issue
Block a user