Create chunk tag filter extractor
import requests
url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/chunk-tag-filter-extractors/"
payload = {
"name": "Pricing & SLA chunks",
"brief": "Keep only chunks tagged with pricing or SLA topics.",
"filter": {
"tag_key": "topic",
"values": ["pricing", "sla"]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Pricing & SLA chunks',
brief: 'Keep only chunks tagged with pricing or SLA topics.',
filter: {tag_key: 'topic', values: ['pricing', 'sla']}
})
};
fetch('https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/chunk-tag-filter-extractors/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/chunk-tag-filter-extractors/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Pricing & SLA chunks",
"brief": "Keep only chunks tagged with pricing or SLA topics.",
"filter": {
"tag_key": "topic",
"values": [
"pricing",
"sla"
]
}
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Pricing & SLA chunks",
"brief": "Keep only chunks tagged with pricing or SLA topics.",
"filter": {
"tag_key": "topic",
"values": [
"pricing",
"sla"
]
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"versions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"is_default": true,
"filter": {
"tag_key": "topic",
"values": [
"pricing",
"sla"
]
}
}
],
"default_version": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"is_default": true,
"filter": {
"tag_key": "topic",
"values": [
"pricing",
"sla"
]
}
},
"latest_version": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"is_default": true,
"filter": {
"tag_key": "topic",
"values": [
"pricing",
"sla"
]
}
}
}{
"error": "User not found"
}{
"error": "Authentication credentials were not provided."
}{
"error": "You do not have permission to perform this action."
}Chunk Tag Filter Extractors
Create chunk tag filter extractor
Create a ChunkTagFilterExtractor — restricts a downstream pipeline
branch to chunks carrying specific tags.
POST
/
projects
/
{project_id}
/
chunk-tag-filter-extractors
/
Create chunk tag filter extractor
import requests
url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/chunk-tag-filter-extractors/"
payload = {
"name": "Pricing & SLA chunks",
"brief": "Keep only chunks tagged with pricing or SLA topics.",
"filter": {
"tag_key": "topic",
"values": ["pricing", "sla"]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Pricing & SLA chunks',
brief: 'Keep only chunks tagged with pricing or SLA topics.',
filter: {tag_key: 'topic', values: ['pricing', 'sla']}
})
};
fetch('https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/chunk-tag-filter-extractors/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/chunk-tag-filter-extractors/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Pricing & SLA chunks",
"brief": "Keep only chunks tagged with pricing or SLA topics.",
"filter": {
"tag_key": "topic",
"values": [
"pricing",
"sla"
]
}
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Pricing & SLA chunks",
"brief": "Keep only chunks tagged with pricing or SLA topics.",
"filter": {
"tag_key": "topic",
"values": [
"pricing",
"sla"
]
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"versions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"is_default": true,
"filter": {
"tag_key": "topic",
"values": [
"pricing",
"sla"
]
}
}
],
"default_version": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"is_default": true,
"filter": {
"tag_key": "topic",
"values": [
"pricing",
"sla"
]
}
},
"latest_version": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"is_default": true,
"filter": {
"tag_key": "topic",
"values": [
"pricing",
"sla"
]
}
}
}{
"error": "User not found"
}{
"error": "Authentication credentials were not provided."
}{
"error": "You do not have permission to perform this action."
}Authorizations
BearerAuthTokenAuth
Use Authorization: Bearer
Path Parameters
UUID of the project
Body
application/json
Restricts a downstream pipeline branch to chunks carrying specific tags.
Response
Created
Restricts a downstream pipeline branch to chunks carrying specific tags.
Example:
"Pricing & SLA chunks"
Example:
"Keep only chunks tagged with pricing or SLA topics."
Example:
{ "tag_key": "topic", "values": ["pricing", "sla"] }
Show child attributes
Show child attributes
Immutable snapshot of a ChunkTagFilterExtractor's version-bearing configuration.
Show child attributes
Show child attributes
Immutable snapshot of a ChunkTagFilterExtractor's version-bearing configuration.
Show child attributes
Show child attributes