get_translator() — langchain Function Reference
Architecture documentation for the get_translator() function in __init__.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 292bcf3e_6e68_6045_d58e_492b26140adf["get_translator()"] c42572b6_95e3_adf4_9d97_d08f819b3c4c["__init__.py"] 292bcf3e_6e68_6045_d58e_492b26140adf -->|defined in| c42572b6_95e3_adf4_9d97_d08f819b3c4c style 292bcf3e_6e68_6045_d58e_492b26140adf fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/messages/block_translators/__init__.py lines 57–70
def get_translator(
provider: str,
) -> dict[str, Callable[..., list[types.ContentBlock]]] | None:
"""Get the translator functions for a provider.
Args:
provider: The model provider name.
Returns:
Dictionary with `'translate_content'` and `'translate_content_chunk'`
functions, or None if no translator is registered for the provider. In such
case, best-effort parsing in `BaseMessage` will be used.
"""
return PROVIDER_TRANSLATORS.get(provider)
Domain
Subdomains
Source
Frequently Asked Questions
What does get_translator() do?
get_translator() is a function in the langchain codebase, defined in libs/core/langchain_core/messages/block_translators/__init__.py.
Where is get_translator() defined?
get_translator() is defined in libs/core/langchain_core/messages/block_translators/__init__.py at line 57.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free