1.SRM数据库驱动调整
2.新增MSDS文件检核逻辑
This commit is contained in:
1 parent
fb8189ef13
commit
09b5e62861
5 files changed
+530
-116
No files matched your search
@@ -1,8 +1,9 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
from typing import Any, Callable
|
||||
|
||||
from flask import current_app
|
||||
|
||||
from app.services.dify import DifyService
|
||||
|
||||
try:
|
||||
@@ -11,9 +12,8 @@ except Exception: # pragma: no cover
|
||||
pyodbc = None
|
||||
|
||||
|
||||
FIXED_ROHS_SQL = """
|
||||
FETCHD_ROHS_SQL = """
|
||||
select
|
||||
TOP(100)
|
||||
t2.supplier_code as supplier_code,
|
||||
t2.supplier_name as supplier_name,
|
||||
t2.material_code as item_code,
|
||||
@@ -47,18 +47,148 @@ where
|
||||
and t2.def1 = '7'
|
||||
"""
|
||||
|
||||
SRM_ROHS_SQL_ALIAS_ORDER: list[str] = [
|
||||
"id",
|
||||
"supplier_code",
|
||||
"supplier_name",
|
||||
"item_code",
|
||||
"item_name",
|
||||
"material",
|
||||
"material_name",
|
||||
"third_code",
|
||||
"test_item",
|
||||
"pb",
|
||||
"cd",
|
||||
"hg",
|
||||
"cr6",
|
||||
"pbbs",
|
||||
"pbdes",
|
||||
"dbp",
|
||||
"bbp",
|
||||
"dehp",
|
||||
"dibp",
|
||||
"cl",
|
||||
"br",
|
||||
"test_date",
|
||||
"attachment",
|
||||
]
|
||||
|
||||
SRM_ROHS_HEADER_LABELS: dict[str, str] = {
|
||||
"id": "SRM系统ID",
|
||||
"supplier_code": "供应商编码",
|
||||
"supplier_name": "供应商名称",
|
||||
"item_code": "物料编码",
|
||||
"item_name": "物料名称",
|
||||
"material": "材质",
|
||||
"material_name": "材质名称",
|
||||
"third_code": "第三方编码",
|
||||
"test_item": "检测项目",
|
||||
"pb": "铅(Pb)",
|
||||
"cd": "镉(Cd)",
|
||||
"hg": "汞(Hg)",
|
||||
"cr6": "六价铬(Cr6+)",
|
||||
"pbbs": "多溴联苯(PBBs)",
|
||||
"pbdes": "多溴二苯醚(PBDEs)",
|
||||
"dbp": "邻苯二甲酸二丁酯(DBP)",
|
||||
"bbp": "邻苯二甲酸丁苄酯(BBP)",
|
||||
"dehp": "邻苯二甲酸二(2-乙基己)酯(DEHP)",
|
||||
"dibp": "邻苯二甲酸二异丁酯(DIBP)",
|
||||
"cl": "氯(Cl)",
|
||||
"br": "溴(Br)",
|
||||
"test_date": "检测日期",
|
||||
"attachment": "附件地址",
|
||||
"dify_result": "判定结果",
|
||||
"dify_message": "判定说明",
|
||||
"writeback_srm": "回写SRM",
|
||||
"writeback_err": "回写错误",
|
||||
}
|
||||
|
||||
FETCHD_MSDS_SQL = """
|
||||
select
|
||||
cc.id as cc_id,
|
||||
cc.supplier_code as supplier_code,
|
||||
cc.supplier_name as supplier_name,
|
||||
cc.material_code as material_code,
|
||||
cc.material_name as material_name,
|
||||
ccm.id as ccm_id,
|
||||
ccm.material as material,
|
||||
ccm.attachment as attachment,
|
||||
ccm.weight as weight
|
||||
from
|
||||
chemical_composition cc
|
||||
inner join chemical_composition_management ccm on
|
||||
cc.id = ccm.chemical_composition_id
|
||||
where
|
||||
cc.def1 = '7'
|
||||
and ccm.def11 is null
|
||||
order by ccm.id
|
||||
"""
|
||||
|
||||
FETCHD_MSDS_DETAIL_SQL = """
|
||||
select
|
||||
ccmb.cas_no as cas_no,
|
||||
ccmb.component_name as component_name,
|
||||
ccmb.concentration as concentration
|
||||
from
|
||||
chemical_composition_management_b ccmb
|
||||
where
|
||||
ccmb.chemical_composition_management_id = ?
|
||||
order by ccmb.id
|
||||
"""
|
||||
|
||||
SRM_MSDS_SQL_ALIAS_ORDER: list[str] = [
|
||||
"cc_id",
|
||||
"supplier_code",
|
||||
"supplier_name",
|
||||
"material_code",
|
||||
"material_name",
|
||||
"ccm_id",
|
||||
"material",
|
||||
"attachment",
|
||||
"weight",
|
||||
]
|
||||
|
||||
SRM_MSDS_DETAIL_ALIAS_ORDER: list[str] = [
|
||||
"cas_no",
|
||||
"component_name",
|
||||
"concentration",
|
||||
]
|
||||
|
||||
SRM_MSDS_HEADER_LABELS: dict[str, str] = {
|
||||
"cc_id": "SRM系统CC_ID",
|
||||
"supplier_code": "供应商编码",
|
||||
"supplier_name": "供应商名称",
|
||||
"material_code": "物料编码",
|
||||
"material_name": "物料名称",
|
||||
"ccm_id": "SRM系统CCM_ID",
|
||||
"material": "材质",
|
||||
"attachment": "附件地址",
|
||||
"weight": "重量",
|
||||
"cas_no": "CAS号",
|
||||
"component_name": "成分名称",
|
||||
"concentration": "浓度",
|
||||
"detail_text": "成分明细",
|
||||
"dify_result": "判定结果",
|
||||
"dify_message": "判定说明",
|
||||
"writeback_srm": "回写SRM",
|
||||
"writeback_err": "回写错误",
|
||||
}
|
||||
|
||||
|
||||
def _connect(conn_str: str):
|
||||
if pyodbc is None:
|
||||
raise RuntimeError('pyodbc is not installed')
|
||||
raise RuntimeError("pyodbc is not installed")
|
||||
return pyodbc.connect(conn_str, timeout=15)
|
||||
|
||||
|
||||
def fetch_rohs_records(conn_str: str) -> list[dict[str, Any]]:
|
||||
def _fetch_records(conn_str: str, sql: str, params: tuple | None = None) -> list[dict[str, Any]]:
|
||||
conn = _connect(conn_str)
|
||||
try:
|
||||
cur = conn.cursor()
|
||||
cur.execute(FIXED_ROHS_SQL)
|
||||
if params:
|
||||
cur.execute(sql, params)
|
||||
else:
|
||||
cur.execute(sql)
|
||||
cols = [c[0] for c in cur.description]
|
||||
rows = cur.fetchall()
|
||||
return [{cols[i]: row[i] for i in range(len(cols))} for row in rows]
|
||||
@@ -66,56 +196,123 @@ def fetch_rohs_records(conn_str: str) -> list[dict[str, Any]]:
|
||||
conn.close()
|
||||
|
||||
|
||||
def writeback_rohs(conn_str: str, *, row_id: str, run_no: str, judgement: str, reason: str) -> None:
|
||||
def _execute_writeback(conn_str: str, sql: str, params: tuple) -> None:
|
||||
conn = _connect(conn_str)
|
||||
try:
|
||||
cur = conn.cursor()
|
||||
cur.execute(
|
||||
"UPDATE control_harmful_substances SET def11=?, def12=?, def13=? WHERE id=?",
|
||||
(run_no, judgement, reason, str(row_id)),
|
||||
)
|
||||
cur.execute(sql, params)
|
||||
conn.commit()
|
||||
finally:
|
||||
conn.close()
|
||||
|
||||
|
||||
def _derive_judgement_and_reason(data: dict[str, Any]) -> tuple[str, str]:
|
||||
judgement = str(data.get("judgement") or data.get("result") or "人工判定").strip()
|
||||
reason = str(data.get("reason") or "").strip()
|
||||
if judgement not in {"合格", "不合格", "人工判定"}:
|
||||
reason = (reason + " | 返回值异常:" + judgement).strip(" |")
|
||||
judgement = "人工判定"
|
||||
return judgement, reason
|
||||
def _derive_dify_result_and_message(data: dict[str, Any]) -> tuple[str, str]:
|
||||
dify_result = str(data.get("dify_result") or data.get("result") or "人工判定").strip()
|
||||
dify_message = str(data.get("dify_message") or data.get("message") or data.get("messge") or "").strip()
|
||||
if dify_result not in {"合格", "不合格", "人工判定"}:
|
||||
dify_message = (dify_message + " | 返回值异常:" + dify_result).strip(" |")
|
||||
dify_result = "人工判定"
|
||||
return dify_result, dify_message
|
||||
|
||||
|
||||
def run_rohs_doc_check_dify_job(*, conn_str: str, run_no: str, agent=None, user: str = "schedule_system", wait_seconds: int = 120, run_id: int | None = None) -> tuple[int, int, int, int, list[dict[str, Any]], list[str]]:
|
||||
def _build_record_text(
|
||||
item: dict[str, Any],
|
||||
alias_order: list[str],
|
||||
header_labels: dict[str, str],
|
||||
detail_rows: list[dict[str, Any]] | None = None,
|
||||
detail_alias_order: list[str] | None = None,
|
||||
) -> str:
|
||||
lines: list[str] = []
|
||||
for key in alias_order:
|
||||
label = header_labels.get(key, key)
|
||||
value = item.get(key)
|
||||
text = "" if value is None else str(value)
|
||||
lines.append(f"{label}: {text}")
|
||||
if detail_rows and detail_alias_order:
|
||||
lines.append("成分明细:")
|
||||
for idx, dr in enumerate(detail_rows, 1):
|
||||
detail_parts: list[str] = []
|
||||
for dk in detail_alias_order:
|
||||
dl = header_labels.get(dk, dk)
|
||||
dv = dr.get(dk)
|
||||
detail_parts.append(f"{dl}: {'' if dv is None else str(dv)}")
|
||||
lines.append(f" [{idx}] " + ", ".join(detail_parts))
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
RecordBuilder = Callable[[str, dict[str, Any], str], tuple[str, str | None]]
|
||||
WritebackFunc = Callable[..., None]
|
||||
PreDifyFunc = Callable[[str, dict[str, Any], str], dict[str, Any] | None]
|
||||
|
||||
|
||||
def _run_check_job_loop(
|
||||
*,
|
||||
conn_str: str,
|
||||
run_no: str,
|
||||
agent,
|
||||
user: str,
|
||||
wait_seconds: int,
|
||||
run_id: int | None,
|
||||
fetch_fn: Callable[[str], list[dict[str, Any]]],
|
||||
build_record_fn: RecordBuilder,
|
||||
writeback_fn: WritebackFunc,
|
||||
row_id_key: str,
|
||||
log_prefix: str,
|
||||
pre_dify_fn: PreDifyFunc | None = None,
|
||||
) -> tuple[int, int, int, int, list[dict[str, Any]], list[str]]:
|
||||
from app.services.schedule.scheduler_service import is_run_cancelled
|
||||
|
||||
use_dify = agent is not None
|
||||
if use_dify and not getattr(agent, "dify_api_key", None):
|
||||
raise RuntimeError("dify_agent_id is set, but Dify api key is missing")
|
||||
|
||||
rows = fetch_rohs_records(conn_str)
|
||||
total_count = len(rows)
|
||||
rows = fetch_fn(conn_str)
|
||||
details: list[dict[str, Any]] = []
|
||||
success_count = 0
|
||||
failed_count = 0
|
||||
skipped_count = 0
|
||||
errors: list[str] = []
|
||||
all_errors: list[str] = []
|
||||
|
||||
from app.services.schedule.scheduler_service import is_run_cancelled
|
||||
for idx, row in enumerate(rows):
|
||||
for row in rows:
|
||||
if run_id is not None and is_run_cancelled(run_id):
|
||||
item = dict(row)
|
||||
item.update({"judgement": "人工判定", "reason": "排程已被删除,执行中断", "writeback_ok": False, "error": "排程已被删除,执行中断"})
|
||||
item.update({
|
||||
"dify_result": "人工判定",
|
||||
"dify_message": "排程已被删除,执行中断",
|
||||
"writeback_srm": False,
|
||||
"writeback_err": "排程已被删除,执行中断",
|
||||
})
|
||||
skipped_count += 1
|
||||
details.append(item)
|
||||
continue
|
||||
|
||||
item = dict(row)
|
||||
row_id_value = str(row.get(row_id_key, ""))
|
||||
|
||||
if pre_dify_fn:
|
||||
pre_result = pre_dify_fn(conn_str, item, row_id_value)
|
||||
if pre_result is not None:
|
||||
item.update(pre_result)
|
||||
failed_count += 1
|
||||
all_errors.append(pre_result.get("writeback_err", ""))
|
||||
details.append(item)
|
||||
continue
|
||||
|
||||
record_text, attachment_url = build_record_fn(conn_str, item, row_id_value)
|
||||
|
||||
dify_ok = False
|
||||
dify_result = "人工判定"
|
||||
dify_message = ""
|
||||
|
||||
try:
|
||||
if use_dify:
|
||||
dify_res = DifyService.run_workflow_streaming(
|
||||
agent=agent,
|
||||
inputs={"inputs": {"run_no": run_no, "records": item}},
|
||||
inputs={
|
||||
"run_no": run_no,
|
||||
"record": record_text,
|
||||
"attachment_url": attachment_url,
|
||||
},
|
||||
user=user,
|
||||
timeout=(5, max(300, int(wait_seconds))),
|
||||
)
|
||||
@@ -123,64 +320,181 @@ def run_rohs_doc_check_dify_job(*, conn_str: str, run_no: str, agent=None, user:
|
||||
dify_error = dify_res.get("error") if isinstance(dify_res, dict) else None
|
||||
if dify_status == "failed" or (dify_error and not dify_res.get("outputs")):
|
||||
err_detail = str(dify_error) if dify_error else f"Dify status={dify_status}"
|
||||
judgement = "人工判定"
|
||||
reason = f"Dify执行失败:{err_detail}"
|
||||
item.update({"judgement": judgement, "reason": reason, "writeback_ok": False, "error": err_detail, "dify_output": dify_res if isinstance(dify_res, dict) else {}})
|
||||
dify_result = "人工判定"
|
||||
dify_message = f"Dify执行失败:{err_detail}"
|
||||
item.update({
|
||||
"dify_result": dify_result,
|
||||
"dify_message": dify_message,
|
||||
"writeback_srm": False,
|
||||
"writeback_err": err_detail,
|
||||
})
|
||||
failed_count += 1
|
||||
errors.append(f"Dify row_id={row.get('id')}: {err_detail}")
|
||||
all_errors.append(f"Dify {log_prefix}={row_id_value}: {err_detail}")
|
||||
details.append(item)
|
||||
continue
|
||||
else:
|
||||
outputs = (dify_res.get("outputs") or {}).get("output") or dify_res.get("outputs") or dify_res
|
||||
if current_app:
|
||||
current_app.logger.info(
|
||||
"[srm-dify] judgement=%s reason=%s",
|
||||
outputs.get("judgement") if isinstance(outputs, dict) else None,
|
||||
outputs.get("reason") if isinstance(outputs, dict) else None,
|
||||
"[%s] %s=%s dify_result=%s dify_message=%s",
|
||||
log_prefix, log_prefix, row_id_value,
|
||||
(outputs.get("dify_result") or outputs.get("result")) if isinstance(outputs, dict) else None,
|
||||
(outputs.get("dify_message") or outputs.get("message")) if isinstance(outputs, dict) else None,
|
||||
)
|
||||
judgement, reason = _derive_judgement_and_reason(outputs if isinstance(outputs, dict) else {})
|
||||
item["dify_output"] = outputs if isinstance(outputs, dict) else {}
|
||||
dify_result, dify_message = _derive_dify_result_and_message(outputs if isinstance(outputs, dict) else {})
|
||||
dify_ok = True
|
||||
else:
|
||||
judgement = "人工判定"
|
||||
reason = "未配置 Agent ID,跳过 Dify"
|
||||
dify_result = "人工判定"
|
||||
dify_message = "未配置 Agent ID,跳过 Dify"
|
||||
dify_ok = True
|
||||
|
||||
try:
|
||||
writeback_rohs(
|
||||
conn_str,
|
||||
row_id=str(row.get("id")),
|
||||
run_no=run_no,
|
||||
judgement=judgement,
|
||||
reason=reason,
|
||||
)
|
||||
item.update({"judgement": judgement, "reason": reason, "writeback_ok": True, "error": item.get("error")})
|
||||
writeback_fn(conn_str, row_id=row_id_value, run_no=run_no, dify_result=dify_result, dify_message=dify_message)
|
||||
item.update({
|
||||
"dify_result": dify_result,
|
||||
"dify_message": dify_message,
|
||||
"writeback_srm": True,
|
||||
"writeback_err": item.get("writeback_err"),
|
||||
})
|
||||
if dify_ok:
|
||||
success_count += 1
|
||||
except Exception as wb_exc:
|
||||
if current_app:
|
||||
current_app.logger.error("[srm-dify] writeback failed row_id=%s error=%s", row.get("id"), wb_exc)
|
||||
item.update({"judgement": judgement, "reason": reason, "writeback_ok": False, "error": str(wb_exc)})
|
||||
current_app.logger.error("[%s] writeback failed %s=%s error=%s", log_prefix, log_prefix, row_id_value, wb_exc)
|
||||
item.update({
|
||||
"dify_result": dify_result,
|
||||
"dify_message": dify_message,
|
||||
"writeback_srm": False,
|
||||
"writeback_err": str(wb_exc),
|
||||
})
|
||||
if dify_ok:
|
||||
failed_count += 1
|
||||
errors.append(f"writeback row_id={row.get('id')}: {wb_exc}")
|
||||
all_errors.append(f"writeback {log_prefix}={row_id_value}: {wb_exc}")
|
||||
except Exception as exc:
|
||||
judgement = "人工判定"
|
||||
reason = f"执行异常:{exc}"
|
||||
item.update({"judgement": judgement, "reason": reason, "writeback_ok": False, "error": str(exc)})
|
||||
dify_result = "人工判定"
|
||||
dify_message = f"执行异常:{exc}"
|
||||
item.update({
|
||||
"dify_result": dify_result,
|
||||
"dify_message": dify_message,
|
||||
"writeback_srm": False,
|
||||
"writeback_err": str(exc),
|
||||
})
|
||||
failed_count += 1
|
||||
errors.append(str(exc))
|
||||
all_errors.append(str(exc))
|
||||
try:
|
||||
writeback_rohs(
|
||||
conn_str,
|
||||
row_id=str(row.get("id")),
|
||||
run_no=run_no,
|
||||
judgement=judgement,
|
||||
reason=reason,
|
||||
)
|
||||
item["writeback_ok"] = True
|
||||
writeback_fn(conn_str, row_id=row_id_value, run_no=run_no, dify_result=dify_result, dify_message=dify_message)
|
||||
item["writeback_srm"] = True
|
||||
except Exception as wb_exc:
|
||||
item["writeback_ok"] = False
|
||||
item["error"] = f"{item.get('error', '')}; writeback failed: {wb_exc}"
|
||||
item["writeback_srm"] = False
|
||||
item["writeback_err"] = f"{item.get('writeback_err', '')}; writeback failed: {wb_exc}"
|
||||
|
||||
details.append(item)
|
||||
|
||||
total_count = success_count + failed_count + skipped_count
|
||||
return total_count, success_count, failed_count, skipped_count, details, errors
|
||||
return total_count, success_count, failed_count, skipped_count, details, all_errors
|
||||
|
||||
|
||||
def fetch_rohs_records(conn_str: str) -> list[dict[str, Any]]:
|
||||
return _fetch_records(conn_str, FETCHD_ROHS_SQL)
|
||||
|
||||
|
||||
def writeback_rohs(conn_str: str, *, row_id: str, run_no: str, dify_result: str, dify_message: str) -> None:
|
||||
_execute_writeback(
|
||||
conn_str,
|
||||
"UPDATE control_harmful_substances SET def11=?, def12=?, def13=? WHERE id=?",
|
||||
(run_no, dify_result, dify_message, str(row_id)),
|
||||
)
|
||||
|
||||
|
||||
def run_rohs_doc_check_dify_job(
|
||||
*,
|
||||
conn_str: str,
|
||||
run_no: str,
|
||||
agent=None,
|
||||
user: str = "schedule_system",
|
||||
wait_seconds: int = 120,
|
||||
run_id: int | None = None,
|
||||
) -> tuple[int, int, int, int, list[dict[str, Any]], list[str]]:
|
||||
def _build_record(conn_str: str, item: dict[str, Any], row_id_value: str) -> tuple[str, str | None]:
|
||||
text = _build_record_text(item, SRM_ROHS_SQL_ALIAS_ORDER, SRM_ROHS_HEADER_LABELS)
|
||||
return text, item.get("attachment")
|
||||
|
||||
return _run_check_job_loop(
|
||||
conn_str=conn_str,
|
||||
run_no=run_no,
|
||||
agent=agent,
|
||||
user=user,
|
||||
wait_seconds=wait_seconds,
|
||||
run_id=run_id,
|
||||
fetch_fn=fetch_rohs_records,
|
||||
build_record_fn=_build_record,
|
||||
writeback_fn=writeback_rohs,
|
||||
row_id_key="id",
|
||||
log_prefix="srm-rohs-dify",
|
||||
)
|
||||
|
||||
|
||||
def fetch_msds_records(conn_str: str) -> list[dict[str, Any]]:
|
||||
return _fetch_records(conn_str, FETCHD_MSDS_SQL)
|
||||
|
||||
|
||||
def fetch_msds_detail_records(conn_str: str, ccm_id: str) -> list[dict[str, Any]]:
|
||||
return _fetch_records(conn_str, FETCHD_MSDS_DETAIL_SQL, params=(str(ccm_id),))
|
||||
|
||||
|
||||
def writeback_msds(conn_str: str, *, row_id: str, run_no: str, dify_result: str, dify_message: str) -> None:
|
||||
_execute_writeback(
|
||||
conn_str,
|
||||
"UPDATE chemical_composition_management SET def11=?, def12=?, def13=? WHERE id=?",
|
||||
(run_no, dify_result, dify_message, str(row_id)),
|
||||
)
|
||||
|
||||
|
||||
def _msds_pre_dify_fn(conn_str: str, item: dict[str, Any], row_id_value: str) -> dict[str, Any] | None:
|
||||
try:
|
||||
detail_rows = fetch_msds_detail_records(conn_str, row_id_value)
|
||||
except Exception as detail_exc:
|
||||
return {
|
||||
"dify_result": "人工判定",
|
||||
"dify_message": f"查询成分明细失败:{detail_exc}",
|
||||
"writeback_srm": False,
|
||||
"writeback_err": str(detail_exc),
|
||||
}
|
||||
detail_summary_lines: list[str] = []
|
||||
for dr in detail_rows:
|
||||
parts = [f"{SRM_MSDS_HEADER_LABELS.get(dk, dk)}: {dr.get(dk, '')}" for dk in SRM_MSDS_DETAIL_ALIAS_ORDER]
|
||||
detail_summary_lines.append(", ".join(parts))
|
||||
item["detail_text"] = "; ".join(detail_summary_lines) if detail_summary_lines else ""
|
||||
item["_detail_rows"] = detail_rows
|
||||
return None
|
||||
|
||||
|
||||
def _msds_build_record(conn_str: str, item: dict[str, Any], row_id_value: str) -> tuple[str, str | None]:
|
||||
detail_rows = item.pop("_detail_rows", [])
|
||||
text = _build_record_text(item, SRM_MSDS_SQL_ALIAS_ORDER, SRM_MSDS_HEADER_LABELS, detail_rows, SRM_MSDS_DETAIL_ALIAS_ORDER)
|
||||
return text, item.get("attachment")
|
||||
|
||||
|
||||
def run_msds_doc_check_dify_job(
|
||||
*,
|
||||
conn_str: str,
|
||||
run_no: str,
|
||||
agent=None,
|
||||
user: str = "schedule_system",
|
||||
wait_seconds: int = 120,
|
||||
run_id: int | None = None,
|
||||
) -> tuple[int, int, int, int, list[dict[str, Any]], list[str]]:
|
||||
return _run_check_job_loop(
|
||||
conn_str=conn_str,
|
||||
run_no=run_no,
|
||||
agent=agent,
|
||||
user=user,
|
||||
wait_seconds=wait_seconds,
|
||||
run_id=run_id,
|
||||
fetch_fn=fetch_msds_records,
|
||||
build_record_fn=_msds_build_record,
|
||||
writeback_fn=writeback_msds,
|
||||
row_id_key="ccm_id",
|
||||
log_prefix="srm-msds-dify",
|
||||
pre_dify_fn=_msds_pre_dify_fn,
|
||||
)
|
||||
Reference in new issue
Block a user