fix: title generation + ai sdk upgrade (#1392)
This commit is contained in:
parent
f19d3d4071
commit
9d5d8a3ea7
38 changed files with 1422 additions and 2360 deletions
|
|
@ -123,10 +123,17 @@ export const updateDocumentPrompt = (
|
|||
${currentContent}`;
|
||||
};
|
||||
|
||||
export const titlePrompt = `Generate a very short chat title (2-5 words max) based on the user's message.
|
||||
Rules:
|
||||
- Maximum 30 characters
|
||||
- No quotes, colons, hashtags, or markdown
|
||||
- Just the topic/intent, not a full sentence
|
||||
- If the message is a greeting like "hi" or "hello", respond with just "New conversation"
|
||||
- Be concise: "Weather in NYC" not "User asking about the weather in New York City"`;
|
||||
export const titlePrompt = `Generate a short chat title (2-5 words) summarizing the user's message.
|
||||
|
||||
Output ONLY the title text. No prefixes, no formatting.
|
||||
|
||||
Examples:
|
||||
- "what's the weather in nyc" → Weather in NYC
|
||||
- "help me write an essay about space" → Space Essay Help
|
||||
- "hi" → New Conversation
|
||||
- "debug my python code" → Python Debugging
|
||||
|
||||
Bad outputs (never do this):
|
||||
- "# Space Essay" (no hashtags)
|
||||
- "Title: Weather" (no prefixes)
|
||||
- ""NYC Weather"" (no quotes)`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue