extract_support_text_mapper¶
Extracts a supporting sub-text from the original text based on a given summary.
This operator uses an API model to identify and extract a segment of the original text that best matches the provided summary. It leverages a system prompt and input template to guide the extraction process. The extracted support text is stored in the specified meta field key. If the extraction fails or returns an empty string, the original summary is used as a fallback. The operator retries the extraction up to a specified number of times in case of errors.
根据给定的摘要从原始文本中提取支持性的子文本。
此算子使用 API 模型识别并提取与提供的摘要最匹配的原始文本段落。它利用系统提示和输入模板来指导提取过程。提取的支持文本存储在指定的 meta 字段键中。如果提取失败或返回空字符串,则使用原始摘要作为后备。如果出现错误,该算子将重试提取最多指定次数。
Type 算子类型: mapper
Tags 标签: cpu, api, text
🔧 Parameter Configuration 参数配置¶
name 参数名 |
type 类型 |
default 默认值 |
desc 说明 |
---|---|---|---|
|
<class ‘str’> |
|
API model name. |
|
<class ‘str’> |
|
The key name to store the input summary in the |
|
<class ‘str’> |
|
The key name to store the output |
|
typing.Optional[str] |
|
URL endpoint for the API. |
|
typing.Optional[str] |
|
Path to extract content from the API response. |
|
typing.Optional[str] |
|
System prompt for the task. |
|
typing.Optional[str] |
|
Template for building the model input. |
|
typing.Annotated[int, Gt(gt=0)] |
|
The number of retry attempts when there is an API |
|
<class ‘bool’> |
|
If drop the text in the output. |
|
typing.Dict |
|
Parameters for initializing the API model. |
|
typing.Dict |
|
Extra parameters passed to the API call. |
|
|
Extra keyword arguments. |
📊 Effect demonstration 效果演示¶
not available 暂无