diff --git a/agent/tools/exesql.py b/agent/tools/exesql.py index ea4ca34b83..e1b586af98 100644 --- a/agent/tools/exesql.py +++ b/agent/tools/exesql.py @@ -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 { diff --git a/api/apps/llm_app.py b/api/apps/llm_app.py index 583e05af7c..d9217eddc3 100644 --- a/api/apps/llm_app.py +++ b/api/apps/llm_app.py @@ -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) diff --git a/api/apps/restful_apis/dataset_api.py b/api/apps/restful_apis/dataset_api.py index 55ded90e02..459bf786b8 100644 --- a/api/apps/restful_apis/dataset_api.py +++ b/api/apps/restful_apis/dataset_api.py @@ -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() diff --git a/api/db/services/document_service.py b/api/db/services/document_service.py index bf6ebacbba..2c80e76fc6 100644 --- a/api/db/services/document_service.py +++ b/api/db/services/document_service.py @@ -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}") diff --git a/api/db/services/file_service.py b/api/db/services/file_service.py index 511624799f..7c5945d8af 100644 --- a/api/db/services/file_service.py +++ b/api/db/services/file_service.py @@ -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()) diff --git a/test/testcases/test_web_api/test_llm_app/test_llm_list_unit.py b/test/testcases/test_web_api/test_llm_app/test_llm_list_unit.py index 8bf9227a5d..53a8705f31 100644 --- a/test/testcases/test_web_api/test_llm_app/test_llm_list_unit.py +++ b/test/testcases/test_web_api/test_llm_app/test_llm_list_unit.py @@ -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