Home / Function/ _get_ls_params() — langchain Function Reference

_get_ls_params() — langchain Function Reference

Architecture documentation for the _get_ls_params() function in llms.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  04a7c2f7_487c_1b1a_34cf_68d2a12e8f7d["_get_ls_params()"]
  c95a497f_938f_2be9_842e_087a0766cf00["AnthropicLLM"]
  04a7c2f7_487c_1b1a_34cf_68d2a12e8f7d -->|defined in| c95a497f_938f_2be9_842e_087a0766cf00
  style 04a7c2f7_487c_1b1a_34cf_68d2a12e8f7d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/anthropic/langchain_anthropic/llms.py lines 195–208

    def _get_ls_params(
        self,
        stop: list[str] | None = None,
        **kwargs: Any,
    ) -> LangSmithParams:
        """Get standard params for tracing."""
        params = super()._get_ls_params(stop=stop, **kwargs)
        identifying_params = self._identifying_params
        if max_tokens := kwargs.get(
            "max_tokens",
            identifying_params.get("max_tokens"),
        ):
            params["ls_max_tokens"] = max_tokens
        return params

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free