fix: improve title, summary, and content formatting

- youtube.py: fetch real title via YouTube oEmbed API instead of falling back to video ID
- youtube.py: paragraphize transcript text by grouping sentences (4 per para)
- enricher.py: increase max_tokens 1024→2048 to prevent summary truncation
- web.py: restore paragraph breaks after HTML stripping
This commit is contained in:
joungmin
2026-02-28 09:39:05 +09:00
parent 9739daf481
commit 826961f2b9
3 changed files with 47 additions and 20 deletions

View File

@@ -64,7 +64,7 @@ def enrich(content_type: str, title: str, url: str, text: str) -> dict:
client = _get_client()
req = GenericChatRequest(
messages=[UserMessage(content=[TextContent(text=prompt)])],
max_tokens=1024,
max_tokens=2048,
temperature=0,
)
det = ChatDetails(