sample_id stringlengths 21 196 | text stringlengths 105 936k | metadata dict | category stringclasses 6
values |
|---|---|---|---|
OpenBMB/ChatDev:server/services/attachment_service.py | """Attachment helpers shared by HTTP routes and executors."""
import logging
import mimetypes
import os
import shutil
import tempfile
from pathlib import Path
from typing import Any, Dict, List, Optional
from fastapi import UploadFile
from entity.messages import MessageBlock, MessageBlockType
from utils.attachments ... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "server/services/attachment_service.py",
"license": "Apache License 2.0",
"lines": 102,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
OpenBMB/ChatDev:server/services/message_handler.py | import logging
from typing import Any, Dict
from utils.exceptions import ValidationError
from server.services.session_execution import SessionExecutionController
from server.services.session_store import WorkflowSessionStore
class MessageHandler:
"""Routes WebSocket messages to the appropriate handlers."""
... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "server/services/message_handler.py",
"license": "Apache License 2.0",
"lines": 68,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
OpenBMB/ChatDev:server/services/prompt_channel.py | """PromptChannel implementation backed by WebSocket sessions."""
import asyncio
from typing import Any, Dict, List, Optional
from entity.messages import MessageBlock
from server.services.attachment_service import AttachmentService
from server.services.session_execution import SessionExecutionController
from utils.att... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "server/services/prompt_channel.py",
"license": "Apache License 2.0",
"lines": 109,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
OpenBMB/ChatDev:server/services/session_execution.py | """Human input coordination for workflow sessions."""
import concurrent.futures
import logging
import time
from concurrent.futures import Future
from typing import Any, Dict, Optional
from utils.exceptions import ValidationError, TimeoutError as CustomTimeoutError, WorkflowCancelledError
from utils.structured_logger ... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "server/services/session_execution.py",
"license": "Apache License 2.0",
"lines": 132,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
OpenBMB/ChatDev:server/services/session_store.py | """Session persistence primitives for workflow runs."""
import logging
import time
from dataclasses import dataclass, field
from enum import Enum
from threading import Event
from typing import Any, Dict, Optional
from server.services.artifact_events import ArtifactEventQueue
class SessionStatus(Enum):
"""Lifecy... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "server/services/session_store.py",
"license": "Apache License 2.0",
"lines": 105,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
OpenBMB/ChatDev:server/services/vuegraphs_storage.py | """
SQLite-backed storage helpers for Vue graph editor payloads.
"""
import os
import sqlite3
from pathlib import Path
from typing import Optional
_INITIALIZED_PATHS: set[Path] = set()
def _get_db_path() -> Path:
"""Resolve the SQLite database path, allowing overrides via env."""
return Path(os.getenv("VUE... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "server/services/vuegraphs_storage.py",
"license": "Apache License 2.0",
"lines": 51,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
OpenBMB/ChatDev:server/services/websocket_executor.py | """GraphExecutor variant that reports results over WebSocket."""
import asyncio
from typing import List
from utils.logger import WorkflowLogger
from workflow.graph import GraphExecutor
from workflow.graph_context import GraphContext
from server.services.attachment_service import AttachmentService
from server.service... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "server/services/websocket_executor.py",
"license": "Apache License 2.0",
"lines": 59,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
OpenBMB/ChatDev:server/services/websocket_logger.py | import asyncio
from typing import Any, Dict
from entity.enums import LogLevel, EventType
from utils.logger import WorkflowLogger, LogEntry
from utils.structured_logger import get_workflow_logger
class WebSocketLogger(WorkflowLogger):
"""Workflow logger that also pushes entries via WebSocket."""
def __init__... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "server/services/websocket_logger.py",
"license": "Apache License 2.0",
"lines": 23,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
OpenBMB/ChatDev:server/services/websocket_manager.py | """WebSocket connection manager used by FastAPI app."""
import asyncio
import json
import logging
import time
import traceback
import uuid
from typing import Any, Dict, Optional
from fastapi import WebSocket
from server.services.message_handler import MessageHandler
from server.services.attachment_service import Att... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "server/services/websocket_manager.py",
"license": "Apache License 2.0",
"lines": 152,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
OpenBMB/ChatDev:server/services/workflow_run_service.py | """Service responsible for executing workflows for WebSocket sessions."""
import logging
from pathlib import Path
from typing import List, Optional, Union
from check.check import load_config
from entity.graph_config import GraphConfig
from entity.messages import Message
from entity.enums import LogLevel
from utils.ex... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "server/services/workflow_run_service.py",
"license": "Apache License 2.0",
"lines": 268,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
OpenBMB/ChatDev:server/services/workflow_storage.py | """Utilities for validating and persisting workflow YAML files."""
import re
from pathlib import Path
from typing import Any, Tuple
import yaml
from check.check import check_config
from utils.exceptions import (
ResourceConflictError,
ResourceNotFoundError,
SecurityError,
ValidationError,
Workflo... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "server/services/workflow_storage.py",
"license": "Apache License 2.0",
"lines": 181,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
OpenBMB/ChatDev:server/state.py | """Global state shared across server modules."""
from typing import Optional
from server.services.websocket_manager import WebSocketManager
from utils.exceptions import ValidationError
websocket_manager: Optional[WebSocketManager] = None
def init_state() -> None:
"""Ensure global singletons are ready for incom... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "server/state.py",
"license": "Apache License 2.0",
"lines": 23,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
OpenBMB/ChatDev:server_main.py | import argparse
import logging
from pathlib import Path
from runtime.bootstrap.schema import ensure_schema_registry_populated
from server.app import app
ensure_schema_registry_populated()
def main():
import uvicorn
parser = argparse.ArgumentParser(description="DevAll Workflow Server")
parser.add_argum... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "server_main.py",
"license": "Apache License 2.0",
"lines": 61,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
OpenBMB/ChatDev:tools/export_design_template.py | """CLI for exporting DesignConfig YAML templates from typed schemas."""
import argparse
from collections import OrderedDict
from pathlib import Path
from typing import Any, Dict, Mapping, Sequence, Tuple
import yaml
from runtime.bootstrap.schema import ensure_schema_registry_populated
from entity.configs import Base... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "tools/export_design_template.py",
"license": "Apache License 2.0",
"lines": 202,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
OpenBMB/ChatDev:utils/attachments.py | """Attachment storage and serialization helpers."""
import base64
import hashlib
import json
import mimetypes
import shutil
import uuid
from dataclasses import dataclass, field
from pathlib import Path
from typing import Any, Dict, Optional
from entity.messages import AttachmentRef, MessageBlock, MessageBlockType
DE... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "utils/attachments.py",
"license": "Apache License 2.0",
"lines": 310,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
OpenBMB/ChatDev:utils/env_loader.py | """Environment loading utilities for root-level vars interpolation."""
import os
from pathlib import Path
from typing import Dict
_DOTENV_LOADED = False
def load_dotenv_file(dotenv_path: Path | None = None) -> None:
"""Populate ``os.environ`` with key/value pairs from a .env file once per process."""
globa... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "utils/env_loader.py",
"license": "Apache License 2.0",
"lines": 27,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
OpenBMB/ChatDev:utils/error_handler.py | """Error handling utilities for the DevAll workflow system."""
from fastapi import Request
from fastapi.responses import JSONResponse
from fastapi.encoders import jsonable_encoder
import traceback
from utils.structured_logger import get_server_logger
from utils.exceptions import MACException, ValidationError, Securit... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "utils/error_handler.py",
"license": "Apache License 2.0",
"lines": 112,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
OpenBMB/ChatDev:utils/exceptions.py | """Custom exceptions for the DevAll workflow system."""
from typing import Optional, Dict, Any
import json
class MACException(Exception):
"""Base exception for DevAll workflow system."""
def __init__(self, message: str, error_code: str = None, details: Dict[str, Any] = None):
super().__init__(me... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "utils/exceptions.py",
"license": "Apache License 2.0",
"lines": 82,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
OpenBMB/ChatDev:utils/function_catalog.py | """Utility helpers for introspecting function-calling tools."""
import inspect
from collections import abc
from dataclasses import dataclass
from enum import Enum
from pathlib import Path
from typing import Annotated, Any, Dict, List, Literal, Mapping, Sequence, Tuple, Union, get_args, get_origin
from utils.function_... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "utils/function_catalog.py",
"license": "Apache License 2.0",
"lines": 285,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
OpenBMB/ChatDev:utils/function_manager.py | """Unified function management."""
import importlib.util
import inspect
import os
from pathlib import Path
from typing import Any, Callable, Dict, Optional
_MODULE_PREFIX = "_dynamic_functions"
_FUNCTION_CALLING_ENV = "MAC_FUNCTIONS_DIR"
_EDGE_FUNCTION_ENV = "MAC_EDGE_FUNCTIONS_DIR"
_EDGE_PROCESSOR_FUNCTION_ENV = "MAC... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "utils/function_manager.py",
"license": "Apache License 2.0",
"lines": 108,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
OpenBMB/ChatDev:utils/human_prompt.py | """Human-in-the-loop prompt service with pluggable channels."""
import threading
from dataclasses import dataclass, field
from typing import Any, Callable, Dict, List, Optional, Protocol
from entity.messages import MessageBlock, MessageBlockType, MessageContent
from utils.log_manager import LogManager
@dataclass
cl... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "utils/human_prompt.py",
"license": "Apache License 2.0",
"lines": 134,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
OpenBMB/ChatDev:utils/io_utils.py | from typing import Any, Dict
import yaml
def read_yaml(path) -> Dict[str, Any]:
with open(path, mode="r", encoding="utf-8") as f:
return yaml.load(f, Loader=yaml.FullLoader) | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "utils/io_utils.py",
"license": "Apache License 2.0",
"lines": 5,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
OpenBMB/ChatDev:utils/log_manager.py | """Log manager compatibility shim.
LogManager now wraps WorkflowLogger for backward compatibility.
All timing helpers live inside WorkflowLogger; prefer using it directly.
"""
import time
from contextlib import contextmanager
from typing import Any, Dict, List
from entity.enums import CallStage, LogLevel
from utils.... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "utils/log_manager.py",
"license": "Apache License 2.0",
"lines": 177,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
OpenBMB/ChatDev:utils/logger.py | import os
import time
from contextlib import contextmanager
from dataclasses import dataclass, field
from datetime import datetime
from enum import Enum
from pathlib import Path
from typing import Any, Dict, List, Optional
import json
import copy
import traceback
from entity.enums import CallStage, EventType, LogLevel... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "utils/logger.py",
"license": "Apache License 2.0",
"lines": 432,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
OpenBMB/ChatDev:utils/middleware.py | """Custom middleware for the DevAll workflow system."""
import uuid
from typing import Callable, Awaitable
from fastapi import Request, HTTPException, FastAPI
from fastapi.responses import JSONResponse
from fastapi.middleware.cors import CORSMiddleware
import time
import re
import os
from utils.structured_logger impo... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "utils/middleware.py",
"license": "Apache License 2.0",
"lines": 106,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
OpenBMB/ChatDev:utils/registry.py | """Generic registry utilities for pluggable backend components."""
from dataclasses import dataclass, field
from importlib import import_module
from typing import Any, Callable, Dict, Iterable, Optional
class RegistryError(RuntimeError):
"""Raised when registering duplicated or invalid entries."""
@dataclass(s... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "utils/registry.py",
"license": "Apache License 2.0",
"lines": 55,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
OpenBMB/ChatDev:utils/schema_exporter.py | """Schema exporter for dynamic configuration metadata."""
import hashlib
import json
from dataclasses import dataclass
from typing import Any, Dict, Iterable, List, Mapping, Sequence, Type
from entity.configs import BaseConfig
from entity.configs.graph import DesignConfig
SCHEMA_VERSION = "0.1.0"
class SchemaResol... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "utils/schema_exporter.py",
"license": "Apache License 2.0",
"lines": 112,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
OpenBMB/ChatDev:utils/strs.py | def titleize(value: str) -> str:
sanitized = value.replace("_", " ").replace("-", " ").strip()
if not sanitized:
return value
return " ".join(part.capitalize() for part in sanitized.split()) | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "utils/strs.py",
"license": "Apache License 2.0",
"lines": 5,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
OpenBMB/ChatDev:utils/structured_logger.py | """Structured logging utilities for the DevAll workflow system."""
import json
import logging
import sys
import traceback
import datetime
from enum import Enum
from pathlib import Path
import os
from entity.enums import LogLevel
from utils.exceptions import MACException
class LogType(str, Enum):
"""Types of str... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "utils/structured_logger.py",
"license": "Apache License 2.0",
"lines": 151,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
OpenBMB/ChatDev:utils/task_input.py | """Helpers for building initial task inputs with optional attachments."""
import mimetypes
from pathlib import Path
from typing import List, Sequence, Union
from entity.messages import Message, MessageBlock, MessageBlockType, MessageRole
from utils.attachments import AttachmentStore
class TaskInputBuilder:
"""B... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "utils/task_input.py",
"license": "Apache License 2.0",
"lines": 51,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
OpenBMB/ChatDev:utils/token_tracker.py | """Token usage tracking module for DevAll project."""
from dataclasses import dataclass, field
from datetime import datetime
from typing import Dict, List, Optional, Any
from collections import defaultdict
@dataclass
class TokenUsage:
"""Stores token usage metrics for individual API calls."""
input_tokens: in... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "utils/token_tracker.py",
"license": "Apache License 2.0",
"lines": 129,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
OpenBMB/ChatDev:utils/vars_resolver.py | """Placeholder resolution for design configs."""
import re
from typing import Any, Dict, Mapping, MutableMapping, Sequence
from entity.configs.base import ConfigError, extend_path
_PLACEHOLDER_PATTERN = re.compile(r"\$\{([A-Za-z0-9_]+)\}")
_PLACEHOLDER_ONLY_PATTERN = re.compile(r"^\s*\$\{([A-Za-z0-9_]+)\}\s*$")
... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "utils/vars_resolver.py",
"license": "Apache License 2.0",
"lines": 74,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
OpenBMB/ChatDev:utils/workspace_scanner.py | """Utilities for scanning nested code_workspace directories."""
from dataclasses import dataclass
from pathlib import Path
from typing import Iterator, List, Optional
@dataclass
class WorkspaceEntry:
"""Metadata about a workspace file or directory."""
path: str # relative path from workspace root
type:... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "utils/workspace_scanner.py",
"license": "Apache License 2.0",
"lines": 61,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
OpenBMB/ChatDev:workflow/cycle_manager.py | """Cycle detection and management for workflow graphs."""
from typing import Dict, List, Set, Optional, Any
from dataclasses import dataclass, field
from entity.configs import Node
@dataclass
class CycleInfo:
"""Information about a detected cycle in the workflow graph."""
cycle_id: str
nodes: Set[str] #... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "workflow/cycle_manager.py",
"license": "Apache License 2.0",
"lines": 176,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
OpenBMB/ChatDev:workflow/executor/cycle_executor.py | """Cycle executor that runs workflow graphs containing loops."""
import copy
import threading
from typing import Dict, List, Callable, Any, Set, Optional
from entity.configs import Node, EdgeLink
from utils.log_manager import LogManager
from workflow.cycle_manager import CycleManager
from workflow.executor.parallel_e... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "workflow/executor/cycle_executor.py",
"license": "Apache License 2.0",
"lines": 517,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
OpenBMB/ChatDev:workflow/executor/dag_executor.py | """Executor for DAG (Directed Acyclic Graph) workflows."""
from typing import Dict, List, Callable
from entity.configs import Node
from utils.log_manager import LogManager
from workflow.executor.parallel_executor import ParallelExecutor
class DAGExecutor:
"""Execute DAG workflows.
Features:
- Execu... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "workflow/executor/dag_executor.py",
"license": "Apache License 2.0",
"lines": 45,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
OpenBMB/ChatDev:workflow/executor/dynamic_edge_executor.py | """Dynamic edge executor for edge-level Map and Tree execution.
Handles dynamic node expansion based on edge-level dynamic configuration.
When a message passes through an edge with dynamic config, the target node
is virtually expanded into multiple instances based on split results.
"""
import concurrent.futures
from ... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "workflow/executor/dynamic_edge_executor.py",
"license": "Apache License 2.0",
"lines": 331,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
OpenBMB/ChatDev:workflow/executor/parallel_executor.py | """Parallel execution helpers that eliminate duplicated code."""
import concurrent.futures
from typing import Any, Callable, List, Tuple
from utils.log_manager import LogManager
class ParallelExecutor:
"""Manage parallel execution for workflow nodes.
Provides shared logic for parallel batches and seria... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "workflow/executor/parallel_executor.py",
"license": "Apache License 2.0",
"lines": 116,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
OpenBMB/ChatDev:workflow/executor/resource_manager.py | """Resource coordination helpers for workflow node execution."""
import threading
from contextlib import contextmanager
from dataclasses import dataclass
from typing import Dict, Iterable, List, Tuple
from entity.configs import Node
from runtime.node.registry import get_node_registration
from utils.log_manager import... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "workflow/executor/resource_manager.py",
"license": "Apache License 2.0",
"lines": 67,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
OpenBMB/ChatDev:workflow/graph.py | """Graph orchestration adapted to ChatDev design_0.4.0 workflows."""
import threading
from typing import Any, Callable, Dict, List, Optional
from runtime.node.agent.memory import MemoryBase, MemoryFactory, MemoryManager
from runtime.node.agent.thinking import ThinkingManagerBase, ThinkingManagerFactory
from entity.c... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "workflow/graph.py",
"license": "Apache License 2.0",
"lines": 743,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
OpenBMB/ChatDev:workflow/graph_context.py | """Runtime context for workflow graphs.
This module stores execution-time state and business logic for graphs.
"""
from datetime import datetime
from typing import Any, Dict, List
import yaml
from entity.configs import Node
from entity.graph_config import GraphConfig
class GraphContext:
"""Runtime context for... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "workflow/graph_context.py",
"license": "Apache License 2.0",
"lines": 127,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
OpenBMB/ChatDev:workflow/graph_manager.py | """Graph management and construction utilities for workflow graphs."""
from typing import Dict, List, Set, Any
import copy
from entity.configs import ConfigError, SubgraphConfig
from entity.configs.edge.edge_condition import EdgeConditionConfig
from entity.configs.base import extend_path
from entity.configs.node.subg... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "workflow/graph_manager.py",
"license": "Apache License 2.0",
"lines": 297,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
OpenBMB/ChatDev:workflow/hooks/workspace_artifact.py | """Hook that scans a node workspace for newly created files."""
import hashlib
import logging
import mimetypes
import os
import time
from dataclasses import dataclass
from pathlib import Path
from typing import Callable, Dict, List, Optional, Sequence, Set, Tuple
from entity.configs import Node
from entity.messages i... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "workflow/hooks/workspace_artifact.py",
"license": "Apache License 2.0",
"lines": 248,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
OpenBMB/ChatDev:workflow/runtime/execution_strategy.py | """Execution strategies for different graph topologies."""
from collections import Counter
from typing import Callable, Dict, List, Sequence
from entity.configs import Node
from entity.messages import Message
from utils.log_manager import LogManager
from workflow.executor.dag_executor import DAGExecutor
from workflow... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "workflow/runtime/execution_strategy.py",
"license": "Apache License 2.0",
"lines": 125,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
OpenBMB/ChatDev:workflow/runtime/result_archiver.py | """Utilities for persisting execution artifacts."""
from utils.log_manager import LogManager
from utils.token_tracker import TokenTracker
from workflow.graph_context import GraphContext
class ResultArchiver:
"""Handles post-execution persistence (tokens, logs, metadata)."""
def __init__(
self,
... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "workflow/runtime/result_archiver.py",
"license": "Apache License 2.0",
"lines": 27,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
OpenBMB/ChatDev:workflow/runtime/runtime_builder.py | """Builder that assembles the runtime context for workflow execution."""
from dataclasses import dataclass
from typing import Any, Dict, Optional
from runtime.node.agent import ToolManager
from utils.attachments import AttachmentStore
from utils.function_manager import EDGE_FUNCTION_DIR, EDGE_PROCESSOR_FUNCTION_DIR, ... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "workflow/runtime/runtime_builder.py",
"license": "Apache License 2.0",
"lines": 48,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
OpenBMB/ChatDev:workflow/runtime/runtime_context.py | """Shared runtime context for workflow execution."""
from dataclasses import dataclass, field
from pathlib import Path
from typing import Any, Dict, Optional
from runtime.node.agent import ToolManager
from utils.function_manager import FunctionManager
from utils.logger import WorkflowLogger
from utils.log_manager imp... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "workflow/runtime/runtime_context.py",
"license": "Apache License 2.0",
"lines": 25,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
OpenBMB/ChatDev:workflow/subgraph_loader.py | """Utilities for loading reusable subgraph YAML definitions."""
from copy import deepcopy
from pathlib import Path
from typing import Any, Dict, List, Tuple
from entity.configs import ConfigError
from utils.io_utils import read_yaml
_REPO_ROOT = Path(__file__).resolve().parents[1]
_DEFAULT_SUBGRAPH_ROOT = (_REPO_ROO... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "workflow/subgraph_loader.py",
"license": "Apache License 2.0",
"lines": 57,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
OpenBMB/ChatDev:workflow/topology_builder.py | """Graph topology builder utility for cycle detection and topological sorting.
This module provides stateless utilities for building execution order of graphs,
supporting both global graphs and scoped subgraphs (e.g., within cycles).
"""
from typing import Dict, List, Set, Any
from entity.configs import Node
from wor... | {
"repo_id": "OpenBMB/ChatDev",
"file_path": "workflow/topology_builder.py",
"license": "Apache License 2.0",
"lines": 192,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
PaddlePaddle/PaddleOCR:deploy/paddleocr_vl_docker/hps/gateway/app.py | #!/usr/bin/env python
# Copyright (c) 2025 PaddlePaddle 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
#
# Un... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "deploy/paddleocr_vl_docker/hps/gateway/app.py",
"license": "Apache License 2.0",
"lines": 358,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:langchain-paddleocr/scripts/check_imports.py | import sys
import traceback
from importlib.machinery import SourceFileLoader
if __name__ == "__main__":
files = sys.argv[1:]
has_failure = False
for file in files:
try:
SourceFileLoader("x", file).load_module()
except Exception:
has_failure = True
print(f... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "langchain-paddleocr/scripts/check_imports.py",
"license": "Apache License 2.0",
"lines": 15,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
PaddlePaddle/PaddleOCR:langchain-paddleocr/tests/integration_tests/document_loaders/test_paddleocr_vl_loader.py | from __future__ import annotations
import os
from pathlib import Path
import pytest
from pydantic import SecretStr
from langchain_paddleocr import PaddleOCRVLLoader
def test_paddleocr_vl_loader_live_integration() -> None:
"""Live integration test against a real PaddleOCR-VL endpoint.
This test requires th... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "langchain-paddleocr/tests/integration_tests/document_loaders/test_paddleocr_vl_loader.py",
"license": "Apache License 2.0",
"lines": 35,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
... | test |
PaddlePaddle/PaddleOCR:langchain-paddleocr/tests/unit_tests/document_loaders/test_paddleocr_vl_loader.py | from __future__ import annotations
from typing import Any
import pytest
from langchain_paddleocr import PaddleOCRVLLoader
def test_snake_to_camel_conversion_and_additional_params(
monkeypatch: pytest.MonkeyPatch,
) -> None:
"""Ensure that snake_case parameters and additional_params are converted to
cam... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "langchain-paddleocr/tests/unit_tests/document_loaders/test_paddleocr_vl_loader.py",
"license": "Apache License 2.0",
"lines": 63,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"templa... | test |
PaddlePaddle/PaddleOCR:tests/test_rec_postprocess.py | import os
import sys
import numpy as np
import pytest
current_dir = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.abspath(os.path.join(current_dir, "..")))
from ppocr.postprocess.rec_postprocess import BaseRecLabelDecode
class TestBaseRecLabelDecode:
"""Tests for BaseRecLabelDecode.get_wor... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "tests/test_rec_postprocess.py",
"license": "Apache License 2.0",
"lines": 91,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | test |
PaddlePaddle/PaddleOCR:paddleocr/_pipelines/paddleocr_vl.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_pipelines/paddleocr_vl.py",
"license": "Apache License 2.0",
"lines": 486,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/_models/_doc_vlm.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_models/_doc_vlm.py",
"license": "Apache License 2.0",
"lines": 40,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/_models/chart_parsing.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_models/chart_parsing.py",
"license": "Apache License 2.0",
"lines": 37,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/_pipelines/pp_doctranslation.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_pipelines/pp_doctranslation.py",
"license": "Apache License 2.0",
"lines": 912,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:tests/pipelines/test_pp_doctranslation.py | import pytest
from paddleocr import PPDocTranslation
from ..testing_utils import TEST_DATA_DIR
@pytest.fixture(scope="module")
def pp_doctranslation_pipeline():
return PPDocTranslation()
@pytest.mark.parametrize(
"image_path",
[
TEST_DATA_DIR / "book.jpg",
],
)
def test_visual_predict(pp_do... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "tests/pipelines/test_pp_doctranslation.py",
"license": "Apache License 2.0",
"lines": 67,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | test |
PaddlePaddle/PaddleOCR:mcp_server/paddleocr_mcp/__main__.py | #!/usr/bin/env python3
# Copyright (c) 2025 PaddlePaddle 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": "PaddlePaddle/PaddleOCR",
"file_path": "mcp_server/paddleocr_mcp/__main__.py",
"license": "Apache License 2.0",
"lines": 183,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:mcp_server/paddleocr_mcp/pipelines.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "mcp_server/paddleocr_mcp/pipelines.py",
"license": "Apache License 2.0",
"lines": 823,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/_models/_text_detection.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_models/_text_detection.py",
"license": "Apache License 2.0",
"lines": 70,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/__main__.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/__main__.py",
"license": "Apache License 2.0",
"lines": 33,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/_abstract.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_abstract.py",
"license": "Apache License 2.0",
"lines": 21,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/_cli.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_cli.py",
"license": "Apache License 2.0",
"lines": 170,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/_common_args.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_common_args.py",
"license": "Apache License 2.0",
"lines": 134,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/_constants.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_constants.py",
"license": "Apache License 2.0",
"lines": 21,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/_env.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_env.py",
"license": "Apache License 2.0",
"lines": 17,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/_models/_image_classification.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_models/_image_classification.py",
"license": "Apache License 2.0",
"lines": 48,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/_models/_object_detection.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_models/_object_detection.py",
"license": "Apache License 2.0",
"lines": 77,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/_models/base.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_models/base.py",
"license": "Apache License 2.0",
"lines": 90,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/_models/doc_img_orientation_classification.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_models/doc_img_orientation_classification.py",
"license": "Apache License 2.0",
"lines": 33,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/_models/doc_vlm.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_models/doc_vlm.py",
"license": "Apache License 2.0",
"lines": 37,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/_models/formula_recognition.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_models/formula_recognition.py",
"license": "Apache License 2.0",
"lines": 44,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/_models/layout_detection.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_models/layout_detection.py",
"license": "Apache License 2.0",
"lines": 31,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/_models/seal_text_detection.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_models/seal_text_detection.py",
"license": "Apache License 2.0",
"lines": 39,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/_models/table_cells_detection.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_models/table_cells_detection.py",
"license": "Apache License 2.0",
"lines": 31,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/_models/table_classification.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_models/table_classification.py",
"license": "Apache License 2.0",
"lines": 31,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/_models/table_structure_recognition.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_models/table_structure_recognition.py",
"license": "Apache License 2.0",
"lines": 44,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/_models/text_detection.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_models/text_detection.py",
"license": "Apache License 2.0",
"lines": 39,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/_models/text_image_unwarping.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_models/text_image_unwarping.py",
"license": "Apache License 2.0",
"lines": 44,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/_models/text_recognition.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_models/text_recognition.py",
"license": "Apache License 2.0",
"lines": 54,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/_pipelines/base.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_pipelines/base.py",
"license": "Apache License 2.0",
"lines": 112,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/_pipelines/doc_preprocessor.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_pipelines/doc_preprocessor.py",
"license": "Apache License 2.0",
"lines": 132,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/_pipelines/doc_understanding.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_pipelines/doc_understanding.py",
"license": "Apache License 2.0",
"lines": 91,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/_pipelines/formula_recognition.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_pipelines/formula_recognition.py",
"license": "Apache License 2.0",
"lines": 271,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/_pipelines/ocr.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_pipelines/ocr.py",
"license": "Apache License 2.0",
"lines": 661,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/_pipelines/pp_chatocrv4_doc.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_pipelines/pp_chatocrv4_doc.py",
"license": "Apache License 2.0",
"lines": 715,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/_pipelines/pp_structurev3.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_pipelines/pp_structurev3.py",
"license": "Apache License 2.0",
"lines": 998,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/_pipelines/seal_recognition.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_pipelines/seal_recognition.py",
"license": "Apache License 2.0",
"lines": 362,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/_pipelines/table_recognition_v2.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_pipelines/table_recognition_v2.py",
"license": "Apache License 2.0",
"lines": 421,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/_pipelines/utils.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_pipelines/utils.py",
"license": "Apache License 2.0",
"lines": 28,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:paddleocr/_version.py | # Copyright (c) 2025 PaddlePaddle 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 appli... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "paddleocr/_version.py",
"license": "Apache License 2.0",
"lines": 18,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | license |
PaddlePaddle/PaddleOCR:tests/pipelines/test_doc_preprocessor.py | import pytest
from paddleocr import DocPreprocessor
from ..testing_utils import (
TEST_DATA_DIR,
check_simple_inference_result,
check_wrapper_simple_inference_param_forwarding,
)
@pytest.fixture(scope="module")
def ocr_engine() -> DocPreprocessor:
return DocPreprocessor()
@pytest.mark.parametrize(
... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "tests/pipelines/test_doc_preprocessor.py",
"license": "Apache License 2.0",
"lines": 48,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | test |
PaddlePaddle/PaddleOCR:tests/pipelines/test_formula_recognition.py | import pytest
from paddleocr import FormulaRecognitionPipeline
from ..testing_utils import (
TEST_DATA_DIR,
check_simple_inference_result,
check_wrapper_simple_inference_param_forwarding,
)
@pytest.fixture(scope="module")
def formula_recognition_engine() -> FormulaRecognitionPipeline:
return FormulaR... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "tests/pipelines/test_formula_recognition.py",
"license": "Apache License 2.0",
"lines": 57,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | test |
PaddlePaddle/PaddleOCR:tests/pipelines/test_ocr.py | import pytest
from paddleocr import PaddleOCR
from ..testing_utils import (
TEST_DATA_DIR,
check_simple_inference_result,
check_wrapper_simple_inference_param_forwarding,
)
@pytest.fixture(scope="module")
def ocr_engine() -> PaddleOCR:
return PaddleOCR()
# TODO: Should we separate unit tests and in... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "tests/pipelines/test_ocr.py",
"license": "Apache License 2.0",
"lines": 112,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | test |
PaddlePaddle/PaddleOCR:tests/pipelines/test_pp_chatocrv4_doc.py | import pytest
from paddleocr import PPChatOCRv4Doc
from ..testing_utils import TEST_DATA_DIR
@pytest.fixture(scope="module")
def pp_chatocrv4_doc_pipeline():
return PPChatOCRv4Doc()
@pytest.mark.parametrize(
"image_path",
[
TEST_DATA_DIR / "doc_with_formula.png",
],
)
def test_visual_predic... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "tests/pipelines/test_pp_chatocrv4_doc.py",
"license": "Apache License 2.0",
"lines": 67,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | test |
PaddlePaddle/PaddleOCR:tests/pipelines/test_pp_structurev3.py | import pytest
from paddleocr import PPStructureV3
from ..testing_utils import (
TEST_DATA_DIR,
check_simple_inference_result,
check_wrapper_simple_inference_param_forwarding,
)
@pytest.fixture(scope="module")
def pp_structurev3_pipeline():
return PPStructureV3()
@pytest.mark.resource_intensive
@pyt... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "tests/pipelines/test_pp_structurev3.py",
"license": "Apache License 2.0",
"lines": 62,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | test |
PaddlePaddle/PaddleOCR:tests/pipelines/test_seal_rec.py | import pytest
from paddleocr import SealRecognition
from ..testing_utils import (
TEST_DATA_DIR,
check_simple_inference_result,
check_wrapper_simple_inference_param_forwarding,
)
@pytest.fixture(scope="module")
def ocr_engine() -> SealRecognition:
return SealRecognition()
@pytest.mark.parametrize(
... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "tests/pipelines/test_seal_rec.py",
"license": "Apache License 2.0",
"lines": 61,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | test |
PaddlePaddle/PaddleOCR:tests/pipelines/test_table_recognition_v2.py | import pytest
from paddleocr import TableRecognitionPipelineV2
from ..testing_utils import (
TEST_DATA_DIR,
check_simple_inference_result,
check_wrapper_simple_inference_param_forwarding,
)
@pytest.fixture(scope="module")
def table_recognition_v2_pipeline():
return TableRecognitionPipelineV2()
@pyt... | {
"repo_id": "PaddlePaddle/PaddleOCR",
"file_path": "tests/pipelines/test_table_recognition_v2.py",
"license": "Apache License 2.0",
"lines": 54,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | test |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.