"prompt": "Identify organizations, people, and places from the text.",
"threshold": 0.5
}'
**Response:**
**Response:**
..code:: json
..code:: json
@ -127,6 +143,22 @@ API Endpoints
"threshold": 0.5
"threshold": 0.5
}'
}'
**Batch request with prompt:**
..code:: bash
curl -X POST http://localhost:8000/relation-extraction \
-H "Content-Type: application/json" \
-d '{
"texts": [
"Steve Jobs founded Apple Inc. in California.",
"Bill Gates leads Microsoft."
],
"relations": ["founded_by", "leads"],
"prompt": "Extract the relationships between the entities.",
"threshold": 0.5
}'
**Response:**
**Response:**
..code:: json
..code:: json
@ -182,6 +214,45 @@ API Endpoints
"threshold": 0.5
"threshold": 0.5
}'
}'
**Single request with `prompt`:**
..code:: bash
curl -X POST http://localhost:8000/summarization \
-H "Content-Type: application/json" \
-d '{
"text": "Artificial intelligence is transforming industries worldwide. Machine learning enables computers to learn from data. Deep learning uses neural networks for complex tasks.",
"prompt": "Generate a concise summary of the key concepts.",
"threshold": 0.5
}'
**Response:**
..code:: json
{
"outputs": [
{
"text": "Artificial intelligence is transforming industries worldwide.",
"start": 0,
"end": 61,
"score": 0.8586996793746948
},
{
"text": "Machine learning enables computers to learn from data.",
"start": 62,
"end": 116,
"score": 0.9330101013183594
},
{
"text": "Deep learning uses neural networks for complex tasks.",