Home / Function/ lc_secrets() — langchain Function Reference

lc_secrets() — langchain Function Reference

Architecture documentation for the lc_secrets() function in chat_models.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  0cb71105_b19e_e868_e50d_46d670658c14["lc_secrets()"]
  977b57b2_5d0e_bcf4_a43e_b52857105005["ChatAnthropic"]
  0cb71105_b19e_e868_e50d_46d670658c14 -->|defined in| 977b57b2_5d0e_bcf4_a43e_b52857105005
  style 0cb71105_b19e_e868_e50d_46d670658c14 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/anthropic/langchain_anthropic/chat_models.py lines 928–933

    def lc_secrets(self) -> dict[str, str]:
        """Return a mapping of secret keys to environment variables."""
        return {
            "anthropic_api_key": "ANTHROPIC_API_KEY",
            "mcp_servers": "ANTHROPIC_MCP_SERVERS",
        }

Domain

Subdomains

Frequently Asked Questions

What does lc_secrets() do?
lc_secrets() is a function in the langchain codebase, defined in libs/partners/anthropic/langchain_anthropic/chat_models.py.
Where is lc_secrets() defined?
lc_secrets() is defined in libs/partners/anthropic/langchain_anthropic/chat_models.py at line 928.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free