Nuclia Understanding API (v1)
API reference for the Nuclia Understanding API.
Pull
Pull internal message on a partition
query Parameters
Timeout (integer) or Timeout (null) (Timeout) Default: 5 | |
Partition (integer) or Partition (null) (Partition) Default: 1 | |
From Cursor (integer) or From Cursor (null) (From Cursor) | |
limit | integer (Limit) Default: 5 |
Responses
Response samples
- 200
- 422
{- "status": "ok",
- "payload": "string",
- "payloads": [ ],
- "msgid": "string",
- "cursor": 0
}
Send Data To Process
Push data to process
Request Body schema: application/jsonrequired
Kbid (string) or Kbid (null) (Kbid) | |
Uuid (string) or Uuid (null) (Uuid) | |
Title (string) or Title (null) (Title) | |
labels | Array of strings (Labels) Default: [] |
Slug (string) or Slug (null) (Slug) | |
Source (integer) or null | |
Userid (string) or Userid (null) (Userid) | |
object (Genericfield) Default: {} | |
object (Filefield) Default: {} | |
object (Linkfield) Default: {} | |
object (Textfield) Default: {} | |
object (Layoutfield) Default: {} | |
object (Conversationfield) Default: {} | |
PushProcessingOptions (object) or null | |
LearningConfig (object) or null | |
WebhookConfig (object) or null |
Responses
Request samples
- Payload
{- "kbid": "string",
- "uuid": "string",
- "title": "string",
- "labels": [ ],
- "slug": "string",
- "source": 0,
- "userid": "string",
- "genericfield": { },
- "filefield": { },
- "linkfield": { },
- "textfield": { },
- "layoutfield": { },
- "conversationfield": { },
- "processing_options": {
- "ml_text": true,
- "extract_strategy": "string"
}, - "learning_config": {
- "semantic_models": [
- "string"
], - "generative_model": "string",
- "ner_model": "string",
- "anonymization_model": "string",
- "visual_labeling": "string"
}, - "webhook_config": {
- "uri": "string",
- "headers": { }
}
}
Response samples
- 200
- 422
{- "seqid": 0,
- "account_seq": 0,
- "queue": "shared",
- "uuid": "string",
- "processing_id": "string"
}
Get Processed Data
Retreive status of processed and unprocessed payloads from a zone
query Parameters
Cursor (string) or Cursor (null) (Cursor) | |
limit | integer (Limit) Default: 20 |
Scheduled (boolean) or Scheduled (null) (Scheduled) | |
Kbid (string) or Kbid (null) (Kbid) | |
sort_on | string (SortFields) Enum: "timestamp" "scheduled_at" "completed_at" |
sort_order | string (SortOrder) Enum: "asc" "desc" |
Responses
Response samples
- 200
- 422
{- "results": [
- {
- "processing_id": "string",
- "resource_id": "string",
- "kbid": "string",
- "title": "string",
- "labels": [
- "string"
], - "completed": true,
- "scheduled": true,
- "timestamp": "2019-08-24T14:15:22Z",
- "completed_at": "2019-08-24T14:15:22Z",
- "scheduled_at": "2019-08-24T14:15:22Z",
- "failed": false,
- "retries": 0,
- "schedule_eta": 0,
- "schedule_order": 0,
- "request": "string",
- "response": "string"
}
], - "cursor": "string"
}
Get Processed Data
Retreive status of processed and unprocessed payloads from a zone
path Parameters
processing_id required | string (Processing Id) |
Responses
Response samples
- 200
- 422
{- "processing_id": "string",
- "resource_id": "string",
- "kbid": "string",
- "title": "string",
- "labels": [
- "string"
], - "completed": true,
- "scheduled": true,
- "timestamp": "2019-08-24T14:15:22Z",
- "completed_at": "2019-08-24T14:15:22Z",
- "scheduled_at": "2019-08-24T14:15:22Z",
- "failed": false,
- "retries": 0,
- "schedule_eta": 0,
- "schedule_order": 0,
- "request": "string",
- "response": "string"
}
Upload Binary File
Upload a file using a multipart request
header Parameters
X-Filename (string) or X-Filename (null) (X-Filename) Default: | |
X-Password (string) or X-Password (null) (X-Password) | |
X-Language (string) or X-Language (null) (X-Language) | |
X-Md5 (string) or X-Md5 (null) (X-Md5) |
Responses
Response samples
- 201
- 422
null
Tus Server Information
Gather information about the Server’s current configuration such as enabled extensions, version...
path Parameters
required | Upload Id (string) or Upload Id (null) (Upload Id) |
Responses
Response samples
- 422
{- "detail": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string"
}
]
}
Download Account Predictive Model File
Download the trained model or any other generated file as a result of a training task on a Knowledge Box
path Parameters
kbid required | string (Kbid) |
model_id required | string (Model Id) |
filename required | string (Filename) |
query Parameters
account_id required | string (Account Id) |
Responses
Response samples
- 200
- 422
null
Add A Model To A Kb
Add a model to a KB to be used
path Parameters
account_id required | string (Account Id) |
kbid required | string (Kbid) |
Request Body schema: application/jsonrequired
id required | string (Id) |
Responses
Request samples
- Payload
{- "id": "string"
}
Response samples
- 200
- 422
null
Learning Configuration Schema
Get schema for creating a KB
path Parameters
account_id required | string (Account Id) |
Responses
Response samples
- 200
- 422
{- "semantic_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "semantic_models": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "default_semantic_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "anonymization_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "visual_labeling": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "generative_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "ner_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "relation_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "summary_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "summary": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "user_keys": {
- "schemas": { },
- "create": false,
- "update": false
}, - "user_prompts": {
- "schemas": { },
- "create": false,
- "update": false
}, - "summary_prompt": {
- "schemas": { },
- "create": false,
- "update": false
}, - "prefer_markdown_generative_response": {
- "schemas": { },
- "create": false,
- "update": false
}
}
Knowledgebox Models Configuration
Current configuration of models assigned to a knowledgebox
path Parameters
kbid required | string (Kbid) |
Responses
Response samples
- 200
- 422
{- "resource_labelers_models": [
- "string"
], - "paragraph_labelers_models": [
- "string"
], - "intent_models": [
- "string"
], - "visual_labeling": "disabled",
- "ner_model": "multilingual",
- "relation_model": "base",
- "anonymization_model": "disabled",
- "semantic_model": "string",
- "semantic_models": [
- "string"
], - "default_semantic_model": "string",
- "semantic_vector_similarity": "DOT",
- "semantic_vector_size": 1024,
- "semantic_matryoshka_dims": [ ],
- "semantic_threshold": 0.4,
- "generative_model": "chatgpt-azure-4o",
- "user_keys": {
- "openai": {
- "key": "string",
- "org": "string"
}, - "azure_openai": {
- "key": "string",
- "url": "string",
- "deployment": "string",
- "model": "string"
}, - "mistral": {
- "key": "string"
}, - "palm": {
- "credentials": "string",
- "location": "string"
}, - "anthropic": {
- "key": "string"
}, - "claude3": {
- "key": "string"
}, - "azure_mistral": {
- "key": "string"
}, - "hf_llm": {
- "url": "string",
- "key": "string"
}, - "hf_embedding": {
- "url": "string",
- "key": "string",
- "matryoshka": [
- 768,
- 512,
- 256
], - "similarity": "DOT",
- "size": 0,
- "threshold": 0.4,
- "passage_prompt": "Passage: {}",
- "query_prompt": "Represent this sentence for searching relevant passages: {}"
}, - "azure_aii": {
- "key": "",
- "url": "",
- "model": ""
}
}, - "user_prompts": {
- "openai": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account our previous conversation, and this context: {context} answer this question: {question}"
}, - "azure_openai": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account our previous conversation, and this context: {context} answer this question: {question}"
}, - "palm": {
- "prompt": "Answer my question in an informal tone, based only in this context: {context}. Question: {question}"
}, - "anthropic": {
- "prompt": "Taking into account our chat history: {chat_history} and this provided context: <Context> {context} </Context>\n Can you answer this question in a clear, concise way: <Question> {question} </Question>"
}, - "claude3": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account our previous conversation, and this context: {context} answer this question: {question}"
}, - "text_generation": {
- "prompt": "Taking into account our chat history: {chat_history} and this provided context: {context}, answer this question: \"{question}\" :"
}, - "mistral": {
- "prompt": "Taking into account our chat history: {chat_history} and this provided context: <Context> {context} </Context>\n Can you answer this question in a clear, concise way: <Question> {question} </Question>"
}, - "azure_mistral": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account this provided context: <Context> {context} </Context>\n Can you answer this question in a clear, concise way: <Question> {question} </Question>"
}, - "hf_llm": {
- "system": "string",
- "prompt": "string"
}, - "openai_url": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account our previous conversation, and this context: {context} answer this question: {question}"
}, - "vertex_llama": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account our previous conversation, and this context: {context} answer this question: {question}"
}, - "deepseek": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account this provided context: <Context> {context} </Context>\n Can you answer this question in a clear, concise way: <Question> {question} </Question>"
}
}, - "summary": "extended",
- "summary_model": "claude-3-fast",
- "summary_prompt": {
- "prompt": "Make a bullet point summary of the following content: {text}"
}, - "prefer_markdown_generative_response": false,
- "semantic_model_configs": { }
}
Knowledgebox Models Add Configuration
Current configuration of models assigned to a knowledgebox
path Parameters
kbid required | string (Kbid) |
Request Body schema: application/jsonrequired
AnonymizationModel (string) or Anonymization Model (string) (Anonymization Model) Default: "disabled" | |
VisualLabeling (string) or Visual Labeling (string) (Visual Labeling) Default: "disabled" | |
generative_model | string (Generative Model) Default: "chatgpt-azure-4o" |
NERModel"multilingual" (string) or Ner Model (string) (Ner Model) Default: "multilingual" | |
RelationModel"base" (string) or Relation Model (string) (Relation Model) Default: "base" | |
UserLearningKeys (object) or null | |
UserPrompts (object) or null | |
Summary (string) or null Default: "simple" | |
summary_model | string (Summary Model) Default: "claude-3-fast" |
SummaryPrompt (object) or null | |
prefer_markdown_generative_response | boolean (Prefer Markdown Generative Response) Default: false |
Default Semantic Model (string) or Default Semantic Model (null) (Default Semantic Model) The default vector set / semantic model to use. Must be one of the models defined in the | |
SemanticModel (string) or null Deprecated | |
Array of Semantic Models (strings) or Semantic Models (null) (Semantic Models) |
Responses
Request samples
- Payload
{- "anonymization_model": "disabled",
- "visual_labeling": "disabled",
- "generative_model": "chatgpt-azure-4o",
- "ner_model": "multilingual",
- "relation_model": "base",
- "user_keys": {
- "openai": {
- "key": "string",
- "org": "string"
}, - "azure_openai": {
- "key": "string",
- "url": "string",
- "deployment": "string",
- "model": "string"
}, - "mistral": {
- "key": "string"
}, - "palm": {
- "credentials": "string",
- "location": "string"
}, - "anthropic": {
- "key": "string"
}, - "claude3": {
- "key": "string"
}, - "azure_mistral": {
- "key": "string"
}, - "hf_llm": {
- "url": "string",
- "key": "string"
}, - "hf_embedding": {
- "url": "string",
- "key": "string",
- "matryoshka": [
- 768,
- 512,
- 256
], - "similarity": "DOT",
- "size": 0,
- "threshold": 0.4,
- "passage_prompt": "Passage: {}",
- "query_prompt": "Represent this sentence for searching relevant passages: {}"
}, - "azure_aii": {
- "key": "",
- "url": "",
- "model": ""
}
}, - "user_prompts": {
- "openai": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account our previous conversation, and this context: {context} answer this question: {question}"
}, - "azure_openai": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account our previous conversation, and this context: {context} answer this question: {question}"
}, - "palm": {
- "prompt": "Answer my question in an informal tone, based only in this context: {context}. Question: {question}"
}, - "anthropic": {
- "prompt": "Taking into account our chat history: {chat_history} and this provided context: <Context> {context} </Context>\n Can you answer this question in a clear, concise way: <Question> {question} </Question>"
}, - "claude3": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account our previous conversation, and this context: {context} answer this question: {question}"
}, - "text_generation": {
- "prompt": "Taking into account our chat history: {chat_history} and this provided context: {context}, answer this question: \"{question}\" :"
}, - "mistral": {
- "prompt": "Taking into account our chat history: {chat_history} and this provided context: <Context> {context} </Context>\n Can you answer this question in a clear, concise way: <Question> {question} </Question>"
}, - "azure_mistral": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account this provided context: <Context> {context} </Context>\n Can you answer this question in a clear, concise way: <Question> {question} </Question>"
}, - "hf_llm": {
- "system": "string",
- "prompt": "string"
}, - "openai_url": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account our previous conversation, and this context: {context} answer this question: {question}"
}, - "vertex_llama": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account our previous conversation, and this context: {context} answer this question: {question}"
}, - "deepseek": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account this provided context: <Context> {context} </Context>\n Can you answer this question in a clear, concise way: <Question> {question} </Question>"
}
}, - "summary": "simple",
- "summary_model": "claude-3-fast",
- "summary_prompt": {
- "prompt": "Make a bullet point summary of the following content: {text}"
}, - "prefer_markdown_generative_response": false,
- "default_semantic_model": "string",
- "semantic_model": "en-2024-04-24",
- "semantic_models": [
- "en-2024-04-24"
]
}
Response samples
- 200
- 422
{- "resource_labelers_models": [
- "string"
], - "paragraph_labelers_models": [
- "string"
], - "intent_models": [
- "string"
], - "visual_labeling": "disabled",
- "ner_model": "multilingual",
- "relation_model": "base",
- "anonymization_model": "disabled",
- "semantic_model": "string",
- "semantic_models": [
- "string"
], - "default_semantic_model": "string",
- "semantic_vector_similarity": "DOT",
- "semantic_vector_size": 1024,
- "semantic_matryoshka_dims": [ ],
- "semantic_threshold": 0.4,
- "generative_model": "chatgpt-azure-4o",
- "user_keys": {
- "openai": {
- "key": "string",
- "org": "string"
}, - "azure_openai": {
- "key": "string",
- "url": "string",
- "deployment": "string",
- "model": "string"
}, - "mistral": {
- "key": "string"
}, - "palm": {
- "credentials": "string",
- "location": "string"
}, - "anthropic": {
- "key": "string"
}, - "claude3": {
- "key": "string"
}, - "azure_mistral": {
- "key": "string"
}, - "hf_llm": {
- "url": "string",
- "key": "string"
}, - "hf_embedding": {
- "url": "string",
- "key": "string",
- "matryoshka": [
- 768,
- 512,
- 256
], - "similarity": "DOT",
- "size": 0,
- "threshold": 0.4,
- "passage_prompt": "Passage: {}",
- "query_prompt": "Represent this sentence for searching relevant passages: {}"
}, - "azure_aii": {
- "key": "",
- "url": "",
- "model": ""
}
}, - "user_prompts": {
- "openai": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account our previous conversation, and this context: {context} answer this question: {question}"
}, - "azure_openai": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account our previous conversation, and this context: {context} answer this question: {question}"
}, - "palm": {
- "prompt": "Answer my question in an informal tone, based only in this context: {context}. Question: {question}"
}, - "anthropic": {
- "prompt": "Taking into account our chat history: {chat_history} and this provided context: <Context> {context} </Context>\n Can you answer this question in a clear, concise way: <Question> {question} </Question>"
}, - "claude3": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account our previous conversation, and this context: {context} answer this question: {question}"
}, - "text_generation": {
- "prompt": "Taking into account our chat history: {chat_history} and this provided context: {context}, answer this question: \"{question}\" :"
}, - "mistral": {
- "prompt": "Taking into account our chat history: {chat_history} and this provided context: <Context> {context} </Context>\n Can you answer this question in a clear, concise way: <Question> {question} </Question>"
}, - "azure_mistral": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account this provided context: <Context> {context} </Context>\n Can you answer this question in a clear, concise way: <Question> {question} </Question>"
}, - "hf_llm": {
- "system": "string",
- "prompt": "string"
}, - "openai_url": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account our previous conversation, and this context: {context} answer this question: {question}"
}, - "vertex_llama": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account our previous conversation, and this context: {context} answer this question: {question}"
}, - "deepseek": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account this provided context: <Context> {context} </Context>\n Can you answer this question in a clear, concise way: <Question> {question} </Question>"
}
}, - "summary": "extended",
- "summary_model": "claude-3-fast",
- "summary_prompt": {
- "prompt": "Make a bullet point summary of the following content: {text}"
}, - "prefer_markdown_generative_response": false,
- "semantic_model_configs": { }
}
Knowledgebox Models Update Configuration
Current configuration of models assigned to a knowledgebox
path Parameters
kbid required | string (Kbid) |
Request Body schema: application/jsonrequired
AnonymizationModel (string) or Anonymization Model (string) (Anonymization Model) Default: "disabled" | |
VisualLabeling (string) or Visual Labeling (string) (Visual Labeling) Default: "disabled" | |
generative_model | string (Generative Model) Default: "chatgpt-azure-4o" |
NERModel"multilingual" (string) or Ner Model (string) (Ner Model) Default: "multilingual" | |
RelationModel"base" (string) or Relation Model (string) (Relation Model) Default: "base" | |
UserLearningKeys (object) or null | |
UserPrompts (object) or null | |
Summary (string) or null Default: "simple" | |
summary_model | string (Summary Model) Default: "claude-3-fast" |
SummaryPrompt (object) or null | |
prefer_markdown_generative_response | boolean (Prefer Markdown Generative Response) Default: false |
Default Semantic Model (string) or Default Semantic Model (null) (Default Semantic Model) The default vector set / semantic model to use. Must be one of the models defined in the |
Responses
Request samples
- Payload
{- "anonymization_model": "disabled",
- "visual_labeling": "disabled",
- "generative_model": "chatgpt-azure-4o",
- "ner_model": "multilingual",
- "relation_model": "base",
- "user_keys": {
- "openai": {
- "key": "string",
- "org": "string"
}, - "azure_openai": {
- "key": "string",
- "url": "string",
- "deployment": "string",
- "model": "string"
}, - "mistral": {
- "key": "string"
}, - "palm": {
- "credentials": "string",
- "location": "string"
}, - "anthropic": {
- "key": "string"
}, - "claude3": {
- "key": "string"
}, - "azure_mistral": {
- "key": "string"
}, - "hf_llm": {
- "url": "string",
- "key": "string"
}, - "hf_embedding": {
- "url": "string",
- "key": "string",
- "matryoshka": [
- 768,
- 512,
- 256
], - "similarity": "DOT",
- "size": 0,
- "threshold": 0.4,
- "passage_prompt": "Passage: {}",
- "query_prompt": "Represent this sentence for searching relevant passages: {}"
}, - "azure_aii": {
- "key": "",
- "url": "",
- "model": ""
}
}, - "user_prompts": {
- "openai": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account our previous conversation, and this context: {context} answer this question: {question}"
}, - "azure_openai": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account our previous conversation, and this context: {context} answer this question: {question}"
}, - "palm": {
- "prompt": "Answer my question in an informal tone, based only in this context: {context}. Question: {question}"
}, - "anthropic": {
- "prompt": "Taking into account our chat history: {chat_history} and this provided context: <Context> {context} </Context>\n Can you answer this question in a clear, concise way: <Question> {question} </Question>"
}, - "claude3": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account our previous conversation, and this context: {context} answer this question: {question}"
}, - "text_generation": {
- "prompt": "Taking into account our chat history: {chat_history} and this provided context: {context}, answer this question: \"{question}\" :"
}, - "mistral": {
- "prompt": "Taking into account our chat history: {chat_history} and this provided context: <Context> {context} </Context>\n Can you answer this question in a clear, concise way: <Question> {question} </Question>"
}, - "azure_mistral": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account this provided context: <Context> {context} </Context>\n Can you answer this question in a clear, concise way: <Question> {question} </Question>"
}, - "hf_llm": {
- "system": "string",
- "prompt": "string"
}, - "openai_url": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account our previous conversation, and this context: {context} answer this question: {question}"
}, - "vertex_llama": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account our previous conversation, and this context: {context} answer this question: {question}"
}, - "deepseek": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account this provided context: <Context> {context} </Context>\n Can you answer this question in a clear, concise way: <Question> {question} </Question>"
}
}, - "summary": "simple",
- "summary_model": "claude-3-fast",
- "summary_prompt": {
- "prompt": "Make a bullet point summary of the following content: {text}"
}, - "prefer_markdown_generative_response": false,
- "default_semantic_model": "string"
}
Response samples
- 200
- 422
{- "resource_labelers_models": [
- "string"
], - "paragraph_labelers_models": [
- "string"
], - "intent_models": [
- "string"
], - "visual_labeling": "disabled",
- "ner_model": "multilingual",
- "relation_model": "base",
- "anonymization_model": "disabled",
- "semantic_model": "string",
- "semantic_models": [
- "string"
], - "default_semantic_model": "string",
- "semantic_vector_similarity": "DOT",
- "semantic_vector_size": 1024,
- "semantic_matryoshka_dims": [ ],
- "semantic_threshold": 0.4,
- "generative_model": "chatgpt-azure-4o",
- "user_keys": {
- "openai": {
- "key": "string",
- "org": "string"
}, - "azure_openai": {
- "key": "string",
- "url": "string",
- "deployment": "string",
- "model": "string"
}, - "mistral": {
- "key": "string"
}, - "palm": {
- "credentials": "string",
- "location": "string"
}, - "anthropic": {
- "key": "string"
}, - "claude3": {
- "key": "string"
}, - "azure_mistral": {
- "key": "string"
}, - "hf_llm": {
- "url": "string",
- "key": "string"
}, - "hf_embedding": {
- "url": "string",
- "key": "string",
- "matryoshka": [
- 768,
- 512,
- 256
], - "similarity": "DOT",
- "size": 0,
- "threshold": 0.4,
- "passage_prompt": "Passage: {}",
- "query_prompt": "Represent this sentence for searching relevant passages: {}"
}, - "azure_aii": {
- "key": "",
- "url": "",
- "model": ""
}
}, - "user_prompts": {
- "openai": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account our previous conversation, and this context: {context} answer this question: {question}"
}, - "azure_openai": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account our previous conversation, and this context: {context} answer this question: {question}"
}, - "palm": {
- "prompt": "Answer my question in an informal tone, based only in this context: {context}. Question: {question}"
}, - "anthropic": {
- "prompt": "Taking into account our chat history: {chat_history} and this provided context: <Context> {context} </Context>\n Can you answer this question in a clear, concise way: <Question> {question} </Question>"
}, - "claude3": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account our previous conversation, and this context: {context} answer this question: {question}"
}, - "text_generation": {
- "prompt": "Taking into account our chat history: {chat_history} and this provided context: {context}, answer this question: \"{question}\" :"
}, - "mistral": {
- "prompt": "Taking into account our chat history: {chat_history} and this provided context: <Context> {context} </Context>\n Can you answer this question in a clear, concise way: <Question> {question} </Question>"
}, - "azure_mistral": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account this provided context: <Context> {context} </Context>\n Can you answer this question in a clear, concise way: <Question> {question} </Question>"
}, - "hf_llm": {
- "system": "string",
- "prompt": "string"
}, - "openai_url": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account our previous conversation, and this context: {context} answer this question: {question}"
}, - "vertex_llama": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account our previous conversation, and this context: {context} answer this question: {question}"
}, - "deepseek": {
- "system": "You are a medical assistant, use medical terminology",
- "prompt": "Taking into account this provided context: <Context> {context} </Context>\n Can you answer this question in a clear, concise way: <Question> {question} </Question>"
}
}, - "summary": "extended",
- "summary_model": "claude-3-fast",
- "summary_prompt": {
- "prompt": "Make a bullet point summary of the following content: {text}"
}, - "prefer_markdown_generative_response": false,
- "semantic_model_configs": { }
}
Learning Configuration Schema
Get jsonschema definition for learning_configuration
field of knowledgebox creation payload
Responses
Response samples
- 200
- 422
{- "semantic_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "semantic_models": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "default_semantic_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "anonymization_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "visual_labeling": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "generative_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "ner_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "relation_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "summary_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "summary": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "user_keys": {
- "schemas": { },
- "create": false,
- "update": false
}, - "user_prompts": {
- "schemas": { },
- "create": false,
- "update": false
}, - "summary_prompt": {
- "schemas": { },
- "create": false,
- "update": false
}, - "prefer_markdown_generative_response": {
- "schemas": { },
- "create": false,
- "update": false
}
}
Learning Configuration Schema
Get jsonschema definition for learning_configuration
field of knowledgebox creation payload
Responses
Response samples
- 200
- 422
{- "semantic_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "semantic_models": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "default_semantic_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "anonymization_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "visual_labeling": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "generative_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "ner_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "relation_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "summary_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "summary": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "user_keys": {
- "schemas": { },
- "create": false,
- "update": false
}, - "user_prompts": {
- "schemas": { },
- "create": false,
- "update": false
}, - "summary_prompt": {
- "schemas": { },
- "create": false,
- "update": false
}, - "prefer_markdown_generative_response": {
- "schemas": { },
- "create": false,
- "update": false
}
}
Learning Configuration Schema
Get jsonschema definition for learning_configuration
field of knowledgebox update payload
path Parameters
kbid required | string (Kbid) |
Responses
Response samples
- 200
- 422
{- "semantic_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "semantic_models": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "default_semantic_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "anonymization_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "visual_labeling": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "generative_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "ner_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "relation_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "summary_model": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "summary": {
- "options": [
- {
- "name": "string",
- "value": "string",
- "provider": "string",
- "user_prompt": "string",
- "user_key": "string"
}
], - "default": "string",
- "create": false,
- "update": false,
- "multiple": false
}, - "user_keys": {
- "schemas": { },
- "create": false,
- "update": false
}, - "user_prompts": {
- "schemas": { },
- "create": false,
- "update": false
}, - "summary_prompt": {
- "schemas": { },
- "create": false,
- "update": false
}, - "prefer_markdown_generative_response": {
- "schemas": { },
- "create": false,
- "update": false
}
}
Predict Chat
Chat interface for your NucliaDB
query Parameters
model | string (Model) Default: "chatgpt-azure-4o" |
Request Body schema: application/jsonrequired
question required | string (Question) |
retrieval | boolean (Retrieval) Default: true |
user_id required | string (User Id) |
System (string) or System (null) (System) | |
Array of objects (Chat History) Default: [] | |
Array of objects (Context) Default: [] | |
Array of Query Context (strings) or Query Context (object) (Query Context) Default: {} | |
object (Query Context Order) Default: {} | |
Truncate (boolean) or Truncate (null) (Truncate) Default: true | |
UserPrompt (object) or null | |
Citations (boolean) or Citations (null) (Citations) Default: false | |
Citation Threshold (number) or Citation Threshold (null) (Citation Threshold) If citations is set to True, this will be the similarity threshold. Value between 0 and 1, lower values will produce more citations. If not set, it will be set to the optimized threshold found by Nuclia. | |
Generative Model (string) or Generative Model (null) (Generative Model) | |
Max Tokens (integer) or Max Tokens (null) (Max Tokens) | |
Array of Query Context Images (objects) or Query Context Images (object) (Query Context Images) Default: {} | |
Prefer Markdown (boolean) or Prefer Markdown (null) (Prefer Markdown) | |
Json Schema (object) or Json Schema (null) (Json Schema) | |
format_prompt | boolean (Format Prompt) Default: true |
rerank_context | boolean (Rerank Context) Default: false Whether to reorder the query context based on a reranker. This option will also make it so the first response will contain the scores given for each context piece. |
Responses
Request samples
- Payload
{- "question": "string",
- "retrieval": true,
- "user_id": "string",
- "system": "string",
- "chat_history": [ ],
- "context": [ ],
- "query_context": { },
- "query_context_order": { },
- "truncate": true,
- "user_prompt": {
- "prompt": "string"
}, - "citations": false,
- "citation_threshold": 1,
- "generative_model": "string",
- "max_tokens": 0,
- "query_context_images": { },
- "prefer_markdown": true,
- "json_schema": { },
- "format_prompt": true,
- "rerank_context": false
}
Response samples
- 200
- 422
null
Predict Chat Kbid
Chat interface for your NucliaDB
path Parameters
kbid required | string (Kbid) |
Request Body schema: application/jsonrequired
question required | string (Question) |
retrieval | boolean (Retrieval) Default: true |
user_id required | string (User Id) |
System (string) or System (null) (System) | |
Array of objects (Chat History) Default: [] | |
Array of objects (Context) Default: [] | |
Array of Query Context (strings) or Query Context (object) (Query Context) Default: {} | |
object (Query Context Order) Default: {} | |
Truncate (boolean) or Truncate (null) (Truncate) Default: true | |
UserPrompt (object) or null | |
Citations (boolean) or Citations (null) (Citations) Default: false | |
Citation Threshold (number) or Citation Threshold (null) (Citation Threshold) If citations is set to True, this will be the similarity threshold. Value between 0 and 1, lower values will produce more citations. If not set, it will be set to the optimized threshold found by Nuclia. | |
Generative Model (string) or Generative Model (null) (Generative Model) | |
Max Tokens (integer) or Max Tokens (null) (Max Tokens) | |
Array of Query Context Images (objects) or Query Context Images (object) (Query Context Images) Default: {} | |
Prefer Markdown (boolean) or Prefer Markdown (null) (Prefer Markdown) | |
Json Schema (object) or Json Schema (null) (Json Schema) | |
format_prompt | boolean (Format Prompt) Default: true |
rerank_context | boolean (Rerank Context) Default: false Whether to reorder the query context based on a reranker. This option will also make it so the first response will contain the scores given for each context piece. |
Responses
Request samples
- Payload
{- "question": "string",
- "retrieval": true,
- "user_id": "string",
- "system": "string",
- "chat_history": [ ],
- "context": [ ],
- "query_context": { },
- "query_context_order": { },
- "truncate": true,
- "user_prompt": {
- "prompt": "string"
}, - "citations": false,
- "citation_threshold": 1,
- "generative_model": "string",
- "max_tokens": 0,
- "query_context_images": { },
- "prefer_markdown": true,
- "json_schema": { },
- "format_prompt": true,
- "rerank_context": false
}
Response samples
- 200
- 422
null
Predict Query
Get the vector of a sentence
query Parameters
Text (string) or Text (null) (Text) Text to process | |
semantic_model | string (Semantic Model) Default: "multilingual-2024-05-06" |
token_model | string (Token Model) Default: "multilingual" |
generative_model | string (Generative Model) Default: "chatgpt-azure-4o" |
rephrase | boolean (Rephrase) Default: false |
Rephrase Prompt (string) or Rephrase Prompt (null) (Rephrase Prompt) Examples: rephrase_prompt=Rephrase this question so its better for retrieval, and keep the rephrased question in the same language as the original.
QUESTION: {question}
Please return ONLY the question without any explanation. Just the rephrased question. rephrase_prompt=Rephrase this question so its better for retrieval, identify any part numbers and append them to the end of the question separated by a commas.
QUESTION: {question}
Please return ONLY the question without any explanation. Prompt to rephrase the sentence, if not provided, the default prompt will be used. It must include the {question} placeholder. The placeholder will be replaced with the original question. | |
agentic_entities | boolean (Agentic Entities) Default: false If true, the model will return the entities detected in the sentence guided by an already defined Graph Extraction Agent in the Knowledge Box. |
Responses
Response samples
- 200
- 422
{- "language": "string",
- "stop_words": [
- "string"
], - "semantic_threshold": 0,
- "semantic_thresholds": {
- "property1": 0,
- "property2": 0
}, - "visual_llm": true,
- "max_context": 0,
- "entities": {
- "tokens": [ ],
- "time": 0,
- "input_tokens": 0
}, - "sentence": {
- "data": [
- 0
], - "vectors": {
- "property1": [
- 0
], - "property2": [
- 0
]
}, - "time": 0,
- "timings": {
- "property1": 0,
- "property2": 0
}
}, - "query": "string",
- "rephrased_query": ""
}
Predict Query Kbid
Get the vector of a sentence
path Parameters
kbid required | string (Kbid) |
query Parameters
Text (string) or Text (null) (Text) Text to process | |
Array of Semantic Models (strings) or Semantic Models (null) (Semantic Models) Semantic models to compute the sentence vector for, if not provided, it will only compute the sentence vector for default semantic model in the Knowledge box's configuration. | |
generative_model | string (Generative Model) Default: "chatgpt-azure-4o-mini" |
rephrase | boolean (Rephrase) Default: false |
Rephrase Prompt (string) or Rephrase Prompt (null) (Rephrase Prompt) Examples: rephrase_prompt=Rephrase this question so its better for retrieval, and keep the rephrased question in the same language as the original.
QUESTION: {question}
Please return ONLY the question without any explanation. Just the rephrased question. rephrase_prompt=Rephrase this question so its better for retrieval, identify any part numbers and append them to the end of the question separated by a commas.
QUESTION: {question}
Please return ONLY the question without any explanation. Prompt to rephrase the sentence, if not provided, the default prompt will be used. It must include the {question} placeholder. The placeholder will be replaced with the original question. | |
agentic_entities | boolean (Agentic Entities) Default: false If true, the model will return the entities detected in the sentence guided by an already defined Graph Extraction Agent in the Knowledge Box. |
Responses
Response samples
- 200
- 422
{- "language": "string",
- "stop_words": [
- "string"
], - "semantic_threshold": 0,
- "semantic_thresholds": {
- "property1": 0,
- "property2": 0
}, - "visual_llm": true,
- "max_context": 0,
- "entities": {
- "tokens": [ ],
- "time": 0,
- "input_tokens": 0
}, - "sentence": {
- "data": [
- 0
], - "vectors": {
- "property1": [
- 0
], - "property2": [
- 0
]
}, - "time": 0,
- "timings": {
- "property1": 0,
- "property2": 0
}
}, - "query": "string",
- "rephrased_query": ""
}
Predict Remi
The REMi model is a model that computes metrics for a given question, answer and contexts. The metrics computed are:
- Answer Relevance: Measures the relevance of the generated answer to the user query, in a scale of 0 to 5.
- Context Relevance: Measures the relevance of the retrieved context to the user query, in a scale of 0 to 5.
- Groundedness: Measures the degree to which the generated answer is grounded in the retrieved context, in a scale of 0 to 5.
More information about REMi metrics and how to interpret in the following link: https://nuclia.com/developers/remi-open-source-rag-evaluation-model/
Request Body schema: application/jsonrequired
user_id required | string (The user ID of the user making the request) |
(The question or query that the user asked (string)) or (The question or query that the user asked (null)) (The question or query that the user asked) | |
The answer that the model provided (string) or The answer that the model provided (null) (The answer that the model provided) | |
Array of The contexts that the model used to generate the answer (strings) or The contexts that the model used to generate the answer (null) (The contexts that the model used to generate the answer) |
Responses
Request samples
- Payload
{- "user_id": "string",
- "question": "string",
- "answer": "string",
- "contexts": [
- "string"
]
}
Response samples
- 200
- 422
{- "time": 0,
- "answer_relevance": {
- "score": 0,
- "reason": "string"
}, - "context_relevance": [
- 0
], - "groundedness": [
- 0
]
}
Predict Remi Kbid
The REMi model is a model that computes metrics for a given question, answer and contexts. The metrics computed are:
- Answer Relevance: Measures the relevance of the generated answer to the user query, in a scale of 0 to 5.
- Context Relevance: Measures the relevance of the retrieved context to the user query, in a scale of 0 to 5.
- Groundedness: Measures the degree to which the generated answer is grounded in the retrieved context, in a scale of 0 to 5.
More information about REMi metrics and how to interpret in the following link: https://nuclia.com/developers/remi-open-source-rag-evaluation-model/
path Parameters
kbid required | string (Kbid) |
Request Body schema: application/jsonrequired
user_id required | string (The user ID of the user making the request) |
(The question or query that the user asked (string)) or (The question or query that the user asked (null)) (The question or query that the user asked) | |
The answer that the model provided (string) or The answer that the model provided (null) (The answer that the model provided) | |
Array of The contexts that the model used to generate the answer (strings) or The contexts that the model used to generate the answer (null) (The contexts that the model used to generate the answer) |
Responses
Request samples
- Payload
{- "user_id": "string",
- "question": "string",
- "answer": "string",
- "contexts": [
- "string"
]
}
Response samples
- 200
- 422
{- "time": 0,
- "answer_relevance": {
- "score": 0,
- "reason": "string"
}, - "context_relevance": [
- 0
], - "groundedness": [
- 0
]
}
Predict Rephrase
Rephrase interface for your NucliaDB
query Parameters
model | string (Model) Default: "chatgpt-azure-4o" |
Request Body schema: application/jsonrequired
question required | string (Question) |
Array of objects (Chat History) | |
Array of objects (Context) | |
Array of User Context (strings) or User Context (null) (User Context) | |
user_id required | string (User Id) |
Generative Model (string) or Generative Model (null) (Generative Model) | |
Prompt (string) or Prompt (null) (Prompt) Prompt to send the model to rephrase the sentence, if not provided, the default prompt will be used. It must include the {question} placeholder. The placeholder will be replaced with the original question. It will only be used if no user_context is provided. |
Responses
Request samples
- Payload
{- "question": "string",
- "chat_history": [
- {
- "author": "NUCLIA",
- "text": "string"
}
], - "context": [
- {
- "author": "NUCLIA",
- "text": "string"
}
], - "user_context": [
- "string"
], - "user_id": "string",
- "generative_model": "string",
- "prompt": "Rephrase this question so its better for retrieval, and keep the rephrased question in the same language as the original.\nQUESTION: {question}\nPlease return ONLY the question without any explanation. Just the rephrased question."
}
Response samples
- 200
- 422
"string"
Predict Rephrase Kbid
Rephrase interface for your NucliaDB with Container
path Parameters
kbid required | string (Kbid) |
Request Body schema: application/jsonrequired
question required | string (Question) |
Array of objects (Chat History) | |
Array of objects (Context) | |
Array of User Context (strings) or User Context (null) (User Context) | |
user_id required | string (User Id) |
Generative Model (string) or Generative Model (null) (Generative Model) | |
Prompt (string) or Prompt (null) (Prompt) Prompt to send the model to rephrase the sentence, if not provided, the default prompt will be used. It must include the {question} placeholder. The placeholder will be replaced with the original question. It will only be used if no user_context is provided. |
Responses
Request samples
- Payload
{- "question": "string",
- "chat_history": [
- {
- "author": "NUCLIA",
- "text": "string"
}
], - "context": [
- {
- "author": "NUCLIA",
- "text": "string"
}
], - "user_context": [
- "string"
], - "user_id": "string",
- "generative_model": "string",
- "prompt": "Rephrase this question so its better for retrieval, and keep the rephrased question in the same language as the original.\nQUESTION: {question}\nPlease return ONLY the question without any explanation. Just the rephrased question."
}
Response samples
- 200
- 422
null
Predict Rerank
Rerank your results
Request Body schema: application/jsonrequired
question required | string (Question) |
user_id required | string (User Id) |
object (Context) Default: {} |
Responses
Request samples
- Payload
{- "question": "string",
- "user_id": "string",
- "context": { }
}
Response samples
- 200
- 422
{- "context_scores": {
- "property1": 0,
- "property2": 0
}
}
Predict Rerank Kbid
Rerank your results
path Parameters
kbid required | string (Kbid) |
Request Body schema: application/jsonrequired
question required | string (Question) |
user_id required | string (User Id) |
object (Context) Default: {} |
Responses
Request samples
- Payload
{- "question": "string",
- "user_id": "string",
- "context": { }
}
Response samples
- 200
- 422
{- "context_scores": {
- "property1": 0,
- "property2": 0
}
}
Predict Sentence
Get the vector of a sentence
query Parameters
text required | string (Text) |
model | string (Model) Default: "multilingual-2024-05-06" |
Responses
Response samples
- 200
- 422
{- "data": [
- 0
], - "vectors": {
- "property1": [
- 0
], - "property2": [
- 0
]
}, - "time": 0,
- "timings": {
- "property1": 0,
- "property2": 0
}
}
Predict Sentence Kbid
Get the vector of a sentence
path Parameters
kbid required | string (Kbid) |
query Parameters
text required | string (Text) |
Array of Models (strings) or Models (null) (Models) Semantic models to compute the sentence vector for, if not provided, it will only compute the sentence vector for default semantic model in the Knowledge box's configuration. |
Responses
Response samples
- 200
- 422
{- "data": [
- 0
], - "vectors": {
- "property1": [
- 0
], - "property2": [
- 0
]
}, - "time": 0,
- "timings": {
- "property1": 0,
- "property2": 0
}
}
Predict Summarize
Get summarized answers via NUA
query Parameters
model | string (Model) Default: "claude-3-fast" |
Request Body schema: application/jsonrequired
required | object (Resources) |
summary_kind | string (SummaryKind) Enum: "simple" "extended" |
User Prompt (string) or User Prompt (null) (User Prompt) Default: "" | |
Generative Model (string) or Generative Model (null) (Generative Model) |
Responses
Request samples
- Payload
{- "resources": {
- "property1": {
- "fields": {
- "property1": "string",
- "property2": "string"
}
}, - "property2": {
- "fields": {
- "property1": "string",
- "property2": "string"
}
}
}, - "summary_kind": "simple",
- "user_prompt": "",
- "generative_model": "string"
}
Response samples
- 200
- 422
null
Predict Summarize Kbid
Get summarized answers via NUA with Container
path Parameters
kbid required | string (Kbid) |
Request Body schema: application/jsonrequired
required | object (Resources) |
summary_kind | string (SummaryKind) Enum: "simple" "extended" |
User Prompt (string) or User Prompt (null) (User Prompt) Default: "" | |
Generative Model (string) or Generative Model (null) (Generative Model) |
Responses
Request samples
- Payload
{- "resources": {
- "property1": {
- "fields": {
- "property1": "string",
- "property2": "string"
}
}, - "property2": {
- "fields": {
- "property1": "string",
- "property2": "string"
}
}
}, - "summary_kind": "simple",
- "user_prompt": "",
- "generative_model": "string"
}
Response samples
- 200
- 422
null
Upload Partition Account
Upload a partition of a dataset
path Parameters
dataset_id required | string (Dataset Id) |
account_id required | string (Account Id) |
partition_id required | string (Partition Id) |
header Parameters
content-length required | integer (Content-Length) |
Responses
Response samples
- 422
{- "detail": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string"
}
]
}
Delete Dataset Partition
Deletes a partition of a dataset
path Parameters
dataset_id required | string (Dataset Id) |
partition_id required | string (Partition Id) ^[a-zA-Z0-9-_]+$ |
account_id required | string (Account Id) |
Responses
Response samples
- 422
{- "detail": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string"
}
]
}
Create Dataset Account
Creates a new dataset
path Parameters
account_id required | string (Account Id) |
Request Body schema: application/jsonrequired
name required | string (Name) |
required | object (DatasetFilter) |
type required | string (Task) Enum: "PARAGRAPH_CLASSIFICATION" "FIELD_CLASSIFICATION" "SENTENCE_CLASSIFICATION" "TOKEN_CLASSIFICATION" "IMAGE_CLASSIFICATION" "PARAGRAPH_STREAMING" "QUESTION_ANSWER_STREAMING" "FIELD_STREAMING" |
Responses
Request samples
- Payload
{- "name": "string",
- "filter": {
- "labels": [
- "string"
]
}, - "type": "PARAGRAPH_CLASSIFICATION"
}
Response samples
- 201
- 422
{- "id": "string"
}
Response samples
- 201
- 422
{- "datasets": [
- {
- "id": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "account_id": "string",
- "nua_client_id": "string",
- "account_type": "string",
- "type": "string",
- "path": "string",
- "filter": { },
- "name": "string"
}
]
}
Upload Partition
Upload a partition of a dataset
path Parameters
dataset_id required | string (Dataset Id) |
partition_id required | string (Partition Id) |
header Parameters
content-length required | integer (Content-Length) |
Responses
Response samples
- 422
{- "detail": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string"
}
]
}
Create Dataset
Creates a new dataset
Request Body schema: application/jsonrequired
name required | string (Name) |
required | object (DatasetFilter) |
type required | string (Task) Enum: "PARAGRAPH_CLASSIFICATION" "FIELD_CLASSIFICATION" "SENTENCE_CLASSIFICATION" "TOKEN_CLASSIFICATION" "IMAGE_CLASSIFICATION" "PARAGRAPH_STREAMING" "QUESTION_ANSWER_STREAMING" "FIELD_STREAMING" |
Responses
Request samples
- Payload
{- "name": "string",
- "filter": {
- "labels": [
- "string"
]
}, - "type": "PARAGRAPH_CLASSIFICATION"
}
Response samples
- 201
- 422
{- "id": "string"
}
Start Dataset Task
Start an Ingestion Agent or a Task on a Dataset
path Parameters
dataset_id required | string (Dataset Id) |
Request Body schema: application/jsonrequired
name required | string (TaskName) Enum: "dummy" "env" "demo-dataset" "labeler" "llm-graph" "synthetic-questions" "ask" "llm-align" "semantic-model-migrator" "llama-guard" "prompt-guard" |
DataAugmentation (object) or SemanticModelMigrationParams (object) or Parameters (null) (Parameters) Parameters to be passed to the task. These must match the | |
Uuid Task (string) or Uuid Task (null) (Uuid Task) UUID of an already configured task. This is used to start a task that was already configured |
Responses
Request samples
- Payload
{- "name": "dummy",
- "parameters": {
- "name": "",
- "on": 0,
- "filter": {
- "contains": [
- "string"
], - "resource_type": [
- "string"
], - "field_types": [
- "string"
], - "not_field_types": [
- "string"
], - "rids": [
- "string"
], - "fields": [
- "string"
], - "splits": [
- "string"
], - "labels": [
- "string"
], - "apply_to_agent_generated_fields": false
}, - "operations": [
- {
- "graph": {
- "entity_defs": [
- {
- "label": "string",
- "description": ""
}
], - "examples": [
- {
- "entities": [
- {
- "name": "string",
- "label": "string"
}
], - "relations": [
- {
- "source": "string",
- "target": "string",
- "label": "string"
}
], - "text": "string"
}
], - "ident": "string",
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "label": {
- "labels": [
- {
- "label": "string",
- "description": "",
- "examples": [
- "string"
]
}
], - "ident": "string",
- "description": "",
- "multiple": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "ask": {
- "question": "string",
- "destination": "string",
- "json": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
], - "user_prompt": ""
}, - "qa": {
- "question_generator_prompt": "",
- "system_question_generator_prompt": "",
- "summary_prompt": "",
- "generate_answers_prompt": "",
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "extract": {
- "model": 0,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "prompt_guard": {
- "enabled": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "llama_guard": {
- "enabled": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}
}
], - "llm": {
- "user_keys": {
- "openai": {
- "key": "",
- "org": ""
}, - "azure_openai": {
- "key": "",
- "url": "",
- "deployment": "",
- "model": ""
}, - "palm": {
- "credentials": "string",
- "location": ""
}, - "anthropic": {
- "key": ""
}, - "claude3": {
- "key": ""
}, - "text_generation": {
- "model": ""
}, - "mistral": {
- "key": ""
}, - "azure_mistral": {
- "key": "",
- "url": ""
}, - "hf_llm": {
- "key": "",
- "url": "",
- "model": 0
}, - "hf_embedding": {
- "url": "",
- "key": "",
- "matryoshka": [
- 0
], - "similarity": "",
- "size": 0,
- "threshold": 0,
- "passage_prompt": "",
- "query_prompt": ""
}, - "azure_aii": {
- "key": "",
- "url": "",
- "model": ""
}
}, - "generative_model": "",
- "generative_provider": "",
- "generative_prompt_id": ""
}
}, - "uuid_task": "string"
}
Response samples
- 200
- 422
{- "name": "dummy",
- "status": "not_running",
- "id": "string"
}
Inspect Dataset Task
Get the status of an Ingestion Agent or a Task of a Dataset
path Parameters
dataset_id required | string (Dataset Id) |
task_id required | string (Task Id) |
Responses
Response samples
- 200
- 422
{- "task": {
- "name": "string",
- "data_augmentation": false,
- "description": "string",
- "can_cleanup": false
}, - "source": "nucliadb",
- "kbid": "string",
- "dataset_id": "string",
- "account_id": "string",
- "nua_client_id": "string",
- "user_id": "string",
- "id": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "scheduled": false,
- "completed": false,
- "stopped": false,
- "scheduled_at": "2019-08-24T14:15:22Z",
- "completed_at": "2019-08-24T14:15:22Z",
- "stopped_at": "2019-08-24T14:15:22Z",
- "failed": false,
- "retries": 0,
- "parameters": {
- "name": "",
- "on": 0,
- "filter": {
- "contains": [
- "string"
], - "resource_type": [
- "string"
], - "field_types": [
- "string"
], - "not_field_types": [
- "string"
], - "rids": [
- "string"
], - "fields": [
- "string"
], - "splits": [
- "string"
], - "labels": [
- "string"
], - "apply_to_agent_generated_fields": false
}, - "operations": [
- {
- "graph": {
- "entity_defs": [
- {
- "label": "string",
- "description": ""
}
], - "examples": [
- {
- "entities": [
- {
- "name": "string",
- "label": "string"
}
], - "relations": [
- {
- "source": "string",
- "target": "string",
- "label": "string"
}
], - "text": "string"
}
], - "ident": "string",
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "label": {
- "labels": [
- {
- "label": "string",
- "description": "",
- "examples": [
- "string"
]
}
], - "ident": "string",
- "description": "",
- "multiple": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "ask": {
- "question": "string",
- "destination": "string",
- "json": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
], - "user_prompt": ""
}, - "qa": {
- "question_generator_prompt": "",
- "system_question_generator_prompt": "",
- "summary_prompt": "",
- "generate_answers_prompt": "",
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "extract": {
- "model": 0,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "prompt_guard": {
- "enabled": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "llama_guard": {
- "enabled": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}
}
], - "llm": {
- "user_keys": {
- "openai": {
- "key": "",
- "org": ""
}, - "azure_openai": {
- "key": "",
- "url": "",
- "deployment": "",
- "model": ""
}, - "palm": {
- "credentials": "string",
- "location": ""
}, - "anthropic": {
- "key": ""
}, - "claude3": {
- "key": ""
}, - "text_generation": {
- "model": ""
}, - "mistral": {
- "key": ""
}, - "azure_mistral": {
- "key": "",
- "url": ""
}, - "hf_llm": {
- "key": "",
- "url": "",
- "model": 0
}, - "hf_embedding": {
- "url": "",
- "key": "",
- "matryoshka": [
- 0
], - "similarity": "",
- "size": 0,
- "threshold": 0,
- "passage_prompt": "",
- "query_prompt": ""
}, - "azure_aii": {
- "key": "",
- "url": "",
- "model": ""
}
}, - "generative_model": "",
- "generative_provider": "",
- "generative_prompt_id": ""
}
}, - "log": "string",
- "cleanup_parent_task_id": "string"
}
List Account Available Tasks
Get the available tasks for a Dataset
path Parameters
dataset_id required | string (Dataset Id) |
query Parameters
count | integer (Count) Default: 10 How many finished tasks to return |
Responses
Response samples
- 200
- 422
{- "tasks": [
- {
- "name": "dummy",
- "description": "string",
- "validation": { }
}
], - "running": [
- {
- "task": {
- "name": "string",
- "data_augmentation": false,
- "description": "string",
- "can_cleanup": false
}, - "source": "nucliadb",
- "kbid": "string",
- "dataset_id": "string",
- "account_id": "string",
- "nua_client_id": "string",
- "user_id": "string",
- "id": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "scheduled": false,
- "completed": false,
- "stopped": false,
- "scheduled_at": "2019-08-24T14:15:22Z",
- "completed_at": "2019-08-24T14:15:22Z",
- "stopped_at": "2019-08-24T14:15:22Z",
- "failed": false,
- "retries": 0,
- "parameters": {
- "name": "",
- "on": 0,
- "filter": {
- "contains": [
- "string"
], - "resource_type": [
- "string"
], - "field_types": [
- "string"
], - "not_field_types": [
- "string"
], - "rids": [
- "string"
], - "fields": [
- "string"
], - "splits": [
- "string"
], - "labels": [
- "string"
], - "apply_to_agent_generated_fields": false
}, - "operations": [
- {
- "graph": {
- "entity_defs": [
- {
- "label": "string",
- "description": ""
}
], - "examples": [
- {
- "entities": [
- null
], - "relations": [
- null
], - "text": "string"
}
], - "ident": "string",
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}, - "label": {
- "labels": [
- {
- "label": "string",
- "description": "",
- "examples": [
- null
]
}
], - "ident": "string",
- "description": "",
- "multiple": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}, - "ask": {
- "question": "string",
- "destination": "string",
- "json": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
], - "user_prompt": ""
}, - "qa": {
- "question_generator_prompt": "",
- "system_question_generator_prompt": "",
- "summary_prompt": "",
- "generate_answers_prompt": "",
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}, - "extract": {
- "model": 0,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}, - "prompt_guard": {
- "enabled": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}, - "llama_guard": {
- "enabled": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}
}
], - "llm": {
- "user_keys": {
- "openai": {
- "key": "",
- "org": ""
}, - "azure_openai": {
- "key": "",
- "url": "",
- "deployment": "",
- "model": ""
}, - "palm": {
- "credentials": "string",
- "location": ""
}, - "anthropic": {
- "key": ""
}, - "claude3": {
- "key": ""
}, - "text_generation": {
- "model": ""
}, - "mistral": {
- "key": ""
}, - "azure_mistral": {
- "key": "",
- "url": ""
}, - "hf_llm": {
- "key": "",
- "url": "",
- "model": 0
}, - "hf_embedding": {
- "url": "",
- "key": "",
- "matryoshka": [
- 0
], - "similarity": "",
- "size": 0,
- "threshold": 0,
- "passage_prompt": "",
- "query_prompt": ""
}, - "azure_aii": {
- "key": "",
- "url": "",
- "model": ""
}
}, - "generative_model": "",
- "generative_provider": "",
- "generative_prompt_id": ""
}
}, - "log": "string",
- "cleanup_parent_task_id": "string"
}
], - "configs": [
- {
- "task": {
- "name": "string",
- "data_augmentation": false,
- "description": "string",
- "can_cleanup": false
}, - "kbid": "string",
- "account_id": "string",
- "account_type": "string",
- "nua_client_id": "string",
- "user_id": "string",
- "parameters": {
- "name": "",
- "on": 0,
- "filter": {
- "contains": [
- "string"
], - "resource_type": [
- "string"
], - "field_types": [
- "string"
], - "not_field_types": [
- "string"
], - "rids": [
- "string"
], - "fields": [
- "string"
], - "splits": [
- "string"
], - "labels": [
- "string"
], - "apply_to_agent_generated_fields": false
}, - "operations": [
- {
- "graph": {
- "entity_defs": [
- {
- "label": "string",
- "description": ""
}
], - "examples": [
- {
- "entities": [
- null
], - "relations": [
- null
], - "text": "string"
}
], - "ident": "string",
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}, - "label": {
- "labels": [
- {
- "label": "string",
- "description": "",
- "examples": [
- null
]
}
], - "ident": "string",
- "description": "",
- "multiple": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}, - "ask": {
- "question": "string",
- "destination": "string",
- "json": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
], - "user_prompt": ""
}, - "qa": {
- "question_generator_prompt": "",
- "system_question_generator_prompt": "",
- "summary_prompt": "",
- "generate_answers_prompt": "",
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}, - "extract": {
- "model": 0,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}, - "prompt_guard": {
- "enabled": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}, - "llama_guard": {
- "enabled": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}
}
], - "llm": {
- "user_keys": {
- "openai": {
- "key": "",
- "org": ""
}, - "azure_openai": {
- "key": "",
- "url": "",
- "deployment": "",
- "model": ""
}, - "palm": {
- "credentials": "string",
- "location": ""
}, - "anthropic": {
- "key": ""
}, - "claude3": {
- "key": ""
}, - "text_generation": {
- "model": ""
}, - "mistral": {
- "key": ""
}, - "azure_mistral": {
- "key": "",
- "url": ""
}, - "hf_llm": {
- "key": "",
- "url": "",
- "model": 0
}, - "hf_embedding": {
- "url": "",
- "key": "",
- "matryoshka": [
- 0
], - "similarity": "",
- "size": 0,
- "threshold": 0,
- "passage_prompt": "",
- "query_prompt": ""
}, - "azure_aii": {
- "key": "",
- "url": "",
- "model": ""
}
}, - "generative_model": "",
- "generative_provider": "",
- "generative_prompt_id": ""
}
}, - "id": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "defined_at": "2019-08-24T14:15:22Z",
- "enabled": true
}
], - "done": [
- {
- "task": {
- "name": "string",
- "data_augmentation": false,
- "description": "string",
- "can_cleanup": false
}, - "source": "nucliadb",
- "kbid": "string",
- "dataset_id": "string",
- "account_id": "string",
- "nua_client_id": "string",
- "user_id": "string",
- "id": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "scheduled": false,
- "completed": false,
- "stopped": false,
- "scheduled_at": "2019-08-24T14:15:22Z",
- "completed_at": "2019-08-24T14:15:22Z",
- "stopped_at": "2019-08-24T14:15:22Z",
- "failed": false,
- "retries": 0,
- "parameters": {
- "name": "",
- "on": 0,
- "filter": {
- "contains": [
- "string"
], - "resource_type": [
- "string"
], - "field_types": [
- "string"
], - "not_field_types": [
- "string"
], - "rids": [
- "string"
], - "fields": [
- "string"
], - "splits": [
- "string"
], - "labels": [
- "string"
], - "apply_to_agent_generated_fields": false
}, - "operations": [
- {
- "graph": {
- "entity_defs": [
- {
- "label": "string",
- "description": ""
}
], - "examples": [
- {
- "entities": [
- null
], - "relations": [
- null
], - "text": "string"
}
], - "ident": "string",
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}, - "label": {
- "labels": [
- {
- "label": "string",
- "description": "",
- "examples": [
- null
]
}
], - "ident": "string",
- "description": "",
- "multiple": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}, - "ask": {
- "question": "string",
- "destination": "string",
- "json": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
], - "user_prompt": ""
}, - "qa": {
- "question_generator_prompt": "",
- "system_question_generator_prompt": "",
- "summary_prompt": "",
- "generate_answers_prompt": "",
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}, - "extract": {
- "model": 0,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}, - "prompt_guard": {
- "enabled": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}, - "llama_guard": {
- "enabled": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}
}
], - "llm": {
- "user_keys": {
- "openai": {
- "key": "",
- "org": ""
}, - "azure_openai": {
- "key": "",
- "url": "",
- "deployment": "",
- "model": ""
}, - "palm": {
- "credentials": "string",
- "location": ""
}, - "anthropic": {
- "key": ""
}, - "claude3": {
- "key": ""
}, - "text_generation": {
- "model": ""
}, - "mistral": {
- "key": ""
}, - "azure_mistral": {
- "key": "",
- "url": ""
}, - "hf_llm": {
- "key": "",
- "url": "",
- "model": 0
}, - "hf_embedding": {
- "url": "",
- "key": "",
- "matryoshka": [
- 0
], - "similarity": "",
- "size": 0,
- "threshold": 0,
- "passage_prompt": "",
- "query_prompt": ""
}, - "azure_aii": {
- "key": "",
- "url": "",
- "model": ""
}
}, - "generative_model": "",
- "generative_provider": "",
- "generative_prompt_id": ""
}
}, - "log": "string",
- "cleanup_parent_task_id": "string"
}
]
}
Start Knowledge Box Task
Start an Ingestion Agent or a Task on a Knowledge Box
path Parameters
kb_uuid required | string (Kb Uuid) |
Request Body schema: application/jsonrequired
name required | string (TaskName) Enum: "dummy" "env" "demo-dataset" "labeler" "llm-graph" "synthetic-questions" "ask" "llm-align" "semantic-model-migrator" "llama-guard" "prompt-guard" |
DataAugmentation (object) or SemanticModelMigrationParams (object) or Parameters (null) (Parameters) Parameters to be passed to the task. These must match the | |
Uuid Task (string) or Uuid Task (null) (Uuid Task) UUID of an already configured task. This is used to start a task that was already configured | |
apply | string (ApplyOptions) Enum: "EXISTING" "NEW" "ALL" Defines how the tasks should be applied to the existing data.
|
enabled | boolean (Enabled) Default: true Whether the task should be enabled at the time of creation. This only applies to tasks involving 'NEW' apply options, as 'EXISTING' tasks start immediately |
Responses
Request samples
- Payload
{- "name": "dummy",
- "parameters": {
- "name": "",
- "on": 0,
- "filter": {
- "contains": [
- "string"
], - "resource_type": [
- "string"
], - "field_types": [
- "string"
], - "not_field_types": [
- "string"
], - "rids": [
- "string"
], - "fields": [
- "string"
], - "splits": [
- "string"
], - "labels": [
- "string"
], - "apply_to_agent_generated_fields": false
}, - "operations": [
- {
- "graph": {
- "entity_defs": [
- {
- "label": "string",
- "description": ""
}
], - "examples": [
- {
- "entities": [
- {
- "name": "string",
- "label": "string"
}
], - "relations": [
- {
- "source": "string",
- "target": "string",
- "label": "string"
}
], - "text": "string"
}
], - "ident": "string",
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "label": {
- "labels": [
- {
- "label": "string",
- "description": "",
- "examples": [
- "string"
]
}
], - "ident": "string",
- "description": "",
- "multiple": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "ask": {
- "question": "string",
- "destination": "string",
- "json": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
], - "user_prompt": ""
}, - "qa": {
- "question_generator_prompt": "",
- "system_question_generator_prompt": "",
- "summary_prompt": "",
- "generate_answers_prompt": "",
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "extract": {
- "model": 0,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "prompt_guard": {
- "enabled": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "llama_guard": {
- "enabled": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}
}
], - "llm": {
- "user_keys": {
- "openai": {
- "key": "",
- "org": ""
}, - "azure_openai": {
- "key": "",
- "url": "",
- "deployment": "",
- "model": ""
}, - "palm": {
- "credentials": "string",
- "location": ""
}, - "anthropic": {
- "key": ""
}, - "claude3": {
- "key": ""
}, - "text_generation": {
- "model": ""
}, - "mistral": {
- "key": ""
}, - "azure_mistral": {
- "key": "",
- "url": ""
}, - "hf_llm": {
- "key": "",
- "url": "",
- "model": 0
}, - "hf_embedding": {
- "url": "",
- "key": "",
- "matryoshka": [
- 0
], - "similarity": "",
- "size": 0,
- "threshold": 0,
- "passage_prompt": "",
- "query_prompt": ""
}, - "azure_aii": {
- "key": "",
- "url": "",
- "model": ""
}
}, - "generative_model": "",
- "generative_provider": "",
- "generative_prompt_id": ""
}
}, - "uuid_task": "string",
- "apply": "EXISTING",
- "enabled": true
}
Response samples
- 200
- 422
{- "name": "dummy",
- "status": "not_running",
- "id": "string"
}
Patch Knowledge Box Task
Modify the parameters of a task. This is only available for tasks that run on NEW
resources, tasks that run on EXISTING
resources cannot be modified.
path Parameters
kb_uuid required | string (Kb Uuid) |
task_id required | string (Task Id) |
Request Body schema: application/jsonrequired
required | DataAugmentation (object) or SemanticModelMigrationParams (object) or Parameters (null) (Parameters) Parameters to be passed to the task. These must match the | ||||||||||
Any of
|
Responses
Request samples
- Payload
{- "parameters": {
- "name": "",
- "on": 0,
- "filter": {
- "contains": [
- "string"
], - "resource_type": [
- "string"
], - "field_types": [
- "string"
], - "not_field_types": [
- "string"
], - "rids": [
- "string"
], - "fields": [
- "string"
], - "splits": [
- "string"
], - "labels": [
- "string"
], - "apply_to_agent_generated_fields": false
}, - "operations": [
- {
- "graph": {
- "entity_defs": [
- {
- "label": "string",
- "description": ""
}
], - "examples": [
- {
- "entities": [
- {
- "name": "string",
- "label": "string"
}
], - "relations": [
- {
- "source": "string",
- "target": "string",
- "label": "string"
}
], - "text": "string"
}
], - "ident": "string",
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "label": {
- "labels": [
- {
- "label": "string",
- "description": "",
- "examples": [
- "string"
]
}
], - "ident": "string",
- "description": "",
- "multiple": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "ask": {
- "question": "string",
- "destination": "string",
- "json": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
], - "user_prompt": ""
}, - "qa": {
- "question_generator_prompt": "",
- "system_question_generator_prompt": "",
- "summary_prompt": "",
- "generate_answers_prompt": "",
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "extract": {
- "model": 0,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "prompt_guard": {
- "enabled": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "llama_guard": {
- "enabled": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}
}
], - "llm": {
- "user_keys": {
- "openai": {
- "key": "",
- "org": ""
}, - "azure_openai": {
- "key": "",
- "url": "",
- "deployment": "",
- "model": ""
}, - "palm": {
- "credentials": "string",
- "location": ""
}, - "anthropic": {
- "key": ""
}, - "claude3": {
- "key": ""
}, - "text_generation": {
- "model": ""
}, - "mistral": {
- "key": ""
}, - "azure_mistral": {
- "key": "",
- "url": ""
}, - "hf_llm": {
- "key": "",
- "url": "",
- "model": 0
}, - "hf_embedding": {
- "url": "",
- "key": "",
- "matryoshka": [
- 0
], - "similarity": "",
- "size": 0,
- "threshold": 0,
- "passage_prompt": "",
- "query_prompt": ""
}, - "azure_aii": {
- "key": "",
- "url": "",
- "model": ""
}
}, - "generative_model": "",
- "generative_provider": "",
- "generative_prompt_id": ""
}
}
}
Response samples
- 200
- 422
{- "task": {
- "name": "string",
- "image_repository": "europe-west4-docker.pkg.dev/nuclia-internal/nuclia",
- "image_name": "string",
- "image_version": "latest",
- "entrypoint": [
- "string"
], - "sentry_id": "string",
- "memory": "1Gi",
- "cpu": "1000m",
- "imagePullPolicy": "Always",
- "use_gpu": false,
- "trainset_type": 0,
- "command": [
- "string"
], - "disallowed_account_types": [ ],
- "model_type": null,
- "listing": true,
- "data_augmentation": false,
- "description": "string",
- "feedback": false,
- "cleanup_command": [
- "string"
]
}, - "source": "nucliadb",
- "kbid": "string",
- "dataset_id": "string",
- "dataset_path": "string",
- "account_id": "string",
- "account_type": "string",
- "nua_client_id": "string",
- "user_id": "string",
- "parameters": {
- "name": "",
- "on": 0,
- "filter": {
- "contains": [
- "string"
], - "resource_type": [
- "string"
], - "field_types": [
- "string"
], - "not_field_types": [
- "string"
], - "rids": [
- "string"
], - "fields": [
- "string"
], - "splits": [
- "string"
], - "labels": [
- "string"
], - "apply_to_agent_generated_fields": false
}, - "operations": [
- {
- "graph": {
- "entity_defs": [
- {
- "label": "string",
- "description": ""
}
], - "examples": [
- {
- "entities": [
- {
- "name": "string",
- "label": "string"
}
], - "relations": [
- {
- "source": "string",
- "target": "string",
- "label": "string"
}
], - "text": "string"
}
], - "ident": "string",
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "label": {
- "labels": [
- {
- "label": "string",
- "description": "",
- "examples": [
- "string"
]
}
], - "ident": "string",
- "description": "",
- "multiple": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "ask": {
- "question": "string",
- "destination": "string",
- "json": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
], - "user_prompt": ""
}, - "qa": {
- "question_generator_prompt": "",
- "system_question_generator_prompt": "",
- "summary_prompt": "",
- "generate_answers_prompt": "",
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "extract": {
- "model": 0,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "prompt_guard": {
- "enabled": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "llama_guard": {
- "enabled": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}
}
], - "llm": {
- "user_keys": {
- "openai": {
- "key": "",
- "org": ""
}, - "azure_openai": {
- "key": "",
- "url": "",
- "deployment": "",
- "model": ""
}, - "palm": {
- "credentials": "string",
- "location": ""
}, - "anthropic": {
- "key": ""
}, - "claude3": {
- "key": ""
}, - "text_generation": {
- "model": ""
}, - "mistral": {
- "key": ""
}, - "azure_mistral": {
- "key": "",
- "url": ""
}, - "hf_llm": {
- "key": "",
- "url": "",
- "model": 0
}, - "hf_embedding": {
- "url": "",
- "key": "",
- "matryoshka": [
- 0
], - "similarity": "",
- "size": 0,
- "threshold": 0,
- "passage_prompt": "",
- "query_prompt": ""
}, - "azure_aii": {
- "key": "",
- "url": "",
- "model": ""
}
}, - "generative_model": "",
- "generative_provider": "",
- "generative_prompt_id": ""
}
}, - "id": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "scheduled": false,
- "completed": false,
- "stopped": false,
- "scheduled_at": "2019-08-24T14:15:22Z",
- "completed_at": "2019-08-24T14:15:22Z",
- "stopped_at": "2019-08-24T14:15:22Z",
- "failed": false,
- "retries": 0,
- "token": "string",
- "key_id": "string",
- "ndb_token": "string",
- "log": "string",
- "cleanup_parent_task_id": "string"
}
Delete Knowledge Box Task
Delete an Ingestion Agent or a Task of a Knowledge Box
path Parameters
kb_uuid required | string (Kb Uuid) |
task_id required | string (Task Id) |
query Parameters
cleanup | boolean (Cleanup) Default: false Cleanup all data associated with the task |
Responses
Response samples
- 200
- 422
null
Cleanup Knowledge Box Task
Start a cleanup process for an Ingestion Agent or a Task of a Knowledge Box
path Parameters
kb_uuid required | string (Kb Uuid) |
task_id required | string (Task Id) |
Responses
Response samples
- 200
- 422
{- "request": {
- "task": {
- "name": "string",
- "data_augmentation": false,
- "description": "string",
- "can_cleanup": false
}, - "source": "nucliadb",
- "kbid": "string",
- "dataset_id": "string",
- "account_id": "string",
- "nua_client_id": "string",
- "user_id": "string",
- "id": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "scheduled": false,
- "completed": false,
- "stopped": false,
- "scheduled_at": "2019-08-24T14:15:22Z",
- "completed_at": "2019-08-24T14:15:22Z",
- "stopped_at": "2019-08-24T14:15:22Z",
- "failed": false,
- "retries": 0,
- "parameters": {
- "name": "",
- "on": 0,
- "filter": {
- "contains": [
- "string"
], - "resource_type": [
- "string"
], - "field_types": [
- "string"
], - "not_field_types": [
- "string"
], - "rids": [
- "string"
], - "fields": [
- "string"
], - "splits": [
- "string"
], - "labels": [
- "string"
], - "apply_to_agent_generated_fields": false
}, - "operations": [
- {
- "graph": {
- "entity_defs": [
- {
- "label": "string",
- "description": ""
}
], - "examples": [
- {
- "entities": [
- {
- "name": null,
- "label": null
}
], - "relations": [
- {
- "source": null,
- "target": null,
- "label": null
}
], - "text": "string"
}
], - "ident": "string",
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "label": {
- "labels": [
- {
- "label": "string",
- "description": "",
- "examples": [
- "string"
]
}
], - "ident": "string",
- "description": "",
- "multiple": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "ask": {
- "question": "string",
- "destination": "string",
- "json": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
], - "user_prompt": ""
}, - "qa": {
- "question_generator_prompt": "",
- "system_question_generator_prompt": "",
- "summary_prompt": "",
- "generate_answers_prompt": "",
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "extract": {
- "model": 0,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "prompt_guard": {
- "enabled": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "llama_guard": {
- "enabled": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}
}
], - "llm": {
- "user_keys": {
- "openai": {
- "key": "",
- "org": ""
}, - "azure_openai": {
- "key": "",
- "url": "",
- "deployment": "",
- "model": ""
}, - "palm": {
- "credentials": "string",
- "location": ""
}, - "anthropic": {
- "key": ""
}, - "claude3": {
- "key": ""
}, - "text_generation": {
- "model": ""
}, - "mistral": {
- "key": ""
}, - "azure_mistral": {
- "key": "",
- "url": ""
}, - "hf_llm": {
- "key": "",
- "url": "",
- "model": 0
}, - "hf_embedding": {
- "url": "",
- "key": "",
- "matryoshka": [
- 0
], - "similarity": "",
- "size": 0,
- "threshold": 0,
- "passage_prompt": "",
- "query_prompt": ""
}, - "azure_aii": {
- "key": "",
- "url": "",
- "model": ""
}
}, - "generative_model": "",
- "generative_provider": "",
- "generative_prompt_id": ""
}
}, - "log": "string",
- "cleanup_parent_task_id": "string"
}, - "config": {
- "task": {
- "name": "string",
- "data_augmentation": false,
- "description": "string",
- "can_cleanup": false
}, - "kbid": "string",
- "account_id": "string",
- "account_type": "string",
- "nua_client_id": "string",
- "user_id": "string",
- "parameters": {
- "name": "",
- "on": 0,
- "filter": {
- "contains": [
- "string"
], - "resource_type": [
- "string"
], - "field_types": [
- "string"
], - "not_field_types": [
- "string"
], - "rids": [
- "string"
], - "fields": [
- "string"
], - "splits": [
- "string"
], - "labels": [
- "string"
], - "apply_to_agent_generated_fields": false
}, - "operations": [
- {
- "graph": {
- "entity_defs": [
- {
- "label": "string",
- "description": ""
}
], - "examples": [
- {
- "entities": [
- {
- "name": null,
- "label": null
}
], - "relations": [
- {
- "source": null,
- "target": null,
- "label": null
}
], - "text": "string"
}
], - "ident": "string",
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "label": {
- "labels": [
- {
- "label": "string",
- "description": "",
- "examples": [
- "string"
]
}
], - "ident": "string",
- "description": "",
- "multiple": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "ask": {
- "question": "string",
- "destination": "string",
- "json": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
], - "user_prompt": ""
}, - "qa": {
- "question_generator_prompt": "",
- "system_question_generator_prompt": "",
- "summary_prompt": "",
- "generate_answers_prompt": "",
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "extract": {
- "model": 0,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "prompt_guard": {
- "enabled": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "llama_guard": {
- "enabled": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}
}
], - "llm": {
- "user_keys": {
- "openai": {
- "key": "",
- "org": ""
}, - "azure_openai": {
- "key": "",
- "url": "",
- "deployment": "",
- "model": ""
}, - "palm": {
- "credentials": "string",
- "location": ""
}, - "anthropic": {
- "key": ""
}, - "claude3": {
- "key": ""
}, - "text_generation": {
- "model": ""
}, - "mistral": {
- "key": ""
}, - "azure_mistral": {
- "key": "",
- "url": ""
}, - "hf_llm": {
- "key": "",
- "url": "",
- "model": 0
}, - "hf_embedding": {
- "url": "",
- "key": "",
- "matryoshka": [
- 0
], - "similarity": "",
- "size": 0,
- "threshold": 0,
- "passage_prompt": "",
- "query_prompt": ""
}, - "azure_aii": {
- "key": "",
- "url": "",
- "model": ""
}
}, - "generative_model": "",
- "generative_provider": "",
- "generative_prompt_id": ""
}
}, - "id": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "defined_at": "2019-08-24T14:15:22Z",
- "enabled": true
}
}
Enable Knowledge Box Task
Enable or disable a task. This is only available for tasks that run on NEW
resources. To disable a task that runs on EXISTING
resources, use the stop
endpoint.
path Parameters
task_id required | string (Task Id) |
kb_uuid required | string (Kb Uuid) |
Request Body schema: application/jsonrequired
enabled required | boolean (Enabled) |
Responses
Request samples
- Payload
{- "enabled": true
}
Response samples
- 200
- 422
null
Inspect Knowledge Box Task
Get the details of an Ingestion Agent or a Task of a Knowledge Box
path Parameters
kb_uuid required | string (Kb Uuid) |
task_id required | string (Task Id) |
Responses
Response samples
- 200
- 422
{- "request": {
- "task": {
- "name": "string",
- "data_augmentation": false,
- "description": "string",
- "can_cleanup": false
}, - "source": "nucliadb",
- "kbid": "string",
- "dataset_id": "string",
- "account_id": "string",
- "nua_client_id": "string",
- "user_id": "string",
- "id": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "scheduled": false,
- "completed": false,
- "stopped": false,
- "scheduled_at": "2019-08-24T14:15:22Z",
- "completed_at": "2019-08-24T14:15:22Z",
- "stopped_at": "2019-08-24T14:15:22Z",
- "failed": false,
- "retries": 0,
- "parameters": {
- "name": "",
- "on": 0,
- "filter": {
- "contains": [
- "string"
], - "resource_type": [
- "string"
], - "field_types": [
- "string"
], - "not_field_types": [
- "string"
], - "rids": [
- "string"
], - "fields": [
- "string"
], - "splits": [
- "string"
], - "labels": [
- "string"
], - "apply_to_agent_generated_fields": false
}, - "operations": [
- {
- "graph": {
- "entity_defs": [
- {
- "label": "string",
- "description": ""
}
], - "examples": [
- {
- "entities": [
- {
- "name": null,
- "label": null
}
], - "relations": [
- {
- "source": null,
- "target": null,
- "label": null
}
], - "text": "string"
}
], - "ident": "string",
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "label": {
- "labels": [
- {
- "label": "string",
- "description": "",
- "examples": [
- "string"
]
}
], - "ident": "string",
- "description": "",
- "multiple": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "ask": {
- "question": "string",
- "destination": "string",
- "json": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
], - "user_prompt": ""
}, - "qa": {
- "question_generator_prompt": "",
- "system_question_generator_prompt": "",
- "summary_prompt": "",
- "generate_answers_prompt": "",
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "extract": {
- "model": 0,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "prompt_guard": {
- "enabled": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "llama_guard": {
- "enabled": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}
}
], - "llm": {
- "user_keys": {
- "openai": {
- "key": "",
- "org": ""
}, - "azure_openai": {
- "key": "",
- "url": "",
- "deployment": "",
- "model": ""
}, - "palm": {
- "credentials": "string",
- "location": ""
}, - "anthropic": {
- "key": ""
}, - "claude3": {
- "key": ""
}, - "text_generation": {
- "model": ""
}, - "mistral": {
- "key": ""
}, - "azure_mistral": {
- "key": "",
- "url": ""
}, - "hf_llm": {
- "key": "",
- "url": "",
- "model": 0
}, - "hf_embedding": {
- "url": "",
- "key": "",
- "matryoshka": [
- 0
], - "similarity": "",
- "size": 0,
- "threshold": 0,
- "passage_prompt": "",
- "query_prompt": ""
}, - "azure_aii": {
- "key": "",
- "url": "",
- "model": ""
}
}, - "generative_model": "",
- "generative_provider": "",
- "generative_prompt_id": ""
}
}, - "log": "string",
- "cleanup_parent_task_id": "string"
}, - "config": {
- "task": {
- "name": "string",
- "data_augmentation": false,
- "description": "string",
- "can_cleanup": false
}, - "kbid": "string",
- "account_id": "string",
- "account_type": "string",
- "nua_client_id": "string",
- "user_id": "string",
- "parameters": {
- "name": "",
- "on": 0,
- "filter": {
- "contains": [
- "string"
], - "resource_type": [
- "string"
], - "field_types": [
- "string"
], - "not_field_types": [
- "string"
], - "rids": [
- "string"
], - "fields": [
- "string"
], - "splits": [
- "string"
], - "labels": [
- "string"
], - "apply_to_agent_generated_fields": false
}, - "operations": [
- {
- "graph": {
- "entity_defs": [
- {
- "label": "string",
- "description": ""
}
], - "examples": [
- {
- "entities": [
- {
- "name": null,
- "label": null
}
], - "relations": [
- {
- "source": null,
- "target": null,
- "label": null
}
], - "text": "string"
}
], - "ident": "string",
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "label": {
- "labels": [
- {
- "label": "string",
- "description": "",
- "examples": [
- "string"
]
}
], - "ident": "string",
- "description": "",
- "multiple": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "ask": {
- "question": "string",
- "destination": "string",
- "json": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
], - "user_prompt": ""
}, - "qa": {
- "question_generator_prompt": "",
- "system_question_generator_prompt": "",
- "summary_prompt": "",
- "generate_answers_prompt": "",
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "extract": {
- "model": 0,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "prompt_guard": {
- "enabled": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "llama_guard": {
- "enabled": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}
}
], - "llm": {
- "user_keys": {
- "openai": {
- "key": "",
- "org": ""
}, - "azure_openai": {
- "key": "",
- "url": "",
- "deployment": "",
- "model": ""
}, - "palm": {
- "credentials": "string",
- "location": ""
}, - "anthropic": {
- "key": ""
}, - "claude3": {
- "key": ""
}, - "text_generation": {
- "model": ""
}, - "mistral": {
- "key": ""
}, - "azure_mistral": {
- "key": "",
- "url": ""
}, - "hf_llm": {
- "key": "",
- "url": "",
- "model": 0
}, - "hf_embedding": {
- "url": "",
- "key": "",
- "matryoshka": [
- 0
], - "similarity": "",
- "size": 0,
- "threshold": 0,
- "passage_prompt": "",
- "query_prompt": ""
}, - "azure_aii": {
- "key": "",
- "url": "",
- "model": ""
}
}, - "generative_model": "",
- "generative_provider": "",
- "generative_prompt_id": ""
}
}, - "id": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "defined_at": "2019-08-24T14:15:22Z",
- "enabled": true
}
}
Restart Knowledge Box Task
Restart an Ingestion Agent or a Task of a Knowledge Box. This only affects tasks that are configured to run on EXISTING
resources, for tasks that run on NEW
resources, use the enable
endpoint.
path Parameters
kb_uuid required | string (Kb Uuid) |
task_id required | string (Task Id) |
Responses
Response samples
- 200
- 422
{- "name": "dummy",
- "status": "not_running",
- "id": "string"
}
Stop Knowledge Box Task
Stop an Ingestion Agent or a Task of a Knowledge Box. This only affects tasks that are currently running on EXISTING
resources, for disabling tasks that run on NEW
resources, use the enable
endpoint.
path Parameters
kb_uuid required | string (Kb Uuid) |
task_id required | string (Task Id) |
Responses
Response samples
- 200
- 422
{- "name": "dummy",
- "status": "not_running",
- "id": "string"
}
Inspect Knowledge Box Task Worker
Get the worker config of a task on a knowledge box
path Parameters
task_id required | string (Task Id) |
Responses
Response samples
- 200
- 422
{- "task": {
- "name": "string",
- "image_repository": "europe-west4-docker.pkg.dev/nuclia-internal/nuclia",
- "image_name": "string",
- "image_version": "latest",
- "entrypoint": [
- "string"
], - "sentry_id": "string",
- "memory": "1Gi",
- "cpu": "1000m",
- "imagePullPolicy": "Always",
- "use_gpu": false,
- "trainset_type": 0,
- "command": [
- "string"
], - "disallowed_account_types": [ ],
- "model_type": null,
- "listing": true,
- "data_augmentation": false,
- "description": "string",
- "feedback": false,
- "cleanup_command": [
- "string"
]
}, - "source": "nucliadb",
- "kbid": "string",
- "dataset_id": "string",
- "dataset_path": "string",
- "account_id": "string",
- "account_type": "string",
- "nua_client_id": "string",
- "user_id": "string",
- "parameters": {
- "name": "",
- "on": 0,
- "filter": {
- "contains": [
- "string"
], - "resource_type": [
- "string"
], - "field_types": [
- "string"
], - "not_field_types": [
- "string"
], - "rids": [
- "string"
], - "fields": [
- "string"
], - "splits": [
- "string"
], - "labels": [
- "string"
], - "apply_to_agent_generated_fields": false
}, - "operations": [
- {
- "graph": {
- "entity_defs": [
- {
- "label": "string",
- "description": ""
}
], - "examples": [
- {
- "entities": [
- {
- "name": "string",
- "label": "string"
}
], - "relations": [
- {
- "source": "string",
- "target": "string",
- "label": "string"
}
], - "text": "string"
}
], - "ident": "string",
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "label": {
- "labels": [
- {
- "label": "string",
- "description": "",
- "examples": [
- "string"
]
}
], - "ident": "string",
- "description": "",
- "multiple": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "ask": {
- "question": "string",
- "destination": "string",
- "json": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
], - "user_prompt": ""
}, - "qa": {
- "question_generator_prompt": "",
- "system_question_generator_prompt": "",
- "summary_prompt": "",
- "generate_answers_prompt": "",
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "extract": {
- "model": 0,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "prompt_guard": {
- "enabled": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}, - "llama_guard": {
- "enabled": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
]
}
}
], - "llm": {
- "user_keys": {
- "openai": {
- "key": "",
- "org": ""
}, - "azure_openai": {
- "key": "",
- "url": "",
- "deployment": "",
- "model": ""
}, - "palm": {
- "credentials": "string",
- "location": ""
}, - "anthropic": {
- "key": ""
}, - "claude3": {
- "key": ""
}, - "text_generation": {
- "model": ""
}, - "mistral": {
- "key": ""
}, - "azure_mistral": {
- "key": "",
- "url": ""
}, - "hf_llm": {
- "key": "",
- "url": "",
- "model": 0
}, - "hf_embedding": {
- "url": "",
- "key": "",
- "matryoshka": [
- 0
], - "similarity": "",
- "size": 0,
- "threshold": 0,
- "passage_prompt": "",
- "query_prompt": ""
}, - "azure_aii": {
- "key": "",
- "url": "",
- "model": ""
}
}, - "generative_model": "",
- "generative_provider": "",
- "generative_prompt_id": ""
}
}, - "id": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "scheduled": false,
- "completed": false,
- "stopped": false,
- "scheduled_at": "2019-08-24T14:15:22Z",
- "completed_at": "2019-08-24T14:15:22Z",
- "stopped_at": "2019-08-24T14:15:22Z",
- "failed": false,
- "retries": 0,
- "token": "string",
- "key_id": "string",
- "ndb_token": "string",
- "log": "string",
- "cleanup_parent_task_id": "string"
}
List Knowledge Box Available Tasks
Get the available Ingestion Agents and Tasks of a Knowledge Box
path Parameters
kb_uuid required | string (Kb Uuid) |
query Parameters
count | integer (Count) Default: 10 How many finished tasks to return |
Responses
Response samples
- 200
- 422
{- "tasks": [
- {
- "name": "dummy",
- "description": "string",
- "validation": { }
}
], - "running": [
- {
- "task": {
- "name": "string",
- "data_augmentation": false,
- "description": "string",
- "can_cleanup": false
}, - "source": "nucliadb",
- "kbid": "string",
- "dataset_id": "string",
- "account_id": "string",
- "nua_client_id": "string",
- "user_id": "string",
- "id": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "scheduled": false,
- "completed": false,
- "stopped": false,
- "scheduled_at": "2019-08-24T14:15:22Z",
- "completed_at": "2019-08-24T14:15:22Z",
- "stopped_at": "2019-08-24T14:15:22Z",
- "failed": false,
- "retries": 0,
- "parameters": {
- "name": "",
- "on": 0,
- "filter": {
- "contains": [
- "string"
], - "resource_type": [
- "string"
], - "field_types": [
- "string"
], - "not_field_types": [
- "string"
], - "rids": [
- "string"
], - "fields": [
- "string"
], - "splits": [
- "string"
], - "labels": [
- "string"
], - "apply_to_agent_generated_fields": false
}, - "operations": [
- {
- "graph": {
- "entity_defs": [
- {
- "label": "string",
- "description": ""
}
], - "examples": [
- {
- "entities": [
- null
], - "relations": [
- null
], - "text": "string"
}
], - "ident": "string",
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}, - "label": {
- "labels": [
- {
- "label": "string",
- "description": "",
- "examples": [
- null
]
}
], - "ident": "string",
- "description": "",
- "multiple": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}, - "ask": {
- "question": "string",
- "destination": "string",
- "json": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
], - "user_prompt": ""
}, - "qa": {
- "question_generator_prompt": "",
- "system_question_generator_prompt": "",
- "summary_prompt": "",
- "generate_answers_prompt": "",
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}, - "extract": {
- "model": 0,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}, - "prompt_guard": {
- "enabled": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}, - "llama_guard": {
- "enabled": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}
}
], - "llm": {
- "user_keys": {
- "openai": {
- "key": "",
- "org": ""
}, - "azure_openai": {
- "key": "",
- "url": "",
- "deployment": "",
- "model": ""
}, - "palm": {
- "credentials": "string",
- "location": ""
}, - "anthropic": {
- "key": ""
}, - "claude3": {
- "key": ""
}, - "text_generation": {
- "model": ""
}, - "mistral": {
- "key": ""
}, - "azure_mistral": {
- "key": "",
- "url": ""
}, - "hf_llm": {
- "key": "",
- "url": "",
- "model": 0
}, - "hf_embedding": {
- "url": "",
- "key": "",
- "matryoshka": [
- 0
], - "similarity": "",
- "size": 0,
- "threshold": 0,
- "passage_prompt": "",
- "query_prompt": ""
}, - "azure_aii": {
- "key": "",
- "url": "",
- "model": ""
}
}, - "generative_model": "",
- "generative_provider": "",
- "generative_prompt_id": ""
}
}, - "log": "string",
- "cleanup_parent_task_id": "string"
}
], - "configs": [
- {
- "task": {
- "name": "string",
- "data_augmentation": false,
- "description": "string",
- "can_cleanup": false
}, - "kbid": "string",
- "account_id": "string",
- "account_type": "string",
- "nua_client_id": "string",
- "user_id": "string",
- "parameters": {
- "name": "",
- "on": 0,
- "filter": {
- "contains": [
- "string"
], - "resource_type": [
- "string"
], - "field_types": [
- "string"
], - "not_field_types": [
- "string"
], - "rids": [
- "string"
], - "fields": [
- "string"
], - "splits": [
- "string"
], - "labels": [
- "string"
], - "apply_to_agent_generated_fields": false
}, - "operations": [
- {
- "graph": {
- "entity_defs": [
- {
- "label": "string",
- "description": ""
}
], - "examples": [
- {
- "entities": [
- null
], - "relations": [
- null
], - "text": "string"
}
], - "ident": "string",
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}, - "label": {
- "labels": [
- {
- "label": "string",
- "description": "",
- "examples": [
- null
]
}
], - "ident": "string",
- "description": "",
- "multiple": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}, - "ask": {
- "question": "string",
- "destination": "string",
- "json": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
], - "user_prompt": ""
}, - "qa": {
- "question_generator_prompt": "",
- "system_question_generator_prompt": "",
- "summary_prompt": "",
- "generate_answers_prompt": "",
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}, - "extract": {
- "model": 0,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}, - "prompt_guard": {
- "enabled": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}, - "llama_guard": {
- "enabled": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}
}
], - "llm": {
- "user_keys": {
- "openai": {
- "key": "",
- "org": ""
}, - "azure_openai": {
- "key": "",
- "url": "",
- "deployment": "",
- "model": ""
}, - "palm": {
- "credentials": "string",
- "location": ""
}, - "anthropic": {
- "key": ""
}, - "claude3": {
- "key": ""
}, - "text_generation": {
- "model": ""
}, - "mistral": {
- "key": ""
}, - "azure_mistral": {
- "key": "",
- "url": ""
}, - "hf_llm": {
- "key": "",
- "url": "",
- "model": 0
}, - "hf_embedding": {
- "url": "",
- "key": "",
- "matryoshka": [
- 0
], - "similarity": "",
- "size": 0,
- "threshold": 0,
- "passage_prompt": "",
- "query_prompt": ""
}, - "azure_aii": {
- "key": "",
- "url": "",
- "model": ""
}
}, - "generative_model": "",
- "generative_provider": "",
- "generative_prompt_id": ""
}
}, - "id": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "defined_at": "2019-08-24T14:15:22Z",
- "enabled": true
}
], - "done": [
- {
- "task": {
- "name": "string",
- "data_augmentation": false,
- "description": "string",
- "can_cleanup": false
}, - "source": "nucliadb",
- "kbid": "string",
- "dataset_id": "string",
- "account_id": "string",
- "nua_client_id": "string",
- "user_id": "string",
- "id": "string",
- "timestamp": "2019-08-24T14:15:22Z",
- "scheduled": false,
- "completed": false,
- "stopped": false,
- "scheduled_at": "2019-08-24T14:15:22Z",
- "completed_at": "2019-08-24T14:15:22Z",
- "stopped_at": "2019-08-24T14:15:22Z",
- "failed": false,
- "retries": 0,
- "parameters": {
- "name": "",
- "on": 0,
- "filter": {
- "contains": [
- "string"
], - "resource_type": [
- "string"
], - "field_types": [
- "string"
], - "not_field_types": [
- "string"
], - "rids": [
- "string"
], - "fields": [
- "string"
], - "splits": [
- "string"
], - "labels": [
- "string"
], - "apply_to_agent_generated_fields": false
}, - "operations": [
- {
- "graph": {
- "entity_defs": [
- {
- "label": "string",
- "description": ""
}
], - "examples": [
- {
- "entities": [
- null
], - "relations": [
- null
], - "text": "string"
}
], - "ident": "string",
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}, - "label": {
- "labels": [
- {
- "label": "string",
- "description": "",
- "examples": [
- null
]
}
], - "ident": "string",
- "description": "",
- "multiple": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}, - "ask": {
- "question": "string",
- "destination": "string",
- "json": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
], - "user_prompt": ""
}, - "qa": {
- "question_generator_prompt": "",
- "system_question_generator_prompt": "",
- "summary_prompt": "",
- "generate_answers_prompt": "",
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}, - "extract": {
- "model": 0,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}, - "prompt_guard": {
- "enabled": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}, - "llama_guard": {
- "enabled": false,
- "triggers": [
- {
- "url": "",
- "headers": {
- "property1": null,
- "property2": null
}, - "params": {
- "property1": null,
- "property2": null
}
}
]
}
}
], - "llm": {
- "user_keys": {
- "openai": {
- "key": "",
- "org": ""
}, - "azure_openai": {
- "key": "",
- "url": "",
- "deployment": "",
- "model": ""
}, - "palm": {
- "credentials": "string",
- "location": ""
}, - "anthropic": {
- "key": ""
}, - "claude3": {
- "key": ""
}, - "text_generation": {
- "model": ""
}, - "mistral": {
- "key": ""
}, - "azure_mistral": {
- "key": "",
- "url": ""
}, - "hf_llm": {
- "key": "",
- "url": "",
- "model": 0
}, - "hf_embedding": {
- "url": "",
- "key": "",
- "matryoshka": [
- 0
], - "similarity": "",
- "size": 0,
- "threshold": 0,
- "passage_prompt": "",
- "query_prompt": ""
}, - "azure_aii": {
- "key": "",
- "url": "",
- "model": ""
}
}, - "generative_model": "",
- "generative_provider": "",
- "generative_prompt_id": ""
}
}, - "log": "string",
- "cleanup_parent_task_id": "string"
}
]
}
Learning Extract Strategies
Get available extract strategies onprem
path Parameters
kbid required | string (Kbid) |
Responses
Response samples
- 200
- 422
{- "property1": {
- "name": "",
- "vllm_config": {
- "rules": [
- "string"
], - "llm": {
- "user_keys": {
- "openai": {
- "key": "",
- "org": ""
}, - "azure_openai": {
- "key": "",
- "url": "",
- "deployment": "",
- "model": ""
}, - "palm": {
- "credentials": "string",
- "location": ""
}, - "anthropic": {
- "key": ""
}, - "claude3": {
- "key": ""
}, - "text_generation": {
- "model": ""
}, - "mistral": {
- "key": ""
}, - "azure_mistral": {
- "key": "",
- "url": ""
}, - "hf_llm": {
- "key": "",
- "url": "",
- "model": 0
}, - "hf_embedding": {
- "url": "",
- "key": "",
- "matryoshka": [
- 0
], - "similarity": "",
- "size": 0,
- "threshold": 0,
- "passage_prompt": "",
- "query_prompt": ""
}, - "azure_aii": {
- "key": "",
- "url": "",
- "model": ""
}
}, - "generative_model": "",
- "generative_provider": "",
- "generative_prompt_id": ""
}
}, - "ai_tables": {
- "llm": {
- "user_keys": {
- "openai": {
- "key": "",
- "org": ""
}, - "azure_openai": {
- "key": "",
- "url": "",
- "deployment": "",
- "model": ""
}, - "palm": {
- "credentials": "string",
- "location": ""
}, - "anthropic": {
- "key": ""
}, - "claude3": {
- "key": ""
}, - "text_generation": {
- "model": ""
}, - "mistral": {
- "key": ""
}, - "azure_mistral": {
- "key": "",
- "url": ""
}, - "hf_llm": {
- "key": "",
- "url": "",
- "model": 0
}, - "hf_embedding": {
- "url": "",
- "key": "",
- "matryoshka": [
- 0
], - "similarity": "",
- "size": 0,
- "threshold": 0,
- "passage_prompt": "",
- "query_prompt": ""
}, - "azure_aii": {
- "key": "",
- "url": "",
- "model": ""
}
}, - "generative_model": "",
- "generative_provider": "",
- "generative_prompt_id": ""
}, - "rules": [
- "string"
], - "merge_pages": false,
- "max_pages_to_merge": 0
}, - "split": {
- "max_paragraph": 0
}
}, - "property2": {
- "name": "",
- "vllm_config": {
- "rules": [
- "string"
], - "llm": {
- "user_keys": {
- "openai": {
- "key": "",
- "org": ""
}, - "azure_openai": {
- "key": "",
- "url": "",
- "deployment": "",
- "model": ""
}, - "palm": {
- "credentials": "string",
- "location": ""
}, - "anthropic": {
- "key": ""
}, - "claude3": {
- "key": ""
}, - "text_generation": {
- "model": ""
}, - "mistral": {
- "key": ""
}, - "azure_mistral": {
- "key": "",
- "url": ""
}, - "hf_llm": {
- "key": "",
- "url": "",
- "model": 0
}, - "hf_embedding": {
- "url": "",
- "key": "",
- "matryoshka": [
- 0
], - "similarity": "",
- "size": 0,
- "threshold": 0,
- "passage_prompt": "",
- "query_prompt": ""
}, - "azure_aii": {
- "key": "",
- "url": "",
- "model": ""
}
}, - "generative_model": "",
- "generative_provider": "",
- "generative_prompt_id": ""
}
}, - "ai_tables": {
- "llm": {
- "user_keys": {
- "openai": {
- "key": "",
- "org": ""
}, - "azure_openai": {
- "key": "",
- "url": "",
- "deployment": "",
- "model": ""
}, - "palm": {
- "credentials": "string",
- "location": ""
}, - "anthropic": {
- "key": ""
}, - "claude3": {
- "key": ""
}, - "text_generation": {
- "model": ""
}, - "mistral": {
- "key": ""
}, - "azure_mistral": {
- "key": "",
- "url": ""
}, - "hf_llm": {
- "key": "",
- "url": "",
- "model": 0
}, - "hf_embedding": {
- "url": "",
- "key": "",
- "matryoshka": [
- 0
], - "similarity": "",
- "size": 0,
- "threshold": 0,
- "passage_prompt": "",
- "query_prompt": ""
}, - "azure_aii": {
- "key": "",
- "url": "",
- "model": ""
}
}, - "generative_model": "",
- "generative_provider": "",
- "generative_prompt_id": ""
}, - "rules": [
- "string"
], - "merge_pages": false,
- "max_pages_to_merge": 0
}, - "split": {
- "max_paragraph": 0
}
}
}
Add A Extract Strategy To A Kb Onprem
Add a extract strategy to a KB to be used
path Parameters
kbid required | string (Kbid) |
Request Body schema: application/jsonrequired
name | string (Name) Default: "" |
VLLMExtractionConfig (object) or null | |
AITables (object) or null | |
SplitConfig (object) or null |
Responses
Request samples
- Payload
{- "name": "",
- "vllm_config": {
- "rules": [
- "string"
], - "llm": {
- "user_keys": {
- "openai": {
- "key": "",
- "org": ""
}, - "azure_openai": {
- "key": "",
- "url": "",
- "deployment": "",
- "model": ""
}, - "palm": {
- "credentials": "string",
- "location": ""
}, - "anthropic": {
- "key": ""
}, - "claude3": {
- "key": ""
}, - "text_generation": {
- "model": ""
}, - "mistral": {
- "key": ""
}, - "azure_mistral": {
- "key": "",
- "url": ""
}, - "hf_llm": {
- "key": "",
- "url": "",
- "model": 0
}, - "hf_embedding": {
- "url": "",
- "key": "",
- "matryoshka": [
- 0
], - "similarity": "",
- "size": 0,
- "threshold": 0,
- "passage_prompt": "",
- "query_prompt": ""
}, - "azure_aii": {
- "key": "",
- "url": "",
- "model": ""
}
}, - "generative_model": "",
- "generative_provider": "",
- "generative_prompt_id": ""
}
}, - "ai_tables": {
- "llm": {
- "user_keys": {
- "openai": {
- "key": "",
- "org": ""
}, - "azure_openai": {
- "key": "",
- "url": "",
- "deployment": "",
- "model": ""
}, - "palm": {
- "credentials": "string",
- "location": ""
}, - "anthropic": {
- "key": ""
}, - "claude3": {
- "key": ""
}, - "text_generation": {
- "model": ""
}, - "mistral": {
- "key": ""
}, - "azure_mistral": {
- "key": "",
- "url": ""
}, - "hf_llm": {
- "key": "",
- "url": "",
- "model": 0
}, - "hf_embedding": {
- "url": "",
- "key": "",
- "matryoshka": [
- 0
], - "similarity": "",
- "size": 0,
- "threshold": 0,
- "passage_prompt": "",
- "query_prompt": ""
}, - "azure_aii": {
- "key": "",
- "url": "",
- "model": ""
}
}, - "generative_model": "",
- "generative_provider": "",
- "generative_prompt_id": ""
}, - "rules": [
- "string"
], - "merge_pages": false,
- "max_pages_to_merge": 0
}, - "split": {
- "max_paragraph": 0
}
}
Response samples
- 200
- 422
"string"
Extract Strategy Configuration
Get extract strategy for a given id
path Parameters
kbid required | string (Kbid) |
strategy_id required | string (Strategy Id) |
Responses
Response samples
- 200
- 422
{- "name": "",
- "vllm_config": {
- "rules": [
- "string"
], - "llm": {
- "user_keys": {
- "openai": {
- "key": "",
- "org": ""
}, - "azure_openai": {
- "key": "",
- "url": "",
- "deployment": "",
- "model": ""
}, - "palm": {
- "credentials": "string",
- "location": ""
}, - "anthropic": {
- "key": ""
}, - "claude3": {
- "key": ""
}, - "text_generation": {
- "model": ""
}, - "mistral": {
- "key": ""
}, - "azure_mistral": {
- "key": "",
- "url": ""
}, - "hf_llm": {
- "key": "",
- "url": "",
- "model": 0
}, - "hf_embedding": {
- "url": "",
- "key": "",
- "matryoshka": [
- 0
], - "similarity": "",
- "size": 0,
- "threshold": 0,
- "passage_prompt": "",
- "query_prompt": ""
}, - "azure_aii": {
- "key": "",
- "url": "",
- "model": ""
}
}, - "generative_model": "",
- "generative_provider": "",
- "generative_prompt_id": ""
}
}, - "ai_tables": {
- "llm": {
- "user_keys": {
- "openai": {
- "key": "",
- "org": ""
}, - "azure_openai": {
- "key": "",
- "url": "",
- "deployment": "",
- "model": ""
}, - "palm": {
- "credentials": "string",
- "location": ""
}, - "anthropic": {
- "key": ""
}, - "claude3": {
- "key": ""
}, - "text_generation": {
- "model": ""
}, - "mistral": {
- "key": ""
}, - "azure_mistral": {
- "key": "",
- "url": ""
}, - "hf_llm": {
- "key": "",
- "url": "",
- "model": 0
}, - "hf_embedding": {
- "url": "",
- "key": "",
- "matryoshka": [
- 0
], - "similarity": "",
- "size": 0,
- "threshold": 0,
- "passage_prompt": "",
- "query_prompt": ""
}, - "azure_aii": {
- "key": "",
- "url": "",
- "model": ""
}
}, - "generative_model": "",
- "generative_provider": "",
- "generative_prompt_id": ""
}, - "rules": [
- "string"
], - "merge_pages": false,
- "max_pages_to_merge": 0
}, - "split": {
- "max_paragraph": 0
}
}