Repository Analysis

langchain-ai/langchain

The agent engineering platform.

41.1 Strong AI signal View on GitHub
41.1
Adjusted Score
41.1
Raw Score
100%
Time Factor
2026-05-29
Last Push
138,010
Stars
Python
Language
387,612
Lines of Code
2676
Files
10593
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 19HIGH 848MEDIUM 1212LOW 8514

Pattern Findings

10593 matches across 21 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers4282 hits · 3815 pts
SeverityFileLineSnippet
LOW…/text-splitters/tests/unit_tests/test_html_security.py12 def test_xxe_entity_attack_blocked(self) -> None:
LOW…/text-splitters/tests/unit_tests/test_html_security.py29 def test_xxe_document_function_blocked(self) -> None:
LOW…/text-splitters/tests/unit_tests/test_html_security.py47 def test_secure_parser_configuration(self) -> None:
LOW…/text-splitters/tests/unit_tests/test_html_security.py84 def test_dtd_processing_disabled(self) -> None:
LOW…/text-splitters/tests/unit_tests/test_html_security.py110 def test_safe_default_xslt_usage(self) -> None:
LOWlibs/text-splitters/tests/unit_tests/conftest.py23def pytest_collection_modifyitems(
LOW…text-splitters/tests/unit_tests/test_text_splitters.py65def test_character_text_splitter_empty_doc() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py74def test_character_text_splitter_separtor_empty_doc() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py83def test_character_text_splitter_long() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py92def test_character_text_splitter_short_words_first() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py101def test_character_text_splitter_longer_words() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py111def test_character_text_splitter_no_separator_in_text() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py120def test_character_text_splitter_handle_chunksize_equal_to_chunkoverlap() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py129def test_character_text_splitter_empty_input() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py138def test_character_text_splitter_whitespace_only() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py150def test_character_text_splitter_keep_separator_regex(
LOW…text-splitters/tests/unit_tests/test_text_splitters.py174def test_character_text_splitter_keep_separator_regex_start(
LOW…text-splitters/tests/unit_tests/test_text_splitters.py198def test_character_text_splitter_keep_separator_regex_end(
LOW…text-splitters/tests/unit_tests/test_text_splitters.py222def test_character_text_splitter_discard_separator_regex(
LOW…text-splitters/tests/unit_tests/test_text_splitters.py243def test_recursive_character_text_splitter_keep_separators() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py267def test_character_text_splitting_args() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py305def test_create_documents_with_metadata() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py350def test_create_documents_with_start_index(
LOW…text-splitters/tests/unit_tests/test_text_splitters.py361def test_metadata_not_shallow() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py376def test_iterative_text_splitter_keep_separator() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py389def test_iterative_text_splitter_discard_separator() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py402def __test_iterative_text_splitter(
LOW…text-splitters/tests/unit_tests/test_text_splitters.py420def test_iterative_text_splitter() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py473def test_python_text_splitter() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py1023def test_elixir_separators_no_while() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py1510def test_md_header_text_splitter_fenced_code_block(fence: str) -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py1537def test_md_header_text_splitter_fenced_code_block_interleaved(
LOW…text-splitters/tests/unit_tests/test_text_splitters.py1574def test_md_header_text_splitter_with_invisible_characters(characters: str) -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py1602def test_md_header_text_splitter_with_custom_headers() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py1797def test_experimental_markdown_syntax_text_splitter_header_configuration() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py1842def test_experimental_markdown_syntax_text_splitter_with_headers() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py1900def test_experimental_markdown_syntax_text_splitter_split_lines() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py2008def test_experimental_markdown_syntax_text_splitter_on_multi_files() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py2091def test_experimental_markdown_syntax_text_splitter_split_lines_on_multi_files() -> (
LOW…text-splitters/tests/unit_tests/test_text_splitters.py2219def test_experimental_markdown_syntax_text_splitter_with_header_on_multi_files() -> (
LOW…text-splitters/tests/unit_tests/test_text_splitters.py2308def test_experimental_markdown_syntax_text_splitter_header_config_on_multi_files() -> (
LOW…text-splitters/tests/unit_tests/test_text_splitters.py2384def test_solidity_code_splitter() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py2984def test_decode_returns_no_chunks() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py3055def test_happy_path_splitting_based_on_header_with_font_size() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py3106def test_happy_path_splitting_based_on_header_with_whitespace_chars() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py3157def test_happy_path_splitting_with_duplicate_header_tag() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py3230def test_split_json_with_lists() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py3253def test_split_json_many_calls() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py3274def test_split_json_with_empty_dict_values() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py3292def test_split_json_with_nested_empty_dicts() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py3310def test_split_json_empty_dict_only() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py3323def test_split_json_mixed_empty_and_nonempty_dicts() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py3346def test_split_json_empty_dict_value_in_large_payload() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py3377def test_powershell_code_splitter_short_code() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py4230def test_character_text_splitter_chunk_size_effect(
LOW…text-splitters/tests/unit_tests/test_text_splitters.py56def test_character_text_splitter() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py613def test_svelte_text_splitter() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py628def test_jsx_splitter_separator_not_mutated_across_calls() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py659def test_python_code_splitter() -> None:
LOW…text-splitters/tests/unit_tests/test_text_splitters.py682def test_golang_code_splitter() -> None:
4222 more matches not shown…
Unused Imports3537 hits · 3267 pts
SeverityFileLineSnippet
LOW…text-splitters/tests/unit_tests/test_text_splitters.py3
LOWlibs/text-splitters/langchain_text_splitters/nltk.py3
LOWlibs/text-splitters/langchain_text_splitters/html.py3
LOW…bs/text-splitters/langchain_text_splitters/__init__.py9
LOW…bs/text-splitters/langchain_text_splitters/__init__.py9
LOW…bs/text-splitters/langchain_text_splitters/__init__.py9
LOW…bs/text-splitters/langchain_text_splitters/__init__.py9
LOW…bs/text-splitters/langchain_text_splitters/__init__.py9
LOW…bs/text-splitters/langchain_text_splitters/__init__.py16
LOW…bs/text-splitters/langchain_text_splitters/__init__.py16
LOW…bs/text-splitters/langchain_text_splitters/__init__.py20
LOW…bs/text-splitters/langchain_text_splitters/__init__.py20
LOW…bs/text-splitters/langchain_text_splitters/__init__.py20
LOW…bs/text-splitters/langchain_text_splitters/__init__.py20
LOW…bs/text-splitters/langchain_text_splitters/__init__.py26
LOW…bs/text-splitters/langchain_text_splitters/__init__.py27
LOW…bs/text-splitters/langchain_text_splitters/__init__.py28
LOW…bs/text-splitters/langchain_text_splitters/__init__.py29
LOW…bs/text-splitters/langchain_text_splitters/__init__.py30
LOW…bs/text-splitters/langchain_text_splitters/__init__.py30
LOW…bs/text-splitters/langchain_text_splitters/__init__.py30
LOW…bs/text-splitters/langchain_text_splitters/__init__.py30
LOW…bs/text-splitters/langchain_text_splitters/__init__.py30
LOW…bs/text-splitters/langchain_text_splitters/__init__.py37
LOW…bs/text-splitters/langchain_text_splitters/__init__.py38
LOW…bs/text-splitters/langchain_text_splitters/__init__.py39
LOW…bs/text-splitters/langchain_text_splitters/__init__.py42
LOWlibs/text-splitters/langchain_text_splitters/konlpy.py3
LOW…bs/text-splitters/langchain_text_splitters/markdown.py3
LOWlibs/text-splitters/langchain_text_splitters/python.py3
LOW…s/text-splitters/langchain_text_splitters/character.py3
LOW…ters/langchain_text_splitters/sentence_transformers.py3
LOWlibs/text-splitters/langchain_text_splitters/spacy.py3
LOWlibs/text-splitters/langchain_text_splitters/latex.py3
LOWlibs/text-splitters/langchain_text_splitters/json.py3
LOWlibs/text-splitters/langchain_text_splitters/base.py3
LOW…nit_tests/language_models/test_chat_model_v3_stream.py3
LOW…tests/unit_tests/language_models/test_compat_bridge.py26
LOW…tests/unit_tests/language_models/test_compat_bridge.py26
LOW…tests/unit_tests/language_models/test_compat_bridge.py26
LOW…tests/unit_tests/language_models/test_compat_bridge.py26
LOW…tests/unit_tests/language_models/test_compat_bridge.py26
LOW…tests/unit_tests/language_models/test_compat_bridge.py26
LOW…tests/unit_tests/language_models/test_compat_bridge.py26
LOW…ore/tests/unit_tests/language_models/test_v1_parity.py7
LOW…s/unit_tests/language_models/test_chat_model_stream.py3
LOW…s/unit_tests/language_models/test_chat_model_stream.py19
LOW…unit_tests/language_models/test_chat_model_streamer.py3
LOW…unit_tests/language_models/test_chat_model_streamer.py22
LOW…sts/unit_tests/messages/block_translators/test_groq.py8
LOWlibs/core/tests/unit_tests/runnables/test_imports.py43
LOW…/tests/unit_tests/runnables/test_runnable_events_v3.py3
LOW…re/tests/unit_tests/runnables/test_tracing_interops.py1
LOWlibs/core/tests/unit_tests/runnables/test_config.py16
LOW…core/tests/unit_tests/vectorstores/test_vectorstore.py7
LOW…ore/tests/unit_tests/tracers/test_async_base_tracer.py3
LOWlibs/core/tests/unit_tests/tracers/test_base_tracer.py3
LOW…re/tests/unit_tests/tracers/test_automatic_metadata.py3
LOWlibs/core/langchain_core/caches.py18
LOWlibs/core/langchain_core/globals.py6
3477 more matches not shown…
Self-Referential Comments947 hits · 2820 pts
SeverityFileLineSnippet
MEDIUMlibs/text-splitters/scripts/lint_imports.sh5# Initialize a variable to keep track of errors
MEDIUM…ts/unit_tests/language_models/chat_models/test_base.py611 # Create a message with v0 format image content
MEDIUM…s/unit_tests/language_models/chat_models/test_cache.py321 # Create a simple fake chat model that we can control
MEDIUM…ore/tests/unit_tests/language_models/llms/test_base.py359 # Create a custom LLM that supports streaming
MEDIUM…ts/unit_tests/callbacks/test_async_callback_manager.py179 """This method is decorated with @shielded in the run manager."""
MEDIUM…ts/unit_tests/callbacks/test_async_callback_manager.py185 """This method is decorated with @shielded in the run manager."""
MEDIUM…s/core/tests/unit_tests/utils/test_function_calling.py1186 # Define a custom Python class that isn't JSON-serializable
MEDIUMlibs/core/tests/unit_tests/runnables/test_graph.py643 # Create a simple graph
MEDIUMlibs/core/langchain_core/messages/system.py24 # Define a chat model and invoke it with the messages
MEDIUMlibs/core/langchain_core/messages/content.py66 # Create a text content block with provider-specific fields
MEDIUM…gchain_core/messages/block_translators/google_genai.py82 # Create a citation for each referenced chunk
MEDIUMlibs/core/langchain_core/callbacks/manager.py236 # Create the coroutine
MEDIUMlibs/core/langchain_core/callbacks/manager.py242 # Create a task with the captured context to preserve context variables
MEDIUMlibs/core/langchain_core/utils/utils.py96 # Create a copy of dt_value.
MEDIUMlibs/core/langchain_core/runnables/graph_png.py139 # Create a directed graph
MEDIUMlibs/core/langchain_core/runnables/base.py4138 # Create the transform() generator for each step
MEDIUMlibs/core/langchain_core/runnables/base.py4204 # Create the transform() generator for each step
MEDIUMlibs/core/langchain_core/runnables/base.py6272 # Create a Runnable binding that invokes the chat model with the
MEDIUM…core/langchain_core/prompts/few_shot_with_templates.py144 # Create the overall prefix.
MEDIUM…core/langchain_core/prompts/few_shot_with_templates.py155 # Create the overall suffix
MEDIUM…core/langchain_core/prompts/few_shot_with_templates.py188 # Create the overall prefix.
MEDIUM…core/langchain_core/prompts/few_shot_with_templates.py199 # Create the overall suffix
MEDIUMlibs/core/langchain_core/prompts/few_shot.py201 # Create the overall template.
MEDIUMlibs/core/langchain_core/prompts/few_shot.py229 # Create the overall template.
MEDIUMlibs/core/langchain_core/prompts/few_shot.py362 # Define the overall prompt.
MEDIUMlibs/core/langchain_core/indexing/api.py606# Define an asynchronous generator function
MEDIUMlibs/core/langchain_core/tracers/langchain.py305 # This method is only really useful for debugging flows, so we will assume
MEDIUMlibs/core/scripts/lint_imports.sh5# Initialize a variable to keep track of errors
MEDIUM…ain/tests/unit_tests/agents/output_parsers/test_xml.py41 # Create an AgentAction with XML tags in the tool name
MEDIUM…/langchain/tests/unit_tests/storage/test_filesystem.py13 # Create a temporary directory for testing
MEDIUM…/langchain/tests/unit_tests/storage/test_filesystem.py40 # Create a temporary directory for testing
MEDIUM…/langchain/tests/unit_tests/storage/test_filesystem.py63 # Create a temporary directory for testing
MEDIUM…bs/langchain/tests/unit_tests/storage/test_lc_store.py14 # Create a temporary directory for testing
MEDIUMlibs/langchain/scripts/lint_imports.sh5# Initialize a variable to keep track of errors
MEDIUMlibs/langchain/langchain_classic/serpapi.py10# Create a way to dynamically look up deprecated imports.
MEDIUMlibs/langchain/langchain_classic/cache.py25# Create a way to dynamically look up deprecated imports.
MEDIUMlibs/langchain/langchain_classic/sql_database.py10# Create a way to dynamically look up deprecated imports.
MEDIUMlibs/langchain/langchain_classic/requests.py14# Create a way to dynamically look up deprecated imports.
MEDIUM…s/langchain/langchain_classic/chat_loaders/whatsapp.py8# Create a way to dynamically look up deprecated imports.
MEDIUM…s/langchain/langchain_classic/chat_loaders/telegram.py8# Create a way to dynamically look up deprecated imports.
MEDIUM…/langchain/langchain_classic/chat_loaders/langsmith.py11# Create a way to dynamically look up deprecated imports.
MEDIUM…s/langchain/langchain_classic/chat_loaders/imessage.py8# Create a way to dynamically look up deprecated imports.
MEDIUMlibs/langchain/langchain_classic/chat_loaders/gmail.py8# Create a way to dynamically look up deprecated imports.
MEDIUMlibs/langchain/langchain_classic/chat_loaders/utils.py13# Create a way to dynamically look up deprecated imports.
MEDIUMlibs/langchain/langchain_classic/chat_loaders/slack.py8# Create a way to dynamically look up deprecated imports.
MEDIUMlibs/langchain/langchain_classic/retrievers/bm25.py9# Create a way to dynamically look up deprecated imports.
MEDIUMlibs/langchain/langchain_classic/retrievers/docarray.py9# Create a way to dynamically look up deprecated imports.
MEDIUM…chain/langchain_classic/retrievers/remote_retriever.py8# Create a way to dynamically look up deprecated imports.
MEDIUM…ngchain_classic/retrievers/chatgpt_plugin_retriever.py8# Create a way to dynamically look up deprecated imports.
MEDIUMlibs/langchain/langchain_classic/retrievers/milvus.py9# Create a way to dynamically look up deprecated imports.
MEDIUM…s/langchain/langchain_classic/retrievers/embedchain.py8# Create a way to dynamically look up deprecated imports.
MEDIUM…langchain_classic/retrievers/weaviate_hybrid_search.py8# Create a way to dynamically look up deprecated imports.
MEDIUMlibs/langchain/langchain_classic/retrievers/pubmed.py8# Create a way to dynamically look up deprecated imports.
MEDIUM…langchain_classic/retrievers/pinecone_hybrid_search.py8# Create a way to dynamically look up deprecated imports.
MEDIUMlibs/langchain/langchain_classic/retrievers/arxiv.py8# Create a way to dynamically look up deprecated imports.
MEDIUM…bs/langchain/langchain_classic/retrievers/chaindesk.py8# Create a way to dynamically look up deprecated imports.
MEDIUM…langchain/langchain_classic/retrievers/web_research.py12# Create a way to dynamically look up deprecated imports.
MEDIUM…/langchain/langchain_classic/retrievers/llama_index.py11# Create a way to dynamically look up deprecated imports.
MEDIUM…angchain_classic/retrievers/google_vertex_ai_search.py12# Create a way to dynamically look up deprecated imports.
MEDIUM…lassic/retrievers/google_cloud_documentai_warehouse.py8# Create a way to dynamically look up deprecated imports.
887 more matches not shown…
Cross-File Repetition505 hits · 2525 pts
SeverityFileLineSnippet
HIGHlibs/text-splitters/tests/unit_tests/conftest.py0add implementations for handling custom markers. at the moment, this adds support for a custom `requires` marker. the `r
HIGHlibs/core/tests/unit_tests/conftest.py0add implementations for handling custom markers. at the moment, this adds support for a custom `requires` marker. the `r
HIGHlibs/langchain/tests/unit_tests/conftest.py0add implementations for handling custom markers. at the moment, this adds support for a custom `requires` marker. the `r
HIGHlibs/langchain_v1/tests/unit_tests/conftest.py0add implementations for handling custom markers. at the moment, this adds support for a custom `requires` marker. the `r
HIGH…text-splitters/tests/unit_tests/test_text_splitters.py0<h1>section 1</h1> <p>this is some text. this is some other text.</p>
HIGH…text-splitters/tests/unit_tests/test_text_splitters.py0<h1>section 1</h1> <p>this is some text. this is some other text.</p>
HIGH…text-splitters/tests/unit_tests/test_text_splitters.py0<h1>section 1</h1> <p>this is some text. this is some other text.</p>
HIGH…text-splitters/tests/unit_tests/test_text_splitters.py0<h1>section 1</h1> <p>this is some text. this is some other text.</p>
HIGH…text-splitters/tests/unit_tests/test_text_splitters.py0<h1>section 1</h1> <p>this is some text. this is some other text.</p>
HIGH…text-splitters/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.
HIGHlibs/core/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.
HIGHlibs/langchain/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.
HIGH…s/langchain_v1/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.
HIGH…artners/chroma/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.
HIGH…ners/mistralai/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.
HIGH…ers/openrouter/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.
HIGH…s/partners/exa/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.
HIGH…ners/fireworks/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.
HIGH…/partners/groq/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.
HIGH…tners/deepseek/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.
HIGH…s/partners/xai/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.
HIGH…partners/nomic/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.
HIGH…ers/perplexity/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.
HIGH…artners/qdrant/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.
HIGH…ners/anthropic/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.
HIGH…rs/huggingface/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.
HIGH…artners/ollama/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.
HIGH…artners/openai/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.
HIGH…standard-tests/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.
HIGH…model-profiles/tests/integration_tests/test_compile.py0used for compiling integration tests without running any real tests.
HIGHlibs/core/tests/unit_tests/test_tools.py0test that structured tools can be created from functions.
HIGHlibs/core/tests/unit_tests/test_tools.py0test that structured tools can be created from functions.
HIGHlibs/core/tests/unit_tests/test_tools.py0test that structured tools can be created from functions.
HIGHlibs/core/tests/unit_tests/test_tools.py0simple tool for testing. args: query: the query string.
HIGHlibs/core/tests/unit_tests/test_tools.py0simple tool for testing. args: query: the query string.
HIGHlibs/core/tests/unit_tests/test_tools.py0simple tool for testing. args: query: the query string.
HIGHlibs/core/tests/unit_tests/test_tools.py0simple tool for testing. args: query: the query string.
HIGH…s/core/tests/unit_tests/utils/test_function_calling.py0dummy function. args: arg1: foo arg2: one of 'bar', 'baz'
HIGH…s/core/tests/unit_tests/utils/test_function_calling.py0dummy function. args: arg1: foo arg2: one of 'bar', 'baz'
HIGH…s/core/tests/unit_tests/utils/test_function_calling.py0dummy function. args: arg1: foo arg2: one of 'bar', 'baz'
HIGH…s/core/tests/unit_tests/utils/test_function_calling.py0dummy function. args: arg1: foo arg2: one of 'bar', 'baz'
HIGH…s/core/tests/unit_tests/utils/test_function_calling.py0dummy function. args: arg1: foo arg2: one of 'bar', 'baz'
HIGH…s/core/tests/unit_tests/utils/test_function_calling.py0dummy function. args: arg1: foo arg2: one of 'bar', 'baz'
HIGH…artners/anthropic/tests/unit_tests/test_chat_models.py0dummy function. args: arg1: foo arg2: one of 'bar', 'baz'
HIGHlibs/core/tests/unit_tests/runnables/test_runnable.py0test generator runnable config propagation. test that a generator can call other runnables with config propagated from t
HIGHlibs/core/tests/unit_tests/runnables/test_runnable.py0test generator runnable config propagation. test that a generator can call other runnables with config propagated from t
HIGHlibs/core/tests/unit_tests/runnables/test_runnable.py0test generator runnable config propagation. test that a generator can call other runnables with config propagated from t
HIGHlibs/core/tests/unit_tests/runnables/test_runnable.py0test generator runnable config propagation. test that a generator can call other runnables with config propagated from t
HIGHlibs/core/tests/unit_tests/prompts/test_few_shot.py0test error is raised when input variables are not provided.
HIGHlibs/core/tests/unit_tests/prompts/test_few_shot.py0test error is raised when input variables are not provided.
HIGHlibs/core/tests/unit_tests/prompts/test_prompt.py0test error is raised when input variables are not provided.
HIGHlibs/core/tests/unit_tests/prompts/test_prompt.py0test error is raised when input variables are not provided.
HIGHlibs/core/tests/unit_tests/prompts/test_few_shot.py0test prompt can be initialized with partial variables.
HIGHlibs/core/tests/unit_tests/prompts/test_few_shot.py0test prompt can be initialized with partial variables.
HIGHlibs/core/tests/unit_tests/prompts/test_prompt.py0test prompt can be initialized with partial variables.
HIGHlibs/core/tests/unit_tests/prompts/test_prompt.py0test prompt can be initialized with partial variables.
HIGHlibs/core/tests/unit_tests/prompts/test_few_shot.py0tests for few shot chat message template with an example selector.
HIGHlibs/core/tests/unit_tests/prompts/test_few_shot.py0tests for few shot chat message template with an example selector.
HIGHlibs/core/tests/unit_tests/prompts/test_few_shot.py0tests for few shot chat message template with an example selector.
HIGHlibs/core/tests/unit_tests/prompts/test_image.py0test that the image prompt template is serializable.
445 more matches not shown…
Docstring Block Structure262 hits · 1310 pts
SeverityFileLineSnippet
HIGHAGENTS.md212Send an email to a recipient with specified priority. Any additional context about the function can go here. A
HIGHCLAUDE.md212Send an email to a recipient with specified priority. Any additional context about the function can go here. A
HIGHlibs/text-splitters/langchain_text_splitters/html.py201Fetch text content from a URL and split it into documents. Args: url: The URL to fetch content from
HIGHlibs/text-splitters/langchain_text_splitters/html.py245Private method that performs a DFS traversal over the DOM and yields. Document objects on-the-fly. This approac
HIGHlibs/text-splitters/langchain_text_splitters/html.py447Split an HTML document into sections based on specified header tags. This method uses BeautifulSoup to parse th
HIGHlibs/text-splitters/langchain_text_splitters/html.py508Convert specific HTML tags to headers using an XSLT transformation. This method uses an XSLT file to transform
HIGH…s/text-splitters/langchain_text_splitters/character.py180Retrieve a list of separators specific to the given language. Args: language: The language for whic
HIGHlibs/text-splitters/langchain_text_splitters/base.py238Text splitter that uses `tiktoken` encoder to count length. Args: encoding_name: The name of the ti
HIGHlibs/core/langchain_core/retrievers.py182Invoke the retriever to get relevant documents. Main entry point for synchronous retriever invocations.
HIGHlibs/core/langchain_core/retrievers.py243Asynchronously invoke the retriever to get relevant documents. Main entry point for asynchronous retriever invo
HIGHlibs/core/langchain_core/_import_utils.py9Import an attribute from a module located in a package. This utility function is used in custom `__getattr__` metho
HIGHlibs/core/langchain_core/language_models/chat_models.py207Generate from a stream. Args: stream: Iterator of `ChatGenerationChunk`. Raises: ValueError: I
HIGHlibs/core/langchain_core/language_models/chat_models.py2351Model wrapper that returns outputs formatted to match the given schema. Args: schema: The output sc
HIGHlibs/core/langchain_core/language_models/llms.py79Create a retry decorator for a given LLM and provided a list of error types. Args: error_types: List of err
HIGHlibs/core/langchain_core/language_models/llms.py161Get prompts that are already cached. Args: params: Dictionary of parameters. prompts: List of promp
HIGHlibs/core/langchain_core/language_models/llms.py197Get prompts that are already cached. Async version. Args: params: Dictionary of parameters. prompts
HIGHlibs/core/langchain_core/language_models/llms.py235Update the cache and get the LLM output. Args: cache: Cache object. existing_prompts: Dictionary of
HIGHlibs/core/langchain_core/language_models/llms.py268Update the cache and get the LLM output. Async version. Args: cache: Cache object. existing_prompts
HIGHlibs/core/langchain_core/language_models/llms.py861Pass a sequence of prompts to a model and return generations. This method should make use of batched calls for
HIGHlibs/core/langchain_core/language_models/llms.py1144Asynchronously pass a sequence of prompts to a model and return generations. This method should make use of bat
HIGHlibs/core/langchain_core/tools/convert.py89Convert Python functions and `Runnables` to LangChain tools. Can be used as a decorator with or without arguments t
HIGHlibs/core/langchain_core/tools/structured.py148Create tool from a given function. A classmethod that helps to create a tool from a function. Args:
HIGHlibs/core/langchain_core/tools/simple.py75Convert tool input to Pydantic model. Args: tool_input: The input to the tool. tool_cal
HIGHlibs/core/langchain_core/tools/simple.py176Initialize tool from a function. Args: func: The function to create the tool from. name
HIGHlibs/core/langchain_core/tools/base.py250Check if all Pydantic annotations in a function are from v1. Args: signature: The function signature to che
HIGHlibs/core/langchain_core/tools/base.py659Parse and validate tool input using the args schema. Args: tool_input: The raw input to the tool.
HIGHlibs/core/langchain_core/tools/base.py842Convert tool input to positional and keyword arguments. Args: tool_input: The input to the tool.
HIGHlibs/core/langchain_core/tools/base.py894Run the tool. Args: tool_input: The input to the tool. verbose: Whether to log the tool
HIGHlibs/core/langchain_core/tools/base.py1022Run the tool asynchronously. Args: tool_input: The input to the tool. verbose: Whether
HIGHlibs/core/langchain_core/tools/base.py1155Handle validation errors based on the configured flag. Args: e: The validation error that occurred.
HIGHlibs/core/langchain_core/tools/base.py1187Handle tool execution errors based on the configured flag. Args: e: The tool exception that occurred.
HIGHlibs/core/langchain_core/messages/content.py1005Create an `ImageContentBlock`. Args: url: URL of the image. base64: Base64-encoded image data.
HIGHlibs/core/langchain_core/messages/content.py1067Create a `VideoContentBlock`. Args: url: URL of the video. base64: Base64-encoded video data.
HIGHlibs/core/langchain_core/messages/content.py1133Create an `AudioContentBlock`. Args: url: URL of the audio. base64: Base64-encoded audio data.
HIGHlibs/core/langchain_core/messages/content.py1199Create a `FileContentBlock`. Args: url: URL of the file. base64: Base64-encoded file data.
HIGHlibs/core/langchain_core/messages/utils.py255Get the type string for XML message element. Args: m: The message to get the type string for. human
HIGHlibs/core/langchain_core/messages/utils.py298Convert a sequence of messages to strings and concatenate them into one string. Args: messages: Messages to
HIGHlibs/core/langchain_core/messages/utils.py593Create a message from a `Message` type and content string. Args: message_type: the type of the message (e.g
HIGHlibs/core/langchain_core/messages/utils.py698Instantiate a `Message` from a variety of message formats. The message format can be one of the following: - `
HIGHlibs/core/langchain_core/messages/utils.py859Filter messages based on `name`, `type` or `id`. Args: messages: Sequence Message-like objects to filter.
HIGHlibs/core/langchain_core/messages/utils.py1139Trim messages to be below a token count. `trim_messages` can be used to reduce the size of a chat history to a spec
HIGHlibs/core/langchain_core/messages/utils.py1546Convert LangChain messages into OpenAI message dicts. Args: messages: Message-like object or iterable of ob
HIGHlibs/core/langchain_core/messages/base.py413Message chunks support concatenation with other message chunks. This functionality is useful to combine message
HIGH…re/langchain_core/messages/block_translators/openai.py23Convert `ImageContentBlock` to format expected by OpenAI Chat Completions. Args: block: The image content b
HIGH…re/langchain_core/messages/block_translators/openai.py61Format standard data content block to format expected by OpenAI. "Standard data content block" can include old-styl
HIGH…angchain_core/example_selectors/semantic_similarity.py149Create k-shot example selector using example list and embeddings. Reshuffles examples dynamically based on quer
HIGH…angchain_core/example_selectors/semantic_similarity.py193Async create k-shot example selector using example list and embeddings. Reshuffles examples dynamically based o
HIGH…angchain_core/example_selectors/semantic_similarity.py280Create k-shot example selector using example list and embeddings. Reshuffles examples dynamically based on Max
HIGH…angchain_core/example_selectors/semantic_similarity.py327Create k-shot example selector using example list and embeddings. Reshuffles examples dynamically based on Max
HIGHlibs/core/langchain_core/callbacks/manager.py2369Configure the callback manager. Args: callback_manager_cls: The callback manager class. inheritable
HIGHlibs/core/langchain_core/_security/_ssrf_protection.py47Validate a URL for SSRF protection. This function validates URLs to prevent Server-Side Request Forgery (SSRF) atta
HIGHlibs/core/langchain_core/_api/__init__.py61Dynamically import and return an attribute from a submodule. This function enables lazy loading of API functions fr
HIGHlibs/core/langchain_core/utils/env.py61Get a value from a dictionary or an environment variable. Args: key: The key to look up in the dictionary.
HIGHlibs/core/langchain_core/utils/formatting.py26Format a string using only keyword arguments. Overrides the base `vformat` to reject positional arguments, ensu
HIGHlibs/core/langchain_core/utils/_merge.py7Merge dictionaries. Merge many dicts, handling specific scenarios where a key exists in both dictionaries but h
HIGHlibs/core/langchain_core/utils/_merge.py171Merge two objects. It handles specific scenarios where a key exists in both dictionaries but has a value of `No
HIGHlibs/core/langchain_core/utils/function_calling.py166Converts a Pydantic model to a function description for the OpenAI API. Args: model: The Pydantic model to
HIGHlibs/core/langchain_core/utils/function_calling.py329Format tool into the OpenAI function API. Args: tool: The tool to format. Raises: ValueError:
HIGHlibs/core/langchain_core/utils/function_calling.py380Convert a raw function/class to an OpenAI function. Args: function: A dictionary, Pydantic `BaseModel` clas
HIGHlibs/core/langchain_core/utils/function_calling.py582Convert a schema representation to a JSON schema. Args: schema: The schema to convert. strict: If `
202 more matches not shown…
Decorative Section Separators230 hits · 770 pts
SeverityFileLineSnippet
MEDIUM…s/text-splitters/langchain_text_splitters/character.py519 # ---------------
MEDIUM…bs/core/tests/unit_tests/test_ssrf_policy_transport.py143# ---------------------------------------------------------------------------
MEDIUM…bs/core/tests/unit_tests/test_ssrf_policy_transport.py145# ---------------------------------------------------------------------------
MEDIUM…bs/core/tests/unit_tests/test_ssrf_policy_transport.py233# ---------------------------------------------------------------------------
MEDIUM…bs/core/tests/unit_tests/test_ssrf_policy_transport.py235# ---------------------------------------------------------------------------
MEDIUM…bs/core/tests/unit_tests/test_ssrf_policy_transport.py353# ---------------------------------------------------------------------------
MEDIUM…bs/core/tests/unit_tests/test_ssrf_policy_transport.py355# ---------------------------------------------------------------------------
MEDIUM…bs/core/tests/unit_tests/test_ssrf_policy_transport.py193# ---------------------------------------------------------------------------
MEDIUM…bs/core/tests/unit_tests/test_ssrf_policy_transport.py196# ---------------------------------------------------------------------------
MEDIUM…bs/core/tests/unit_tests/test_ssrf_policy_transport.py272# ---------------------------------------------------------------------------
MEDIUM…bs/core/tests/unit_tests/test_ssrf_policy_transport.py274# ---------------------------------------------------------------------------
MEDIUM…bs/core/tests/unit_tests/test_ssrf_policy_transport.py315# ---------------------------------------------------------------------------
MEDIUM…bs/core/tests/unit_tests/test_ssrf_policy_transport.py317# ---------------------------------------------------------------------------
MEDIUM…tests/unit_tests/language_models/test_compat_bridge.py42# ---------------------------------------------------------------------------
MEDIUM…tests/unit_tests/language_models/test_compat_bridge.py44# ---------------------------------------------------------------------------
MEDIUM…tests/unit_tests/language_models/test_compat_bridge.py123# ---------------------------------------------------------------------------
MEDIUM…tests/unit_tests/language_models/test_compat_bridge.py125# ---------------------------------------------------------------------------
MEDIUM…tests/unit_tests/language_models/test_compat_bridge.py821# ---------------------------------------------------------------------------
MEDIUM…tests/unit_tests/language_models/test_compat_bridge.py823# ---------------------------------------------------------------------------
MEDIUM…tests/unit_tests/language_models/test_compat_bridge.py1084# ---------------------------------------------------------------------------
MEDIUM…tests/unit_tests/language_models/test_compat_bridge.py1086# ---------------------------------------------------------------------------
MEDIUM…s/unit_tests/language_models/test_chat_model_stream.py21# ---------------------------------------------------------------------------
MEDIUM…s/unit_tests/language_models/test_chat_model_stream.py23# ---------------------------------------------------------------------------
MEDIUM…s/unit_tests/language_models/test_chat_model_stream.py294# ---------------------------------------------------------------------------
MEDIUM…s/unit_tests/language_models/test_chat_model_stream.py296# ---------------------------------------------------------------------------
MEDIUM…s/unit_tests/language_models/test_chat_model_stream.py789# ---------------------------------------------------------------------------
MEDIUM…s/unit_tests/language_models/test_chat_model_stream.py791# ---------------------------------------------------------------------------
MEDIUMlibs/core/tests/unit_tests/messages/test_utils.py2963# ---------------------------------------------------------------------------
MEDIUMlibs/core/tests/unit_tests/messages/test_utils.py2965# ---------------------------------------------------------------------------
MEDIUM…/core/langchain_core/language_models/_compat_bridge.py90# ---------------------------------------------------------------------------
MEDIUM…/core/langchain_core/language_models/_compat_bridge.py92# ---------------------------------------------------------------------------
MEDIUM…/core/langchain_core/language_models/_compat_bridge.py146# ---------------------------------------------------------------------------
MEDIUM…/core/langchain_core/language_models/_compat_bridge.py148# ---------------------------------------------------------------------------
MEDIUM…/core/langchain_core/language_models/_compat_bridge.py223# ---------------------------------------------------------------------------
MEDIUM…/core/langchain_core/language_models/_compat_bridge.py225# ---------------------------------------------------------------------------
MEDIUM…/core/langchain_core/language_models/_compat_bridge.py461# ---------------------------------------------------------------------------
MEDIUM…/core/langchain_core/language_models/_compat_bridge.py463# ---------------------------------------------------------------------------
MEDIUM…/core/langchain_core/language_models/_compat_bridge.py506# ---------------------------------------------------------------------------
MEDIUM…/core/langchain_core/language_models/_compat_bridge.py508# ---------------------------------------------------------------------------
MEDIUM…/core/langchain_core/language_models/_compat_bridge.py566# ---------------------------------------------------------------------------
MEDIUM…/core/langchain_core/language_models/_compat_bridge.py568# ---------------------------------------------------------------------------
MEDIUM…re/langchain_core/language_models/chat_model_stream.py48# ---------------------------------------------------------------------------
MEDIUM…re/langchain_core/language_models/chat_model_stream.py50# ---------------------------------------------------------------------------
MEDIUM…re/langchain_core/language_models/chat_model_stream.py160# ---------------------------------------------------------------------------
MEDIUM…re/langchain_core/language_models/chat_model_stream.py162# ---------------------------------------------------------------------------
MEDIUM…re/langchain_core/language_models/chat_model_stream.py213# ---------------------------------------------------------------------------
MEDIUM…re/langchain_core/language_models/chat_model_stream.py215# ---------------------------------------------------------------------------
MEDIUM…re/langchain_core/language_models/chat_model_stream.py308# ---------------------------------------------------------------------------
MEDIUM…re/langchain_core/language_models/chat_model_stream.py310# ---------------------------------------------------------------------------
MEDIUM…re/langchain_core/language_models/chat_model_stream.py468# ---------------------------------------------------------------------------
MEDIUM…re/langchain_core/language_models/chat_model_stream.py470# ---------------------------------------------------------------------------
MEDIUM…re/langchain_core/language_models/chat_model_stream.py1037# ---------------------------------------------------------------------------
MEDIUM…re/langchain_core/language_models/chat_model_stream.py1039# ---------------------------------------------------------------------------
MEDIUM…re/langchain_core/language_models/chat_model_stream.py1193# ---------------------------------------------------------------------------
MEDIUM…re/langchain_core/language_models/chat_model_stream.py1195# ---------------------------------------------------------------------------
MEDIUMlibs/core/langchain_core/_security/_policy.py12# ---------------------------------------------------------------------------
MEDIUMlibs/core/langchain_core/_security/_policy.py14# ---------------------------------------------------------------------------
MEDIUMlibs/core/langchain_core/_security/_policy.py97# ---------------------------------------------------------------------------
MEDIUMlibs/core/langchain_core/_security/_policy.py99# ---------------------------------------------------------------------------
MEDIUMlibs/core/langchain_core/_security/_policy.py117# ---------------------------------------------------------------------------
170 more matches not shown…
Cross-Language Confusion62 hits · 395 pts
SeverityFileLineSnippet
HIGH…text-splitters/tests/unit_tests/test_text_splitters.py964 else if (age >= 18 && age < 65)
HIGH…s/unit_tests/language_models/test_chat_model_stream.py31 proj.push("a")
HIGH…s/unit_tests/language_models/test_chat_model_stream.py32 proj.push("b")
HIGH…s/unit_tests/language_models/test_chat_model_stream.py38 proj.push("x")
HIGH…s/unit_tests/language_models/test_chat_model_stream.py132 proj.push("a")
HIGH…s/unit_tests/language_models/test_chat_model_stream.py142 proj.push("x")
HIGH…s/unit_tests/language_models/test_chat_model_stream.py144 proj.push("y")
HIGH…s/unit_tests/language_models/test_chat_model_stream.py162 proj.push("partial")
HIGH…s/unit_tests/language_models/test_chat_model_stream.py176 proj.push(next(deltas))
HIGH…s/unit_tests/language_models/test_chat_model_stream.py199 proj.push(value)
HIGH…s/unit_tests/language_models/test_chat_model_stream.py215 proj.push("only")
HIGH…s/unit_tests/language_models/test_chat_model_stream.py51 proj.push(val)
HIGH…s/unit_tests/language_models/test_chat_model_stream.py60 proj.push("partial")
HIGH…s/unit_tests/language_models/test_chat_model_stream.py73 proj.push("a")
HIGH…s/unit_tests/language_models/test_chat_model_stream.py74 proj.push("b")
HIGH…s/unit_tests/language_models/test_chat_model_stream.py91 proj.push("Hello")
HIGH…s/unit_tests/language_models/test_chat_model_stream.py92 proj.push(" world")
HIGH…s/unit_tests/language_models/test_chat_model_stream.py103 proj.push("Hi")
HIGH…s/unit_tests/language_models/test_chat_model_stream.py115 proj.push("x")
HIGH…s/unit_tests/language_models/test_chat_model_stream.py120 proj.push("hello")
HIGH…ests/unit_tests/output_parsers/test_pydantic_parser.py130 "additional_fields": null,
HIGH…re/langchain_core/language_models/chat_model_stream.py785 self._reasoning_proj.push(full_r)
HIGH…re/langchain_core/language_models/chat_model_stream.py789 self._reasoning_proj.push(tail)
HIGH…re/langchain_core/language_models/chat_model_stream.py631 self._text_proj.push(delta_text)
HIGH…re/langchain_core/language_models/chat_model_stream.py640 self._reasoning_proj.push(delta_r)
HIGH…re/langchain_core/language_models/chat_model_stream.py660 self._tool_calls_proj.push(chunk_block)
HIGH…re/langchain_core/language_models/chat_model_stream.py690 self._tool_calls_proj.push(legacy_chunk_block)
HIGH…re/langchain_core/language_models/chat_model_stream.py728 self._tool_calls_proj.push(fallback_chunk_block)
HIGH…re/langchain_core/language_models/chat_model_stream.py756 self._text_proj.push(full_text)
HIGH…re/langchain_core/language_models/chat_model_stream.py762 self._text_proj.push(tail)
HIGH…re/langchain_core/language_models/chat_model_stream.py1420 self._events_proj.push(cast("MessagesData", event))
HIGHlibs/core/langchain_core/utils/json_schema.py184 # Case 4: Primitive value (string, number, boolean, null) - return unchanged
HIGH…s/langchain/langchain_classic/chains/natbot/crawler.py101 "(document.scrollingElement || document.body).scrollTop = "
HIGH…s/langchain/langchain_classic/chains/natbot/crawler.py102 "(document.scrollingElement || document.body).scrollTop - "
HIGH…s/langchain/langchain_classic/chains/natbot/crawler.py107 "(document.scrollingElement || document.body).scrollTop = "
HIGH…s/langchain/langchain_classic/chains/natbot/crawler.py108 "(document.scrollingElement || document.body).scrollTop + "
HIGHlibs/partners/groq/langchain_groq/chat_models.py1423 # Groq sends 'null' (JSON null) for tools with no arguments, but we
HIGHlibs/partners/groq/langchain_groq/chat_models.py1502 # Groq sends 'null' (JSON null) for tools with no arguments, but we
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py448DEEPSEEK_STREAM_DATA = """{"id":"d3610c24e6b42518a7883ea57c3ea2c3","choices":[{"index":0,"delta":{"content":"","role":"a
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py449{"choices":[{"delta":{"content":"我是","role":"assistant"},"finish_reason":null,"index":0,"logprobs":null}],"created":1721
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py450{"choices":[{"delta":{"content":"Deep","role":"assistant"},"finish_reason":null,"index":0,"logprobs":null}],"created":17
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py451{"choices":[{"delta":{"content":"Seek","role":"assistant"},"finish_reason":null,"index":0,"logprobs":null}],"created":17
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py452{"choices":[{"delta":{"content":" Chat","role":"assistant"},"finish_reason":null,"index":0,"logprobs":null}],"created":1
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py453{"choices":[{"delta":{"content":",","role":"assistant"},"finish_reason":null,"index":0,"logprobs":null}],"created":17216
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py454{"choices":[{"delta":{"content":"一个","role":"assistant"},"finish_reason":null,"index":0,"logprobs":null}],"created":1721
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py455{"choices":[{"delta":{"content":"由","role":"assistant"},"finish_reason":null,"index":0,"logprobs":null}],"created":17216
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py456{"choices":[{"delta":{"content":"深度","role":"assistant"},"finish_reason":null,"index":0,"logprobs":null}],"created":1721
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py457{"choices":[{"delta":{"content":"求","role":"assistant"},"finish_reason":null,"index":0,"logprobs":null}],"created":17216
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py458{"choices":[{"delta":{"content":"索","role":"assistant"},"finish_reason":null,"index":0,"logprobs":null}],"created":17216
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py459{"choices":[{"delta":{"content":"公司","role":"assistant"},"finish_reason":null,"index":0,"logprobs":null}],"created":1721
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py460{"choices":[{"delta":{"content":"开发的","role":"assistant"},"finish_reason":null,"index":0,"logprobs":null}],"created":172
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py461{"choices":[{"delta":{"content":"智能","role":"assistant"},"finish_reason":null,"index":0,"logprobs":null}],"created":1721
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py462{"choices":[{"delta":{"content":"助手","role":"assistant"},"finish_reason":null,"index":0,"logprobs":null}],"created":1721
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py463{"choices":[{"delta":{"content":"。","role":"assistant"},"finish_reason":null,"index":0,"logprobs":null}],"created":17216
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py464{"choices":[{"delta":{"content":"","role":null},"finish_reason":"stop","index":0,"logprobs":null}],"created":1721630271,
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py527OPENAI_STREAM_DATA = """{"id":"chatcmpl-9nhARrdUiJWEMd5plwV1Gc9NCjb9M","object":"chat.completion.chunk","created":172163
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py528{"id":"chatcmpl-9nhARrdUiJWEMd5plwV1Gc9NCjb9M","object":"chat.completion.chunk","created":1721631035,"model":"gpt-4o-202
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py529{"id":"chatcmpl-9nhARrdUiJWEMd5plwV1Gc9NCjb9M","object":"chat.completion.chunk","created":1721631035,"model":"gpt-4o-202
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py530{"id":"chatcmpl-9nhARrdUiJWEMd5plwV1Gc9NCjb9M","object":"chat.completion.chunk","created":1721631035,"model":"gpt-4o-202
HIGH…tners/openai/tests/unit_tests/chat_models/test_base.py531{"id":"chatcmpl-9nhARrdUiJWEMd5plwV1Gc9NCjb9M","object":"chat.completion.chunk","created":1721631035,"model":"gpt-4o-202
2 more matches not shown…
Deep Nesting318 hits · 282 pts
SeverityFileLineSnippet
LOWlibs/text-splitters/tests/unit_tests/conftest.py23
LOWlibs/text-splitters/langchain_text_splitters/html.py244
LOWlibs/text-splitters/langchain_text_splitters/html.py420
LOWlibs/text-splitters/langchain_text_splitters/html.py860
LOWlibs/text-splitters/langchain_text_splitters/html.py905
LOW…bs/text-splitters/langchain_text_splitters/markdown.py134
LOW…bs/text-splitters/langchain_text_splitters/markdown.py372
LOWlibs/text-splitters/langchain_text_splitters/json.py85
LOWlibs/text-splitters/langchain_text_splitters/base.py152
LOWlibs/core/tests/unit_tests/conftest.py49
LOWlibs/core/tests/unit_tests/pydantic_utils.py9
LOWlibs/core/tests/unit_tests/pydantic_utils.py31
LOWlibs/core/tests/unit_tests/test_pydantic_imports.py7
LOWlibs/core/tests/unit_tests/messages/test_utils.py593
LOWlibs/core/tests/unit_tests/messages/test_utils.py605
LOWlibs/core/tests/unit_tests/utils/test_utils.py186
LOW…re/tests/unit_tests/runnables/test_tracing_interops.py343
LOW…/tests/unit_tests/runnables/test_runnable_events_v2.py2148
LOWlibs/core/langchain_core/sys_info.py11
LOWlibs/core/langchain_core/language_models/chat_models.py108
LOWlibs/core/langchain_core/language_models/chat_models.py138
LOWlibs/core/langchain_core/language_models/chat_models.py713
LOWlibs/core/langchain_core/language_models/chat_models.py842
LOWlibs/core/langchain_core/language_models/chat_models.py1862
LOWlibs/core/langchain_core/language_models/chat_models.py2023
LOWlibs/core/langchain_core/language_models/llms.py74
LOWlibs/core/langchain_core/language_models/llms.py132
LOWlibs/core/langchain_core/language_models/llms.py94
LOWlibs/core/langchain_core/language_models/llms.py511
LOW…ore/langchain_core/language_models/fake_chat_models.py266
LOW…/core/langchain_core/language_models/_compat_bridge.py151
LOW…/core/langchain_core/language_models/_compat_bridge.py300
LOW…re/langchain_core/language_models/chat_model_stream.py246
LOW…re/langchain_core/language_models/chat_model_stream.py422
LOW…re/langchain_core/language_models/chat_model_stream.py580
LOW…re/langchain_core/language_models/chat_model_stream.py615
LOW…re/langchain_core/language_models/chat_model_stream.py793
LOW…re/langchain_core/language_models/chat_model_stream.py1155
LOWlibs/core/langchain_core/language_models/_utils.py33
LOWlibs/core/langchain_core/language_models/_utils.py140
LOWlibs/core/langchain_core/tools/structured.py133
LOWlibs/core/langchain_core/tools/base.py656
LOWlibs/core/langchain_core/tools/base.py803
LOWlibs/core/langchain_core/tools/base.py878
LOWlibs/core/langchain_core/tools/base.py1006
LOWlibs/core/langchain_core/messages/ai.py243
LOWlibs/core/langchain_core/messages/ai.py495
LOWlibs/core/langchain_core/messages/ai.py590
LOWlibs/core/langchain_core/messages/utils.py287
LOWlibs/core/langchain_core/messages/utils.py584
LOWlibs/core/langchain_core/messages/utils.py697
LOWlibs/core/langchain_core/messages/utils.py848
LOWlibs/core/langchain_core/messages/utils.py993
LOWlibs/core/langchain_core/messages/utils.py1539
LOWlibs/core/langchain_core/messages/utils.py1954
LOWlibs/core/langchain_core/messages/utils.py2228
LOWlibs/core/langchain_core/messages/tool.py92
LOWlibs/core/langchain_core/messages/base.py366
LOWlibs/core/langchain_core/messages/base.py200
LOW…gchain_core/messages/block_translators/langchain_v0.py46
258 more matches not shown…
Excessive Try-Catch Wrapping201 hits · 232 pts
SeverityFileLineSnippet
LOWlibs/text-splitters/scripts/check_imports.py13 except Exception: # noqa: BLE001
LOWlibs/core/tests/unit_tests/conftest.py92 except Exception:
LOW…/tests/unit_tests/runnables/test_runnable_events_v1.py1546 except Exception:
LOW…/tests/unit_tests/runnables/test_runnable_events_v1.py1663 except Exception:
LOW…/tests/unit_tests/runnables/test_runnable_events_v2.py1505 except Exception:
LOW…/tests/unit_tests/runnables/test_runnable_events_v2.py1622 except Exception:
LOW…/tests/unit_tests/runnables/test_runnable_events_v2.py1967 except Exception as e:
LOWlibs/core/langchain_core/sys_info.py96 except Exception:
LOWlibs/core/langchain_core/sys_info.py105 except Exception:
LOWlibs/core/langchain_core/sys_info.py129 except Exception:
LOWlibs/core/langchain_core/retrievers.py227 except Exception as e:
LOWlibs/core/langchain_core/retrievers.py288 except Exception as e:
LOWlibs/core/langchain_core/agents.py229 except Exception:
LOWlibs/core/langchain_core/agents.py249 except Exception:
LOWlibs/core/langchain_core/language_models/chat_models.py115 except Exception:
LOWlibs/core/langchain_core/language_models/chat_models.py118 except Exception:
LOWlibs/core/langchain_core/language_models/chat_models.py123 except Exception:
LOWlibs/core/langchain_core/language_models/llms.py111 except Exception as e:
LOWlibs/core/langchain_core/language_models/llms.py443 except Exception as e:
LOWlibs/core/langchain_core/language_models/llms.py489 except Exception as e:
LOW…/core/langchain_core/language_models/_compat_bridge.py186 except Exception:
LOWlibs/core/langchain_core/tools/base.py829 except Exception:
LOWlibs/core/langchain_core/tools/base.py1335 except Exception:
LOWlibs/core/langchain_core/tools/base.py1352 except Exception:
LOWlibs/core/langchain_core/messages/ai.py323 except Exception:
LOWlibs/core/langchain_core/messages/ai.py554 except Exception:
LOW…gchain_core/messages/block_translators/google_genai.py413 except Exception:
LOWlibs/core/langchain_core/callbacks/manager.py125 except Exception as e:
LOWlibs/core/langchain_core/callbacks/manager.py208 except Exception as e:
LOWlibs/core/langchain_core/callbacks/manager.py306 except Exception as e:
LOWlibs/core/langchain_core/callbacks/manager.py351 except Exception as e:
LOWlibs/core/langchain_core/callbacks/manager.py363 except Exception as e:
LOWlibs/core/langchain_core/callbacks/manager.py408 except Exception as e:
LOWlibs/core/langchain_core/callbacks/manager.py2509 except Exception as e:
LOWlibs/core/langchain_core/utils/html.py107 except Exception as e:
LOWlibs/core/langchain_core/utils/function_calling.py276 except Exception:
LOWlibs/core/langchain_core/runnables/configurable.py186 except Exception as e:
LOWlibs/core/langchain_core/runnables/configurable.py229 except Exception as e:
LOWlibs/core/langchain_core/runnables/router.py159 except Exception as e:
LOWlibs/core/langchain_core/runnables/router.py196 except Exception as e:
LOWlibs/core/langchain_core/runnables/base.py906 except Exception as e:
LOWlibs/core/langchain_core/runnables/base.py977 except Exception as e:
LOWlibs/core/langchain_core/runnables/base.py1043 except Exception as e:
LOWlibs/core/langchain_core/runnables/base.py1115 except Exception as e:
LOWlibs/core/langchain_core/load/serializable.py78 except Exception as _:
LOWlibs/core/langchain_core/load/serializable.py81 except Exception as _:
LOWlibs/core/langchain_core/load/serializable.py84 except Exception as _:
LOWlibs/core/langchain_core/load/serializable.py321 except Exception as _:
LOWlibs/core/langchain_core/load/serializable.py377 except Exception:
LOWlibs/core/langchain_core/document_loaders/langsmith.py142 except Exception:
LOWlibs/core/langchain_core/indexing/api.py216 except Exception as e:
LOWlibs/core/langchain_core/tracers/evaluation.py147 except Exception:
LOWlibs/core/langchain_core/tracers/core.py121 except Exception:
LOWlibs/core/langchain_core/tracers/stdout.py26 except Exception:
LOWlibs/core/langchain_core/tracers/langchain.py336 except Exception as e:
LOWlibs/core/langchain_core/tracers/langchain.py348 except Exception as e:
MEDIUMlibs/core/scripts/check_version.py36 print(f"Error: {pyproject_path} not found")
MEDIUMlibs/core/scripts/check_version.py40 print(f"Error: {version_path} not found")
MEDIUMlibs/core/scripts/check_version.py47 print("Error: Could not find version in pyproject.toml")
MEDIUMlibs/core/scripts/check_version.py51 print("Error: Could not find VERSION in langchain_core/version.py")
141 more matches not shown…
Hallucination Indicators19 hits · 195 pts
SeverityFileLineSnippet
CRITICAL…hain/langchain_classic/agents/openai_assistant/base.py345 run = self.client.beta.threads.runs.submit_tool_outputs(**tool_outputs)
CRITICAL…hain/langchain_classic/agents/openai_assistant/base.py362 _ = self.client.beta.threads.messages.create(
CRITICAL…hain/langchain_classic/agents/openai_assistant/base.py372 run = self.client.beta.threads.runs.submit_tool_outputs(**input)
CRITICAL…hain/langchain_classic/agents/openai_assistant/base.py477 run = await self.async_client.beta.threads.runs.submit_tool_outputs(
CRITICAL…hain/langchain_classic/agents/openai_assistant/base.py495 _ = await self.async_client.beta.threads.messages.create(
CRITICAL…hain/langchain_classic/agents/openai_assistant/base.py505 run = await self.async_client.beta.threads.runs.submit_tool_outputs(
CRITICAL…hain/langchain_classic/agents/openai_assistant/base.py562 return self.client.beta.threads.runs.create(
CRITICAL…hain/langchain_classic/agents/openai_assistant/base.py603 messages = self.client.beta.threads.messages.list(
CRITICAL…hain/langchain_classic/agents/openai_assistant/base.py673 run = self.client.beta.threads.runs.retrieve(run_id, thread_id=thread_id)
CRITICAL…hain/langchain_classic/agents/openai_assistant/base.py719 return await self.async_client.beta.threads.runs.create(
CRITICAL…hain/langchain_classic/agents/openai_assistant/base.py760 messages = await self.async_client.beta.threads.messages.list(
CRITICAL…hain/langchain_classic/agents/openai_assistant/base.py826 run = await self.async_client.beta.threads.runs.retrieve(
CRITICAL…plexity/tests/unit_tests/test_chat_models_responses.py251 llm.client.chat.completions.create.assert_called_once()
CRITICAL…plexity/tests/unit_tests/test_chat_models_responses.py185 llm.client.chat.completions.create.assert_called_once()
CRITICAL…plexity/tests/unit_tests/test_chat_models_responses.py205 llm.client.chat.completions.create.assert_not_called()
CRITICAL…s/partners/openai/langchain_openai/chat_models/base.py1575 response_stream = self.root_client.beta.chat.completions.stream(
CRITICAL…s/partners/openai/langchain_openai/chat_models/base.py1639 self.root_client.chat.completions.with_raw_response.parse(**payload)
CRITICAL…s/partners/openai/langchain_openai/chat_models/base.py1834 response_stream = self.root_async_client.beta.chat.completions.stream(
CRITICAL…s/partners/openai/langchain_openai/chat_models/base.py1902 raw_response = await self.root_async_client.chat.completions.with_raw_response.parse( # noqa: E501
Redundant / Tautological Comments64 hits · 102 pts
SeverityFileLineSnippet
LOWlibs/text-splitters/tests/unit_tests/conftest.py58 # Iterate through the list of required packages
LOW…text-splitters/tests/unit_tests/test_text_splitters.py3382# Check if a file exists
LOW…text-splitters/tests/unit_tests/test_text_splitters.py3393 '# Check if a file exists\n$filePath = "C:\\temp\\file.txt"',
LOW…ers/tests/integration_tests/test_nlp_text_splitters.py21 # Check if en_core_web_sm model is available
LOW…bs/text-splitters/langchain_text_splitters/markdown.py193 # Check if line matches either standard or custom header pattern
LOWlibs/core/tests/unit_tests/conftest.py84 # Iterate through the list of required packages
LOW…s/unit_tests/indexing/test_in_memory_record_manager.py153 # Check if the keys exist in the database
LOW…s/unit_tests/indexing/test_in_memory_record_manager.py168 # Check if the keys exist in the database
LOW…s/unit_tests/indexing/test_in_memory_record_manager.py262 # Check if the deleted keys are no longer in the database
LOW…s/unit_tests/indexing/test_in_memory_record_manager.py277 # Check if the deleted keys are no longer in the database
LOWlibs/core/langchain_core/language_models/chat_models.py548 # Check if streaming is implemented.
LOWlibs/core/langchain_core/tools/base.py745 # Check if field has an explicit default defined in the schema.
LOWlibs/core/langchain_core/messages/utils.py449 # Check if this is an AIMessage with tool calls
LOWlibs/core/langchain_core/messages/utils.py1967 # Check if all messages already fit within token limit
LOW…gchain_core/messages/block_translators/langchain_v0.py68 # Check if this is actually a v0 format block
LOWlibs/core/langchain_core/callbacks/file.py77 # Open the file in the specified mode with UTF-8 encoding.
LOWlibs/core/langchain_core/utils/pydantic.py159 # Check if allow_population_by_field_name is enabled
LOWlibs/core/langchain_core/utils/function_calling.py806 # Check if 'required' is a key at the current level or if the schema is empty,
LOWlibs/core/langchain_core/runnables/graph_mermaid.py437 # Check if the background color is a hexadecimal color code using regex
LOWlibs/core/langchain_core/load/_validation.py88 # Check if dict needs escaping BEFORE recursing into values.
LOWlibs/core/langchain_core/prompts/loading.py89 # Check if template_path exists in config.
LOWlibs/langchain/tests/unit_tests/conftest.py72 # Iterate through the list of required packages
LOW…ngchain/tests/unit_tests/agents/test_agent_iterator.py284 # Check if properties are updated
LOW…ngchain/tests/unit_tests/agents/test_agent_iterator.py292 # Check if properties are reset
LOW…ngchain/tests/unit_tests/agents/test_agent_iterator.py337 assert outputs[-1]["output"] # Check if there is an output
LOW…ngchain/tests/unit_tests/agents/test_agent_iterator.py352 assert len(outputs) == 2 # Check if the custom stopping condition is respected
LOW…/langchain/tests/unit_tests/storage/test_filesystem.py93 # Check if the deleted key is present
LOW…gchain_classic/callbacks/streaming_aiter_final_only.py88 # Check if the last n tokens match the answer_prefix_tokens list ...
LOW…chain_classic/callbacks/streaming_stdout_final_only.py84 # Check if the last n tokens match the answer_prefix_tokens list ...
LOW…n/langchain_classic/output_parsers/pandas_dataframe.py54 # Check if the format is [1,3,5]
LOW…n/langchain_classic/output_parsers/pandas_dataframe.py57 # Check if the format is [1..5]
LOW…n/langchain_classic/output_parsers/pandas_dataframe.py67 # Check if the format is ["column_name"]
LOW…/langchain_classic/evaluation/comparison/eval_chain.py263 # Check if the model is GPT-4 if not raise a warning
LOWlibs/langchain_v1/langchain/agents/factory.py1190 # Check if any requested tools are unknown CLIENT-SIDE tools
LOW…angchain_v1/langchain/agents/middleware/model_retry.py238 # Check if we should retry this exception
LOW…angchain_v1/langchain/agents/middleware/model_retry.py243 # Check if we have more retries left
LOW…angchain_v1/langchain/agents/middleware/model_retry.py288 # Check if we should retry this exception
LOW…angchain_v1/langchain/agents/middleware/model_retry.py293 # Check if we have more retries left
LOW…gchain_v1/langchain/agents/middleware/tool_emulator.py126 # Check if this tool should be emulated
LOW…gchain_v1/langchain/agents/middleware/tool_emulator.py178 # Check if this tool should be emulated
LOW…hain_v1/langchain/agents/middleware/tool_call_limit.py422 # Check if there are tool calls to other tools that would continue executing
LOW…langchain_v1/langchain/agents/middleware/tool_retry.py307 # Check if retry should apply to this tool
LOW…langchain_v1/langchain/agents/middleware/tool_retry.py320 # Check if we should retry this exception
LOW…langchain_v1/langchain/agents/middleware/tool_retry.py325 # Check if we have more retries left
LOW…langchain_v1/langchain/agents/middleware/tool_retry.py365 # Check if retry should apply to this tool
LOW…langchain_v1/langchain/agents/middleware/tool_retry.py378 # Check if we should retry this exception
LOW…langchain_v1/langchain/agents/middleware/tool_retry.py383 # Check if we have more retries left
LOW…ain_v1/langchain/agents/middleware/model_call_limit.py189 # Check if any limits will be exceeded after the next call
LOWlibs/langchain_v1/tests/unit_tests/conftest.py124 # Iterate through the list of required packages
LOW…perplexity/tests/integration_tests/test_chat_models.py45 # Check if any chunk has reasoning_steps
LOWlibs/partners/qdrant/langchain_qdrant/vectorstores.py1715 # Check if the vector configuration has the same dimensionality.
LOWlibs/partners/qdrant/langchain_qdrant/vectorstores.py1882 # Check if the vector configuration has the same dimensionality.
LOW…/partners/anthropic/langchain_anthropic/chat_models.py1610 # Assign citations to a list if present
LOW…opic/langchain_anthropic/middleware/anthropic_tools.py418 # Read file
LOW…opic/langchain_anthropic/middleware/anthropic_tools.py468 # Read file
LOW…opic/langchain_anthropic/middleware/anthropic_tools.py543 # Read file
LOW…opic/langchain_anthropic/middleware/anthropic_tools.py876 # Read file
LOW…opic/langchain_anthropic/middleware/anthropic_tools.py913 # Write file
LOW…opic/langchain_anthropic/middleware/anthropic_tools.py940 # Read file
LOW…opic/langchain_anthropic/middleware/anthropic_tools.py977 # Read file
4 more matches not shown…
Magic Placeholder Names18 hits · 62 pts
SeverityFileLineSnippet
HIGH…s/partners/mistralai/langchain_mistralai/embeddings.py68 export MISTRAL_API_KEY="your-api-key"
HIGH…artners/openrouter/langchain_openrouter/chat_models.py101 export OPENROUTER_API_KEY="your-api-key"
HIGHlibs/partners/exa/langchain_exa/tools.py29 export EXA_API_KEY="your-api-key"
HIGH…s/partners/fireworks/langchain_fireworks/embeddings.py18 export FIREWORKS_API_KEY="your-api-key"
HIGHlibs/partners/groq/langchain_groq/chat_models.py106 export GROQ_API_KEY="your-api-key"
HIGH…bs/partners/deepseek/langchain_deepseek/chat_models.py55 export DEEPSEEK_API_KEY="your-api-key"
HIGHlibs/partners/xai/langchain_xai/chat_models.py54 export XAI_API_KEY="your-api-key"
HIGH…artners/perplexity/langchain_perplexity/chat_models.py462 export PPLX_API_KEY=your_api_key
HIGH…partners/perplexity/langchain_perplexity/embeddings.py32 export PPLX_API_KEY=your_api_key
HIGH…/partners/anthropic/langchain_anthropic/chat_models.py889 # export ANTHROPIC_API_KEY="your-api-key"
HIGH…ners/openai/tests/unit_tests/chat_models/test_azure.py201 api_key=SecretStr("your_api_key"),
HIGH…ners/openai/tests/unit_tests/chat_models/test_azure.py221 api_key=SecretStr("your_api_key"),
HIGH…s/partners/openai/langchain_openai/embeddings/azure.py35 export AZURE_OPENAI_API_KEY="your-api-key"
HIGH…bs/partners/openai/langchain_openai/embeddings/base.py94 export OPENAI_API_KEY="your-api-key"
HIGH…/partners/openai/langchain_openai/chat_models/azure.py50 export AZURE_OPENAI_API_KEY="your-api-key"
HIGH…s/partners/openai/langchain_openai/chat_models/base.py2559 export OPENAI_API_KEY="your-api-key"
HIGHlibs/partners/openai/langchain_openai/llms/base.py64 export OPENAI_API_KEY="your-api-key"
HIGHlibs/partners/openai/langchain_openai/llms/base.py788 export OPENAI_API_KEY="your-api-key"
Over-Commented Block80 hits · 55 pts
SeverityFileLineSnippet
LOWlibs/text-splitters/langchain_text_splitters/html.py121 <p>Final thoughts.</p>
LOW…re/langchain_core/language_models/chat_model_stream.py881 # Backfill the wire index onto the finalized block when the
LOWlibs/core/langchain_core/tools/convert.py361 return _create_tool_factory(name_or_callable.__name__)(name_or_callable)
LOWlibs/core/langchain_core/callbacks/manager.py2781 # If the user is specifying ASYNC callback handlers to be run from a
LOWlibs/core/langchain_core/utils/_merge.py41 f'additional_kwargs["{right_k}"] already exists in this message,'
LOWlibs/core/langchain_core/runnables/base.py1981 await asyncio.gather(runnable.ainvoke(2), runnable.ainvoke(3))
LOW…gchain/tests/unit_tests/agents/test_structured_chat.py181 """, # noqa: E501
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py1# import dataclasses
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py21# from langchain_core.tools import BaseTool, InjectedToolCallId, ToolException
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py41# )
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py61# )
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py81# assert saved.pending_writes == []
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py101# }
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py121# agent = create_agent(FakeToolCallingModel(), [], system_prompt=prompt)
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py141# async def prompt(state):
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py161# assert response == expected_response
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py181# model = FakeToolCallingModel()
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py201# assert response["messages"][-1].content == "foo-hi"
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py221# model = FakeToolCallingModel()
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py241# model = FakeToolCallingModel(tool_style=tool_style)
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py261# "allowed_tools": [
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py281
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py301
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py321# expected = (ValueError,)
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py341# _infer_handled_types(handler)
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py361# """Get the weather"""
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py381# "ai", # "What's the weather?"
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py401# sync_checkpointer: BaseCheckpointSaver,
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py421# system_msg = f"User name is {user_name}"
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py441# tool_message: ToolMessage = response["messages"][-2]
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py461
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py481# )
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py501# assert message_types == [
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py521# def tool1(
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py541# store=store,
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py561# """A normal tool."""
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py581
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py601# model = FakeToolCallingModel(tool_calls=[second_tool_call, []])
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py621# ),
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py641# content="Normal result: Test both normal",
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py661# assert _get_state_args(foo) == {"a": None, "b": "bar"}
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py681# def add(state):
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py701
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py721# model,
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py741# content="6",
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py761# [{"args": {"city": "Tokyo"}, "id": "1", "name": "get_weather"}],
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py781# stream_mode="messages",
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py801# assert "assistant" in str(result["messages"][1])
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py821# for event in compiled_workflow.stream(
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py841# def get_weather(city: str) -> str:
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py861# """Node that runs the React agent and collects streaming output."""
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py881
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py901# {"messages": [("user", "What is the weather in Tokyo?")]},
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py921# assert msg.content.startswith("You are a helpful travel assistant")
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py941# ToolCall(name="tool_interrupt", args={"some_val": 0}, id="1"),
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py961# "name": "tool_interrupt",
LOW…ngchain_v1/tests/unit_tests/agents/test_react_agent.py981# assert task.name == "tools"
LOW…tners/groq/tests/integration_tests/test_chat_models.py801 response = llm.invoke([input_message, full, next_message])
LOW…/partners/anthropic/langchain_anthropic/chat_models.py121
LOW…/partners/anthropic/langchain_anthropic/chat_models.py1861 )
20 more matches not shown…
Fake / Example Data30 hits · 37 pts
SeverityFileLineSnippet
LOW…plitters/tests/integration_tests/test_text_splitter.py62 text = "Lorem ipsum"
LOW…plitters/tests/integration_tests/test_text_splitter.py78 text = "lorem ipsum"
LOW…plitters/tests/integration_tests/test_text_splitter.py124 text = "lorem ipsum"
LOW…e/tests/unit_tests/output_parsers/test_openai_tools.py1109 "street": "123 Main St",
LOW…e/tests/unit_tests/output_parsers/test_openai_tools.py1125 assert result_v1[0].address.street == "123 Main St" # type: ignore[attr-defined,unused-ignore]
LOWlibs/core/tests/unit_tests/examples/example-utf8.txt1Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
LOWlibs/core/tests/unit_tests/examples/example-utf8.txt1Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
LOW…core/tests/unit_tests/indexing/test_hashed_document.py9 uid="123", page_content="Lorem ipsum dolor sit amet", metadata={"key": "value"}
LOW…core/tests/unit_tests/indexing/test_hashed_document.py9 uid="123", page_content="Lorem ipsum dolor sit amet", metadata={"key": "value"}
LOW…core/tests/unit_tests/indexing/test_hashed_document.py18 page_content="Lorem ipsum dolor sit amet", metadata={"key": "value"}
LOW…core/tests/unit_tests/indexing/test_hashed_document.py18 page_content="Lorem ipsum dolor sit amet", metadata={"key": "value"}
LOW…core/tests/unit_tests/indexing/test_hashed_document.py23 assert hashed_doc.page_content == "Lorem ipsum dolor sit amet"
LOW…core/tests/unit_tests/indexing/test_hashed_document.py23 assert hashed_doc.page_content == "Lorem ipsum dolor sit amet"
LOW…core/tests/unit_tests/indexing/test_hashed_document.py30 page_content="Lorem ipsum dolor sit amet", metadata={"key": "value"}
LOW…core/tests/unit_tests/indexing/test_hashed_document.py30 page_content="Lorem ipsum dolor sit amet", metadata={"key": "value"}
LOW…core/tests/unit_tests/indexing/test_hashed_document.py61 page_content="Lorem ipsum dolor sit amet", metadata={"key": "like a duck"}
LOW…core/tests/unit_tests/indexing/test_hashed_document.py61 page_content="Lorem ipsum dolor sit amet", metadata={"key": "like a duck"}
LOW…s/langchain/tests/unit_tests/examples/example-utf8.txt1Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
LOW…s/langchain/tests/unit_tests/examples/example-utf8.txt1Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
LOW…hain/tests/unit_tests/evaluation/qa/test_eval_chain.py27 example = {"query": "What's my name", "answer": "John Doe"}
LOW…hain/tests/unit_tests/evaluation/qa/test_eval_chain.py28 prediction = {"result": "John Doe"}
LOW…hain/tests/unit_tests/evaluation/qa/test_eval_chain.py48 prediction = {"result": "John Doe"}
LOW…s/agents/middleware/implementations/test_shell_tool.py128 assert "user@example.com" not in message
LOW…it_tests/agents/middleware/implementations/test_pii.py282 assert "user@example.com" not in content
LOW…ers/perplexity/tests/unit_tests/test_output_parsers.py199 text = '{"name": "John Doe", "age": 30, "email": "john@example.com"}'
LOW…ers/perplexity/tests/unit_tests/test_output_parsers.py203 assert result.name == "John Doe"
LOW…ers/perplexity/tests/unit_tests/test_output_parsers.py213 object</think>{"name": "John Doe", "age": 30}'
LOW…ers/perplexity/tests/unit_tests/test_output_parsers.py217 assert result.name == "John Doe"
LOW…tegration_tests/qdrant_vector_store/test_from_texts.py26 ["Lorem ipsum dolor sit amet", "Ipsum dolor sit amet"],
LOW…tegration_tests/qdrant_vector_store/test_from_texts.py26 ["Lorem ipsum dolor sit amet", "Ipsum dolor sit amet"],
Overly Generic Function Names13 hits · 14 pts
SeverityFileLineSnippet
LOW…s/core/tests/unit_tests/utils/test_function_calling.py419 def my_function(arg1: NestedV2) -> None:
LOW…s/core/tests/unit_tests/utils/test_function_calling.py432 def my_function(arg1: Nested) -> None:
LOW…s/core/tests/unit_tests/utils/test_function_calling.py390 def my_function(_: str) -> str:
LOW…s/core/tests/unit_tests/utils/test_function_calling.py469 def my_function(arg1: Nested) -> None:
LOW…s/core/tests/unit_tests/utils/test_function_calling.py512 def my_function(my_arg: NestedA | NestedB | NestedC) -> None:
LOW…s/core/tests/unit_tests/utils/test_function_calling.py1126 def my_function(arg1: dict, arg2: dict | None) -> None:
LOWlibs/core/tests/unit_tests/runnables/test_runnable.py3508 def my_function(_: Any, **kwargs: Any) -> int:
LOWlibs/core/tests/unit_tests/runnables/test_runnable.py3518 def my_function(_: Any, **kwargs: Any) -> int:
LOW…re/tests/unit_tests/runnables/test_tracing_interops.py73 def my_function(a: int) -> int:
LOW…re/tests/unit_tests/runnables/test_tracing_interops.py145 def my_function(a: int) -> int:
LOW…re/tests/unit_tests/runnables/test_tracing_interops.py222 async def my_function(a: int) -> int:
LOWlibs/core/langchain_core/_security/_transport.py144 def handle_request(
LOW…hropic/tests/unit_tests/middleware/test_file_search.py40 "content": ["def helper(): pass"],
Slop Phrases9 hits · 14 pts
SeverityFileLineSnippet
MEDIUMlibs/core/langchain_core/runnables/fallbacks.py64 # And you can also use fallbacks at the level of a chain.
MEDIUMlibs/core/langchain_core/runnables/base.py3031 Here is a simple example that uses simple functions to illustrate the use of
MEDIUMlibs/core/langchain_core/runnables/base.py3755 Here is a simple example that uses functions to illustrate the use of
MEDIUM…sts/unit_tests/examples/test_specs/zapier/apispec.json6 "description": "<img src=\"https://cdn.zappy.app/945f9bf9e44126873952ec5113949c3f.png\" width=\"100\" />\n\n## Hel
MEDIUMlibs/langchain/langchain_classic/memory/prompt.py5You are designed to be able to assist with a wide range of tasks, from answering simple questions to providing in-depth
MEDIUM…langchain_classic/agents/conversational_chat/prompt.py3Assistant is designed to be able to assist with a wide range of tasks, from answering simple questions to providing in-d
MEDIUM…s/langchain/langchain_classic/agents/json_chat/base.py96 topics. As a language model, Assistant is able to generate human-like text based on
MEDIUM…hain/langchain_classic/agents/conversational/prompt.py3Assistant is designed to be able to assist with a wide range of tasks, from answering simple questions to providing in-d
LOWlibs/partners/ollama/langchain_ollama/chat_models.py426 content="It's been a blast chatting with you! Say goodbye to the world for me, and don't forget to come
AI Slop Vocabulary9 hits · 14 pts
SeverityFileLineSnippet
MEDIUM…sts/unit_tests/output_parsers/test_openai_functions.py17 """Test the JSON output function parser is configured with robust defaults."""
LOWlibs/core/langchain_core/tools/base.py830 # If we can't get annotations, just use FILTERED_ARGS
LOWlibs/core/langchain_core/utils/mustache.py376 # Then just return the current scope
LOWlibs/core/langchain_core/tracers/event_stream.py229 # otherwise just pass through
LOWlibs/core/langchain_core/tracers/event_stream.py279 # otherwise just pass through
MEDIUM…sts/unit_tests/examples/test_specs/zapier/apispec.json6 "description": "<img src=\"https://cdn.zappy.app/945f9bf9e44126873952ec5113949c3f.png\" width=\"100\" />\n\n## Hel
LOW…hain/langchain_classic/callbacks/streamlit/__init__.py59 # This is the official handler, so we can just return it.
LOWlibs/langchain/langchain_classic/agents/agent.py967 # we just return the full output
LOW…in/langchain_classic/chains/history_aware_retriever.py62 # If no chat history, then we just pass input to retriever
Dead Code4 hits · 8 pts
SeverityFileLineSnippet
MEDIUMlibs/core/langchain_core/runnables/base.py5596
MEDIUM…artners/fireworks/tests/unit_tests/test_chat_models.py1414
MEDIUM…artners/fireworks/tests/unit_tests/test_chat_models.py713
MEDIUM…artners/fireworks/tests/unit_tests/test_chat_models.py865
Synthetic Comment Markers1 hit · 8 pts
SeverityFileLineSnippet
HIGH…gchain/tests/unit_tests/chains/test_qa_with_sources.py54 # The following text was generated by gpt-3.5-turbo
Verbosity Indicators1 hit · 2 pts
SeverityFileLineSnippet
LOWlibs/core/langchain_core/utils/pydantic.py107 # Before we can use issubclass on the cls we need to check if it is a class
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippet
LOW…gchain_classic/chains/conversational_retrieval/base.py327 # Usage: