ContentHandlerBase#
- class langchain_community.llms.sagemaker_endpoint.ContentHandlerBase[source]#
处理程序类,用于将来自LLM的输入转换为SageMaker端点期望的格式。
同样地,该类处理将SageMaker端点的输出转换为LLM类期望的格式。
属性
accepts从端点返回的响应数据的MIME类型
content_type传递给端点的输入数据的MIME类型
方法
transform_input(prompt, model_kwargs)将输入转换为模型可以接受的请求体格式。
transform_output(output)将模型的输出转换为LLM类期望的字符串。
使用 ContentHandlerBase 的示例