compress_texts
Function
Compresses text based on the provided question, context, and compress_rate.
Prototype
def compress_texts(context, question, compress_rate)
Parameters
Parameter |
Data Type |
Required/Optional |
Description |
|---|---|---|---|
context |
String |
Required |
Long text to be summarized. Its length range is [1, 16 MB]. |
question |
String |
Required |
Prompt for summarizing the long text, which is used to calculate the relevance with the context chunk. Its length range is [1, 1000 × 1000]. |
compress_rate |
Float |
Optional |
Compression rate. The default value is 0.6. The value range is (0, 1). |
Return Value
Data Type |
Description |
|---|---|
String |
Compressed text |
Parent topic: ClusterCompressor