Class for storing a piece of text and associated metadata.
model
enumRequired
An enumeration.
operator_prompt
stringRequired
reducer_prompt
stringRequired
input
stringRequired
Response
This endpoint returns an object
input
string
input_documents
list of objects
Class for storing a piece of text and associated metadata.
output_text
string
POST
1
curl -X POST https://api.athenaintelligence.ai/api/v0/tools/map-reduce \
2
-H "X-API-KEY: <apiKey>" \
3
-H "Content-Type: application/json" \
4
-d '{
5
"documents": [
6
{
7
"page_content": "Athena is an AI-native analytics platform and artificial employee built to accelerate analytics workflows by offering enterprise teams co-pilot and auto-pilot modes. Athena learns your workflow as a co-pilot, allowing you to hand over controls to her for autonomous execution with confidence."
8
}
9
],
10
"model": "mistral-large-0224",
11
"operator_prompt": "summarize the content",
12
"reducer_prompt": "Combine these summaries",
13
"input": "return a summary in a single sentence"
14
}'
200
Successful
1
{
2
"input": "return a summary in a single sentence",
3
"input_documents": [
4
{
5
"page_content": "Athena is an AI-native analytics platform and artificial employee built to accelerate analytics workflows by offering enterprise teams co-pilot and auto-pilot modes. Athena learns your workflow as a co-pilot, allowing you to hand over controls to her for autonomous execution with confidence.",
6
"type": "Document"
7
}
8
],
9
"output_text": "The website www.athenaintelligence.ai provides information about Athena Intelligence, an AI-native analytics platform and artificial employee."