Register content translators for a provider in PROVIDER_TRANSLATORS.
register_translator(
provider: str,
translate_content: Callable[[AIMessage], list[types.ContentBlock]],
translate_content_chunk: Callable[[AIMessageChunk], list[types.ContentBlock]]
) -> None| Name | Type | Description |
|---|---|---|
provider* | str | The model provider name (e.g. |
translate_content* | Callable[[AIMessage], list[types.ContentBlock]] | Function to translate |
translate_content_chunk* | Callable[[AIMessageChunk], list[types.ContentBlock]] | Function to translate |