Skip to content

Examples

Michael Cizmar edited this page Jan 5, 2025 · 3 revisions

Setup a pipeline

The following is an example of how to setup a field with the payload and then to make the http call to the external service.

PUT _ingest/pipeline/search-knowledge@custom
{
    "description": "Adds call to NER for Inference",
    "processors": [
      {
        "set": {
          "field": "bookend_input",
          "value": """{   "text": "{{body_content}}",   "question": "", "context": "","instruction": "Extract entities from the model's output"}"""
        }
      },
      {
        "ingest_rest": {
          "field": "bookend_input",
          "target_field": "ner",
          "endpoint": "https://api.plaiground.ai/mcplusa/models/predict?model_id=c9318fab-1526-1974-86c7-cat627cdd7d3&task=named_entity_recognition",
          "content_type": "application/json",
          "method": "POST",
          }
      }
    ]
  }

This will result in the output of the call from to be added to a field called ner.

Clone this wiki locally