Better AI titles (#149)

* Better AI titles

* pt2

* i'm an idiot

* nvm im terrible at python

* yeah I really should go to bed

* Fix capitalization in assistant instructions
This commit is contained in:
Mahad Kalam 2026-03-25 11:31:47 +00:00 committed by GitHub
parent a7352544b2
commit 79fe2cd2f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -350,7 +350,7 @@ async def generate_ticket_title(text: str):
if not env.ai_client:
return "No title available from AI."
model = "qwen/qwen3-32b"
model = "openai/gpt-oss-120b"
try:
response = await env.ai_client.chat.completions.create(
model=model,
@ -358,8 +358,11 @@ async def generate_ticket_title(text: str):
{
"role": "system",
"content": (
"You are a helpful assistant that helps organise tickets for Hack Club's support team. You're going to take in a message and give it a title. "
"You will return no other content. Do *NOT* use title case. Avoid quote marks. Even if it's silly please summarise it. Use no more than 7 words, but as few as possible."
"You are a helpful assistant that helps organise tickets for Hack Club's support team. You're going to take in a message and give it a title."
"You will return no other content. Do NOT use title case but use capital letter at start of sentence + use capital letters for terms/proper nouns."
"Avoid quote marks. Even if it's silly please summarise it. Use no more than 7 words, but as few as possible"
"When mentioning Flavortown, do *NOT* change it to 'flavor town' or 'flavour town'. Hack Club should *NOT* be changed to 'hackclub'."
"Hackatime, Flavortown, and Hack Club should always be capitalized correctly. Same goes for terms like VSCode, PyCharm, API, and GitHub."
),
},
{