Generate title prompt tweak

This commit is contained in:
Matt Low 2024-05-30 18:22:48 +00:00
parent 97cd047861
commit a6522dbcd0
1 changed files with 2 additions and 2 deletions

View File

@ -150,13 +150,13 @@ func FormatForExternalPrompt(messages []model.Message, system bool) string {
}
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:
[{"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"}
`