Andrew commited on
Commit
225a957
·
1 Parent(s): a3bd4fd

Improve title generation

Browse files
src/lib/server/textGeneration/title.ts CHANGED
@@ -43,12 +43,13 @@ export async function generateTitle(prompt: string, modelId?: string, opts?: { a
43
  generateFromDefaultEndpoint({
44
  messages: [{ from: "user", content: `Prompt to summarize: "${prompt}"` }],
45
  preprompt: `You are a titling assistant.
46
- Summarize the user's request into a short title of at most 4 words.
47
- Use the SAME language as the user's message.
48
- Do not answer the question.
49
- Do not include the word prompt into your response.
50
- Do not include quotes, emojis, hashtags or trailing punctuation.
51
- Return ONLY the title text.`,
 
52
  generateSettings: {
53
  max_tokens: 30,
54
  },
 
43
  generateFromDefaultEndpoint({
44
  messages: [{ from: "user", content: `Prompt to summarize: "${prompt}"` }],
45
  preprompt: `You are a titling assistant.
46
+ Summarize the user's request into a short title of at most 4 words.
47
+ Use the SAME language as the user's message.
48
+ Do not answer the question.
49
+ Do not include the word prompt into your response.
50
+ Do not say "summarize" or "summary" in the title.
51
+ Do not include quotes, emojis, hashtags or trailing punctuation.
52
+ Return ONLY the title text.`,
53
  generateSettings: {
54
  max_tokens: 30,
55
  },