From a6522dbcd02c23047e32758eed52ac53ef6e2549 Mon Sep 17 00:00:00 2001 From: Matt Low Date: Thu, 30 May 2024 18:22:48 +0000 Subject: [PATCH] Generate title prompt tweak --- pkg/cmd/util/util.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/cmd/util/util.go b/pkg/cmd/util/util.go index 84d3178..cd34895 100644 --- a/pkg/cmd/util/util.go +++ b/pkg/cmd/util/util.go @@ -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"} `