Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions backend/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,12 @@ HIL_TIMEOUT=300
# COORDINATOR_API_KEY=sk-ant-api03-xxx
# COORDINATOR_MODEL=claude-3-opus-20240229
# COORDINATOR_BASE_URL=https://api.anthropic.com/v1
#
# 【Novita AI 配置示例】
# COORDINATOR_API_TYPE=openai-chat
# COORDINATOR_API_KEY=sk-xxx
# COORDINATOR_MODEL=moonshotai/kimi-k3
# COORDINATOR_BASE_URL=https://api.novita.ai/openai
#
# 使用步骤:
# 1. 复制此文件为 .env.dev
Expand Down
4 changes: 3 additions & 1 deletion backend/app/utils/common_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,9 @@ def split_footnotes(text: str) -> tuple[str, list[tuple[str, str]]]:
"""
main_text = re.sub(
r"\n\[\^\d+\]:.*?(?=\n\[\^|\n\n|\Z)", "", text, flags=re.DOTALL
).strip()
)
# 正文中的脚注引用标记(如 [^1])本身不是可读内容,随定义一起去除
main_text = re.sub(r"\[\^\d+\]", "", main_text).strip()

# 匹配脚注定义
footnotes = re.findall(r"\[\^(\d+)\]:\s*(.+?)(?=\n\[\^|\n\n|\Z)", text, re.DOTALL)
Expand Down