Compare commits
2
Commits
61cb91c490
..
dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a5a7b29764
|
||
|
|
e2ecbc747d
|
No files matched your search
+11
-1
@@ -50,10 +50,20 @@ def _shorten_with_claude(text: str, max_chars: int) -> str:
|
|||||||
model="claude-sonnet-4-6",
|
model="claude-sonnet-4-6",
|
||||||
max_tokens=256,
|
max_tokens=256,
|
||||||
timeout=CLAUDE_TIMEOUT_S,
|
timeout=CLAUDE_TIMEOUT_S,
|
||||||
|
system=(
|
||||||
|
"You rewrite a message to fit within a strict character budget. "
|
||||||
|
"Output ONLY the rewritten message — no preamble, no quotes, no "
|
||||||
|
"explanation, no commentary, no labels, no character count. "
|
||||||
|
"Preserve the original meaning, tone, and voice. Plain text only."
|
||||||
|
),
|
||||||
messages=[
|
messages=[
|
||||||
{
|
{
|
||||||
"role": "user",
|
"role": "user",
|
||||||
"content": f"Shorten this to {max_chars} characters: {text}",
|
"content": (
|
||||||
|
f"Rewrite the following message so it is at most "
|
||||||
|
f"{max_chars} characters. Reply with the rewritten "
|
||||||
|
f"message only.\n\n{text}"
|
||||||
|
),
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -256,6 +256,7 @@ _BUILTIN_HASHTAG_CHANNELS: tuple[str, ...] = (
|
|||||||
"#weather",
|
"#weather",
|
||||||
"#protest",
|
"#protest",
|
||||||
# --- Dev / testing ---
|
# --- Dev / testing ---
|
||||||
|
"#development",
|
||||||
"#devtest",
|
"#devtest",
|
||||||
"#devtestdevtest",
|
"#devtestdevtest",
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in new issue
Block a user