Home / Function/ _get_ls_params() — langchain Function Reference

_get_ls_params() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  cb02c751_c01a_048a_2ac3_c311f3b471dc["_get_ls_params()"]
  19e4be00_71fb_5390_6768_f6e6158f49b4["ChatOllama"]
  cb02c751_c01a_048a_2ac3_c311f3b471dc -->|defined in| 19e4be00_71fb_5390_6768_f6e6158f49b4
  style cb02c751_c01a_048a_2ac3_c311f3b471dc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/ollama/langchain_ollama/chat_models.py lines 1011–1024

    def _get_ls_params(
        self, stop: list[str] | None = None, **kwargs: Any
    ) -> LangSmithParams:
        """Get standard params for tracing."""
        params = self._get_invocation_params(stop=stop, **kwargs)
        ls_params = LangSmithParams(
            ls_provider="ollama",
            ls_model_name=self.model,
            ls_model_type="chat",
            ls_temperature=params.get("temperature", self.temperature),
        )
        if ls_stop := stop or params.get("stop", None) or self.stop:
            ls_params["ls_stop"] = ls_stop
        return ls_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/chat_models.py.
Where is _get_ls_params() defined?
_get_ls_params() is defined in libs/partners/ollama/langchain_ollama/chat_models.py at line 1011.

Analyze Your Own Codebase

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

Try Supermodel Free