{"openapi":"3.1.0","info":{"title":"题材投资辅助系统","version":"0.2.0"},"paths":{"/":{"get":{"summary":"Home","operationId":"home__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/sources/url":{"post":{"summary":"Add Url","operationId":"add_url_sources_url_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_add_url_sources_url_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/poll":{"post":{"summary":"Poll Now","operationId":"poll_now_poll_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/ingest/url-once":{"post":{"summary":"Ingest Url Once","description":"单次拉取 URL：不入库 config，仅保存文档并触发一次解读（已存在则跳过分析）。","operationId":"ingest_url_once_ingest_url_once_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_ingest_url_once_ingest_url_once_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingest/paste":{"post":{"summary":"Ingest Paste","description":"粘贴剪报正文：一次性入库并解读；相同正文 sha 去重，不会每次启动重分析。","operationId":"ingest_paste_ingest_paste_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_ingest_paste_ingest_paste_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/themes":{"get":{"summary":"List Themes","operationId":"list_themes_themes_get","parameters":[{"name":"sort","in":"query","required":false,"schema":{"type":"string","description":"investment | created","default":"investment","title":"Sort"},"description":"investment | created"},{"name":"order","in":"query","required":false,"schema":{"type":"string","description":"asc | desc","default":"desc","title":"Order"},"description":"asc | desc"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/themes/{theme_id}":{"get":{"summary":"Theme Detail","operationId":"theme_detail_themes__theme_id__get","parameters":[{"name":"theme_id","in":"path","required":true,"schema":{"type":"integer","title":"Theme Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/themes/{theme_id}/edit":{"post":{"summary":"Edit Theme","description":"手动修改题材名称、叙述、驱动类型、重要性（0–1）。","operationId":"edit_theme_themes__theme_id__edit_post","parameters":[{"name":"theme_id","in":"path","required":true,"schema":{"type":"integer","title":"Theme Id"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_edit_theme_themes__theme_id__edit_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/themes/{theme_id}/pause":{"post":{"summary":"Pause","operationId":"pause_themes__theme_id__pause_post","parameters":[{"name":"theme_id","in":"path","required":true,"schema":{"type":"integer","title":"Theme Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/themes/{theme_id}/resume":{"post":{"summary":"Resume","operationId":"resume_themes__theme_id__resume_post","parameters":[{"name":"theme_id","in":"path","required":true,"schema":{"type":"integer","title":"Theme Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/themes/{theme_id}/archive":{"post":{"summary":"Archive","operationId":"archive_themes__theme_id__archive_post","parameters":[{"name":"theme_id","in":"path","required":true,"schema":{"type":"integer","title":"Theme Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/themes/{theme_id}/postmortem":{"post":{"summary":"Close Theme","operationId":"close_theme_themes__theme_id__postmortem_post","parameters":[{"name":"theme_id","in":"path","required":true,"schema":{"type":"integer","title":"Theme Id"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_close_theme_themes__theme_id__postmortem_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/themes/{theme_id}/reanalyze":{"post":{"summary":"Reanalyze","description":"对指定题材重新运行五步投资分析——综合所有关联文档，并保存版本历史。","operationId":"reanalyze_themes__theme_id__reanalyze_post","parameters":[{"name":"theme_id","in":"path","required":true,"schema":{"type":"integer","title":"Theme Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/themes/{theme_id}/versions":{"get":{"summary":"Theme Versions","description":"查看题材分析版本历史（JSON API）。","operationId":"theme_versions_themes__theme_id__versions_get","parameters":[{"name":"theme_id","in":"path","required":true,"schema":{"type":"integer","title":"Theme Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/themes/{theme_id}/link_doc":{"post":{"summary":"Link Doc","description":"手动将一篇文档关联到指定题材（followup / manual）。","operationId":"link_doc_themes__theme_id__link_doc_post","parameters":[{"name":"theme_id","in":"path","required":true,"schema":{"type":"integer","title":"Theme Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_link_doc_themes__theme_id__link_doc_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/themes/{theme_id}/unlink_doc":{"post":{"summary":"Unlink Doc","description":"取消指定文档与题材的关联。","operationId":"unlink_doc_themes__theme_id__unlink_doc_post","parameters":[{"name":"theme_id","in":"path","required":true,"schema":{"type":"integer","title":"Theme Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_unlink_doc_themes__theme_id__unlink_doc_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/documents/{doc_id}/link_theme":{"post":{"summary":"Doc Link Theme","description":"从文档侧将文档关联到指定题材。","operationId":"doc_link_theme_documents__doc_id__link_theme_post","parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"integer","title":"Doc Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_doc_link_theme_documents__doc_id__link_theme_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/documents/{doc_id}/unlink_theme":{"post":{"summary":"Doc Unlink Theme","description":"从文档侧取消文档与指定题材的关联。","operationId":"doc_unlink_theme_documents__doc_id__unlink_theme_post","parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"integer","title":"Doc Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_doc_unlink_theme_documents__doc_id__unlink_theme_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/documents/{doc_id}/reassign_theme":{"post":{"summary":"Doc Reassign Theme","description":"将文档从原题材移动（改归属）到新题材。旧关联将被删除，新关联会被建立。","operationId":"doc_reassign_theme_documents__doc_id__reassign_theme_post","parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"integer","title":"Doc Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_doc_reassign_theme_documents__doc_id__reassign_theme_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/themes/{theme_id}/set_deadline":{"post":{"summary":"Set Deadline","description":"手动设置题材投资截止日期。","operationId":"set_deadline_themes__theme_id__set_deadline_post","parameters":[{"name":"theme_id","in":"path","required":true,"schema":{"type":"integer","title":"Theme Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_set_deadline_themes__theme_id__set_deadline_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/themes/reanalyze_all":{"post":{"summary":"Reanalyze All","description":"对所有有关联文档的题材批量重新运行投资分析（含已归档）。","operationId":"reanalyze_all_themes_reanalyze_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/themes/merge":{"post":{"summary":"Merge Themes","operationId":"merge_themes_themes_merge_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_merge_themes_themes_merge_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/investment":{"get":{"summary":"Investment Ranking","description":"按综合投资分排行的所有题材投资建议页。","operationId":"investment_ranking_investment_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/today":{"get":{"summary":"Today Valuable News","description":"今日已入库新闻中，已关联题材且具备跟踪/投资分析价值的一条流式列表（含解读摘要与投资要点）。","operationId":"today_valuable_news_today_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/inbox":{"get":{"summary":"Inbox","operationId":"inbox_inbox_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/inbox/{item_id}/dismiss":{"post":{"summary":"Dismiss Inbox","operationId":"dismiss_inbox_inbox__item_id__dismiss_post","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/inbox/{item_id}/promote":{"post":{"summary":"Promote Inbox","operationId":"promote_inbox_inbox__item_id__promote_post","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/alerts":{"get":{"summary":"Alerts","operationId":"alerts_alerts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/docs":{"get":{"summary":"Docs List","operationId":"docs_list_docs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/documents":{"get":{"summary":"Documents List","operationId":"documents_list_documents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/documents/{doc_id}":{"get":{"summary":"Doc Detail","operationId":"doc_detail_documents__doc_id__get","parameters":[{"name":"doc_id","in":"path","required":true,"schema":{"type":"integer","title":"Doc Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/theme-collect":{"get":{"tags":["题材搜集"],"summary":"Theme Collect List","operationId":"theme_collect_list_theme_collect_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/theme-collect/new":{"get":{"tags":["题材搜集"],"summary":"Theme Collect New Get","operationId":"theme_collect_new_get_theme_collect_new_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["题材搜集"],"summary":"Theme Collect New Post","operationId":"theme_collect_new_post_theme_collect_new_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_theme_collect_new_post_theme_collect_new_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/theme-collect/{job_id}":{"get":{"tags":["题材搜集"],"summary":"Theme Collect Detail","operationId":"theme_collect_detail_theme_collect__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"integer","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/theme-collect/{job_id}/save":{"post":{"tags":["题材搜集"],"summary":"Theme Collect Save","operationId":"theme_collect_save_theme_collect__job_id__save_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"integer","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/theme-collect/{job_id}/submit-review":{"post":{"tags":["题材搜集"],"summary":"Theme Collect Submit Review","operationId":"theme_collect_submit_review_theme_collect__job_id__submit_review_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"integer","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/theme-collect/{job_id}/withdraw-review":{"post":{"tags":["题材搜集"],"summary":"Theme Collect Withdraw Review","operationId":"theme_collect_withdraw_review_theme_collect__job_id__withdraw_review_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"integer","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/theme-collect/{job_id}/approve":{"post":{"tags":["题材搜集"],"summary":"Theme Collect Approve","operationId":"theme_collect_approve_theme_collect__job_id__approve_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"integer","title":"Job Id"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_theme_collect_approve_theme_collect__job_id__approve_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/theme-collect/{job_id}/reject":{"post":{"tags":["题材搜集"],"summary":"Theme Collect Reject","operationId":"theme_collect_reject_theme_collect__job_id__reject_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"integer","title":"Job Id"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_theme_collect_reject_theme_collect__job_id__reject_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/theme-collect/{job_id}/merge-suggest":{"post":{"tags":["题材搜集"],"summary":"Theme Collect Merge Suggest","operationId":"theme_collect_merge_suggest_theme_collect__job_id__merge_suggest_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"integer","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/theme-collect/{job_id}/follow-up":{"post":{"tags":["题材搜集"],"summary":"Theme Collect Follow Up","operationId":"theme_collect_follow_up_theme_collect__job_id__follow_up_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"integer","title":"Job Id"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_theme_collect_follow_up_theme_collect__job_id__follow_up_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/theme-collect/jobs":{"post":{"tags":["题材搜集"],"summary":"Api Theme Collect Create Job","description":"影刀或脚本：创建搜集任务（JSON）。若配置了 theme_collect.api_token 须 Bearer 鉴权。","operationId":"api_theme_collect_create_job_api_theme_collect_jobs_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeCollectCreateJobBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/theme-collect/jobs/{job_id}/slots":{"patch":{"tags":["题材搜集"],"summary":"Api Theme Collect Patch Slots","description":"按 slot_key 合并更新多模型原文（仅草稿）。","operationId":"api_theme_collect_patch_slots_api_theme_collect_jobs__job_id__slots_patch","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"integer","title":"Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeCollectPatchSlotsBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/theme-collect/jobs/{job_id}/merge-suggest":{"post":{"tags":["题材搜集"],"summary":"Api Theme Collect Merge Suggest","description":"服务端 LLM 合并槽位文本为结构化成稿（不流转审核状态）。","operationId":"api_theme_collect_merge_suggest_api_theme_collect_jobs__job_id__merge_suggest_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"integer","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/llm-tasks":{"get":{"summary":"List Llm Tasks","description":"三方拉取待处理的 LLM 任务。\n返回 prompt_system / prompt_user 供三方自行调用模型。\n\n建议三方在拉取后立即调用 PATCH /api/llm-tasks/{id}/status 标记为 processing，\n或在回填结果的同时自动完成状态流转。","operationId":"list_llm_tasks_api_llm_tasks_get","parameters":[{"name":"scene","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scene"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","default":"pending","title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/llm-tasks/{task_id}/status":{"post":{"summary":"Update Task Status","description":"三方领取任务后标记为 processing，防止重复拉取。","operationId":"update_task_status_api_llm_tasks__task_id__status_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_update_task_status_api_llm_tasks__task_id__status_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/llm-tasks/{task_id}/result":{"post":{"summary":"Submit Task Result","description":"三方回填 LLM 答案。本系统收到后自动触发后续写库流程：\n- interpret 场景 → apply_interpretation → （可选）投资分析\n- investment 场景 → 保存 ThemeInvestmentBrief","operationId":"submit_task_result_api_llm_tasks__task_id__result_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResultBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/llm-tasks/stats":{"get":{"summary":"Llm Task Stats","description":"任务队列概览（各 scene × status 计数）。","operationId":"llm_task_stats_api_llm_tasks_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"Body_add_url_sources_url_post":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"Body_add_url_sources_url_post"},"Body_close_theme_themes__theme_id__postmortem_post":{"properties":{"outcome":{"type":"string","title":"Outcome","default":"unknown"},"lessons":{"type":"string","title":"Lessons","default":""}},"type":"object","title":"Body_close_theme_themes__theme_id__postmortem_post"},"Body_doc_link_theme_documents__doc_id__link_theme_post":{"properties":{"theme_id":{"type":"integer","title":"Theme Id"},"role":{"type":"string","title":"Role","default":"manual"}},"type":"object","required":["theme_id"],"title":"Body_doc_link_theme_documents__doc_id__link_theme_post"},"Body_doc_reassign_theme_documents__doc_id__reassign_theme_post":{"properties":{"from_theme_id":{"type":"integer","title":"From Theme Id"},"to_theme_id":{"type":"integer","title":"To Theme Id"},"role":{"type":"string","title":"Role","default":"manual"}},"type":"object","required":["from_theme_id","to_theme_id"],"title":"Body_doc_reassign_theme_documents__doc_id__reassign_theme_post"},"Body_doc_unlink_theme_documents__doc_id__unlink_theme_post":{"properties":{"theme_id":{"type":"integer","title":"Theme Id"}},"type":"object","required":["theme_id"],"title":"Body_doc_unlink_theme_documents__doc_id__unlink_theme_post"},"Body_edit_theme_themes__theme_id__edit_post":{"properties":{"name":{"type":"string","title":"Name","default":""},"narrative":{"type":"string","title":"Narrative","default":""},"driver_type":{"type":"string","title":"Driver Type","default":""},"importance_score":{"type":"string","title":"Importance Score","default":""}},"type":"object","title":"Body_edit_theme_themes__theme_id__edit_post"},"Body_ingest_paste_ingest_paste_post":{"properties":{"body":{"type":"string","title":"Body"},"title":{"type":"string","title":"Title","default":""}},"type":"object","required":["body"],"title":"Body_ingest_paste_ingest_paste_post"},"Body_ingest_url_once_ingest_url_once_post":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"Body_ingest_url_once_ingest_url_once_post"},"Body_link_doc_themes__theme_id__link_doc_post":{"properties":{"doc_id":{"type":"integer","title":"Doc Id"},"role":{"type":"string","title":"Role","default":"followup"}},"type":"object","required":["doc_id"],"title":"Body_link_doc_themes__theme_id__link_doc_post"},"Body_merge_themes_themes_merge_post":{"properties":{"from_id":{"type":"integer","title":"From Id"},"into_id":{"type":"integer","title":"Into Id"}},"type":"object","required":["from_id","into_id"],"title":"Body_merge_themes_themes_merge_post"},"Body_set_deadline_themes__theme_id__set_deadline_post":{"properties":{"deadline":{"type":"string","title":"Deadline"},"deadline_note":{"type":"string","title":"Deadline Note","default":""}},"type":"object","required":["deadline"],"title":"Body_set_deadline_themes__theme_id__set_deadline_post"},"Body_theme_collect_approve_theme_collect__job_id__approve_post":{"properties":{"reviewer_note":{"type":"string","title":"Reviewer Note","default":""}},"type":"object","title":"Body_theme_collect_approve_theme_collect__job_id__approve_post"},"Body_theme_collect_follow_up_theme_collect__job_id__follow_up_post":{"properties":{"follow_text":{"type":"string","title":"Follow Text","default":""}},"type":"object","title":"Body_theme_collect_follow_up_theme_collect__job_id__follow_up_post"},"Body_theme_collect_new_post_theme_collect_new_post":{"properties":{"user_prompt":{"type":"string","title":"User Prompt","default":""}},"type":"object","title":"Body_theme_collect_new_post_theme_collect_new_post"},"Body_theme_collect_reject_theme_collect__job_id__reject_post":{"properties":{"reviewer_note":{"type":"string","title":"Reviewer Note","default":""}},"type":"object","title":"Body_theme_collect_reject_theme_collect__job_id__reject_post"},"Body_unlink_doc_themes__theme_id__unlink_doc_post":{"properties":{"doc_id":{"type":"integer","title":"Doc Id"}},"type":"object","required":["doc_id"],"title":"Body_unlink_doc_themes__theme_id__unlink_doc_post"},"Body_update_task_status_api_llm_tasks__task_id__status_post":{"properties":{"new_status":{"type":"string","title":"New Status"}},"type":"object","required":["new_status"],"title":"Body_update_task_status_api_llm_tasks__task_id__status_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"TaskResultBody":{"properties":{"answer":{"type":"string","title":"Answer"}},"type":"object","required":["answer"],"title":"TaskResultBody","description":"三方异步 LLM 任务回填 JSON Body（须为模块级模型，便于 OpenAPI 生成）。"},"ThemeCollectCreateJobBody":{"properties":{"user_prompt":{"type":"string","maxLength":20000,"minLength":1,"title":"User Prompt"}},"type":"object","required":["user_prompt"],"title":"ThemeCollectCreateJobBody"},"ThemeCollectPatchSlotsBody":{"properties":{"slots":{"additionalProperties":{"type":"string"},"type":"object","title":"Slots"}},"type":"object","title":"ThemeCollectPatchSlotsBody"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"servers":[{"url":"/stock"}]}