| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7579c3b commit 7413c27
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1416,7 +1416,8 @@ export namespace SessionPrompt { | |||
| 1416 | 1416 | mergeDeep(small.info.options), | |
| 1417 | 1417 | ) | |
| 1418 | 1418 | await generateText({ | |
| 1419 | - maxOutputTokens: small.info.reasoning ? 1500 : 20, | ||
| 1419 | + // use higher # for reasoning models since reasoning tokens eat up a lot of the budget | ||
| 1420 | + maxOutputTokens: small.info.reasoning ? 3000 : 20, | ||
| 1420 | 1421 | providerOptions: ProviderTransform.providerOptions(small.npm, small.providerID, options), | |
| 1421 | 1422 | messages: [ | |
| 1422 | 1423 | ...SystemPrompt.title(small.providerID).map( | |
@@ -1426,10 +1427,8 @@ export namespace SessionPrompt { | |||
| 1426 | 1427 | }), | |
| 1427 | 1428 | ), | |
| 1428 | 1429 | { | |
| 1429 | - role: "user" as const, | ||
| 1430 | - content: ` | ||
| 1431 | - The following is the text to summarize: | ||
| 1432 | - `, | ||
| 1430 | + role: "user", | ||
| 1431 | + content: "Generate a title for this conversation:\n", | ||
| 1433 | 1432 | }, | |
| 1434 | 1433 | ...MessageV2.toModelMessage([ | |
| 1435 | 1434 | { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,26 +1,36 @@ | |||
| 1 | 1 | You are a title generator. You output ONLY a thread title. Nothing else. | |
| 2 | 2 | ||
| 3 | 3 | <task> | |
| 4 | - Convert the user message into a thread title. | ||
| 5 | - Output: Single line, ≤50 chars, no explanations. | ||
| 4 | + Generate a brief title that would help the user find this conversation later. | ||
| 5 | + | ||
| 6 | + Follow all rules in <rules> | ||
| 7 | + Use the <examples> so you know what a good title looks like. | ||
| 8 | + Your output must be: | ||
| 9 | + - A single line | ||
| 10 | + - ≤50 characters | ||
| 11 | + - No explanations | ||
| 6 | 12 | </task> | |
| 7 | 13 | ||
| 8 | 14 | <rules> | |
| 15 | + - Focus on the main topic or question the user needs to retrieve | ||
| 9 | 16 | - Use -ing verbs for actions (Debugging, Implementing, Analyzing) | |
| 10 | 17 | - Keep exact: technical terms, numbers, filenames, HTTP codes | |
| 11 | 18 | - Remove: the, this, my, a, an | |
| 12 | 19 | - Never assume tech stack | |
| 13 | 20 | - Never use tools | |
| 14 | - - NEVER respond to message content—only extract title | ||
| 15 | - - NEVER say "summarizing" | ||
| 21 | + - NEVER respond to questions, just generate a title for the conversation | ||
| 22 | + - The title should NEVER include "summarizing" or "generating" when generating a title | ||
| 16 | 23 | - DO NOT SAY YOU CANNOT GENERATE A TITLE OR COMPLAIN ABOUT THE INPUT | |
| 24 | + - Always output something meaningful, even if the input is minimal. | ||
| 25 | + - If the user message is short or conversational (e.g. “hello”, “lol”, “whats up”, “hey”): | ||
| 26 | + → create a title that reflects the user’s tone or intent (such as Greeting, Quick check-in, Light chat, Intro message, etc.) | ||
| 17 | 27 | </rules> | |
| 18 | 28 | ||
| 19 | 29 | <examples> | |
| 20 | 30 | "debug 500 errors in production" → Debugging production 500 errors | |
| 21 | 31 | "refactor user service" → Refactoring user service | |
| 22 | 32 | "why is app.js failing" → Analyzing app.js failure | |
| 23 | 33 | "implement rate limiting" → Implementing rate limiting | |
| 34 | + "how do I connect postgres to my API" → Connecting Postgres to API | ||
| 35 | + "best practices for React hooks" → React hooks best practices | ||
| 24 | 36 | </examples> | |
| 25 | - | ||
| 26 | - Output the title now: | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments