AI Slop Code Risk Monitor

chatchat-space/Langchain-Chatchat

SlopCodeMonitor badge for chatchat-space/Langchain-Chatchat Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).

Langchain-Chatchat(原Langchain-ChatGLM)基于 Langchain 与 ChatGLM, Qwen 与 Llama 等语言模型的 RAG 与 Agent 应用 | Langchain-Chatchat (formerly langchain-ChatGLM), local knowledge based LLM (like ChatGLM, Qwen and Llama) RAG and Agent app with langchain

19.5 Elevated pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for chatchat-space/Langchain-Chatchat, a Python project with 38,711 GitHub stars. SynthScan examined 48,820 lines of code across 425 source files, recording 827 pattern matches distributed across 17 syntactic categories. The legacy adjusted pattern signal is 19.5 (Elevated pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

19.5
Adjusted Signal
19.5
Raw Pattern Score
100%
Time Factor
2025-11-10
Last Push
38.7K
Stars
Python
Language
48.8K
Lines of Code
425
Files
827
Pattern Hits
2026-11-27
Scan Date
0.06
HC Hit Rate

Risk Review · Payload v1

Use each vector to guide manual verification of the underlying findings.

Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-11-27.

Cognitive Ownership Risk 22.6/100 · LOW

Can maintainers explain intent, assumptions, and trade-offs? 235 finding(s).

Hallucinated Dependency & Supply Chain Risk 34.8/100 · MEDIUM

Are imports declared and package/API names verified? 410 finding(s).

Agent Over-Engineering Ratio 32.9/100 · MEDIUM

Are wrappers, guards, and repeated structures necessary? 284 finding(s).

PR Review Velocity Impact 64.2/100 · HIGH

Which changes need focused human review? 827 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

Run additional scans to build a history of the legacy pattern signal. Score changes are not a measure of AI adoption or code quality.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 26MEDIUM 23LOW 778

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 827 distinct pattern matches across 17 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Unused Imports403 hits · 402 pts
SeverityFileLineSnippetContext
LOWrelease.py1CODE
LOWlibs/python-sdk/open_chatcaht/exceptions.py1CODE
LOWlibs/python-sdk/open_chatcaht/exceptions.py4CODE
LOWlibs/python-sdk/open_chatcaht/api_client.py2CODE
LOWlibs/python-sdk/open_chatcaht/api_client.py6CODE
LOW…aht/types/knowledge_base/doc/upload_temp_docs_param.py1CODE
LOW…aht/types/knowledge_base/doc/upload_temp_docs_param.py1CODE
LOW…caht/types/knowledge_base/doc/download_kb_doc_param.py1CODE
LOWlibs/python-sdk/open_chatcaht/api/chat/chat_client.py3CODE
LOW…chatcaht/api/standard_openai/standard_openai_client.py3CODE
LOW…n_chatcaht/api/knowledge_base/knowledge_base_client.py1CODE
LOW…n_chatcaht/api/knowledge_base/knowledge_base_client.py3CODE
LOW…n_chatcaht/api/knowledge_base/knowledge_base_client.py8CODE
LOW…n_chatcaht/api/knowledge_base/knowledge_base_client.py9CODE
LOW…n_chatcaht/api/knowledge_base/knowledge_base_client.py11CODE
LOW…n_chatcaht/api/knowledge_base/knowledge_base_client.py21CODE
LOW…n_chatcaht/api/knowledge_base/knowledge_base_client.py23CODE
LOW…n_chatcaht/api/knowledge_base/knowledge_base_client.py25CODE
LOWlibs/python-sdk/tests/装饰器声明请求_test1.py1CODE
LOWlibs/python-sdk/tests/chat_test.py1CODE
LOWlibs/python-sdk/tests/kb_test.py1CODE
LOWlibs/python-sdk/tests/kb_test.py3CODE
LOWlibs/python-sdk/tests/kb_test.py4CODE
LOWlibs/python-sdk/tests/standard_openai_test.py1CODE
LOWlibs/python-sdk/tests/standard_openai_test.py2CODE
LOWlibs/python-sdk/tests/server_test.py1CODE
LOWlibs/chatchat-server/langchain_chatchat/__init__.py3CODE
LOWlibs/chatchat-server/langchain_chatchat/__init__.py4CODE
LOW…atchat-server/langchain_chatchat/embeddings/zhipuai.py2CODE
LOW…atchat-server/langchain_chatchat/embeddings/zhipuai.py7CODE
LOW…atchat-server/langchain_chatchat/embeddings/zhipuai.py7CODE
LOW…atchat-server/langchain_chatchat/embeddings/zhipuai.py7CODE
LOW…atchat-server/langchain_chatchat/embeddings/zhipuai.py7CODE
LOW…atchat-server/langchain_chatchat/embeddings/zhipuai.py7CODE
LOW…langchain_chatchat/callbacks/agent_callback_handler.py2CODE
LOW…langchain_chatchat/callbacks/agent_callback_handler.py3CODE
LOW…langchain_chatchat/callbacks/agent_callback_handler.py3CODE
LOW…langchain_chatchat/callbacks/agent_callback_handler.py6CODE
LOW…langchain_chatchat/callbacks/agent_callback_handler.py7CODE
LOW…langchain_chatchat/callbacks/agent_callback_handler.py7CODE
LOW…langchain_chatchat/callbacks/agent_callback_handler.py10CODE
LOW…langchain_chatchat/callbacks/agent_callback_handler.py10CODE
LOW…langchain_chatchat/callbacks/agent_callback_handler.py10CODE
LOW…langchain_chatchat/callbacks/agent_callback_handler.py14CODE
LOW…langchain_chatchat/callbacks/agent_callback_handler.py15CODE
LOW…atchat-server/langchain_chatchat/callbacks/__init__.py10CODE
LOW…t-server/langchain_chatchat/callbacks/core/protocol.py1CODE
LOW…t-server/langchain_chatchat/callbacks/core/protocol.py2CODE
LOW…t-server/langchain_chatchat/callbacks/core/protocol.py2CODE
LOW…t-server/langchain_chatchat/callbacks/core/protocol.py2CODE
LOW…t-server/langchain_chatchat/callbacks/core/protocol.py4CODE
LOW…chat-server/langchain_chatchat/chat_models/__init__.py2CODE
LOW…ngchain_chatchat/chat_models/platform_tools_message.py3CODE
LOW…ngchain_chatchat/chat_models/platform_tools_message.py6CODE
LOW…ngchain_chatchat/chat_models/platform_tools_message.py11CODE
LOW…chatchat-server/langchain_chatchat/chat_models/base.py4CODE
LOW…chatchat-server/langchain_chatchat/chat_models/base.py28CODE
LOW…chatchat-server/langchain_chatchat/chat_models/base.py28CODE
LOW…chatchat-server/langchain_chatchat/chat_models/base.py28CODE
LOW…chatchat-server/langchain_chatchat/chat_models/base.py37CODE
343 more matches not shown…
Excessive Try-Catch Wrapping131 hits · 144 pts
SeverityFileLineSnippetContext
LOWdocs/contributing/agent.md52 except Exception as e:CODE
LOWlibs/python-sdk/open_chatcaht/api_client.py77 except Exception as e:CODE
LOWlibs/python-sdk/open_chatcaht/api_client.py102 except Exception as e:CODE
LOWlibs/python-sdk/open_chatcaht/api_client.py124 except Exception as e:CODE
LOWlibs/python-sdk/open_chatcaht/api_client.py156 except Exception as e:CODE
LOWlibs/python-sdk/open_chatcaht/api_client.py178 except Exception as e:CODE
LOWlibs/python-sdk/open_chatcaht/api_client.py201 except Exception as e:CODE
LOWlibs/python-sdk/open_chatcaht/api_client.py223 except Exception as e:CODE
LOWlibs/python-sdk/open_chatcaht/api_client.py248 except Exception as e:CODE
LOWlibs/python-sdk/open_chatcaht/api_client.py309 except Exception as err:CODE
MEDIUMlibs/python-sdk/open_chatcaht/api_client.py310 print(f"An error occurred: {err}")CODE
MEDIUMlibs/python-sdk/open_chatcaht/api_client.py138def ret_async(response, as_json):CODE
MEDIUMlibs/python-sdk/open_chatcaht/api_client.py183def ret_sync(response, as_json):CODE
MEDIUMlibs/python-sdk/open_chatcaht/api_client.py245def to_json(r):CODE
MEDIUMlibs/python-sdk/open_chatcaht/api_client.py288def inner(*args, **kwargs):CODE
LOWlibs/python-sdk/tests/装饰器声明请求_test1.py34 except Exception as err:CODE
MEDIUMlibs/python-sdk/tests/装饰器声明请求_test1.py35 print(f"An error occurred: {err}")CODE
MEDIUMlibs/python-sdk/tests/装饰器声明请求_test1.py17def inner(*args, **kwargs):CODE
LOW⚡libs/python-sdk/tests/装饰器声明请求_test.py44 except Exception as err:CODE
MEDIUM⚡libs/python-sdk/tests/装饰器声明请求_test.py45 print(f"An error occurred: {err}")CODE
MEDIUMlibs/python-sdk/tests/装饰器声明请求_test.py22def inner(*args, **kwargs):CODE
LOW…ngchain_chatchat/chat_models/platform_tools_message.py101 except Exception as e:CODE
LOW…ngchain_chatchat/chat_models/platform_tools_message.py279 except Exception:CODE
LOW…chatchat-server/langchain_chatchat/chat_models/base.py610 except Exception as e:CODE
LOW…_chatchat/agents/output_parsers/glm3_output_parsers.py51 except Exception as e:CODE
LOW…ts/output_parsers/platform_knowledge_output_parsers.py113 except Exception as e:CODE
LOW…agents/output_parsers/tools_output/code_interpreter.py127 except Exception as e:CODE
LOW…hat/agents/output_parsers/tools_output/drawing_tool.py128 except Exception as e:CODE
LOW…chat/agents/output_parsers/tools_output/web_browser.py125 except Exception as e:CODE
LOW…hatchat/agents/output_parsers/tools_output/function.py94 except Exception as e:CODE
LOW…erver/langchain_chatchat/agents/platform_tools/base.py97 except Exception as e:CODE
LOW…ngchain_chatchat/agents/format_scratchpad/all_tools.py41 except Exception:CODE
LOW…er/langchain_chatchat/agent_toolkits/mcp_kit/client.py306 except Exception:CODE
MEDIUM…er/langchain_chatchat/agent_toolkits/mcp_kit/client.py291def __aenter__(self) -> "MultiServerMCPClient":CODE
LOWlibs/chatchat-server/tests/conftest.py70 except Exception:CODE
LOW…erver/tests/custom_splitter/test_different_splitter.py50 except Exception as e:CODE
MEDIUM…erver/tests/custom_splitter/test_different_splitter.py44def test_different_splitter(splitter_name):CODE
LOWlibs/chatchat-server/chatchat/startup.py309 except Exception as e:CODE
LOWlibs/chatchat-server/chatchat/init_database.py60 except Exception as e:CODE
LOWlibs/chatchat-server/chatchat/server/utils.py45 except Exception as e:CODE
LOWlibs/chatchat-server/chatchat/server/utils.py109 except Exception as e:CODE
LOWlibs/chatchat-server/chatchat/server/utils.py264 except Exception as e:CODE
LOWlibs/chatchat-server/chatchat/server/utils.py305 except Exception as e:CODE
LOWlibs/chatchat-server/chatchat/server/utils.py346 except Exception as e:CODE
LOWlibs/chatchat-server/chatchat/server/utils.py394 except Exception as e:CODE
LOWlibs/chatchat-server/chatchat/server/utils.py408 except Exception as e:CODE
LOWlibs/chatchat-server/chatchat/server/utils.py809 except Exception as e:CODE
LOWlibs/chatchat-server/chatchat/server/utils.py834 except Exception as e:CODE
LOWlibs/chatchat-server/chatchat/server/chat/feedback.py17 except Exception as e:CODE
LOWlibs/chatchat-server/chatchat/server/chat/kb_chat.py220 except Exception as e:CODE
MEDIUMlibs/chatchat-server/chatchat/server/chat/kb_chat.py68def knowledge_base_chat_iterator() -> AsyncIterable[str]:CODE
LOWlibs/chatchat-server/chatchat/server/chat/chat.py290 except Exception as e:CODE
MEDIUMlibs/chatchat-server/chatchat/server/chat/chat.py148def chat_iterator_event() -> AsyncIterable[OpenAIChatOutput]:CODE
LOW…hat-server/chatchat/server/chat/human_message_event.py24 except Exception as e:CODE
LOW…hat-server/chatchat/server/chat/human_message_event.py37 except Exception as e:CODE
LOW…hat-server/chatchat/server/chat/human_message_event.py49 except Exception as e:CODE
LOWlibs/chatchat-server/chatchat/server/chat/file_chat.py67 except Exception as e:CODE
LOWlibs/chatchat-server/chatchat/server/chat/file_chat.py107 except Exception as e:CODE
LOW…erver/chatchat/server/agent/tools_factory/calculate.py20 except Exception as e:CODE
LOW…atchat-server/chatchat/server/api_server/mcp_routes.py73 except Exception as e:CODE
71 more matches not shown…
Deep Nesting91 hits · 90 pts
SeverityFileLineSnippetContext
LOWlibs/python-sdk/open_chatcaht/utils.py82CODE
LOWlibs/python-sdk/open_chatcaht/api_client.py129CODE
LOWlibs/python-sdk/open_chatcaht/api_client.py138CODE
LOWlibs/python-sdk/open_chatcaht/api_client.py183CODE
LOW…ngchain_chatchat/chat_models/platform_tools_message.py25CODE
LOW…ngchain_chatchat/chat_models/platform_tools_message.py184CODE
LOW…chatchat-server/langchain_chatchat/chat_models/base.py97CODE
LOW…chatchat-server/langchain_chatchat/chat_models/base.py136CODE
LOW…chatchat-server/langchain_chatchat/chat_models/base.py183CODE
LOW…chatchat-server/langchain_chatchat/chat_models/base.py442CODE
LOW…chatchat-server/langchain_chatchat/chat_models/base.py463CODE
LOW…chatchat-server/langchain_chatchat/chat_models/base.py546CODE
LOW…at-server/langchain_chatchat/agents/all_tools_agent.py49CODE
LOW…at-server/langchain_chatchat/agents/all_tools_agent.py124CODE
LOW…chat/agents/structured_chat/platform_knowledge_bind.py20CODE
LOW…chat/agents/structured_chat/platform_knowledge_bind.py59CODE
LOW…ts/output_parsers/platform_knowledge_output_parsers.py50CODE
LOW…chain_chatchat/agents/output_parsers/platform_tools.py30CODE
LOW…chain_chatchat/agents/output_parsers/platform_tools.py86CODE
LOW…n_chatchat/agents/output_parsers/tools_output/tools.py48CODE
LOW…n_chatchat/agents/output_parsers/tools_output/tools.py92CODE
LOW…hatchat/agents/output_parsers/tools_output/function.py61CODE
LOW…erver/langchain_chatchat/agents/platform_tools/base.py259CODE
LOW…erver/langchain_chatchat/agents/platform_tools/base.py263CODE
LOW…ngchain_chatchat/agents/format_scratchpad/all_tools.py56CODE
LOW…bs/chatchat-server/langchain_chatchat/utils/history.py28CODE
LOW…er/langchain_chatchat/agent_toolkits/mcp_kit/client.py291CODE
LOW…ver/langchain_chatchat/agent_toolkits/mcp_kit/tools.py29CODE
LOW…er/langchain_chatchat/agent_toolkits/all_tools/tool.py132CODE
LOWlibs/chatchat-server/tests/conftest.py29CODE
LOW…ntegration_tests/platform_tools/test_platform_tools.py41CODE
LOW…ntegration_tests/platform_tools/test_platform_tools.py76CODE
LOW…ntegration_tests/platform_tools/test_platform_tools.py112CODE
LOW…ntegration_tests/platform_tools/test_platform_tools.py147CODE
LOW…ntegration_tests/platform_tools/test_platform_tools.py182CODE
LOW…ntegration_tests/platform_tools/test_platform_tools.py217CODE
LOW…on_tests/mcp_platform_tools/test_mcp_platform_tools.py24CODE
LOW…on_tests/mcp_platform_tools/test_mcp_platform_tools.py65CODE
LOW…on_tests/mcp_platform_tools/test_mcp_platform_tools.py118CODE
LOWlibs/chatchat-server/chatchat/startup.py208CODE
LOWlibs/chatchat-server/chatchat/pydantic_settings_file.py103CODE
LOWlibs/chatchat-server/chatchat/pydantic_settings_file.py122CODE
LOWlibs/chatchat-server/chatchat/init_database.py26CODE
LOWlibs/chatchat-server/chatchat/server/utils.py114CODE
LOWlibs/chatchat-server/chatchat/server/utils.py352CODE
LOWlibs/chatchat-server/chatchat/server/utils.py735CODE
LOWlibs/chatchat-server/chatchat/server/llm_api_stale.py195CODE
LOWlibs/chatchat-server/chatchat/server/chat/kb_chat.py30CODE
LOWlibs/chatchat-server/chatchat/server/chat/kb_chat.py68CODE
LOWlibs/chatchat-server/chatchat/server/chat/chat.py134CODE
LOWlibs/chatchat-server/chatchat/server/chat/chat.py148CODE
LOW…/chatchat/server/agent/tools_factory/tools_registry.py43CODE
LOW…hat-server/chatchat/server/api_server/openai_routes.py66CODE
LOW…hat-server/chatchat/server/api_server/openai_routes.py73CODE
LOW…tchat-server/chatchat/server/api_server/chat_routes.py46CODE
LOW…ver/chatchat/server/agents_registry/agents_registry.py46CODE
LOW…/server/file_rag/document_loaders/FilteredCSVloader.py33CODE
LOW…atchat/server/file_rag/document_loaders/mypdfloader.py14CODE
LOW…atchat/server/file_rag/document_loaders/mypdfloader.py39CODE
LOW…atchat/server/file_rag/document_loaders/mypptloader.py8CODE
31 more matches not shown…
Hyper-Verbose Identifiers82 hits · 83 pts
SeverityFileLineSnippetContext
LOWlibs/python-sdk/open_chatcaht/utils.py193def get_function_default_params(func) -> dict:CODE
LOW…n_chatcaht/api/knowledge_base/knowledge_base_client.py191 # def recreate_summary_vector_store(self,COMMENT
LOW…n_chatcaht/api/knowledge_base/knowledge_base_client.py212 # def summary_doc_ids_to_vector_store(self,COMMENT
LOW…n_chatcaht/api/knowledge_base/knowledge_base_client.py235 # def summary_file_to_vector_store(self, knowledge_base_name: str,COMMENT
LOWlibs/python-sdk/tests/装饰器声明请求_test1.py62 def recreate_summary_vector_store(self, a: int, b: int):CODE
LOW⚡libs/python-sdk/tests/装饰器声明请求_test.py62 def recreate_summary_vector_store(CODE
LOW⚡libs/python-sdk/tests/装饰器声明请求_test.py72def recreate_summary_vector_store(CODE
LOW…ngchain_chatchat/chat_models/platform_tools_message.py25def default_platform_tool_chunk_parser(raw_tool_calls: List[dict]) -> List[ToolCallChunk]:CODE
LOW…ngchain_chatchat/chat_models/platform_tools_message.py84 def _backwards_compat_tool_calls(cls, values: dict) -> dict:CODE
LOW…chatchat-server/langchain_chatchat/chat_models/base.py183def _convert_delta_to_message_chunk(CODE
LOW…chatchat-server/langchain_chatchat/chat_models/base.py860def _gen_info_and_msg_metadata(CODE
LOW…at-server/langchain_chatchat/agents/all_tools_agent.py49 def validate_return_direct_tool(cls, values: Dict) -> Dict:CODE
LOW…chat/agents/structured_chat/platform_knowledge_bind.py20def render_knowledge_mcp_tools(tools: List[MCPStructuredTool]) -> str:CODE
LOW…chat/agents/structured_chat/platform_knowledge_bind.py91def create_platform_knowledge_agent(CODE
LOW…chatchat/agents/structured_chat/platform_tools_bind.py17def create_platform_tools_agent(CODE
LOW…chain_chatchat/agents/output_parsers/platform_tools.py30def parse_ai_message_to_platform_tool_action(CODE
LOW…agents/output_parsers/tools_output/code_interpreter.py36def _best_effort_parse_code_interpreter_tool_calls(CODE
LOW…agents/output_parsers/tools_output/code_interpreter.py73def _paser_code_interpreter_chunk_input(CODE
LOW…hat/agents/output_parsers/tools_output/drawing_tool.py36def _best_effort_parse_drawing_tool_tool_calls(CODE
LOW…hat/agents/output_parsers/tools_output/drawing_tool.py73def _paser_drawing_tool_chunk_input(CODE
LOW…n_chatchat/agents/output_parsers/tools_output/tools.py48def paser_ai_message_to_tool_calls(CODE
LOW…n_chatchat/agents/output_parsers/tools_output/tools.py92def parse_ai_message_to_tool_action(CODE
LOW…chat/agents/output_parsers/tools_output/web_browser.py36def _best_effort_parse_web_browser_tool_calls(CODE
LOW…chat/agents/output_parsers/tools_output/web_browser.py73def _paser_web_browser_chunk_input(CODE
LOW…hatchat/agents/output_parsers/tools_output/function.py24def _best_effort_parse_function_tool_calls(CODE
LOW…hatchat/agents/output_parsers/tools_output/function.py61def _paser_function_chunk_input(CODE
LOW…erver/langchain_chatchat/agents/platform_tools/base.py70def _is_assistants_builtin_tool(CODE
LOW…ngchain_chatchat/agents/format_scratchpad/all_tools.py56def format_to_platform_tool_messages(CODE
LOW…gchain_chatchat/agents/react/create_prompt_template.py47def create_prompt_platform_template(model_name: str, template: dict):CODE
LOW…gchain_chatchat/agents/react/create_prompt_template.py85def create_prompt_structured_react_template(model_name: str, template: dict):CODE
LOW…gchain_chatchat/agents/react/create_prompt_template.py123def create_prompt_gpt_tool_template(model_name: str, template: dict):CODE
LOW…gchain_chatchat/agents/react/create_prompt_template.py162def create_prompt_platform_knowledge_mode_template(model_name: str, template: dict):CODE
LOW…er/langchain_chatchat/agent_toolkits/mcp_kit/client.py104 async def _initialize_session_and_load_tools(CODE
LOW…er/langchain_chatchat/agent_toolkits/mcp_kit/client.py170 async def connect_to_server_via_stdio(CODE
LOW…er/langchain_chatchat/agent_toolkits/mcp_kit/client.py217 async def connect_to_server_via_sse(CODE
LOW…ver/langchain_chatchat/agent_toolkits/mcp_kit/tools.py88def _convert_call_tool_result(CODE
LOW…ver/langchain_chatchat/agent_toolkits/mcp_kit/tools.py109def convert_mcp_tool_to_langchain_tool(CODE
LOW…r/langchain_chatchat/agent_toolkits/mcp_kit/prompts.py11def convert_mcp_prompt_message_to_langchain_message(CODE
LOWlibs/chatchat-server/tests/conftest.py29def pytest_collection_modifyitems(config: Config, items: Sequence[Function]) -> None:CODE
LOW…s/chatchat-server/tests/unit_tests/test_mcp_prompts.py26def test_convert_mcp_prompt_message_to_langchain_message_with_text_content(CODE
LOW…s/chatchat-server/tests/unit_tests/test_mcp_prompts.py36def test_convert_mcp_prompt_message_to_langchain_message_with_resource_content(role: str):CODE
LOW…s/chatchat-server/tests/unit_tests/test_mcp_prompts.py51def test_convert_mcp_prompt_message_to_langchain_message_with_image_content(role: str):CODE
LOW…ntegration_tests/platform_tools/test_platform_tools.py41async def test_openai_functions_tools(logging_conf):CODE
LOW…ntegration_tests/platform_tools/test_platform_tools.py147async def test_qwen_chat_agent_tools(logging_conf):CODE
LOW…ntegration_tests/platform_tools/test_platform_tools.py182async def test_qwen_structured_chat_agent_tools(logging_conf):CODE
LOW…ntegration_tests/platform_tools/test_platform_tools.py217async def test_human_platform_tools(logging_conf):CODE
LOWlibs/chatchat-server/tests/api/test_kb_summary_api.py22def test_summary_file_to_vector_store(CODE
LOWlibs/chatchat-server/tests/api/test_kb_summary_api.py37def test_summary_doc_ids_to_vector_store(CODE
LOWlibs/chatchat-server/chatchat/pydantic_settings_file.py196 def settings_customise_sources(CODE
LOWlibs/chatchat-server/chatchat/server/utils.py936def update_search_local_knowledgebase_tool():CODE
LOWlibs/chatchat-server/chatchat/server/chat/kb_chat.py68 async def knowledge_base_chat_iterator() -> AsyncIterable[str]:CODE
LOWlibs/chatchat-server/chatchat/server/chat/chat.py43def create_models_from_config(configs, callbacks, stream, max_tokens):CODE
LOWlibs/chatchat-server/chatchat/server/chat/file_chat.py154 async def knowledge_base_chat_iterator() -> AsyncIterable[str]:CODE
LOW…rver/agent/tools_factory/search_local_knowledgebase.py38def search_local_knowledgebase(CODE
LOW…atchat-server/chatchat/server/api_server/mcp_routes.py79async def create_or_update_mcp_profile(profile_data: MCPProfileCreate):CODE
LOW…atchat-server/chatchat/server/api_server/mcp_routes.py106async def update_mcp_profile_endpoint(profile_data: MCPProfileCreate):CODE
LOW…atchat-server/chatchat/server/api_server/mcp_routes.py133async def reset_mcp_profile_endpoint():CODE
LOW…atchat-server/chatchat/server/api_server/mcp_routes.py159async def delete_mcp_profile_endpoint():CODE
LOW…atchat-server/chatchat/server/api_server/mcp_routes.py317async def update_mcp_connection_by_id(CODE
LOW…atchat-server/chatchat/server/api_server/mcp_routes.py390async def delete_mcp_connection_by_id(connection_id: str):CODE
22 more matches not shown…
Cross-File Repetition16 hits · 80 pts
SeverityFileLineSnippetContext
HIGH…atchat-server/langchain_chatchat/embeddings/zhipuai.py0holds any model parameters valid for `create` call not explicitly specified.STRING
HIGH…chatchat-server/langchain_chatchat/chat_models/base.py0holds any model parameters valid for `create` call not explicitly specified.STRING
HIGH…/chatchat-server/chatchat/server/localai_embeddings.py0holds any model parameters valid for `create` call not explicitly specified.STRING
HIGH…atchat-server/langchain_chatchat/embeddings/zhipuai.py0build extra kwargs from additional params that were passed in.STRING
HIGH…chatchat-server/langchain_chatchat/chat_models/base.py0build extra kwargs from additional params that were passed in.STRING
HIGH…/chatchat-server/chatchat/server/localai_embeddings.py0build extra kwargs from additional params that were passed in.STRING
HIGH…atchat-server/langchain_chatchat/embeddings/zhipuai.py0validate that api key and python package exists in environment.STRING
HIGH…chatchat-server/langchain_chatchat/chat_models/base.py0validate that api key and python package exists in environment.STRING
HIGH…/chatchat-server/chatchat/server/localai_embeddings.py0validate that api key and python package exists in environment.STRING
HIGH…angchain_chatchat/agents/structured_chat/qwen_agent.py0create an agent that uses tools. args: llm: llm to use as the agent. tools: tools this agent has access to. prompt: the STRING
HIGH…chatchat/agents/structured_chat/platform_tools_bind.py0create an agent that uses tools. args: llm: llm to use as the agent. tools: tools this agent has access to. prompt: the STRING
HIGH…atchat/agents/structured_chat/structured_chat_agent.py0create an agent that uses tools. args: llm: llm to use as the agent. tools: tools this agent has access to. prompt: the STRING
HIGH…angchain_chatchat/agents/structured_chat/glm3_agent.py0create an agent that uses tools. args: llm: llm to use as the agent. tools: tools this agent has access to. prompt: the STRING
HIGH…er/langchain_chatchat/agent_toolkits/mcp_kit/client.py0source https://github.com/langchain-ai/langchain-mcp-adaptersSTRING
HIGH…ver/langchain_chatchat/agent_toolkits/mcp_kit/tools.py0source https://github.com/langchain-ai/langchain-mcp-adaptersSTRING
HIGH…r/langchain_chatchat/agent_toolkits/mcp_kit/prompts.py0source https://github.com/langchain-ai/langchain-mcp-adaptersSTRING
Empty Error Handlers7 hits · 35 pts
SeverityFileLineSnippetContext
HIGH…ngchain_chatchat/chat_models/platform_tools_message.py101except Exception as e:CODE
HIGHlibs/chatchat-server/chatchat/startup.py16except:CODE
HIGHlibs/chatchat-server/chatchat/server/chat/chat.py225except:CODE
HIGHlibs/chatchat-server/chatchat/server/chat/chat.py257except:CODE
HIGH…hat-server/chatchat/server/api_server/openai_routes.py324except:CODE
HIGH…t/server/knowledge_base/kb_service/faiss_kb_service.py63except Exception:CODE
HIGH…t/server/knowledge_base/kb_service/faiss_kb_service.py116except Exception:CODE
Over-Commented Block28 hits · 28 pts
SeverityFileLineSnippetContext
LOWdocker/docker-compose.yaml21 count: allCOMMENT
LOW…n_chatcaht/api/knowledge_base/knowledge_base_client.py61 ...COMMENT
LOW…n_chatcaht/api/knowledge_base/knowledge_base_client.py201 # knowledge_base_name=knowledge_base_name,COMMENT
LOW…n_chatcaht/api/knowledge_base/knowledge_base_client.py221 # ):COMMENT
LOW…n_chatcaht/api/knowledge_base/knowledge_base_client.py241 # model_name: str = LLM_MODEL,COMMENT
LOWlibs/python-sdk/tests/chat_test.py1from open_chatcaht.chatchat_api import ChatChatCOMMENT
LOWlibs/python-sdk/tests/kb_test.py1import loggingCOMMENT
LOWlibs/python-sdk/tests/kb_test.py21# print('recreate_summary_vector_store', chatchat.knowledge.recreate_summary_vector_store(COMMENT
LOWlibs/python-sdk/tests/kb_test.py41# print(chatchat.knowledge.download_kb_doc_file(COMMENT
LOWlibs/chatchat-server/pyproject.toml221[tool.pytest.ini_options]COMMENT
LOWlibs/chatchat-server/chatchat/server/utils.py641# def list_embed_models() -> List[str]:COMMENT
LOWlibs/chatchat-server/chatchat/server/utils.py661# root_path = Path(MODEL_ROOT_PATH)COMMENT
LOW…s/chatchat-server/chatchat/server/reranker/reranker.py101 for value, index in zip(values, indices):COMMENT
LOW…s/chatchat-server/chatchat/server/reranker/reranker.py121 # reranker_model_path = MODEL_PATH["reranker"].get(COMMENT
LOWlibs/chatchat-server/chatchat/server/chat/kb_chat.py141COMMENT
LOW…chat-server/chatchat/server/knowledge_base/__init__.py1# from .kb_api import list_kbs, create_kb, delete_kbCOMMENT
LOW…chat/server/knowledge_base/kb_service/pg_kb_service.py121 # pGKBService.add_doc(KnowledgeFile("README.md", "test"))COMMENT
LOW…chatchat/server/knowledge_base/kb_cache/faiss_cache.py181# # for name in kb_names:COMMENT
LOW…chatchat/server/knowledge_base/kb_cache/faiss_cache.py201# threads = []COMMENT
LOWlibs/chatchat-server/chatchat/webui_pages/utils.py961COMMENT
LOW…tchat-server/chatchat/webui_pages/dialogue/dialogue.py321 # reason = feedback["text"]COMMENT
LOW…tchat-server/chatchat/webui_pages/dialogue/dialogue.py521 else:COMMENT
LOW…tchat-server/chatchat/webui_pages/dialogue/dialogue.py541 # elif dialogue_mode == "文件对话":COMMENT
LOW.github/workflows/_release.yml41 cache-key: releaseCOMMENT
LOW.github/workflows/_release.yml81 pre-release-checks:COMMENT
LOW.github/workflows/_release.yml201 - name: Publish package distributions to PyPICOMMENT
LOW.github/workflows/_release.yml221 # runs-on: ubuntu-latestCOMMENT
LOW.github/workflows/_release.yml241 # cache-key: releaseCOMMENT
Modern Structural Boilerplate28 hits · 28 pts
SeverityFileLineSnippetContext
LOWlibs/python-sdk/open_chatcaht/exceptions.py9__all__ = [CODE
LOWlibs/chatchat-server/langchain_chatchat/__init__.py6__all__ = [CODE
LOW…tchat-server/langchain_chatchat/embeddings/__init__.py2__all__ = [CODE
LOW…atchat-server/langchain_chatchat/embeddings/zhipuai.py36logger = logging.getLogger(__name__)CODE
LOW…atchat-server/langchain_chatchat/callbacks/__init__.py14__all__ = [CODE
LOW…chat-server/langchain_chatchat/chat_models/__init__.py4__all__ = [CODE
LOW…chatchat-server/langchain_chatchat/chat_models/base.py94logger = logging.getLogger(__name__)CODE
LOW…at-server/langchain_chatchat/agents/all_tools_agent.py40logger = logging.getLogger(__name__)CODE
LOW…/chatchat-server/langchain_chatchat/agents/__init__.py4__all__ = ["PlatformToolsRunnable"]CODE
LOW…r/langchain_chatchat/agents/output_parsers/__init__.py23__all__ = [CODE
LOW…agents/output_parsers/tools_output/code_interpreter.py27logger = logging.getLogger(__name__)CODE
LOW…hat/agents/output_parsers/tools_output/drawing_tool.py27logger = logging.getLogger(__name__)CODE
LOW…n_chatchat/agents/output_parsers/tools_output/tools.py45logger = logging.getLogger(__name__)CODE
LOW…chat/agents/output_parsers/tools_output/web_browser.py27logger = logging.getLogger(__name__)CODE
LOW…hatchat/agents/output_parsers/tools_output/function.py21logger = logging.getLogger(__name__)CODE
LOW…r/langchain_chatchat/agents/platform_tools/__init__.py15__all__ = [CODE
LOW…s/chatchat-server/langchain_chatchat/utils/__init__.py6__all__ = ["History", "PYDANTIC_V2"]CODE
LOW…t-server/langchain_chatchat/agent_toolkits/__init__.py4__all__ = ["BaseToolOutput", "AdapterAllTool"]CODE
LOW…hain_chatchat/agent_toolkits/all_tools/drawing_tool.py22logger = logging.getLogger(__name__)CODE
LOW…_chatchat/agent_toolkits/all_tools/web_browser_tool.py22logger = logging.getLogger(__name__)CODE
LOW…angchain_chatchat/agent_toolkits/all_tools/__init__.py7__all__ = ["BaseToolOutput", "AdapterAllTool"]CODE
LOW…chat/agent_toolkits/all_tools/code_interpreter_tool.py20logger = logging.getLogger(__name__)CODE
LOW…er/langchain_chatchat/agent_toolkits/all_tools/tool.py41logger = logging.getLogger(__name__)CODE
LOWlibs/chatchat-server/chatchat/pydantic_settings_file.py16__all__ = ["YamlTemplate", "MyBaseModel", "BaseFileSettings", "Field",CODE
LOWlibs/chatchat-server/chatchat/utils.py51logger = logging.getLogger(__name__)CODE
LOW…/chatchat-server/chatchat/server/localai_embeddings.py33logger = logging.getLogger(__name__)CODE
LOW…/chatchat/server/agent/tools_factory/tools_registry.py13__all__ = ["regist_tool", "BaseToolOutput", "format_context"]CODE
LOW…s/chatchat-server/chatchat/webui_pages/mcp/__init__.py7__all__ = ["mcp_management_page"]CODE
AI Structural Patterns20 hits · 20 pts
SeverityFileLineSnippetContext
LOWlibs/python-sdk/open_chatcaht/chatchat_api.py18CODE
LOWlibs/python-sdk/open_chatcaht/api_client.py31CODE
LOWlibs/python-sdk/open_chatcaht/api/chat/chat_client.py31CODE
LOWlibs/python-sdk/open_chatcaht/api/chat/chat_client.py62CODE
LOWlibs/chatchat-server/chatchat/server/chat/kb_chat.py30CODE
LOWlibs/chatchat-server/chatchat/server/chat/chat.py134CODE
LOWlibs/chatchat-server/chatchat/server/chat/file_chat.py113CODE
LOW…hatchat-server/chatchat/server/api_server/kb_routes.py66CODE
LOW…tchat-server/chatchat/server/api_server/chat_routes.py125CODE
LOW…chat/server/db/repository/mcp_connection_repository.py9CODE
LOW…chat/server/db/repository/mcp_connection_repository.py53CODE
LOW…at-server/chatchat/server/knowledge_base/kb_doc_api.py159CODE
LOW…at-server/chatchat/server/knowledge_base/kb_doc_api.py272CODE
LOW…at-server/chatchat/server/knowledge_base/kb_doc_api.py400CODE
LOW…erver/chatchat/server/knowledge_base/kb_summary_api.py20CODE
LOW…erver/chatchat/server/knowledge_base/kb_summary_api.py119CODE
LOW…erver/chatchat/server/knowledge_base/kb_summary_api.py203CODE
LOWlibs/chatchat-server/chatchat/webui_pages/utils.py363CODE
LOWlibs/chatchat-server/chatchat/webui_pages/utils.py766CODE
LOWlibs/chatchat-server/chatchat/webui_pages/utils.py817CODE
Magic Placeholder Names3 hits · 12 pts
SeverityFileLineSnippetContext
HIGH…chatchat-server/langchain_chatchat/chat_models/base.py248 api_key="your-api-key",STRING
HIGHmarkdown_docs/server/utils.md41ChatOpenAI(streaming=True, verbose=True, callbacks=[], openai_api_key="YOUR_API_KEY", openai_api_base="https://api.exampCODE
HIGHmarkdown_docs/server/utils.md72 openai_api_key="YOUR_API_KEY",CODE
Self-Referential Comments4 hits · 12 pts
SeverityFileLineSnippetContext
MEDIUMlibs/python-sdk/tests/装饰器声明请求_test1.py46 # Define a function that applies the decoratorCOMMENT
MEDIUM…angchain_chatchat/agents/structured_chat/qwen_agent.py21 # Create a tools variable from the list of tools providedCOMMENT
MEDIUMlibs/chatchat-server/chatchat/server/utils.py603 # Define the doc and redoc pages, pointing at the right filesCOMMENT
MEDIUMlibs/chatchat-server/scripts/lint_imports.sh5# Initialize a variable to keep track of errorsCOMMENT
Redundant / Tautological Comments4 hits · 5 pts
SeverityFileLineSnippetContext
LOWlibs/chatchat-server/tests/conftest.py62 # Iterate through the list of required packagesCOMMENT
LOW…server/chatchat/server/agent/tools_factory/text2sql.py42 # Check if the statement starts with any of the write operation keywordsSTRING
LOWlibs/chatchat-server/scripts/check_pydantic.sh8# Check if a path argument is providedCOMMENT
LOWlibs/chatchat-server/scripts/check_pydantic.sh19# Check if any matching lines were foundCOMMENT
Example Usage Blocks2 hits · 4 pts
SeverityFileLineSnippetContext
LOW⚡libs/python-sdk/tests/装饰器声明请求_test.py54# Usage exampleCOMMENT
LOW⚡libs/python-sdk/tests/装饰器声明请求_test.py79# Example usageCOMMENT
Fake / Example Data4 hits · 4 pts
SeverityFileLineSnippetContext
LOWmarkdown_docs/server/db/models/knowledge_file_model.md92**输出示例**: 假设有一个 `FileDocModel` 对象,其属性如下:`id=1`,`kb_name='KnowledgeBase1'`,`file_name='document1.pdf'`,`doc_id='12345'`,`CODE
LOWmarkdown_docs/server/db/models/knowledge_file_model.md95<FileDoc(id='1', kb_name='KnowledgeBase1', file_name='document1.pdf', doc_id='12345', metadata='{"author": "John Doe", "CODE
LOW…down_docs/server/db/models/knowledge_metadata_model.md36**输出示例**: 假设有一个`SummaryChunkModel`实例,其`id`为`123`,`kb_name`为`"KnowledgeBase1"`,`summary_context`为`"Context1"`,`doc_ids`为`CODE
LOW…down_docs/server/db/models/knowledge_metadata_model.md39<SummaryChunk(id='123', kb_name='KnowledgeBase1', summary_context='Context1', doc_ids='doc1, doc2', metadata='{'author':CODE
Slop Phrases2 hits · 4 pts
SeverityFileLineSnippetContext
LOW…er/langchain_chatchat/agent_toolkits/mcp_kit/client.py89 # make sure you start your weather server on port 8000STRING
MEDIUM…hatchat-server/chatchat/server/knowledge_base/utils.py306 # If you use SpacyTextSplitter you can use GPU to do split likes Issue #1287COMMENT
Modern AI Meta-Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMdocs/contributing/api.md204### RAG 接口 (/knowledge_base/chat/compleitons)COMMENT
AI Slop Vocabulary1 hit · 1 pts
SeverityFileLineSnippetContext
LOW…rver/chatchat/server/knowledge_base/kb_service/base.py425 if _ is None: # kb not in db, just return NoneCODE