feat:自动剥离大模型返回的markdown代码围栏

This commit is contained in:
ZhangYonghao
2026-03-22 00:43:47 +08:00
parent da15500808
commit bb630358af
6 changed files with 93 additions and 1 deletions

View File

@@ -76,6 +76,7 @@ class Settings:
max_html_length = max(1024, _get_int_env("MAX_HTML_LENGTH", 200_000))
api_key = os.getenv("API_KEY", "").strip()
allow_unsafe_html = _get_bool_env("ALLOW_UNSAFE_HTML", False)
strip_markdown_code_fence = _get_bool_env("STRIP_MARKDOWN_CODE_FENCE", True)
enable_request_debug_log = _get_bool_env("ENABLE_REQUEST_DEBUG_LOG", True)
request_log_max_chars = max(256, _get_int_env("REQUEST_LOG_MAX_CHARS", 10_000))