_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 b39f6f12_4d1b_6a96_1a02_49d36d18f0eb["_get_ls_params()"] 977b57b2_5d0e_bcf4_a43e_b52857105005["ChatAnthropic"] b39f6f12_4d1b_6a96_1a02_49d36d18f0eb -->|defined in| 977b57b2_5d0e_bcf4_a43e_b52857105005 style b39f6f12_4d1b_6a96_1a02_49d36d18f0eb fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/anthropic/langchain_anthropic/chat_models.py lines 965–982
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="anthropic",
ls_model_name=params.get("model", self.model),
ls_model_type="chat",
ls_temperature=params.get("temperature", self.temperature),
)
if ls_max_tokens := params.get("max_tokens", self.max_tokens):
ls_params["ls_max_tokens"] = ls_max_tokens
if ls_stop := stop or params.get("stop", None):
ls_params["ls_stop"] = ls_stop
return ls_params
Domain
Subdomains
Source
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/chat_models.py.
Where is _get_ls_params() defined?
_get_ls_params() is defined in libs/partners/anthropic/langchain_anthropic/chat_models.py at line 965.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free