sample_id
stringlengths
21
196
text
stringlengths
105
936k
metadata
dict
category
stringclasses
6 values
infiniflow/ragflow:test/testcases/test_sdk_api/test_message_management/test_update_message_status.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "test/testcases/test_sdk_api/test_message_management/test_update_message_status.py", "license": "Apache License 2.0", "lines": 64, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template":...
test
infiniflow/ragflow:test/testcases/test_web_api/test_message_app/test_add_message.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "test/testcases/test_web_api/test_message_app/test_add_message.py", "license": "Apache License 2.0", "lines": 147, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
infiniflow/ragflow:test/testcases/test_web_api/test_message_app/test_forget_message.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "test/testcases/test_web_api/test_message_app/test_forget_message.py", "license": "Apache License 2.0", "lines": 60, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
infiniflow/ragflow:test/testcases/test_web_api/test_message_app/test_search_message.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "test/testcases/test_web_api/test_message_app/test_search_message.py", "license": "Apache License 2.0", "lines": 90, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
infiniflow/ragflow:test/testcases/test_web_api/test_message_app/test_update_message_status.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "test/testcases/test_web_api/test_message_app/test_update_message_status.py", "license": "Apache License 2.0", "lines": 95, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
infiniflow/ragflow:api/db/services/system_settings_service.py
# # Copyright 2026 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "api/db/services/system_settings_service.py", "license": "Apache License 2.0", "lines": 39, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
infiniflow/ragflow:test/testcases/test_web_api/test_message_app/test_get_message_content.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "test/testcases/test_web_api/test_message_app/test_get_message_content.py", "license": "Apache License 2.0", "lines": 57, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
infiniflow/ragflow:test/testcases/test_web_api/test_message_app/test_get_recent_message.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "test/testcases/test_web_api/test_message_app/test_get_recent_message.py", "license": "Apache License 2.0", "lines": 70, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
infiniflow/ragflow:test/testcases/test_web_api/test_message_app/test_list_message.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "test/testcases/test_web_api/test_message_app/test_list_message.py", "license": "Apache License 2.0", "lines": 90, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
infiniflow/ragflow:common/data_source/bitbucket/connector.py
from __future__ import annotations import copy from collections.abc import Callable from collections.abc import Iterator from datetime import datetime from datetime import timezone from typing import Any from typing import TYPE_CHECKING from typing_extensions import override from common.data_source.config import IND...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/bitbucket/connector.py", "license": "Apache License 2.0", "lines": 340, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/data_source/bitbucket/utils.py
from __future__ import annotations import time from collections.abc import Callable from collections.abc import Iterator from datetime import datetime from datetime import timezone from typing import Any import httpx from common.data_source.config import REQUEST_TIMEOUT_SECONDS, DocumentSource from common.data_sourc...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/bitbucket/utils.py", "license": "Apache License 2.0", "lines": 250, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/data_source/cross_connector_utils/rate_limit_wrapper.py
import time import logging from collections.abc import Callable from functools import wraps from typing import Any from typing import cast from typing import TypeVar import requests F = TypeVar("F", bound=Callable[..., Any]) class RateLimitTriedTooManyTimesError(Exception): pass class _RateLimitDecorator: ...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/cross_connector_utils/rate_limit_wrapper.py", "license": "Apache License 2.0", "lines": 93, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/data_source/cross_connector_utils/retry_wrapper.py
from collections.abc import Callable import logging from logging import Logger from typing import Any from typing import cast from typing import TypeVar import requests from retry import retry from common.data_source.config import REQUEST_TIMEOUT_SECONDS F = TypeVar("F", bound=Callable[..., Any]) logger = logging.ge...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/cross_connector_utils/retry_wrapper.py", "license": "Apache License 2.0", "lines": 78, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
infiniflow/ragflow:common/data_source/zendesk_connector.py
import copy import logging import time from collections.abc import Callable from collections.abc import Iterator from typing import Any import requests from pydantic import BaseModel from requests.exceptions import HTTPError from typing_extensions import override from common.data_source.config import ZENDESK_CONNECTO...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/zendesk_connector.py", "license": "Apache License 2.0", "lines": 564, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/data_source/imap_connector.py
import copy import email from email.header import decode_header import imaplib import logging import os import re from datetime import datetime, timedelta from datetime import timezone from email.message import Message from email.utils import collapse_rfc2231_value, getaddresses from enum import Enum from typing import...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/imap_connector.py", "license": "Apache License 2.0", "lines": 595, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/data_source/connector_runner.py
import sys import time import logging from collections.abc import Generator from datetime import datetime from typing import Generic from typing import TypeVar from common.data_source.interfaces import ( BaseConnector, CheckpointedConnector, CheckpointedConnectorWithPermSync, CheckpointOutput, LoadC...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/connector_runner.py", "license": "Apache License 2.0", "lines": 184, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/data_source/github/connector.py
import copy import logging from collections.abc import Callable from collections.abc import Generator from datetime import datetime from datetime import timedelta from datetime import timezone from enum import Enum from typing import Any from typing import cast from github import Github, Auth from github import RateLi...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/github/connector.py", "license": "Apache License 2.0", "lines": 865, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/data_source/github/models.py
from typing import Any from github import Repository from github.Requester import Requester from pydantic import BaseModel class SerializedRepository(BaseModel): # id is part of the raw_data as well, just pulled out for convenience id: int headers: dict[str, str | int] raw_data: dict[str, Any] d...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/github/models.py", "license": "Apache License 2.0", "lines": 13, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
infiniflow/ragflow:common/data_source/github/rate_limit_utils.py
import time import logging from datetime import datetime from datetime import timedelta from datetime import timezone from github import Github def sleep_after_rate_limit_exception(github_client: Github) -> None: """ Sleep until the GitHub rate limit resets. Args: github_client: The GitHub clien...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/github/rate_limit_utils.py", "license": "Apache License 2.0", "lines": 20, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
infiniflow/ragflow:common/data_source/github/utils.py
import logging from github import Github from github.Repository import Repository from common.data_source.models import ExternalAccess from .models import SerializedRepository def get_external_access_permission( repo: Repository, github_client: Github ) -> ExternalAccess: """ Get the external access pe...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/github/utils.py", "license": "Apache License 2.0", "lines": 36, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
infiniflow/ragflow:common/data_source/gitlab_connector.py
import fnmatch import itertools from collections import deque from collections.abc import Iterable from collections.abc import Iterator from datetime import datetime from datetime import timezone from typing import Any from typing import TypeVar import gitlab from gitlab.v4.objects import Project from common.data_sour...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/gitlab_connector.py", "license": "Apache License 2.0", "lines": 292, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/data_source/asana_connector.py
from collections.abc import Iterator import time from datetime import datetime import logging from typing import Any, Dict import asana import requests from common.data_source.config import CONTINUE_ON_CONNECTOR_FAILURE, INDEX_BATCH_SIZE, DocumentSource from common.data_source.interfaces import LoadConnector, PollConne...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/asana_connector.py", "license": "Apache License 2.0", "lines": 387, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:api/db/joint_services/memory_message_service.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "api/db/joint_services/memory_message_service.py", "license": "Apache License 2.0", "lines": 390, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/doc_store/es_conn_base.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/doc_store/es_conn_base.py", "license": "Apache License 2.0", "lines": 292, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/doc_store/es_conn_pool.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/doc_store/es_conn_pool.py", "license": "Apache License 2.0", "lines": 71, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/doc_store/infinity_conn_base.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/doc_store/infinity_conn_base.py", "license": "Apache License 2.0", "lines": 667, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/doc_store/infinity_conn_pool.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/doc_store/infinity_conn_pool.py", "license": "Apache License 2.0", "lines": 85, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:memory/services/messages.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "memory/services/messages.py", "license": "Apache License 2.0", "lines": 263, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:memory/services/query.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "memory/services/query.py", "license": "Apache License 2.0", "lines": 166, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:memory/utils/es_conn.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "memory/utils/es_conn.py", "license": "Apache License 2.0", "lines": 526, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:memory/utils/infinity_conn.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "memory/utils/infinity_conn.py", "license": "Apache License 2.0", "lines": 462, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:memory/utils/prompt_util.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "memory/utils/prompt_util.py", "license": "Apache License 2.0", "lines": 167, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
documentation
infiniflow/ragflow:common/data_source/airtable_connector.py
from datetime import datetime, timezone import logging from typing import Any, Generator import requests from pyairtable import Api as AirtableApi from common.data_source.config import AIRTABLE_CONNECTOR_SIZE_THRESHOLD, INDEX_BATCH_SIZE, DocumentSource from common.data_source.exceptions import ConnectorMissingCreden...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/airtable_connector.py", "license": "Apache License 2.0", "lines": 138, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/parser_config_utils.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/parser_config_utils.py", "license": "Apache License 2.0", "lines": 28, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
infiniflow/ragflow:agent/component/excel_processor.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "agent/component/excel_processor.py", "license": "Apache License 2.0", "lines": 337, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/metadata_utils.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/metadata_utils.py", "license": "Apache License 2.0", "lines": 300, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:agent/component/docs_generator.py
import json import os import re import base64 from datetime import datetime from abc import ABC from io import BytesIO from typing import Optional from functools import partial from reportlab.lib.pagesizes import A4 from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.units import inc...
{ "repo_id": "infiniflow/ragflow", "file_path": "agent/component/docs_generator.py", "license": "Apache License 2.0", "lines": 1310, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/data_source/box_connector.py
"""Box connector""" import logging from datetime import datetime, timezone from typing import Any from box_sdk_gen import BoxClient from common.data_source.config import DocumentSource, INDEX_BATCH_SIZE from common.data_source.exceptions import ( ConnectorMissingCredentialError, ConnectorValidationError, ) fro...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/box_connector.py", "license": "Apache License 2.0", "lines": 141, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:api/db/services/memory_service.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "api/db/services/memory_service.py", "license": "Apache License 2.0", "lines": 153, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:api/utils/memory_utils.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "api/utils/memory_utils.py", "license": "Apache License 2.0", "lines": 49, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
infiniflow/ragflow:test/testcases/test_web_api/test_memory_app/test_create_memory.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "test/testcases/test_web_api/test_memory_app/test_create_memory.py", "license": "Apache License 2.0", "lines": 93, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
infiniflow/ragflow:test/testcases/test_web_api/test_memory_app/test_list_memory.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "test/testcases/test_web_api/test_memory_app/test_list_memory.py", "license": "Apache License 2.0", "lines": 105, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
infiniflow/ragflow:test/testcases/test_web_api/test_memory_app/test_rm_memory.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "test/testcases/test_web_api/test_memory_app/test_rm_memory.py", "license": "Apache License 2.0", "lines": 47, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
infiniflow/ragflow:test/testcases/test_web_api/test_memory_app/test_update_memory.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "test/testcases/test_web_api/test_memory_app/test_update_memory.py", "license": "Apache License 2.0", "lines": 142, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
infiniflow/ragflow:rag/llm/ocr_model.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "rag/llm/ocr_model.py", "license": "Apache License 2.0", "lines": 122, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:run_tests.py
#!/usr/bin/env python3 # # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
{ "repo_id": "infiniflow/ragflow", "file_path": "run_tests.py", "license": "Apache License 2.0", "lines": 222, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:rag/utils/gcs_conn.py
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
{ "repo_id": "infiniflow/ragflow", "file_path": "rag/utils/gcs_conn.py", "license": "Apache License 2.0", "lines": 180, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:test/unit_test/utils/test_raptor_utils.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "test/unit_test/utils/test_raptor_utils.py", "license": "Apache License 2.0", "lines": 232, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
infiniflow/ragflow:api/apps/evaluation_app.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "api/apps/evaluation_app.py", "license": "Apache License 2.0", "lines": 389, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:api/db/services/evaluation_service.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "api/db/services/evaluation_service.py", "license": "Apache License 2.0", "lines": 544, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/http_client.py
# Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/http_client.py", "license": "Apache License 2.0", "lines": 232, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
license
infiniflow/ragflow:agent/component/exit_loop.py
# # Copyright 2024 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "agent/component/exit_loop.py", "license": "Apache License 2.0", "lines": 26, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
infiniflow/ragflow:agent/component/loop.py
# # Copyright 2024 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "agent/component/loop.py", "license": "Apache License 2.0", "lines": 68, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:agent/component/loopitem.py
# # Copyright 2024 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "agent/component/loopitem.py", "license": "Apache License 2.0", "lines": 147, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/data_source/webdav_connector.py
"""WebDAV connector""" import logging import os from datetime import datetime, timezone from typing import Any, Optional from webdav4.client import Client as WebDAVClient from common.data_source.utils import ( get_file_ext, ) from common.data_source.config import DocumentSource, INDEX_BATCH_SIZE, BLOB_STORAGE_SIZ...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/webdav_connector.py", "license": "Apache License 2.0", "lines": 333, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/data_source/moodle_connector.py
from __future__ import annotations import logging import os from collections.abc import Generator from datetime import datetime, timezone from retry import retry from typing import Any, Optional from markdownify import markdownify as md from moodle import Moodle as MoodleClient, MoodleException from common.data_sour...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/moodle_connector.py", "license": "Apache License 2.0", "lines": 477, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:rag/utils/ob_conn.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "rag/utils/ob_conn.py", "license": "Apache License 2.0", "lines": 1252, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:agent/component/variable_assigner.py
# # Copyright 2024 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "agent/component/variable_assigner.py", "license": "Apache License 2.0", "lines": 173, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/data_source/jira/connector.py
"""Checkpointed Jira connector that emits markdown blobs for each issue.""" from __future__ import annotations import argparse import copy import logging import os import re from collections.abc import Callable, Generator, Iterable, Iterator, Sequence from datetime import datetime, timedelta, timezone from typing imp...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/jira/connector.py", "license": "Apache License 2.0", "lines": 837, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/data_source/jira/utils.py
"""Helper utilities for the Jira connector.""" from __future__ import annotations import os from collections.abc import Collection from datetime import datetime, timezone from typing import Any, Iterable from jira.resources import Issue from common.data_source.utils import datetime_from_string JIRA_SERVER_API_VERS...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/jira/utils.py", "license": "Apache License 2.0", "lines": 115, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:agent/component/list_operations.py
from abc import ABC import os from agent.component.base import ComponentBase, ComponentParamBase from api.utils.api_utils import timeout class ListOperationsParam(ComponentParamBase): """ Define the List Operations component parameters. """ def __init__(self): super().__init__() self.qu...
{ "repo_id": "infiniflow/ragflow", "file_path": "agent/component/list_operations.py", "license": "Apache License 2.0", "lines": 145, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:check_comment_ascii.py
#!/usr/bin/env python3 """ Check whether given python files contain non-ASCII comments. How to check the whole git repo: ``` $ git ls-files -z -- '*.py' | xargs -0 python3 check_comment_ascii.py ``` """ import sys import tokenize import ast import pathlib import re ASCII = re.compile(r"^[\n -~]*\Z") # Printable A...
{ "repo_id": "infiniflow/ragflow", "file_path": "check_comment_ascii.py", "license": "Apache License 2.0", "lines": 39, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
documentation
infiniflow/ragflow:common/data_source/google_drive/connector.py
"""Google Drive connector""" import copy import logging import os import sys import threading from collections.abc import Callable, Generator, Iterator from enum import Enum from functools import partial from typing import Any, Protocol, cast from urllib.parse import urlparse from google.auth.exceptions import Refres...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/google_drive/connector.py", "license": "Apache License 2.0", "lines": 1104, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/data_source/google_drive/doc_conversion.py
import io import logging import mimetypes from datetime import datetime, timezone from pathlib import Path from typing import Any, cast from urllib.parse import urlparse, urlunparse from googleapiclient.errors import HttpError # type: ignore # type: ignore from googleapiclient.http import MediaIoBaseDownload # type...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/google_drive/doc_conversion.py", "license": "Apache License 2.0", "lines": 510, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/data_source/google_drive/file_retrieval.py
import logging from collections.abc import Callable, Iterator from datetime import datetime, timezone from enum import Enum from googleapiclient.discovery import Resource # type: ignore from googleapiclient.errors import HttpError # type: ignore from common.data_source.google_drive.constant import DRIVE_FOLDER_TYPE...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/google_drive/file_retrieval.py", "license": "Apache License 2.0", "lines": 306, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/data_source/google_drive/model.py
from enum import Enum from typing import Any from pydantic import BaseModel, ConfigDict, field_serializer, field_validator from common.data_source.google_util.util_threadpool_concurrency import ThreadSafeDict from common.data_source.models import ConnectorCheckpoint, SecondsSinceUnixEpoch GoogleDriveFileType = dict[...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/google_drive/model.py", "license": "Apache License 2.0", "lines": 113, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/data_source/google_drive/section_extraction.py
from typing import Any from pydantic import BaseModel from common.data_source.google_util.resource import GoogleDocsService from common.data_source.models import TextSection HEADING_DELIMITER = "\n" class CurrentHeading(BaseModel): id: str | None text: str def get_document_sections( docs_service: Goo...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/google_drive/section_extraction.py", "license": "Apache License 2.0", "lines": 145, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/data_source/google_util/auth.py
import json import logging from typing import Any from google.auth.transport.requests import Request # type: ignore from google.oauth2.credentials import Credentials as OAuthCredentials # type: ignore # type: ignore from google.oauth2.service_account import Credentials as ServiceAccountCredentials # type: ignore ...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/google_util/auth.py", "license": "Apache License 2.0", "lines": 128, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/data_source/google_util/constant.py
from enum import Enum from common.data_source.config import DocumentSource SLIM_BATCH_SIZE = 500 # NOTE: do not need https://www.googleapis.com/auth/documents.readonly # this is counted under `/auth/drive.readonly` GOOGLE_SCOPES = { DocumentSource.GOOGLE_DRIVE: [ "https://www.googleapis.com/auth/drive.rea...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/google_util/constant.py", "license": "Apache License 2.0", "lines": 89, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
documentation
infiniflow/ragflow:common/data_source/google_util/oauth_flow.py
import json import os import threading from typing import Any, Callable from common.data_source.config import DocumentSource from common.data_source.google_util.constant import GOOGLE_SCOPES def _get_requested_scopes(source: DocumentSource) -> list[str]: """Return the scopes to request, honoring an optional over...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/google_util/oauth_flow.py", "license": "Apache License 2.0", "lines": 97, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/data_source/google_util/resource.py
import logging from collections.abc import Callable from typing import Any from google.auth.exceptions import RefreshError # type: ignore from google.oauth2.credentials import Credentials as OAuthCredentials # type: ignore # type: ignore from google.oauth2.service_account import Credentials as ServiceAccountCredent...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/google_util/resource.py", "license": "Apache License 2.0", "lines": 93, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
infiniflow/ragflow:common/data_source/google_util/util.py
import json import logging import os import re import socket from collections.abc import Callable, Iterator from enum import Enum from typing import Any import unicodedata from googleapiclient.errors import HttpError # type: ignore # type: ignore from common.data_source.config import DocumentSource from common.data_...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/google_util/util.py", "license": "Apache License 2.0", "lines": 192, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/data_source/google_util/util_threadpool_concurrency.py
import collections.abc import copy import threading from collections.abc import Callable, Iterator, MutableMapping from typing import Any, TypeVar, overload from pydantic import GetCoreSchemaHandler from pydantic_core import core_schema R = TypeVar("R") KT = TypeVar("KT") # Key type VT = TypeVar("VT") # Value type ...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/google_util/util_threadpool_concurrency.py", "license": "Apache License 2.0", "lines": 110, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:agent/component/varaiable_aggregator.py
# # Copyright 2024 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "agent/component/varaiable_aggregator.py", "license": "Apache License 2.0", "lines": 70, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/exceptions.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/exceptions.py", "license": "Apache License 2.0", "lines": 23, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
infiniflow/ragflow:common/settings.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/settings.py", "license": "Apache License 2.0", "lines": 345, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/signal_utils.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/signal_utils.py", "license": "Apache License 2.0", "lines": 49, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
infiniflow/ragflow:agent/component/data_operations.py
# # Copyright 2024 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "agent/component/data_operations.py", "license": "Apache License 2.0", "lines": 196, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/connection_utils.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/connection_utils.py", "license": "Apache License 2.0", "lines": 120, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/log_utils.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/log_utils.py", "license": "Apache License 2.0", "lines": 72, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:api/apps/connector_app.py
# # Copyright 2024 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "api/apps/connector_app.py", "license": "Apache License 2.0", "lines": 401, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:api/db/services/connector_service.py
# # Copyright 2024 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "api/db/services/connector_service.py", "license": "Apache License 2.0", "lines": 265, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/data_source/blob_connector.py
"""Blob storage connector""" import logging import os from datetime import datetime, timezone from typing import Any, Optional from common.data_source.utils import ( create_s3_client, detect_bucket_region, download_object, extract_size_bytes, get_file_ext, ) from common.data_source.config import Bl...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/blob_connector.py", "license": "Apache License 2.0", "lines": 257, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/data_source/config.py
"""Configuration constants and enum definitions""" import json import os from datetime import datetime, timezone from enum import Enum from typing import cast def get_current_tz_offset() -> int: # datetime now() gets local time, datetime.now(timezone.utc) gets UTC time. # remove tzinfo to compare non-timezone...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/config.py", "license": "Apache License 2.0", "lines": 245, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
infiniflow/ragflow:common/data_source/confluence_connector.py
"""Confluence connector""" import copy import json import logging import time from datetime import datetime, timezone, timedelta from pathlib import Path from typing import Any, cast, Iterator, Callable, Generator import requests from typing_extensions import override from urllib.parse import quote import bs4 from ...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/confluence_connector.py", "license": "Apache License 2.0", "lines": 1830, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/data_source/discord_connector.py
"""Discord connector""" import asyncio import logging import os from datetime import datetime, timezone from typing import Any, AsyncIterable, Iterable from discord import Client, MessageType from discord.channel import TextChannel, Thread from discord.flags import Intents from discord.message import Message as Disco...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/discord_connector.py", "license": "Apache License 2.0", "lines": 285, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/data_source/dropbox_connector.py
"""Dropbox connector""" import logging from datetime import timezone from typing import Any from dropbox import Dropbox from dropbox.exceptions import ApiError, AuthError from dropbox.files import FileMetadata, FolderMetadata from common.data_source.config import INDEX_BATCH_SIZE, DocumentSource from common.data_sou...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/dropbox_connector.py", "license": "Apache License 2.0", "lines": 172, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/data_source/exceptions.py
"""Exception class definitions""" class ConnectorMissingCredentialError(Exception): """Missing credentials exception""" def __init__(self, connector_name: str): super().__init__(f"Missing credentials for {connector_name}") class ConnectorValidationError(Exception): """Connector validation except...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/exceptions.py", "license": "Apache License 2.0", "lines": 19, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
infiniflow/ragflow:common/data_source/file_types.py
PRESENTATION_MIME_TYPE = ( "application/vnd.openxmlformats-officedocument.presentationml.presentation" ) SPREADSHEET_MIME_TYPE = ( "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" ) WORD_PROCESSING_MIME_TYPE = ( "application/vnd.openxmlformats-officedocument.wordprocessingml.document" ) ...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/file_types.py", "license": "Apache License 2.0", "lines": 36, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
infiniflow/ragflow:common/data_source/gmail_connector.py
import logging from typing import Any from google.oauth2.credentials import Credentials as OAuthCredentials from google.oauth2.service_account import Credentials as ServiceAccountCredentials from googleapiclient.errors import HttpError from common.data_source.config import INDEX_BATCH_SIZE, SLIM_BATCH_SIZE, DocumentSo...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/gmail_connector.py", "license": "Apache License 2.0", "lines": 298, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/data_source/html_utils.py
import logging import re from copy import copy from dataclasses import dataclass from io import BytesIO from typing import IO import bs4 from common.data_source.config import HTML_BASED_CONNECTOR_TRANSFORM_LINKS_STRATEGY, \ HtmlBasedConnectorTransformLinksStrategy, WEB_CONNECTOR_IGNORED_CLASSES, WEB_CONNECTOR_IGN...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/html_utils.py", "license": "Apache License 2.0", "lines": 181, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/data_source/interfaces.py
"""Interface definitions""" import abc import uuid from abc import ABC, abstractmethod from enum import IntFlag, auto from types import TracebackType from typing import Any, Dict, Generator, TypeVar, Generic, Callable, TypeAlias from collections.abc import Iterator from anthropic import BaseModel from common.data_sour...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/interfaces.py", "license": "Apache License 2.0", "lines": 327, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/data_source/models.py
"""Data model definitions for all connectors""" from dataclasses import dataclass from datetime import datetime from typing import Any, Optional, List, Sequence, NamedTuple from typing_extensions import TypedDict, NotRequired from pydantic import BaseModel from enum import Enum @dataclass(frozen=True) class ExternalA...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/models.py", "license": "Apache License 2.0", "lines": 250, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/data_source/notion_connector.py
import html import logging from collections.abc import Generator from datetime import datetime, timezone from pathlib import Path from typing import Any, Optional from urllib.parse import urlparse from retry import retry from common.data_source.config import ( INDEX_BATCH_SIZE, NOTION_CONNECTOR_DISABLE_RECURS...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/notion_connector.py", "license": "Apache License 2.0", "lines": 549, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/data_source/sharepoint_connector.py
"""SharePoint connector""" from typing import Any import msal from office365.graph_client import GraphClient from office365.runtime.client_request import ClientRequestException from office365.sharepoint.client_context import ClientContext from common.data_source.config import INDEX_BATCH_SIZE from common.data_source....
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/sharepoint_connector.py", "license": "Apache License 2.0", "lines": 100, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/data_source/slack_connector.py
"""Slack connector""" import itertools import logging import re from collections.abc import Callable, Generator from datetime import datetime, timezone from http.client import IncompleteRead, RemoteDisconnected from typing import Any, cast from urllib.error import URLError from slack_sdk import WebClient from slack_s...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/slack_connector.py", "license": "Apache License 2.0", "lines": 576, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/data_source/teams_connector.py
"""Microsoft Teams connector""" from typing import Any import msal from office365.graph_client import GraphClient from office365.runtime.client_request_exception import ClientRequestException from common.data_source.exceptions import ( ConnectorValidationError, InsufficientPermissionsError, UnexpectedVal...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/data_source/teams_connector.py", "license": "Apache License 2.0", "lines": 92, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:rag/svr/sync_data_source.py
# # Copyright 2024 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "rag/svr/sync_data_source.py", "license": "Apache License 2.0", "lines": 1148, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:rag/utils/file_utils.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "rag/utils/file_utils.py", "license": "Apache License 2.0", "lines": 229, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
infiniflow/ragflow:common/config_utils.py
# # Copyright 2025 The InfiniFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
{ "repo_id": "infiniflow/ragflow", "file_path": "common/config_utils.py", "license": "Apache License 2.0", "lines": 123, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex