[全量] 初始化项目代码、配置、文档及Agent协同harness
This commit is contained in:
16
langchain-chat/server/knowledge_base/pdf_convert_url.py
Normal file
16
langchain-chat/server/knowledge_base/pdf_convert_url.py
Normal file
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
PDF 转 Markdown 微服务的 HTTP 地址(仅此一处拼 URL,不 import configs,避免旧 .pyc / 错误包名导致仍用 0.0.0.0)。
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
|
||||
_DEFAULT = "http://127.0.0.1:6006/convert/"
|
||||
|
||||
|
||||
def resolve_pdf_convert_post_url() -> str:
|
||||
u = (os.environ.get("PDF_CONVERT_API_URL") or "").strip() or _DEFAULT
|
||||
u = u.replace("0.0.0.0", "127.0.0.1")
|
||||
if not u.startswith("http"):
|
||||
return _DEFAULT
|
||||
return u
|
||||
Reference in New Issue
Block a user