refac: title generation

This commit is contained in:
Timothy Jaeryang Baek
2025-01-29 14:40:36 -08:00
parent 4abede9a2b
commit 5420c165c6
3 changed files with 35 additions and 17 deletions

View File

@@ -175,10 +175,10 @@ async def generate_title(
"messages": [{"role": "user", "content": content}],
"stream": False,
**(
{"max_tokens": 50}
{"max_tokens": 1000}
if models[task_model_id]["owned_by"] == "ollama"
else {
"max_completion_tokens": 50,
"max_completion_tokens": 1000,
}
),
"metadata": {