POST
/
compress-prompt
curl --request POST \
  --url http://localhost:5000/compress-prompt \
  --header 'Content-Type: application/json' \
  --data '{
  "concate_question": true,
  "context": [
    "<string>"
  ],
  "instruction": "",
  "keep_first_sentence": 0,
  "keep_last_sentence": 0,
  "keep_sentence_number": 0,
  "question": "",
  "rank_method": "longllmlingua",
  "ratio": 0.5,
  "target_token": -1,
  "use_context_level_filter": true,
  "use_sentence_level_filter": false,
  "use_token_level_filter": true
}'
{
  "compressed_prompt": "<string>"
}

Body

application/json

Response

200
application/json

Compressed prompt

The response is of type object.