langchain_community.llms.sagemaker_endpoint
.ContentHandlerBase¶
- class langchain_community.llms.sagemaker_endpoint.ContentHandlerBase[source]¶
A handler class to transform input from LLM to a format that SageMaker endpoint expects.
Similarly, the class handles transforming output from the SageMaker endpoint to a format that LLM class expects.
Attributes
accepts
The MIME type of the response data returned from endpoint
content_type
The MIME type of the input data passed to endpoint
Methods
__init__
()transform_input
(prompt, model_kwargs)Transforms the input to a format that model can accept as the request Body.
transform_output
(output)Transforms the output from the model to string that the LLM class expects.
- __init__()¶