Toggle Menu
Prev Up Next

# `langchain_community.cross_encoders.sagemaker_endpoint`.CrossEncoderContentHandler

class langchain_community.cross_encoders.sagemaker_endpoint.CrossEncoderContentHandler

  Content handler for CrossEncoder class.

  Attributes

  `accepts` |
  `content_type` |

  Methods

  `__init__`() |
  `transform_input`(text_pairs) |
  `transform_output`(output) |

  __init__()
  transform_input(text_pairs: List[Tuple[str, str]]) → bytes
    Parameters

      text_pairs (List[Tuple[str, str]]) –

    Return type

      bytes

  transform_output(output: Any) → List[float]
    Parameters

      output (Any) –

    Return type

      List[float]