sample_id stringlengths 21 196 | text stringlengths 105 936k | metadata dict | category stringclasses 6
values |
|---|---|---|---|
langchain-ai/langchain:libs/langchain/langchain_classic/agents/agent_toolkits/openapi/prompt.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.agent_toolkits.openapi.prompt import (
DESCRIPTION,
OPENAPI_PREFIX,
OPENAPI_SUFFIX,
)
# Create a way to dynamically look up deprecated imports.
# Used to... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/agent_toolkits/openapi/prompt.py",
"license": "MIT License",
"lines": 21,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/agent_toolkits/openapi/toolkit.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.agent_toolkits.openapi.toolkit import (
OpenAPIToolkit,
RequestsToolkit,
)
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic ... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/agent_toolkits/openapi/toolkit.py",
"license": "MIT License",
"lines": 22,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/agent_toolkits/playwright/toolkit.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.agent_toolkits.playwright.toolkit import (
PlayWrightBrowserToolkit,
)
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising ... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/agent_toolkits/playwright/toolkit.py",
"license": "MIT License",
"lines": 19,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/agent_toolkits/powerbi/base.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.agent_toolkits.powerbi.base import create_pbi_agent
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# hand... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/agent_toolkits/powerbi/base.py",
"license": "MIT License",
"lines": 17,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/agent_toolkits/powerbi/prompt.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.agent_toolkits.powerbi.prompt import (
POWERBI_CHAT_PREFIX,
POWERBI_CHAT_SUFFIX,
POWERBI_PREFIX,
POWERBI_SUFFIX,
)
# Create a way to dynamically ... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/agent_toolkits/powerbi/prompt.py",
"license": "MIT License",
"lines": 28,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/agent_toolkits/powerbi/toolkit.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.agent_toolkits.powerbi.toolkit import PowerBIToolkit
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# han... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/agent_toolkits/powerbi/toolkit.py",
"license": "MIT License",
"lines": 17,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/agent_toolkits/slack/toolkit.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.agent_toolkits.slack.toolkit import SlackToolkit
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handlin... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/agent_toolkits/slack/toolkit.py",
"license": "MIT License",
"lines": 15,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/agent_toolkits/spark_sql/base.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.agent_toolkits.spark_sql.base import create_spark_sql_agent
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings an... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/agent_toolkits/spark_sql/base.py",
"license": "MIT License",
"lines": 17,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/agent_toolkits/spark_sql/prompt.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.agent_toolkits.spark_sql.prompt import (
SQL_PREFIX,
SQL_SUFFIX,
)
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for rais... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/agent_toolkits/spark_sql/prompt.py",
"license": "MIT License",
"lines": 19,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/agent_toolkits/spark_sql/toolkit.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.agent_toolkits.spark_sql.toolkit import SparkSQLToolkit
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# ... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/agent_toolkits/spark_sql/toolkit.py",
"license": "MIT License",
"lines": 17,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/agent_toolkits/sql/base.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.agent_toolkits.sql.base import create_sql_agent
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/agent_toolkits/sql/base.py",
"license": "MIT License",
"lines": 15,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/agent_toolkits/sql/prompt.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.agent_toolkits.sql.prompt import (
SQL_FUNCTIONS_SUFFIX,
SQL_PREFIX,
SQL_SUFFIX,
)
# Create a way to dynamically look up deprecated imports.
# Used to co... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/agent_toolkits/sql/prompt.py",
"license": "MIT License",
"lines": 21,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/agent_toolkits/sql/toolkit.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.agent_toolkits.sql.toolkit import SQLDatabaseToolkit
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# han... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/agent_toolkits/sql/toolkit.py",
"license": "MIT License",
"lines": 17,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/agent_toolkits/steam/toolkit.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.agent_toolkits.steam.toolkit import SteamToolkit
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handlin... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/agent_toolkits/steam/toolkit.py",
"license": "MIT License",
"lines": 15,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/agent_toolkits/vectorstore/base.py | """VectorStore agent."""
from typing import Any
from langchain_core._api import deprecated
from langchain_core.callbacks.base import BaseCallbackManager
from langchain_core.language_models import BaseLanguageModel
from langchain_classic.agents.agent import AgentExecutor
from langchain_classic.agents.agent_toolkits.v... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/agent_toolkits/vectorstore/base.py",
"license": "MIT License",
"lines": 200,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | documentation |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/agent_toolkits/zapier/toolkit.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.agent_toolkits.zapier.toolkit import ZapierToolkit
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handl... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/agent_toolkits/zapier/toolkit.py",
"license": "MIT License",
"lines": 17,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/chat/base.py | from collections.abc import Sequence
from typing import Any
from langchain_core._api import deprecated
from langchain_core.agents import AgentAction
from langchain_core.callbacks import BaseCallbackManager
from langchain_core.language_models import BaseLanguageModel
from langchain_core.prompts import BasePromptTemplat... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/chat/base.py",
"license": "MIT License",
"lines": 160,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/chat/output_parser.py | import json
import re
from re import Pattern
from langchain_core.agents import AgentAction, AgentFinish
from langchain_core.exceptions import OutputParserException
from langchain_classic.agents.agent import AgentOutputParser
from langchain_classic.agents.chat.prompt import FORMAT_INSTRUCTIONS
FINAL_ANSWER_ACTION = "... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/chat/output_parser.py",
"license": "MIT License",
"lines": 57,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/conversational/base.py | """An agent designed to hold a conversation in addition to using tools."""
from __future__ import annotations
from collections.abc import Sequence
from typing import Any
from langchain_core._api import deprecated
from langchain_core.callbacks import BaseCallbackManager
from langchain_core.language_models import Base... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/conversational/base.py",
"license": "MIT License",
"lines": 158,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/conversational/output_parser.py | import re
from langchain_core.agents import AgentAction, AgentFinish
from langchain_core.exceptions import OutputParserException
from langchain_classic.agents.agent import AgentOutputParser
from langchain_classic.agents.conversational.prompt import FORMAT_INSTRUCTIONS
class ConvoOutputParser(AgentOutputParser):
... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/conversational/output_parser.py",
"license": "MIT License",
"lines": 37,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/conversational_chat/base.py | """An agent designed to hold a conversation in addition to using tools."""
from __future__ import annotations
from collections.abc import Sequence
from typing import Any
from langchain_core._api import deprecated
from langchain_core.agents import AgentAction
from langchain_core.callbacks import BaseCallbackManager
f... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/conversational_chat/base.py",
"license": "MIT License",
"lines": 160,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/conversational_chat/output_parser.py | from __future__ import annotations
from langchain_core.agents import AgentAction, AgentFinish
from langchain_core.exceptions import OutputParserException
from langchain_core.utils.json import parse_json_markdown
from langchain_classic.agents import AgentOutputParser
from langchain_classic.agents.conversational_chat.p... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/conversational_chat/output_parser.py",
"license": "MIT License",
"lines": 44,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/format_scratchpad/tools.py | import json
import logging
from collections.abc import Sequence
from typing import Any
from langchain_core.agents import AgentAction
from langchain_core.messages import (
AIMessage,
BaseMessage,
ToolMessage,
)
from langchain_classic.agents.output_parsers.tools import ToolAgentAction
_logger = logging.get... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/format_scratchpad/tools.py",
"license": "MIT License",
"lines": 60,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/json_chat/base.py | from collections.abc import Sequence
from langchain_core.language_models import BaseLanguageModel
from langchain_core.prompts.chat import ChatPromptTemplate
from langchain_core.runnables import Runnable, RunnablePassthrough
from langchain_core.tools import BaseTool
from langchain_core.tools.render import ToolsRenderer... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/json_chat/base.py",
"license": "MIT License",
"lines": 158,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | documentation |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/loading.py | """Functionality for loading agents."""
import json
import logging
from pathlib import Path
from typing import Any
import yaml
from langchain_core._api import deprecated
from langchain_core.language_models import BaseLanguageModel
from langchain_core.tools import Tool
from langchain_classic.agents.agent import BaseM... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/loading.py",
"license": "MIT License",
"lines": 125,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/mrkl/base.py | """Attempt to implement MRKL systems as described in arxiv.org/pdf/2205.00445.pdf."""
from __future__ import annotations
from collections.abc import Callable, Sequence
from typing import Any, NamedTuple
from langchain_core._api import deprecated
from langchain_core.callbacks import BaseCallbackManager
from langchain... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/mrkl/base.py",
"license": "MIT License",
"lines": 185,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/openai_assistant/base.py | from __future__ import annotations
import asyncio
import json
from collections.abc import Callable, Sequence
from json import JSONDecodeError
from time import sleep
from typing import (
TYPE_CHECKING,
Any,
)
from langchain_core.agents import AgentAction, AgentFinish
from langchain_core.callbacks import Callba... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/openai_assistant/base.py",
"license": "MIT License",
"lines": 756,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/openai_functions_agent/base.py | """Module implements an agent that uses OpenAI's APIs function enabled API."""
from collections.abc import Sequence
from typing import Any
from langchain_core._api import deprecated
from langchain_core.agents import AgentAction, AgentFinish
from langchain_core.callbacks import BaseCallbackManager, Callbacks
from lang... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/openai_functions_agent/base.py",
"license": "MIT License",
"lines": 334,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/openai_functions_multi_agent/base.py | """Module implements an agent that uses OpenAI's APIs function enabled API."""
import json
from collections.abc import Sequence
from json import JSONDecodeError
from typing import Any
from langchain_core._api import deprecated
from langchain_core.agents import AgentAction, AgentActionMessageLog, AgentFinish
from lang... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/openai_functions_multi_agent/base.py",
"license": "MIT License",
"lines": 302,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/openai_tools/base.py | from collections.abc import Sequence
from langchain_core.language_models import BaseLanguageModel
from langchain_core.prompts.chat import ChatPromptTemplate
from langchain_core.runnables import Runnable, RunnablePassthrough
from langchain_core.tools import BaseTool
from langchain_core.utils.function_calling import con... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/openai_tools/base.py",
"license": "MIT License",
"lines": 93,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | documentation |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/output_parsers/openai_functions.py | import json
from json import JSONDecodeError
from langchain_core.agents import AgentAction, AgentActionMessageLog, AgentFinish
from langchain_core.exceptions import OutputParserException
from langchain_core.messages import (
AIMessage,
BaseMessage,
)
from langchain_core.outputs import ChatGeneration, Generatio... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/output_parsers/openai_functions.py",
"license": "MIT License",
"lines": 82,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/output_parsers/openai_tools.py | from langchain_core.agents import AgentAction, AgentFinish
from langchain_core.messages import BaseMessage
from langchain_core.outputs import ChatGeneration, Generation
from typing_extensions import override
from langchain_classic.agents.agent import MultiActionAgentOutputParser
from langchain_classic.agents.output_pa... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/output_parsers/openai_tools.py",
"license": "MIT License",
"lines": 59,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/output_parsers/tools.py | import json
from json import JSONDecodeError
from langchain_core.agents import AgentAction, AgentActionMessageLog, AgentFinish
from langchain_core.exceptions import OutputParserException
from langchain_core.messages import (
AIMessage,
BaseMessage,
ToolCall,
)
from langchain_core.outputs import ChatGenerat... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/output_parsers/tools.py",
"license": "MIT License",
"lines": 100,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/output_parsers/xml.py | import re
from typing import Literal
from langchain_core.agents import AgentAction, AgentFinish
from pydantic import Field
from typing_extensions import override
from langchain_classic.agents import AgentOutputParser
def _unescape(text: str) -> str:
"""Convert custom tag delimiters back into XML tags."""
re... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/output_parsers/xml.py",
"license": "MIT License",
"lines": 105,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/react/agent.py | from __future__ import annotations
from collections.abc import Sequence
from langchain_core.language_models import BaseLanguageModel
from langchain_core.prompts import BasePromptTemplate
from langchain_core.runnables import Runnable, RunnablePassthrough
from langchain_core.tools import BaseTool
from langchain_core.to... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/react/agent.py",
"license": "MIT License",
"lines": 119,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | documentation |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/react/base.py | """Chain that implements the ReAct paper from https://arxiv.org/pdf/2210.03629.pdf."""
from __future__ import annotations
from collections.abc import Sequence
from typing import TYPE_CHECKING, Any
from langchain_core._api import deprecated
from langchain_core.documents import Document
from langchain_core.language_mo... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/react/base.py",
"license": "MIT License",
"lines": 158,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/react/output_parser.py | import re
from langchain_core.agents import AgentAction, AgentFinish
from langchain_core.exceptions import OutputParserException
from typing_extensions import override
from langchain_classic.agents.agent import AgentOutputParser
class ReActOutputParser(AgentOutputParser):
"""Output parser for the ReAct agent.""... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/react/output_parser.py",
"license": "MIT License",
"lines": 27,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/self_ask_with_search/base.py | """Chain that does self-ask with search."""
from __future__ import annotations
from collections.abc import Sequence
from typing import TYPE_CHECKING, Any
from langchain_core._api import deprecated
from langchain_core.language_models import BaseLanguageModel
from langchain_core.prompts import BasePromptTemplate
from ... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/self_ask_with_search/base.py",
"license": "MIT License",
"lines": 179,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/structured_chat/base.py | import re
from collections.abc import Sequence
from typing import Any
from langchain_core._api import deprecated
from langchain_core.agents import AgentAction
from langchain_core.callbacks import BaseCallbackManager
from langchain_core.language_models import BaseLanguageModel
from langchain_core.prompts import BasePro... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/structured_chat/base.py",
"license": "MIT License",
"lines": 271,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/structured_chat/output_parser.py | from __future__ import annotations
import json
import logging
import re
from re import Pattern
from langchain_core.agents import AgentAction, AgentFinish
from langchain_core.exceptions import OutputParserException
from langchain_core.language_models import BaseLanguageModel
from pydantic import Field
from typing_exte... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/structured_chat/output_parser.py",
"license": "MIT License",
"lines": 92,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/tool_calling_agent/base.py | from collections.abc import Callable, Sequence
from langchain_core.agents import AgentAction
from langchain_core.language_models import BaseLanguageModel
from langchain_core.messages import BaseMessage
from langchain_core.prompts.chat import ChatPromptTemplate
from langchain_core.runnables import Runnable, RunnablePas... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/tool_calling_agent/base.py",
"license": "MIT License",
"lines": 99,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | documentation |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/types.py | from langchain_classic.agents.agent import BaseSingleActionAgent
from langchain_classic.agents.agent_types import AgentType
from langchain_classic.agents.chat.base import ChatAgent
from langchain_classic.agents.conversational.base import ConversationalAgent
from langchain_classic.agents.conversational_chat.base import ... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/types.py",
"license": "MIT License",
"lines": 25,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/agents/xml/base.py | from collections.abc import Sequence
from typing import Any
from langchain_core._api import deprecated
from langchain_core.agents import AgentAction, AgentFinish
from langchain_core.callbacks import Callbacks
from langchain_core.language_models import BaseLanguageModel
from langchain_core.prompts.base import BasePromp... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/agents/xml/base.py",
"license": "MIT License",
"lines": 194,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
langchain-ai/langchain:libs/langchain/langchain_classic/cache.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.cache import (
AstraDBCache,
AstraDBSemanticCache,
AzureCosmosDBSemanticCache,
CassandraCache,
CassandraSemanticCache,
FullLLMCache,
... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/cache.py",
"license": "MIT License",
"lines": 64,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/callbacks/human.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.callbacks.human import (
AsyncHumanApprovalCallbackHandler,
HumanApprovalCallbackHandler,
HumanRejectedException,
)
# Create a way to dynamically look up... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/callbacks/human.py",
"license": "MIT License",
"lines": 25,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/callbacks/utils.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.callbacks.utils import (
BaseMetadataCallbackHandler,
_flatten_dict,
flatten_dict,
hash_string,
import_pandas,
import_spacy,
i... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/callbacks/utils.py",
"license": "MIT License",
"lines": 40,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/api/base.py | """Chain that makes API calls and summarizes the responses to answer a question."""
from __future__ import annotations
from collections.abc import Sequence
from typing import Any
from urllib.parse import urlparse
from langchain_core._api import deprecated
from langchain_core.callbacks import (
AsyncCallbackManag... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/api/base.py",
"license": "MIT License",
"lines": 341,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | documentation |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/api/openapi/chain.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chains.openapi.chain import OpenAPIEndpointChain
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handlin... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/api/openapi/chain.py",
"license": "MIT License",
"lines": 15,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/api/openapi/prompts.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chains.openapi.prompts import (
REQUEST_TEMPLATE,
RESPONSE_TEMPLATE,
)
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for ... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/api/openapi/prompts.py",
"license": "MIT License",
"lines": 19,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/base.py | """Base interface that all chains should implement."""
import builtins
import contextlib
import inspect
import json
import logging
import warnings
from abc import ABC, abstractmethod
from pathlib import Path
from typing import Any, cast
import yaml
from langchain_core._api import deprecated
from langchain_core.callba... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/base.py",
"license": "MIT License",
"lines": 713,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/combine_documents/base.py | """Base interface for chains combining documents."""
from abc import ABC, abstractmethod
from typing import Any
from langchain_core._api import deprecated
from langchain_core.callbacks import (
AsyncCallbackManagerForChainRun,
CallbackManagerForChainRun,
)
from langchain_core.documents import Document
from la... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/combine_documents/base.py",
"license": "MIT License",
"lines": 233,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/constitutional_ai/base.py | """Chain for applying constitutional principles to the outputs of another chain."""
from typing import Any
from langchain_core._api import deprecated
from langchain_core.callbacks import CallbackManagerForChainRun
from langchain_core.language_models import BaseLanguageModel
from langchain_core.prompts import BaseProm... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/constitutional_ai/base.py",
"license": "MIT License",
"lines": 283,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | documentation |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/conversation/base.py | """Chain that carries on a conversation and calls an LLM."""
from langchain_core._api import deprecated
from langchain_core.prompts import BasePromptTemplate
from pydantic import ConfigDict, Field, model_validator
from typing_extensions import Self, override
from langchain_classic.base_memory import BaseMemory
from l... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/conversation/base.py",
"license": "MIT License",
"lines": 115,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | documentation |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/conversation/memory.py | """Memory modules for conversation prompts."""
from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
from langchain_classic.memory.buffer import (
ConversationBufferMemory,
ConversationStringBufferMemory,
)
from langchain_classic.memory.buffer_window import ConversationBuffe... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/conversation/memory.py",
"license": "MIT License",
"lines": 35,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/conversation/prompt.py | from langchain_core.prompts.prompt import PromptTemplate
from langchain_classic.memory.prompt import (
ENTITY_EXTRACTION_PROMPT,
ENTITY_MEMORY_CONVERSATION_TEMPLATE,
ENTITY_SUMMARIZATION_PROMPT,
KNOWLEDGE_TRIPLE_EXTRACTION_PROMPT,
SUMMARY_PROMPT,
)
DEFAULT_TEMPLATE = """The following is a friendly... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/conversation/prompt.py",
"license": "MIT License",
"lines": 23,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/conversational_retrieval/base.py | """Chain for chatting with a vector database."""
from __future__ import annotations
import inspect
import warnings
from abc import abstractmethod
from collections.abc import Callable
from pathlib import Path
from typing import Any
from langchain_core._api import deprecated
from langchain_core.callbacks import (
... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/conversational_retrieval/base.py",
"license": "MIT License",
"lines": 515,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/elasticsearch_database/base.py | """Chain for interacting with Elasticsearch Database."""
from __future__ import annotations
from typing import TYPE_CHECKING, Any
from langchain_core.callbacks import CallbackManagerForChainRun
from langchain_core.language_models import BaseLanguageModel
from langchain_core.output_parsers import BaseOutputParser, St... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/elasticsearch_database/base.py",
"license": "MIT License",
"lines": 179,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/ernie_functions/base.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chains.ernie_functions.base import (
convert_python_function_to_ernie_function,
convert_to_ernie_function,
create_ernie_fn_chain,
create_ernie_fn_runn... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/ernie_functions/base.py",
"license": "MIT License",
"lines": 41,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/flare/base.py | from __future__ import annotations
import logging
import re
from collections.abc import Sequence
from typing import Any
from langchain_core.callbacks import (
CallbackManagerForChainRun,
)
from langchain_core.language_models import BaseLanguageModel
from langchain_core.messages import AIMessage
from langchain_cor... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/flare/base.py",
"license": "MIT License",
"lines": 279,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/graph_qa/base.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chains.graph_qa.base import GraphQAChain
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling option... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/graph_qa/base.py",
"license": "MIT License",
"lines": 15,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/graph_qa/hugegraph.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chains.graph_qa.hugegraph import HugeGraphQAChain
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handli... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/graph_qa/hugegraph.py",
"license": "MIT License",
"lines": 15,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/graph_qa/prompts.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chains.graph_qa.prompts import (
AQL_FIX_TEMPLATE,
AQL_GENERATION_TEMPLATE,
AQL_QA_TEMPLATE,
CYPHER_GENERATION_PROMPT,
CYPHER_GENERATION_TEMPL... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/graph_qa/prompts.py",
"license": "MIT License",
"lines": 88,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/hyde/base.py | """Hypothetical Document Embeddings.
https://arxiv.org/abs/2212.10496
"""
from __future__ import annotations
import logging
from typing import Any
from langchain_core.callbacks import CallbackManagerForChainRun
from langchain_core.embeddings import Embeddings
from langchain_core.language_models import BaseLanguageM... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/hyde/base.py",
"license": "MIT License",
"lines": 106,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/llm_checker/base.py | """Chain for question-answering with self-verification."""
from __future__ import annotations
import warnings
from typing import Any
from langchain_core._api import deprecated
from langchain_core.callbacks import CallbackManagerForChainRun
from langchain_core.language_models import BaseLanguageModel
from langchain_c... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/llm_checker/base.py",
"license": "MIT License",
"lines": 178,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/llm_math/base.py | """Chain that interprets a prompt and executes python code to do math."""
from __future__ import annotations
import math
import re
import warnings
from typing import Any
from langchain_core._api import deprecated
from langchain_core.callbacks import (
AsyncCallbackManagerForChainRun,
CallbackManagerForChainR... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/llm_math/base.py",
"license": "MIT License",
"lines": 271,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/llm_summarization_checker/base.py | """Chain for summarization with self-verification."""
from __future__ import annotations
import logging
import warnings
from pathlib import Path
from typing import Any
from langchain_core._api import deprecated
from langchain_core.callbacks import CallbackManagerForChainRun
from langchain_core.language_models import... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/llm_summarization_checker/base.py",
"license": "MIT License",
"lines": 185,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/loading.py | """Functionality for loading chains."""
from __future__ import annotations
import json
from pathlib import Path
from typing import TYPE_CHECKING, Any
import yaml
from langchain_core._api import deprecated
from langchain_core.prompts.loading import (
_load_output_parser,
load_prompt,
load_prompt_from_conf... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/loading.py",
"license": "MIT License",
"lines": 666,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/natbot/base.py | """Implement an LLM driven browser."""
from __future__ import annotations
import warnings
from typing import Any
from langchain_core._api import deprecated
from langchain_core.callbacks import CallbackManagerForChainRun
from langchain_core.language_models import BaseLanguageModel
from langchain_core.output_parsers i... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/natbot/base.py",
"license": "MIT License",
"lines": 132,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/openai_functions/base.py | """Methods for creating chains that use OpenAI function-calling APIs."""
from collections.abc import Callable, Sequence
from typing import (
Any,
)
from langchain_core._api import deprecated
from langchain_core.language_models import BaseLanguageModel
from langchain_core.output_parsers import (
BaseLLMOutputP... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/openai_functions/base.py",
"license": "MIT License",
"lines": 204,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | documentation |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/openai_functions/openapi.py | from __future__ import annotations
import json
import logging
import re
from collections import defaultdict
from collections.abc import Callable
from typing import TYPE_CHECKING, Any
import requests
from langchain_core._api import deprecated
from langchain_core.callbacks import CallbackManagerForChainRun
from langcha... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/openai_functions/openapi.py",
"license": "MIT License",
"lines": 389,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/qa_generation/base.py | from __future__ import annotations
import json
from typing import Any
from langchain_core._api import deprecated
from langchain_core.callbacks import CallbackManagerForChainRun
from langchain_core.language_models import BaseLanguageModel
from langchain_core.prompts import BasePromptTemplate
from langchain_text_splitt... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/qa_generation/base.py",
"license": "MIT License",
"lines": 107,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | documentation |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/qa_generation/prompt.py | from langchain_core.prompts.chat import (
ChatPromptTemplate,
HumanMessagePromptTemplate,
SystemMessagePromptTemplate,
)
from langchain_core.prompts.prompt import PromptTemplate
from langchain_classic.chains.prompt_selector import (
ConditionalPromptSelector,
is_chat_model,
)
templ1 = """You are a... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/qa_generation/prompt.py",
"license": "MIT License",
"lines": 47,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | documentation |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/qa_with_sources/base.py | """Question answering with sources over documents."""
from __future__ import annotations
import inspect
import re
from abc import ABC, abstractmethod
from typing import Any
from langchain_core._api import deprecated
from langchain_core.callbacks import (
AsyncCallbackManagerForChainRun,
CallbackManagerForCha... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/qa_with_sources/base.py",
"license": "MIT License",
"lines": 233,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/qa_with_sources/loading.py | """Load question answering with sources chains."""
from __future__ import annotations
from collections.abc import Mapping
from typing import Any, Protocol
from langchain_core._api import deprecated
from langchain_core.language_models import BaseLanguageModel
from langchain_core.prompts import BasePromptTemplate
fro... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/qa_with_sources/loading.py",
"license": "MIT License",
"lines": 195,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/qa_with_sources/retrieval.py | """Question-answering with sources over an index."""
from typing import Any
from langchain_core.callbacks import (
AsyncCallbackManagerForChainRun,
CallbackManagerForChainRun,
)
from langchain_core.documents import Document
from langchain_core.retrievers import BaseRetriever
from pydantic import Field
from l... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/qa_with_sources/retrieval.py",
"license": "MIT License",
"lines": 63,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/query_constructor/base.py | """LLM Chain for turning a user text query into a structured query."""
from __future__ import annotations
import json
from collections.abc import Callable, Sequence
from typing import Any, cast
from langchain_core._api import deprecated
from langchain_core.exceptions import OutputParserException
from langchain_core.... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/query_constructor/base.py",
"license": "MIT License",
"lines": 345,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/question_answering/chain.py | """Load question answering chains."""
from collections.abc import Mapping
from typing import Any, Protocol
from langchain_core._api import deprecated
from langchain_core.callbacks import BaseCallbackManager, Callbacks
from langchain_core.language_models import BaseLanguageModel
from langchain_core.prompts import Base... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/question_answering/chain.py",
"license": "MIT License",
"lines": 266,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/retrieval.py | from __future__ import annotations
from typing import Any
from langchain_core.retrievers import (
BaseRetriever,
RetrieverOutput,
)
from langchain_core.runnables import Runnable, RunnablePassthrough
def create_retrieval_chain(
retriever: BaseRetriever | Runnable[dict, RetrieverOutput],
combine_docs_... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/retrieval.py",
"license": "MIT License",
"lines": 57,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | documentation |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/retrieval_qa/base.py | """Chain for question-answering against a vector database."""
from __future__ import annotations
import inspect
from abc import abstractmethod
from typing import Any
from langchain_core._api import deprecated
from langchain_core.callbacks import (
AsyncCallbackManagerForChainRun,
CallbackManagerForChainRun,
... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/retrieval_qa/base.py",
"license": "MIT License",
"lines": 324,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/router/base.py | """Base classes for chain routing."""
from __future__ import annotations
from abc import ABC
from collections.abc import Mapping
from typing import Any, NamedTuple
from langchain_core.callbacks import (
AsyncCallbackManagerForChainRun,
CallbackManagerForChainRun,
Callbacks,
)
from pydantic import ConfigD... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/router/base.py",
"license": "MIT License",
"lines": 121,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/structured_output/base.py | import json
from collections.abc import Callable, Sequence
from typing import Any, Literal
from langchain_core._api import deprecated
from langchain_core.output_parsers import (
BaseGenerationOutputParser,
BaseOutputParser,
JsonOutputParser,
PydanticOutputParser,
)
from langchain_core.output_parsers.op... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/structured_output/base.py",
"license": "MIT License",
"lines": 512,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | documentation |
langchain-ai/langchain:libs/langchain/langchain_classic/chains/summarize/chain.py | """Load summarizing chains."""
from collections.abc import Mapping
from typing import Any, Protocol
from langchain_core.callbacks import Callbacks
from langchain_core.language_models import BaseLanguageModel
from langchain_core.prompts import BasePromptTemplate
from langchain_classic.chains.combine_documents.base im... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chains/summarize/chain.py",
"license": "MIT License",
"lines": 204,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
langchain-ai/langchain:libs/langchain/langchain_classic/chat_loaders/telegram.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chat_loaders.telegram import TelegramChatLoader
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chat_loaders/telegram.py",
"license": "MIT License",
"lines": 15,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/chat_loaders/utils.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chat_loaders.utils import (
map_ai_messages,
map_ai_messages_in_session,
merge_chat_runs,
merge_chat_runs_in_session,
)
# Create a way to dynamic... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chat_loaders/utils.py",
"license": "MIT License",
"lines": 28,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/chat_models/anthropic.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chat_models.anthropic import (
ChatAnthropic,
convert_messages_to_prompt_anthropic,
)
# Create a way to dynamically look up deprecated imports.
# Used to consoli... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chat_models/anthropic.py",
"license": "MIT License",
"lines": 22,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/chat_models/anyscale.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chat_models.anyscale import ChatAnyscale
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling option... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chat_models/anyscale.py",
"license": "MIT License",
"lines": 15,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/chat_models/azure_openai.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chat_models.azure_openai import AzureChatOpenAI
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chat_models/azure_openai.py",
"license": "MIT License",
"lines": 15,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/chat_models/azureml_endpoint.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chat_models.azureml_endpoint import (
AzureMLChatOnlineEndpoint,
LlamaContentFormatter,
)
# Create a way to dynamically look up deprecated imports.
# Used to con... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chat_models/azureml_endpoint.py",
"license": "MIT License",
"lines": 22,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/chat_models/baidu_qianfan_endpoint.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chat_models.baidu_qianfan_endpoint import (
QianfanChatEndpoint,
)
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising depr... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chat_models/baidu_qianfan_endpoint.py",
"license": "MIT License",
"lines": 19,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/chat_models/base.py | from __future__ import annotations
import warnings
from collections.abc import AsyncIterator, Callable, Iterator, Sequence
from importlib import util
from typing import Any, Literal, TypeAlias, cast, overload
from langchain_core.language_models import (
BaseChatModel,
LanguageModelInput,
SimpleChatModel,
... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chat_models/base.py",
"license": "MIT License",
"lines": 894,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
langchain-ai/langchain:libs/langchain/langchain_classic/chat_models/bedrock.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chat_models.bedrock import BedrockChat, ChatPromptAdapter
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chat_models/bedrock.py",
"license": "MIT License",
"lines": 19,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/chat_models/cohere.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chat_models.cohere import ChatCohere
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional i... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chat_models/cohere.py",
"license": "MIT License",
"lines": 15,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/chat_models/databricks.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chat_models.databricks import ChatDatabricks
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling op... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chat_models/databricks.py",
"license": "MIT License",
"lines": 15,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/chat_models/ernie.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chat_models.ernie import ErnieBotChat
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional ... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chat_models/ernie.py",
"license": "MIT License",
"lines": 15,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/chat_models/fake.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chat_models.fake import (
FakeListChatModel,
FakeMessagesListChatModel,
)
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic f... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chat_models/fake.py",
"license": "MIT License",
"lines": 22,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/chat_models/fireworks.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chat_models.fireworks import ChatFireworks
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling opti... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chat_models/fireworks.py",
"license": "MIT License",
"lines": 15,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/chat_models/gigachat.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chat_models.gigachat import GigaChat
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional i... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chat_models/gigachat.py",
"license": "MIT License",
"lines": 15,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/chat_models/google_palm.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chat_models.google_palm import (
ChatGooglePalm,
ChatGooglePalmError,
)
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chat_models/google_palm.py",
"license": "MIT License",
"lines": 22,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/chat_models/human.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chat_models.human import HumanInputChatModel
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling op... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chat_models/human.py",
"license": "MIT License",
"lines": 15,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
langchain-ai/langchain:libs/langchain/langchain_classic/chat_models/javelin_ai_gateway.py | from typing import TYPE_CHECKING, Any
from langchain_classic._api import create_importer
if TYPE_CHECKING:
from langchain_community.chat_models.javelin_ai_gateway import (
ChatJavelinAIGateway,
ChatParams,
)
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic... | {
"repo_id": "langchain-ai/langchain",
"file_path": "libs/langchain/langchain_classic/chat_models/javelin_ai_gateway.py",
"license": "MIT License",
"lines": 22,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.