加入「拾语」:首页 AI 近况摘要(流式)
- 汇总学习目录、博客分类与最近更新的 10 篇文章 - 调用本地 Ollama qwen3.8:27b 生成技术栈与最近在做 - 每次生成入库,10 天后首次打开首页自动重新生成 - 前端逐字展开缓存摘要,过期时读取 AI 流式响应 - 首页在开场引导结束后显示;拾脉目录页内嵌展示 - 修复摘要面板标题栏命中全局 header 定位的问题
This commit is contained in:
+8
-2
@@ -8,6 +8,7 @@ from django.utils.html import strip_tags
|
||||
from .models import Category, Post, Tag , SiteInfo
|
||||
from explore.models import Idea, Repository
|
||||
from mindmaps.models import MindMap
|
||||
from digest.services import DIGEST_DAYS, DIGEST_MODEL, digest_is_stale, latest_digest
|
||||
|
||||
def category_list(request):
|
||||
# """首页:展示所有分类"""
|
||||
@@ -39,12 +40,17 @@ def category_list(request):
|
||||
|
||||
|
||||
|
||||
digest = latest_digest()
|
||||
|
||||
return render(request, 'base2.html', {
|
||||
# 'categories': categories,
|
||||
'total_posts': total_posts, # 文章总数
|
||||
'total_categories': total_categories, # 分类总数
|
||||
'mindmap_count' : mindmap_count
|
||||
|
||||
'mindmap_count' : mindmap_count,
|
||||
'digest': digest,
|
||||
'digest_stale': digest_is_stale(digest),
|
||||
'digest_days': DIGEST_DAYS,
|
||||
'digest_model': DIGEST_MODEL,
|
||||
})
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user