mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-15 01:18:26 +08:00
chore: fix some comments to improve readability (#14756)
### What problem does this PR solve? fix some comments to improve readability ### Type of change - [x] Documentation Update --------- Signed-off-by: box4wangjing <box4wangjing@outlook.com>
This commit is contained in:
@@ -64,9 +64,9 @@ class ExeSQLParam(ToolParamBase):
|
||||
self.check_positive_integer(self.max_records, "Maximum number of records")
|
||||
if self.database == "rag_flow":
|
||||
if self.host == "ragflow-mysql":
|
||||
raise ValueError("For the security reason, it dose not support database named rag_flow.")
|
||||
raise ValueError("For the security reason, it does not support database named rag_flow.")
|
||||
if self.password == "infini_rag_flow":
|
||||
raise ValueError("For the security reason, it dose not support database named rag_flow.")
|
||||
raise ValueError("For the security reason, it does not support database named rag_flow.")
|
||||
|
||||
def get_input_form(self) -> dict[str, dict]:
|
||||
return {
|
||||
|
||||
@@ -326,7 +326,7 @@ async def add_llm():
|
||||
if len(arr) == 0:
|
||||
raise Exception("Not known.")
|
||||
except KeyError:
|
||||
msg += f"{factory} dose not support this model({factory}/{mdl_nm})"
|
||||
msg += f"{factory} does not support this model({factory}/{mdl_nm})"
|
||||
except Exception as e:
|
||||
msg += f"\nFail to access model({factory}/{mdl_nm})." + str(e)
|
||||
|
||||
|
||||
@@ -620,7 +620,7 @@ def delete_index(tenant_id, dataset_id, index_type):
|
||||
if index_type not in dataset_api_service._VALID_INDEX_TYPES:
|
||||
return get_error_argument_result(f"Invalid index type '{index_type}'")
|
||||
# `wipe` controls whether the persisted index artefacts (graph rows /
|
||||
# raptor summaries) are removed. Default true preserves historical
|
||||
# raptor summaries) are removed. Default true preserves historical
|
||||
# behaviour; pass wipe=false to cancel the running task while keeping
|
||||
# prior progress so it can be resumed later.
|
||||
wipe_arg = (request.args.get("wipe", "true") or "true").strip().lower()
|
||||
|
||||
@@ -455,7 +455,7 @@ class DocumentService(CommonService):
|
||||
chunk_index_name = search.index_name(tenant_id)
|
||||
chunk_index_exists = settings.docStoreConn.index_exist(chunk_index_name, doc.kb_id)
|
||||
|
||||
# Cancel all running tasks first Using preset function in task_service.py --- set cancel flag in Redis
|
||||
# Cancel all running tasks first using preset function in task_service.py --- set cancel flag in Redis
|
||||
try:
|
||||
cancel_all_task_of(doc.id)
|
||||
logging.info(f"Cancelled all tasks for document {doc.id}")
|
||||
|
||||
@@ -705,7 +705,7 @@ class FileService(CommonService):
|
||||
|
||||
# Pre-resolve the full redirect chain so that AsyncWebCrawler never
|
||||
# follows a server-sent redirect to an unvalidated (potentially
|
||||
# internal) host. Each hop is SSRF-checked before being followed;
|
||||
# internal) host. Each hop is SSRF-checked before being followed;
|
||||
# the validated (hostname, ip) pairs are pinned via Chromium's
|
||||
# --host-resolver-rules so the browser cannot re-resolve any of them
|
||||
# through a fresh DNS query.
|
||||
@@ -741,7 +741,7 @@ class FileService(CommonService):
|
||||
)
|
||||
|
||||
# Build a single MAP rule string covering every validated hostname
|
||||
# in the redirect chain. Chromium uses the pinned IP for each,
|
||||
# in the redirect chain. Chromium uses the pinned IP for each,
|
||||
# skipping DNS entirely and eliminating the rebinding window.
|
||||
_map_rules = ",".join(f"MAP {h} {ip}" for h, ip in host_pins.items())
|
||||
|
||||
|
||||
@@ -783,7 +783,7 @@ def test_add_llm_model_type_probe_and_persistence_matrix_unit(monkeypatch):
|
||||
|
||||
res = _call({"llm_factory": "FRKey", "llm_name": "m", "model_type": module.LLMType.RERANK.value, "verify": True})
|
||||
assert res["code"] == 0
|
||||
assert "dose not support this model(FRKey/m)" in res["data"]["message"]
|
||||
assert "does not support this model(FRKey/m)" in res["data"]["message"]
|
||||
|
||||
res = _call({"llm_factory": "FRFail", "llm_name": "m", "model_type": module.LLMType.RERANK.value, "verify": True})
|
||||
assert res["code"] == 0
|
||||
|
||||
Reference in New Issue
Block a user