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
  4086aae6_86ce_50f4_30d0_df98252c56bd["_get_ls_params()"]
  6220540a_4afa_4d39_cdb6_bb2f4e26fe5f["OllamaLLM"]
  4086aae6_86ce_50f4_30d0_df98252c56bd -->|defined in| 6220540a_4afa_4d39_cdb6_bb2f4e26fe5f
  style 4086aae6_86ce_50f4_30d0_df98252c56bd fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/ollama/langchain_ollama/llms.py lines 313–320

    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)
        if max_tokens := kwargs.get("num_predict", self.num_predict):
            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/ollama/langchain_ollama/llms.py.
Where is _get_ls_params() defined?
_get_ls_params() is defined in libs/partners/ollama/langchain_ollama/llms.py at line 313.

Analyze Your Own Codebase

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

Try Supermodel Free