Update Knowledge Base V2
curl --request PATCH \
--url https://api.example.com/v1/knowledge-bases/{knowledge_base_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "<string>",
"description": "<string>",
"document_types": [
"<string>"
],
"error": {},
"summary": "<string>",
"summary_embedding": [
123
],
"needs_summary_update": true,
"settings_": {
"allowed_sources": [
"Document",
"Google Drive",
"OneDrive",
"Website"
],
"ingestion": {
"batch_size": 8,
"default_chunk_size": 1024,
"default_chunk_overlap": 256,
"enrich_chunks_mode": "inject_summary",
"enrich_pre_made_qa": false,
"methods": {
"application/csv": {
"auto_detect_delimiter": true,
"chunk_overlap": 256,
"chunk_size": 1024,
"encoding": "utf-8",
"enrich_chunks_mode": "inject_summary",
"extract_qa_pairs": false,
"include_headers": true,
"row_as_document": true,
"supported_mime_types": [
"text/csv",
"application/csv"
],
"type": "csv"
},
"application/pdf": {
"chunk_overlap": 256,
"chunk_size": 1024,
"enrich_chunks_mode": "inject_summary",
"extract_images": true,
"extract_qa_pairs": false,
"supported_mime_types": [
"application/pdf",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
"application/msword",
"application/vnd.ms-powerpoint"
],
"type": "pdf"
},
"default": {
"chunk_size": 1024,
"chunk_overlap": 256,
"enrich_chunks_mode": "inject_summary",
"extract_qa_pairs": false,
"type": "default",
"supported_mime_types": [
"text/plain",
"text/html",
"text/markdown",
"application/json",
"application/xml",
"text/xml",
"application/rtf"
]
},
"image/*": {
"supported_mime_types": [
"image/jpeg",
"image/png",
"image/tiff",
"image/bmp"
],
"type": "image"
},
"message/rfc822": {
"chunk_overlap": 256,
"chunk_size": 1024,
"enrich_chunks_mode": "inject_summary",
"extract_qa_pairs": false,
"extract_text_only": true,
"include_images": false,
"include_tables": true,
"supported_mime_types": [
"message/rfc822"
],
"type": "email"
},
"text/csv": {
"auto_detect_delimiter": true,
"chunk_overlap": 256,
"chunk_size": 1024,
"encoding": "utf-8",
"enrich_chunks_mode": "inject_summary",
"extract_qa_pairs": false,
"include_headers": true,
"row_as_document": true,
"supported_mime_types": [
"text/csv",
"application/csv"
],
"type": "csv"
},
"text/html": {
"chunk_overlap": 256,
"chunk_size": 1024,
"enrich_chunks_mode": "inject_summary",
"extract_qa_pairs": false,
"extract_text_only": true,
"include_images": false,
"include_tables": true,
"supported_mime_types": [
"text/html"
],
"type": "html"
},
"text/plain": {
"chunk_overlap": 256,
"chunk_size": 1024,
"chunking": true,
"enrich_chunks_mode": "inject_summary",
"extract_qa_pairs": false,
"preserve_formatting": true,
"supported_mime_types": [
"text/plain",
"text/html",
"text/markdown",
"application/json",
"application/xml",
"text/xml",
"application/rtf"
],
"type": "text"
}
}
},
"retrieval": {
"type": "hybrid_reranking",
"hybrid_settings": {
"fts_weight": 0.7,
"full_text_search": {
"top_k": 25,
"type": "full_text_search"
},
"semantic_search": {
"sets_threshold": false,
"threshold": 0,
"top_k": 25,
"type": "semantic"
},
"semantic_weight": 0.3,
"threshold": 0,
"type": "hybrid_relative_score"
},
"reranker_settings": {
"model_name": "semantic-ranker-512@latest",
"ranking_config": "default_ranking_config",
"sets_threshold": false,
"threshold": 0,
"top_k": 10,
"type": "vertex"
}
},
"embeddings": {
"text_model": "vertexai/text-multilingual-embedding-002",
"mm_model": "vertexai/multimodalembedding@001"
}
},
"version": "<string>",
"meta": {}
}
'import requests
url = "https://api.example.com/v1/knowledge-bases/{knowledge_base_id}"
payload = {
"name": "<string>",
"description": "<string>",
"document_types": ["<string>"],
"error": {},
"summary": "<string>",
"summary_embedding": [123],
"needs_summary_update": True,
"settings_": {
"allowed_sources": ["Document", "Google Drive", "OneDrive", "Website"],
"ingestion": {
"batch_size": 8,
"default_chunk_size": 1024,
"default_chunk_overlap": 256,
"enrich_chunks_mode": "inject_summary",
"enrich_pre_made_qa": False,
"methods": {
"application/csv": {
"auto_detect_delimiter": True,
"chunk_overlap": 256,
"chunk_size": 1024,
"encoding": "utf-8",
"enrich_chunks_mode": "inject_summary",
"extract_qa_pairs": False,
"include_headers": True,
"row_as_document": True,
"supported_mime_types": ["text/csv", "application/csv"],
"type": "csv"
},
"application/pdf": {
"chunk_overlap": 256,
"chunk_size": 1024,
"enrich_chunks_mode": "inject_summary",
"extract_images": True,
"extract_qa_pairs": False,
"supported_mime_types": ["application/pdf", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "application/msword", "application/vnd.ms-powerpoint"],
"type": "pdf"
},
"default": {
"chunk_size": 1024,
"chunk_overlap": 256,
"enrich_chunks_mode": "inject_summary",
"extract_qa_pairs": False,
"type": "default",
"supported_mime_types": ["text/plain", "text/html", "text/markdown", "application/json", "application/xml", "text/xml", "application/rtf"]
},
"image/*": {
"supported_mime_types": ["image/jpeg", "image/png", "image/tiff", "image/bmp"],
"type": "image"
},
"message/rfc822": {
"chunk_overlap": 256,
"chunk_size": 1024,
"enrich_chunks_mode": "inject_summary",
"extract_qa_pairs": False,
"extract_text_only": True,
"include_images": False,
"include_tables": True,
"supported_mime_types": ["message/rfc822"],
"type": "email"
},
"text/csv": {
"auto_detect_delimiter": True,
"chunk_overlap": 256,
"chunk_size": 1024,
"encoding": "utf-8",
"enrich_chunks_mode": "inject_summary",
"extract_qa_pairs": False,
"include_headers": True,
"row_as_document": True,
"supported_mime_types": ["text/csv", "application/csv"],
"type": "csv"
},
"text/html": {
"chunk_overlap": 256,
"chunk_size": 1024,
"enrich_chunks_mode": "inject_summary",
"extract_qa_pairs": False,
"extract_text_only": True,
"include_images": False,
"include_tables": True,
"supported_mime_types": ["text/html"],
"type": "html"
},
"text/plain": {
"chunk_overlap": 256,
"chunk_size": 1024,
"chunking": True,
"enrich_chunks_mode": "inject_summary",
"extract_qa_pairs": False,
"preserve_formatting": True,
"supported_mime_types": ["text/plain", "text/html", "text/markdown", "application/json", "application/xml", "text/xml", "application/rtf"],
"type": "text"
}
}
},
"retrieval": {
"type": "hybrid_reranking",
"hybrid_settings": {
"fts_weight": 0.7,
"full_text_search": {
"top_k": 25,
"type": "full_text_search"
},
"semantic_search": {
"sets_threshold": False,
"threshold": 0,
"top_k": 25,
"type": "semantic"
},
"semantic_weight": 0.3,
"threshold": 0,
"type": "hybrid_relative_score"
},
"reranker_settings": {
"model_name": "semantic-ranker-512@latest",
"ranking_config": "default_ranking_config",
"sets_threshold": False,
"threshold": 0,
"top_k": 10,
"type": "vertex"
}
},
"embeddings": {
"text_model": "vertexai/text-multilingual-embedding-002",
"mm_model": "vertexai/multimodalembedding@001"
}
},
"version": "<string>",
"meta": {}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
document_types: ['<string>'],
error: {},
summary: '<string>',
summary_embedding: [123],
needs_summary_update: true,
settings_: {
allowed_sources: ['Document', 'Google Drive', 'OneDrive', 'Website'],
ingestion: {
batch_size: 8,
default_chunk_size: 1024,
default_chunk_overlap: 256,
enrich_chunks_mode: 'inject_summary',
enrich_pre_made_qa: false,
methods: {
'application/csv': {
auto_detect_delimiter: true,
chunk_overlap: 256,
chunk_size: 1024,
encoding: 'utf-8',
enrich_chunks_mode: 'inject_summary',
extract_qa_pairs: false,
include_headers: true,
row_as_document: true,
supported_mime_types: ['text/csv', 'application/csv'],
type: 'csv'
},
'application/pdf': {
chunk_overlap: 256,
chunk_size: 1024,
enrich_chunks_mode: 'inject_summary',
extract_images: true,
extract_qa_pairs: false,
supported_mime_types: [
'application/pdf',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
'application/msword',
'application/vnd.ms-powerpoint'
],
type: 'pdf'
},
default: {
chunk_size: 1024,
chunk_overlap: 256,
enrich_chunks_mode: 'inject_summary',
extract_qa_pairs: false,
type: 'default',
supported_mime_types: [
'text/plain',
'text/html',
'text/markdown',
'application/json',
'application/xml',
'text/xml',
'application/rtf'
]
},
'image/*': {
supported_mime_types: ['image/jpeg', 'image/png', 'image/tiff', 'image/bmp'],
type: 'image'
},
'message/rfc822': {
chunk_overlap: 256,
chunk_size: 1024,
enrich_chunks_mode: 'inject_summary',
extract_qa_pairs: false,
extract_text_only: true,
include_images: false,
include_tables: true,
supported_mime_types: ['message/rfc822'],
type: 'email'
},
'text/csv': {
auto_detect_delimiter: true,
chunk_overlap: 256,
chunk_size: 1024,
encoding: 'utf-8',
enrich_chunks_mode: 'inject_summary',
extract_qa_pairs: false,
include_headers: true,
row_as_document: true,
supported_mime_types: ['text/csv', 'application/csv'],
type: 'csv'
},
'text/html': {
chunk_overlap: 256,
chunk_size: 1024,
enrich_chunks_mode: 'inject_summary',
extract_qa_pairs: false,
extract_text_only: true,
include_images: false,
include_tables: true,
supported_mime_types: ['text/html'],
type: 'html'
},
'text/plain': {
chunk_overlap: 256,
chunk_size: 1024,
chunking: true,
enrich_chunks_mode: 'inject_summary',
extract_qa_pairs: false,
preserve_formatting: true,
supported_mime_types: [
'text/plain',
'text/html',
'text/markdown',
'application/json',
'application/xml',
'text/xml',
'application/rtf'
],
type: 'text'
}
}
},
retrieval: {
type: 'hybrid_reranking',
hybrid_settings: {
fts_weight: 0.7,
full_text_search: {top_k: 25, type: 'full_text_search'},
semantic_search: {sets_threshold: false, threshold: 0, top_k: 25, type: 'semantic'},
semantic_weight: 0.3,
threshold: 0,
type: 'hybrid_relative_score'
},
reranker_settings: {
model_name: 'semantic-ranker-512@latest',
ranking_config: 'default_ranking_config',
sets_threshold: false,
threshold: 0,
top_k: 10,
type: 'vertex'
}
},
embeddings: {
text_model: 'vertexai/text-multilingual-embedding-002',
mm_model: 'vertexai/multimodalembedding@001'
}
},
version: '<string>',
meta: {}
})
};
fetch('https://api.example.com/v1/knowledge-bases/{knowledge_base_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/knowledge-bases/{knowledge_base_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'document_types' => [
'<string>'
],
'error' => [
],
'summary' => '<string>',
'summary_embedding' => [
123
],
'needs_summary_update' => true,
'settings_' => [
'allowed_sources' => [
'Document',
'Google Drive',
'OneDrive',
'Website'
],
'ingestion' => [
'batch_size' => 8,
'default_chunk_size' => 1024,
'default_chunk_overlap' => 256,
'enrich_chunks_mode' => 'inject_summary',
'enrich_pre_made_qa' => false,
'methods' => [
'application/csv' => [
'auto_detect_delimiter' => true,
'chunk_overlap' => 256,
'chunk_size' => 1024,
'encoding' => 'utf-8',
'enrich_chunks_mode' => 'inject_summary',
'extract_qa_pairs' => false,
'include_headers' => true,
'row_as_document' => true,
'supported_mime_types' => [
'text/csv',
'application/csv'
],
'type' => 'csv'
],
'application/pdf' => [
'chunk_overlap' => 256,
'chunk_size' => 1024,
'enrich_chunks_mode' => 'inject_summary',
'extract_images' => true,
'extract_qa_pairs' => false,
'supported_mime_types' => [
'application/pdf',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
'application/msword',
'application/vnd.ms-powerpoint'
],
'type' => 'pdf'
],
'default' => [
'chunk_size' => 1024,
'chunk_overlap' => 256,
'enrich_chunks_mode' => 'inject_summary',
'extract_qa_pairs' => false,
'type' => 'default',
'supported_mime_types' => [
'text/plain',
'text/html',
'text/markdown',
'application/json',
'application/xml',
'text/xml',
'application/rtf'
]
],
'image/*' => [
'supported_mime_types' => [
'image/jpeg',
'image/png',
'image/tiff',
'image/bmp'
],
'type' => 'image'
],
'message/rfc822' => [
'chunk_overlap' => 256,
'chunk_size' => 1024,
'enrich_chunks_mode' => 'inject_summary',
'extract_qa_pairs' => false,
'extract_text_only' => true,
'include_images' => false,
'include_tables' => true,
'supported_mime_types' => [
'message/rfc822'
],
'type' => 'email'
],
'text/csv' => [
'auto_detect_delimiter' => true,
'chunk_overlap' => 256,
'chunk_size' => 1024,
'encoding' => 'utf-8',
'enrich_chunks_mode' => 'inject_summary',
'extract_qa_pairs' => false,
'include_headers' => true,
'row_as_document' => true,
'supported_mime_types' => [
'text/csv',
'application/csv'
],
'type' => 'csv'
],
'text/html' => [
'chunk_overlap' => 256,
'chunk_size' => 1024,
'enrich_chunks_mode' => 'inject_summary',
'extract_qa_pairs' => false,
'extract_text_only' => true,
'include_images' => false,
'include_tables' => true,
'supported_mime_types' => [
'text/html'
],
'type' => 'html'
],
'text/plain' => [
'chunk_overlap' => 256,
'chunk_size' => 1024,
'chunking' => true,
'enrich_chunks_mode' => 'inject_summary',
'extract_qa_pairs' => false,
'preserve_formatting' => true,
'supported_mime_types' => [
'text/plain',
'text/html',
'text/markdown',
'application/json',
'application/xml',
'text/xml',
'application/rtf'
],
'type' => 'text'
]
]
],
'retrieval' => [
'type' => 'hybrid_reranking',
'hybrid_settings' => [
'fts_weight' => 0.7,
'full_text_search' => [
'top_k' => 25,
'type' => 'full_text_search'
],
'semantic_search' => [
'sets_threshold' => false,
'threshold' => 0,
'top_k' => 25,
'type' => 'semantic'
],
'semantic_weight' => 0.3,
'threshold' => 0,
'type' => 'hybrid_relative_score'
],
'reranker_settings' => [
'model_name' => 'semantic-ranker-512@latest',
'ranking_config' => 'default_ranking_config',
'sets_threshold' => false,
'threshold' => 0,
'top_k' => 10,
'type' => 'vertex'
]
],
'embeddings' => [
'text_model' => 'vertexai/text-multilingual-embedding-002',
'mm_model' => 'vertexai/multimodalembedding@001'
]
],
'version' => '<string>',
'meta' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/knowledge-bases/{knowledge_base_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"document_types\": [\n \"<string>\"\n ],\n \"error\": {},\n \"summary\": \"<string>\",\n \"summary_embedding\": [\n 123\n ],\n \"needs_summary_update\": true,\n \"settings_\": {\n \"allowed_sources\": [\n \"Document\",\n \"Google Drive\",\n \"OneDrive\",\n \"Website\"\n ],\n \"ingestion\": {\n \"batch_size\": 8,\n \"default_chunk_size\": 1024,\n \"default_chunk_overlap\": 256,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"enrich_pre_made_qa\": false,\n \"methods\": {\n \"application/csv\": {\n \"auto_detect_delimiter\": true,\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"encoding\": \"utf-8\",\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"include_headers\": true,\n \"row_as_document\": true,\n \"supported_mime_types\": [\n \"text/csv\",\n \"application/csv\"\n ],\n \"type\": \"csv\"\n },\n \"application/pdf\": {\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_images\": true,\n \"extract_qa_pairs\": false,\n \"supported_mime_types\": [\n \"application/pdf\",\n \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n \"application/vnd.openxmlformats-officedocument.presentationml.presentation\",\n \"application/msword\",\n \"application/vnd.ms-powerpoint\"\n ],\n \"type\": \"pdf\"\n },\n \"default\": {\n \"chunk_size\": 1024,\n \"chunk_overlap\": 256,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"type\": \"default\",\n \"supported_mime_types\": [\n \"text/plain\",\n \"text/html\",\n \"text/markdown\",\n \"application/json\",\n \"application/xml\",\n \"text/xml\",\n \"application/rtf\"\n ]\n },\n \"image/*\": {\n \"supported_mime_types\": [\n \"image/jpeg\",\n \"image/png\",\n \"image/tiff\",\n \"image/bmp\"\n ],\n \"type\": \"image\"\n },\n \"message/rfc822\": {\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"extract_text_only\": true,\n \"include_images\": false,\n \"include_tables\": true,\n \"supported_mime_types\": [\n \"message/rfc822\"\n ],\n \"type\": \"email\"\n },\n \"text/csv\": {\n \"auto_detect_delimiter\": true,\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"encoding\": \"utf-8\",\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"include_headers\": true,\n \"row_as_document\": true,\n \"supported_mime_types\": [\n \"text/csv\",\n \"application/csv\"\n ],\n \"type\": \"csv\"\n },\n \"text/html\": {\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"extract_text_only\": true,\n \"include_images\": false,\n \"include_tables\": true,\n \"supported_mime_types\": [\n \"text/html\"\n ],\n \"type\": \"html\"\n },\n \"text/plain\": {\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"chunking\": true,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"preserve_formatting\": true,\n \"supported_mime_types\": [\n \"text/plain\",\n \"text/html\",\n \"text/markdown\",\n \"application/json\",\n \"application/xml\",\n \"text/xml\",\n \"application/rtf\"\n ],\n \"type\": \"text\"\n }\n }\n },\n \"retrieval\": {\n \"type\": \"hybrid_reranking\",\n \"hybrid_settings\": {\n \"fts_weight\": 0.7,\n \"full_text_search\": {\n \"top_k\": 25,\n \"type\": \"full_text_search\"\n },\n \"semantic_search\": {\n \"sets_threshold\": false,\n \"threshold\": 0,\n \"top_k\": 25,\n \"type\": \"semantic\"\n },\n \"semantic_weight\": 0.3,\n \"threshold\": 0,\n \"type\": \"hybrid_relative_score\"\n },\n \"reranker_settings\": {\n \"model_name\": \"semantic-ranker-512@latest\",\n \"ranking_config\": \"default_ranking_config\",\n \"sets_threshold\": false,\n \"threshold\": 0,\n \"top_k\": 10,\n \"type\": \"vertex\"\n }\n },\n \"embeddings\": {\n \"text_model\": \"vertexai/text-multilingual-embedding-002\",\n \"mm_model\": \"vertexai/multimodalembedding@001\"\n }\n },\n \"version\": \"<string>\",\n \"meta\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.example.com/v1/knowledge-bases/{knowledge_base_id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"document_types\": [\n \"<string>\"\n ],\n \"error\": {},\n \"summary\": \"<string>\",\n \"summary_embedding\": [\n 123\n ],\n \"needs_summary_update\": true,\n \"settings_\": {\n \"allowed_sources\": [\n \"Document\",\n \"Google Drive\",\n \"OneDrive\",\n \"Website\"\n ],\n \"ingestion\": {\n \"batch_size\": 8,\n \"default_chunk_size\": 1024,\n \"default_chunk_overlap\": 256,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"enrich_pre_made_qa\": false,\n \"methods\": {\n \"application/csv\": {\n \"auto_detect_delimiter\": true,\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"encoding\": \"utf-8\",\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"include_headers\": true,\n \"row_as_document\": true,\n \"supported_mime_types\": [\n \"text/csv\",\n \"application/csv\"\n ],\n \"type\": \"csv\"\n },\n \"application/pdf\": {\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_images\": true,\n \"extract_qa_pairs\": false,\n \"supported_mime_types\": [\n \"application/pdf\",\n \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n \"application/vnd.openxmlformats-officedocument.presentationml.presentation\",\n \"application/msword\",\n \"application/vnd.ms-powerpoint\"\n ],\n \"type\": \"pdf\"\n },\n \"default\": {\n \"chunk_size\": 1024,\n \"chunk_overlap\": 256,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"type\": \"default\",\n \"supported_mime_types\": [\n \"text/plain\",\n \"text/html\",\n \"text/markdown\",\n \"application/json\",\n \"application/xml\",\n \"text/xml\",\n \"application/rtf\"\n ]\n },\n \"image/*\": {\n \"supported_mime_types\": [\n \"image/jpeg\",\n \"image/png\",\n \"image/tiff\",\n \"image/bmp\"\n ],\n \"type\": \"image\"\n },\n \"message/rfc822\": {\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"extract_text_only\": true,\n \"include_images\": false,\n \"include_tables\": true,\n \"supported_mime_types\": [\n \"message/rfc822\"\n ],\n \"type\": \"email\"\n },\n \"text/csv\": {\n \"auto_detect_delimiter\": true,\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"encoding\": \"utf-8\",\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"include_headers\": true,\n \"row_as_document\": true,\n \"supported_mime_types\": [\n \"text/csv\",\n \"application/csv\"\n ],\n \"type\": \"csv\"\n },\n \"text/html\": {\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"extract_text_only\": true,\n \"include_images\": false,\n \"include_tables\": true,\n \"supported_mime_types\": [\n \"text/html\"\n ],\n \"type\": \"html\"\n },\n \"text/plain\": {\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"chunking\": true,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"preserve_formatting\": true,\n \"supported_mime_types\": [\n \"text/plain\",\n \"text/html\",\n \"text/markdown\",\n \"application/json\",\n \"application/xml\",\n \"text/xml\",\n \"application/rtf\"\n ],\n \"type\": \"text\"\n }\n }\n },\n \"retrieval\": {\n \"type\": \"hybrid_reranking\",\n \"hybrid_settings\": {\n \"fts_weight\": 0.7,\n \"full_text_search\": {\n \"top_k\": 25,\n \"type\": \"full_text_search\"\n },\n \"semantic_search\": {\n \"sets_threshold\": false,\n \"threshold\": 0,\n \"top_k\": 25,\n \"type\": \"semantic\"\n },\n \"semantic_weight\": 0.3,\n \"threshold\": 0,\n \"type\": \"hybrid_relative_score\"\n },\n \"reranker_settings\": {\n \"model_name\": \"semantic-ranker-512@latest\",\n \"ranking_config\": \"default_ranking_config\",\n \"sets_threshold\": false,\n \"threshold\": 0,\n \"top_k\": 10,\n \"type\": \"vertex\"\n }\n },\n \"embeddings\": {\n \"text_model\": \"vertexai/text-multilingual-embedding-002\",\n \"mm_model\": \"vertexai/multimodalembedding@001\"\n }\n },\n \"version\": \"<string>\",\n \"meta\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/knowledge-bases/{knowledge_base_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"document_types\": [\n \"<string>\"\n ],\n \"error\": {},\n \"summary\": \"<string>\",\n \"summary_embedding\": [\n 123\n ],\n \"needs_summary_update\": true,\n \"settings_\": {\n \"allowed_sources\": [\n \"Document\",\n \"Google Drive\",\n \"OneDrive\",\n \"Website\"\n ],\n \"ingestion\": {\n \"batch_size\": 8,\n \"default_chunk_size\": 1024,\n \"default_chunk_overlap\": 256,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"enrich_pre_made_qa\": false,\n \"methods\": {\n \"application/csv\": {\n \"auto_detect_delimiter\": true,\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"encoding\": \"utf-8\",\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"include_headers\": true,\n \"row_as_document\": true,\n \"supported_mime_types\": [\n \"text/csv\",\n \"application/csv\"\n ],\n \"type\": \"csv\"\n },\n \"application/pdf\": {\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_images\": true,\n \"extract_qa_pairs\": false,\n \"supported_mime_types\": [\n \"application/pdf\",\n \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n \"application/vnd.openxmlformats-officedocument.presentationml.presentation\",\n \"application/msword\",\n \"application/vnd.ms-powerpoint\"\n ],\n \"type\": \"pdf\"\n },\n \"default\": {\n \"chunk_size\": 1024,\n \"chunk_overlap\": 256,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"type\": \"default\",\n \"supported_mime_types\": [\n \"text/plain\",\n \"text/html\",\n \"text/markdown\",\n \"application/json\",\n \"application/xml\",\n \"text/xml\",\n \"application/rtf\"\n ]\n },\n \"image/*\": {\n \"supported_mime_types\": [\n \"image/jpeg\",\n \"image/png\",\n \"image/tiff\",\n \"image/bmp\"\n ],\n \"type\": \"image\"\n },\n \"message/rfc822\": {\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"extract_text_only\": true,\n \"include_images\": false,\n \"include_tables\": true,\n \"supported_mime_types\": [\n \"message/rfc822\"\n ],\n \"type\": \"email\"\n },\n \"text/csv\": {\n \"auto_detect_delimiter\": true,\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"encoding\": \"utf-8\",\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"include_headers\": true,\n \"row_as_document\": true,\n \"supported_mime_types\": [\n \"text/csv\",\n \"application/csv\"\n ],\n \"type\": \"csv\"\n },\n \"text/html\": {\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"extract_text_only\": true,\n \"include_images\": false,\n \"include_tables\": true,\n \"supported_mime_types\": [\n \"text/html\"\n ],\n \"type\": \"html\"\n },\n \"text/plain\": {\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"chunking\": true,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"preserve_formatting\": true,\n \"supported_mime_types\": [\n \"text/plain\",\n \"text/html\",\n \"text/markdown\",\n \"application/json\",\n \"application/xml\",\n \"text/xml\",\n \"application/rtf\"\n ],\n \"type\": \"text\"\n }\n }\n },\n \"retrieval\": {\n \"type\": \"hybrid_reranking\",\n \"hybrid_settings\": {\n \"fts_weight\": 0.7,\n \"full_text_search\": {\n \"top_k\": 25,\n \"type\": \"full_text_search\"\n },\n \"semantic_search\": {\n \"sets_threshold\": false,\n \"threshold\": 0,\n \"top_k\": 25,\n \"type\": \"semantic\"\n },\n \"semantic_weight\": 0.3,\n \"threshold\": 0,\n \"type\": \"hybrid_relative_score\"\n },\n \"reranker_settings\": {\n \"model_name\": \"semantic-ranker-512@latest\",\n \"ranking_config\": \"default_ranking_config\",\n \"sets_threshold\": false,\n \"threshold\": 0,\n \"top_k\": 10,\n \"type\": \"vertex\"\n }\n },\n \"embeddings\": {\n \"text_model\": \"vertexai/text-multilingual-embedding-002\",\n \"mm_model\": \"vertexai/multimodalembedding@001\"\n }\n },\n \"version\": \"<string>\",\n \"meta\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"document_types": [
"<string>"
],
"size": 123,
"num_docs": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"error": {},
"total_documents": 123,
"training_documents": 123,
"trained_documents": 123,
"error_documents": 123,
"uploaded_documents": 123,
"source_types": {},
"training_source_types": [],
"meta": {},
"settings_": {
"retrieval_info": "",
"retrieval_method": "hybrid_relative_score",
"retrieval_top_k": 25,
"fts_weight": 0.7,
"semantic_weight": 0.3,
"rrf_k": 60,
"threshold_enabled": false,
"threshold": 0,
"reranker_type": "vertex",
"reranker_top_k": 10,
"reranker_threshold_enabled": false,
"reranker_threshold": 0,
"vertex_model": "semantic-ranker-512@latest",
"ingestion_info": "",
"embedding_model": [
"vertexai/text-multilingual-embedding-002"
],
"mm_embedding_model": [
"vertexai/multimodalembedding"
],
"batch_size": 8,
"default_chunk_size": 2048,
"default_chunk_overlap": 512,
"enrich_chunks_mode": "inject_summary",
"enrich_pre_made_qa": false,
"pdf_info": "",
"pdf_extract_images": true,
"pdf_chunk_size": 1024,
"pdf_chunk_overlap": 256,
"pdf_ocr_enabled": false,
"pdf_ocr_confidence": 0.7,
"pdf_ocr_language": "auto",
"text_info": "",
"text_chunking_enabled": true,
"text_chunk_size": 1024,
"text_chunk_overlap": 256,
"text_preserve_formatting": true,
"html_info": "",
"html_extract_text_only": true,
"html_include_tables": true,
"html_include_images": false,
"image_info": "",
"image_ocr_enabled": false,
"image_ocr_confidence": 0.7,
"csv_row_as_document": true,
"csv_include_headers": true,
"csv_auto_detect_delimiter": true,
"csv_delimiter": ",",
"csv_encoding": "utf-8"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Knowledge Base
Update Knowledge Base
Update a knowledge base
PATCH
/
v1
/
knowledge-bases
/
{knowledge_base_id}
Update Knowledge Base V2
curl --request PATCH \
--url https://api.example.com/v1/knowledge-bases/{knowledge_base_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "<string>",
"description": "<string>",
"document_types": [
"<string>"
],
"error": {},
"summary": "<string>",
"summary_embedding": [
123
],
"needs_summary_update": true,
"settings_": {
"allowed_sources": [
"Document",
"Google Drive",
"OneDrive",
"Website"
],
"ingestion": {
"batch_size": 8,
"default_chunk_size": 1024,
"default_chunk_overlap": 256,
"enrich_chunks_mode": "inject_summary",
"enrich_pre_made_qa": false,
"methods": {
"application/csv": {
"auto_detect_delimiter": true,
"chunk_overlap": 256,
"chunk_size": 1024,
"encoding": "utf-8",
"enrich_chunks_mode": "inject_summary",
"extract_qa_pairs": false,
"include_headers": true,
"row_as_document": true,
"supported_mime_types": [
"text/csv",
"application/csv"
],
"type": "csv"
},
"application/pdf": {
"chunk_overlap": 256,
"chunk_size": 1024,
"enrich_chunks_mode": "inject_summary",
"extract_images": true,
"extract_qa_pairs": false,
"supported_mime_types": [
"application/pdf",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
"application/msword",
"application/vnd.ms-powerpoint"
],
"type": "pdf"
},
"default": {
"chunk_size": 1024,
"chunk_overlap": 256,
"enrich_chunks_mode": "inject_summary",
"extract_qa_pairs": false,
"type": "default",
"supported_mime_types": [
"text/plain",
"text/html",
"text/markdown",
"application/json",
"application/xml",
"text/xml",
"application/rtf"
]
},
"image/*": {
"supported_mime_types": [
"image/jpeg",
"image/png",
"image/tiff",
"image/bmp"
],
"type": "image"
},
"message/rfc822": {
"chunk_overlap": 256,
"chunk_size": 1024,
"enrich_chunks_mode": "inject_summary",
"extract_qa_pairs": false,
"extract_text_only": true,
"include_images": false,
"include_tables": true,
"supported_mime_types": [
"message/rfc822"
],
"type": "email"
},
"text/csv": {
"auto_detect_delimiter": true,
"chunk_overlap": 256,
"chunk_size": 1024,
"encoding": "utf-8",
"enrich_chunks_mode": "inject_summary",
"extract_qa_pairs": false,
"include_headers": true,
"row_as_document": true,
"supported_mime_types": [
"text/csv",
"application/csv"
],
"type": "csv"
},
"text/html": {
"chunk_overlap": 256,
"chunk_size": 1024,
"enrich_chunks_mode": "inject_summary",
"extract_qa_pairs": false,
"extract_text_only": true,
"include_images": false,
"include_tables": true,
"supported_mime_types": [
"text/html"
],
"type": "html"
},
"text/plain": {
"chunk_overlap": 256,
"chunk_size": 1024,
"chunking": true,
"enrich_chunks_mode": "inject_summary",
"extract_qa_pairs": false,
"preserve_formatting": true,
"supported_mime_types": [
"text/plain",
"text/html",
"text/markdown",
"application/json",
"application/xml",
"text/xml",
"application/rtf"
],
"type": "text"
}
}
},
"retrieval": {
"type": "hybrid_reranking",
"hybrid_settings": {
"fts_weight": 0.7,
"full_text_search": {
"top_k": 25,
"type": "full_text_search"
},
"semantic_search": {
"sets_threshold": false,
"threshold": 0,
"top_k": 25,
"type": "semantic"
},
"semantic_weight": 0.3,
"threshold": 0,
"type": "hybrid_relative_score"
},
"reranker_settings": {
"model_name": "semantic-ranker-512@latest",
"ranking_config": "default_ranking_config",
"sets_threshold": false,
"threshold": 0,
"top_k": 10,
"type": "vertex"
}
},
"embeddings": {
"text_model": "vertexai/text-multilingual-embedding-002",
"mm_model": "vertexai/multimodalembedding@001"
}
},
"version": "<string>",
"meta": {}
}
'import requests
url = "https://api.example.com/v1/knowledge-bases/{knowledge_base_id}"
payload = {
"name": "<string>",
"description": "<string>",
"document_types": ["<string>"],
"error": {},
"summary": "<string>",
"summary_embedding": [123],
"needs_summary_update": True,
"settings_": {
"allowed_sources": ["Document", "Google Drive", "OneDrive", "Website"],
"ingestion": {
"batch_size": 8,
"default_chunk_size": 1024,
"default_chunk_overlap": 256,
"enrich_chunks_mode": "inject_summary",
"enrich_pre_made_qa": False,
"methods": {
"application/csv": {
"auto_detect_delimiter": True,
"chunk_overlap": 256,
"chunk_size": 1024,
"encoding": "utf-8",
"enrich_chunks_mode": "inject_summary",
"extract_qa_pairs": False,
"include_headers": True,
"row_as_document": True,
"supported_mime_types": ["text/csv", "application/csv"],
"type": "csv"
},
"application/pdf": {
"chunk_overlap": 256,
"chunk_size": 1024,
"enrich_chunks_mode": "inject_summary",
"extract_images": True,
"extract_qa_pairs": False,
"supported_mime_types": ["application/pdf", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "application/msword", "application/vnd.ms-powerpoint"],
"type": "pdf"
},
"default": {
"chunk_size": 1024,
"chunk_overlap": 256,
"enrich_chunks_mode": "inject_summary",
"extract_qa_pairs": False,
"type": "default",
"supported_mime_types": ["text/plain", "text/html", "text/markdown", "application/json", "application/xml", "text/xml", "application/rtf"]
},
"image/*": {
"supported_mime_types": ["image/jpeg", "image/png", "image/tiff", "image/bmp"],
"type": "image"
},
"message/rfc822": {
"chunk_overlap": 256,
"chunk_size": 1024,
"enrich_chunks_mode": "inject_summary",
"extract_qa_pairs": False,
"extract_text_only": True,
"include_images": False,
"include_tables": True,
"supported_mime_types": ["message/rfc822"],
"type": "email"
},
"text/csv": {
"auto_detect_delimiter": True,
"chunk_overlap": 256,
"chunk_size": 1024,
"encoding": "utf-8",
"enrich_chunks_mode": "inject_summary",
"extract_qa_pairs": False,
"include_headers": True,
"row_as_document": True,
"supported_mime_types": ["text/csv", "application/csv"],
"type": "csv"
},
"text/html": {
"chunk_overlap": 256,
"chunk_size": 1024,
"enrich_chunks_mode": "inject_summary",
"extract_qa_pairs": False,
"extract_text_only": True,
"include_images": False,
"include_tables": True,
"supported_mime_types": ["text/html"],
"type": "html"
},
"text/plain": {
"chunk_overlap": 256,
"chunk_size": 1024,
"chunking": True,
"enrich_chunks_mode": "inject_summary",
"extract_qa_pairs": False,
"preserve_formatting": True,
"supported_mime_types": ["text/plain", "text/html", "text/markdown", "application/json", "application/xml", "text/xml", "application/rtf"],
"type": "text"
}
}
},
"retrieval": {
"type": "hybrid_reranking",
"hybrid_settings": {
"fts_weight": 0.7,
"full_text_search": {
"top_k": 25,
"type": "full_text_search"
},
"semantic_search": {
"sets_threshold": False,
"threshold": 0,
"top_k": 25,
"type": "semantic"
},
"semantic_weight": 0.3,
"threshold": 0,
"type": "hybrid_relative_score"
},
"reranker_settings": {
"model_name": "semantic-ranker-512@latest",
"ranking_config": "default_ranking_config",
"sets_threshold": False,
"threshold": 0,
"top_k": 10,
"type": "vertex"
}
},
"embeddings": {
"text_model": "vertexai/text-multilingual-embedding-002",
"mm_model": "vertexai/multimodalembedding@001"
}
},
"version": "<string>",
"meta": {}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
document_types: ['<string>'],
error: {},
summary: '<string>',
summary_embedding: [123],
needs_summary_update: true,
settings_: {
allowed_sources: ['Document', 'Google Drive', 'OneDrive', 'Website'],
ingestion: {
batch_size: 8,
default_chunk_size: 1024,
default_chunk_overlap: 256,
enrich_chunks_mode: 'inject_summary',
enrich_pre_made_qa: false,
methods: {
'application/csv': {
auto_detect_delimiter: true,
chunk_overlap: 256,
chunk_size: 1024,
encoding: 'utf-8',
enrich_chunks_mode: 'inject_summary',
extract_qa_pairs: false,
include_headers: true,
row_as_document: true,
supported_mime_types: ['text/csv', 'application/csv'],
type: 'csv'
},
'application/pdf': {
chunk_overlap: 256,
chunk_size: 1024,
enrich_chunks_mode: 'inject_summary',
extract_images: true,
extract_qa_pairs: false,
supported_mime_types: [
'application/pdf',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
'application/msword',
'application/vnd.ms-powerpoint'
],
type: 'pdf'
},
default: {
chunk_size: 1024,
chunk_overlap: 256,
enrich_chunks_mode: 'inject_summary',
extract_qa_pairs: false,
type: 'default',
supported_mime_types: [
'text/plain',
'text/html',
'text/markdown',
'application/json',
'application/xml',
'text/xml',
'application/rtf'
]
},
'image/*': {
supported_mime_types: ['image/jpeg', 'image/png', 'image/tiff', 'image/bmp'],
type: 'image'
},
'message/rfc822': {
chunk_overlap: 256,
chunk_size: 1024,
enrich_chunks_mode: 'inject_summary',
extract_qa_pairs: false,
extract_text_only: true,
include_images: false,
include_tables: true,
supported_mime_types: ['message/rfc822'],
type: 'email'
},
'text/csv': {
auto_detect_delimiter: true,
chunk_overlap: 256,
chunk_size: 1024,
encoding: 'utf-8',
enrich_chunks_mode: 'inject_summary',
extract_qa_pairs: false,
include_headers: true,
row_as_document: true,
supported_mime_types: ['text/csv', 'application/csv'],
type: 'csv'
},
'text/html': {
chunk_overlap: 256,
chunk_size: 1024,
enrich_chunks_mode: 'inject_summary',
extract_qa_pairs: false,
extract_text_only: true,
include_images: false,
include_tables: true,
supported_mime_types: ['text/html'],
type: 'html'
},
'text/plain': {
chunk_overlap: 256,
chunk_size: 1024,
chunking: true,
enrich_chunks_mode: 'inject_summary',
extract_qa_pairs: false,
preserve_formatting: true,
supported_mime_types: [
'text/plain',
'text/html',
'text/markdown',
'application/json',
'application/xml',
'text/xml',
'application/rtf'
],
type: 'text'
}
}
},
retrieval: {
type: 'hybrid_reranking',
hybrid_settings: {
fts_weight: 0.7,
full_text_search: {top_k: 25, type: 'full_text_search'},
semantic_search: {sets_threshold: false, threshold: 0, top_k: 25, type: 'semantic'},
semantic_weight: 0.3,
threshold: 0,
type: 'hybrid_relative_score'
},
reranker_settings: {
model_name: 'semantic-ranker-512@latest',
ranking_config: 'default_ranking_config',
sets_threshold: false,
threshold: 0,
top_k: 10,
type: 'vertex'
}
},
embeddings: {
text_model: 'vertexai/text-multilingual-embedding-002',
mm_model: 'vertexai/multimodalembedding@001'
}
},
version: '<string>',
meta: {}
})
};
fetch('https://api.example.com/v1/knowledge-bases/{knowledge_base_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/knowledge-bases/{knowledge_base_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'document_types' => [
'<string>'
],
'error' => [
],
'summary' => '<string>',
'summary_embedding' => [
123
],
'needs_summary_update' => true,
'settings_' => [
'allowed_sources' => [
'Document',
'Google Drive',
'OneDrive',
'Website'
],
'ingestion' => [
'batch_size' => 8,
'default_chunk_size' => 1024,
'default_chunk_overlap' => 256,
'enrich_chunks_mode' => 'inject_summary',
'enrich_pre_made_qa' => false,
'methods' => [
'application/csv' => [
'auto_detect_delimiter' => true,
'chunk_overlap' => 256,
'chunk_size' => 1024,
'encoding' => 'utf-8',
'enrich_chunks_mode' => 'inject_summary',
'extract_qa_pairs' => false,
'include_headers' => true,
'row_as_document' => true,
'supported_mime_types' => [
'text/csv',
'application/csv'
],
'type' => 'csv'
],
'application/pdf' => [
'chunk_overlap' => 256,
'chunk_size' => 1024,
'enrich_chunks_mode' => 'inject_summary',
'extract_images' => true,
'extract_qa_pairs' => false,
'supported_mime_types' => [
'application/pdf',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
'application/msword',
'application/vnd.ms-powerpoint'
],
'type' => 'pdf'
],
'default' => [
'chunk_size' => 1024,
'chunk_overlap' => 256,
'enrich_chunks_mode' => 'inject_summary',
'extract_qa_pairs' => false,
'type' => 'default',
'supported_mime_types' => [
'text/plain',
'text/html',
'text/markdown',
'application/json',
'application/xml',
'text/xml',
'application/rtf'
]
],
'image/*' => [
'supported_mime_types' => [
'image/jpeg',
'image/png',
'image/tiff',
'image/bmp'
],
'type' => 'image'
],
'message/rfc822' => [
'chunk_overlap' => 256,
'chunk_size' => 1024,
'enrich_chunks_mode' => 'inject_summary',
'extract_qa_pairs' => false,
'extract_text_only' => true,
'include_images' => false,
'include_tables' => true,
'supported_mime_types' => [
'message/rfc822'
],
'type' => 'email'
],
'text/csv' => [
'auto_detect_delimiter' => true,
'chunk_overlap' => 256,
'chunk_size' => 1024,
'encoding' => 'utf-8',
'enrich_chunks_mode' => 'inject_summary',
'extract_qa_pairs' => false,
'include_headers' => true,
'row_as_document' => true,
'supported_mime_types' => [
'text/csv',
'application/csv'
],
'type' => 'csv'
],
'text/html' => [
'chunk_overlap' => 256,
'chunk_size' => 1024,
'enrich_chunks_mode' => 'inject_summary',
'extract_qa_pairs' => false,
'extract_text_only' => true,
'include_images' => false,
'include_tables' => true,
'supported_mime_types' => [
'text/html'
],
'type' => 'html'
],
'text/plain' => [
'chunk_overlap' => 256,
'chunk_size' => 1024,
'chunking' => true,
'enrich_chunks_mode' => 'inject_summary',
'extract_qa_pairs' => false,
'preserve_formatting' => true,
'supported_mime_types' => [
'text/plain',
'text/html',
'text/markdown',
'application/json',
'application/xml',
'text/xml',
'application/rtf'
],
'type' => 'text'
]
]
],
'retrieval' => [
'type' => 'hybrid_reranking',
'hybrid_settings' => [
'fts_weight' => 0.7,
'full_text_search' => [
'top_k' => 25,
'type' => 'full_text_search'
],
'semantic_search' => [
'sets_threshold' => false,
'threshold' => 0,
'top_k' => 25,
'type' => 'semantic'
],
'semantic_weight' => 0.3,
'threshold' => 0,
'type' => 'hybrid_relative_score'
],
'reranker_settings' => [
'model_name' => 'semantic-ranker-512@latest',
'ranking_config' => 'default_ranking_config',
'sets_threshold' => false,
'threshold' => 0,
'top_k' => 10,
'type' => 'vertex'
]
],
'embeddings' => [
'text_model' => 'vertexai/text-multilingual-embedding-002',
'mm_model' => 'vertexai/multimodalembedding@001'
]
],
'version' => '<string>',
'meta' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/knowledge-bases/{knowledge_base_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"document_types\": [\n \"<string>\"\n ],\n \"error\": {},\n \"summary\": \"<string>\",\n \"summary_embedding\": [\n 123\n ],\n \"needs_summary_update\": true,\n \"settings_\": {\n \"allowed_sources\": [\n \"Document\",\n \"Google Drive\",\n \"OneDrive\",\n \"Website\"\n ],\n \"ingestion\": {\n \"batch_size\": 8,\n \"default_chunk_size\": 1024,\n \"default_chunk_overlap\": 256,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"enrich_pre_made_qa\": false,\n \"methods\": {\n \"application/csv\": {\n \"auto_detect_delimiter\": true,\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"encoding\": \"utf-8\",\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"include_headers\": true,\n \"row_as_document\": true,\n \"supported_mime_types\": [\n \"text/csv\",\n \"application/csv\"\n ],\n \"type\": \"csv\"\n },\n \"application/pdf\": {\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_images\": true,\n \"extract_qa_pairs\": false,\n \"supported_mime_types\": [\n \"application/pdf\",\n \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n \"application/vnd.openxmlformats-officedocument.presentationml.presentation\",\n \"application/msword\",\n \"application/vnd.ms-powerpoint\"\n ],\n \"type\": \"pdf\"\n },\n \"default\": {\n \"chunk_size\": 1024,\n \"chunk_overlap\": 256,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"type\": \"default\",\n \"supported_mime_types\": [\n \"text/plain\",\n \"text/html\",\n \"text/markdown\",\n \"application/json\",\n \"application/xml\",\n \"text/xml\",\n \"application/rtf\"\n ]\n },\n \"image/*\": {\n \"supported_mime_types\": [\n \"image/jpeg\",\n \"image/png\",\n \"image/tiff\",\n \"image/bmp\"\n ],\n \"type\": \"image\"\n },\n \"message/rfc822\": {\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"extract_text_only\": true,\n \"include_images\": false,\n \"include_tables\": true,\n \"supported_mime_types\": [\n \"message/rfc822\"\n ],\n \"type\": \"email\"\n },\n \"text/csv\": {\n \"auto_detect_delimiter\": true,\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"encoding\": \"utf-8\",\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"include_headers\": true,\n \"row_as_document\": true,\n \"supported_mime_types\": [\n \"text/csv\",\n \"application/csv\"\n ],\n \"type\": \"csv\"\n },\n \"text/html\": {\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"extract_text_only\": true,\n \"include_images\": false,\n \"include_tables\": true,\n \"supported_mime_types\": [\n \"text/html\"\n ],\n \"type\": \"html\"\n },\n \"text/plain\": {\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"chunking\": true,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"preserve_formatting\": true,\n \"supported_mime_types\": [\n \"text/plain\",\n \"text/html\",\n \"text/markdown\",\n \"application/json\",\n \"application/xml\",\n \"text/xml\",\n \"application/rtf\"\n ],\n \"type\": \"text\"\n }\n }\n },\n \"retrieval\": {\n \"type\": \"hybrid_reranking\",\n \"hybrid_settings\": {\n \"fts_weight\": 0.7,\n \"full_text_search\": {\n \"top_k\": 25,\n \"type\": \"full_text_search\"\n },\n \"semantic_search\": {\n \"sets_threshold\": false,\n \"threshold\": 0,\n \"top_k\": 25,\n \"type\": \"semantic\"\n },\n \"semantic_weight\": 0.3,\n \"threshold\": 0,\n \"type\": \"hybrid_relative_score\"\n },\n \"reranker_settings\": {\n \"model_name\": \"semantic-ranker-512@latest\",\n \"ranking_config\": \"default_ranking_config\",\n \"sets_threshold\": false,\n \"threshold\": 0,\n \"top_k\": 10,\n \"type\": \"vertex\"\n }\n },\n \"embeddings\": {\n \"text_model\": \"vertexai/text-multilingual-embedding-002\",\n \"mm_model\": \"vertexai/multimodalembedding@001\"\n }\n },\n \"version\": \"<string>\",\n \"meta\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.example.com/v1/knowledge-bases/{knowledge_base_id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"document_types\": [\n \"<string>\"\n ],\n \"error\": {},\n \"summary\": \"<string>\",\n \"summary_embedding\": [\n 123\n ],\n \"needs_summary_update\": true,\n \"settings_\": {\n \"allowed_sources\": [\n \"Document\",\n \"Google Drive\",\n \"OneDrive\",\n \"Website\"\n ],\n \"ingestion\": {\n \"batch_size\": 8,\n \"default_chunk_size\": 1024,\n \"default_chunk_overlap\": 256,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"enrich_pre_made_qa\": false,\n \"methods\": {\n \"application/csv\": {\n \"auto_detect_delimiter\": true,\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"encoding\": \"utf-8\",\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"include_headers\": true,\n \"row_as_document\": true,\n \"supported_mime_types\": [\n \"text/csv\",\n \"application/csv\"\n ],\n \"type\": \"csv\"\n },\n \"application/pdf\": {\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_images\": true,\n \"extract_qa_pairs\": false,\n \"supported_mime_types\": [\n \"application/pdf\",\n \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n \"application/vnd.openxmlformats-officedocument.presentationml.presentation\",\n \"application/msword\",\n \"application/vnd.ms-powerpoint\"\n ],\n \"type\": \"pdf\"\n },\n \"default\": {\n \"chunk_size\": 1024,\n \"chunk_overlap\": 256,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"type\": \"default\",\n \"supported_mime_types\": [\n \"text/plain\",\n \"text/html\",\n \"text/markdown\",\n \"application/json\",\n \"application/xml\",\n \"text/xml\",\n \"application/rtf\"\n ]\n },\n \"image/*\": {\n \"supported_mime_types\": [\n \"image/jpeg\",\n \"image/png\",\n \"image/tiff\",\n \"image/bmp\"\n ],\n \"type\": \"image\"\n },\n \"message/rfc822\": {\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"extract_text_only\": true,\n \"include_images\": false,\n \"include_tables\": true,\n \"supported_mime_types\": [\n \"message/rfc822\"\n ],\n \"type\": \"email\"\n },\n \"text/csv\": {\n \"auto_detect_delimiter\": true,\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"encoding\": \"utf-8\",\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"include_headers\": true,\n \"row_as_document\": true,\n \"supported_mime_types\": [\n \"text/csv\",\n \"application/csv\"\n ],\n \"type\": \"csv\"\n },\n \"text/html\": {\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"extract_text_only\": true,\n \"include_images\": false,\n \"include_tables\": true,\n \"supported_mime_types\": [\n \"text/html\"\n ],\n \"type\": \"html\"\n },\n \"text/plain\": {\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"chunking\": true,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"preserve_formatting\": true,\n \"supported_mime_types\": [\n \"text/plain\",\n \"text/html\",\n \"text/markdown\",\n \"application/json\",\n \"application/xml\",\n \"text/xml\",\n \"application/rtf\"\n ],\n \"type\": \"text\"\n }\n }\n },\n \"retrieval\": {\n \"type\": \"hybrid_reranking\",\n \"hybrid_settings\": {\n \"fts_weight\": 0.7,\n \"full_text_search\": {\n \"top_k\": 25,\n \"type\": \"full_text_search\"\n },\n \"semantic_search\": {\n \"sets_threshold\": false,\n \"threshold\": 0,\n \"top_k\": 25,\n \"type\": \"semantic\"\n },\n \"semantic_weight\": 0.3,\n \"threshold\": 0,\n \"type\": \"hybrid_relative_score\"\n },\n \"reranker_settings\": {\n \"model_name\": \"semantic-ranker-512@latest\",\n \"ranking_config\": \"default_ranking_config\",\n \"sets_threshold\": false,\n \"threshold\": 0,\n \"top_k\": 10,\n \"type\": \"vertex\"\n }\n },\n \"embeddings\": {\n \"text_model\": \"vertexai/text-multilingual-embedding-002\",\n \"mm_model\": \"vertexai/multimodalembedding@001\"\n }\n },\n \"version\": \"<string>\",\n \"meta\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/knowledge-bases/{knowledge_base_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"document_types\": [\n \"<string>\"\n ],\n \"error\": {},\n \"summary\": \"<string>\",\n \"summary_embedding\": [\n 123\n ],\n \"needs_summary_update\": true,\n \"settings_\": {\n \"allowed_sources\": [\n \"Document\",\n \"Google Drive\",\n \"OneDrive\",\n \"Website\"\n ],\n \"ingestion\": {\n \"batch_size\": 8,\n \"default_chunk_size\": 1024,\n \"default_chunk_overlap\": 256,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"enrich_pre_made_qa\": false,\n \"methods\": {\n \"application/csv\": {\n \"auto_detect_delimiter\": true,\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"encoding\": \"utf-8\",\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"include_headers\": true,\n \"row_as_document\": true,\n \"supported_mime_types\": [\n \"text/csv\",\n \"application/csv\"\n ],\n \"type\": \"csv\"\n },\n \"application/pdf\": {\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_images\": true,\n \"extract_qa_pairs\": false,\n \"supported_mime_types\": [\n \"application/pdf\",\n \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n \"application/vnd.openxmlformats-officedocument.presentationml.presentation\",\n \"application/msword\",\n \"application/vnd.ms-powerpoint\"\n ],\n \"type\": \"pdf\"\n },\n \"default\": {\n \"chunk_size\": 1024,\n \"chunk_overlap\": 256,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"type\": \"default\",\n \"supported_mime_types\": [\n \"text/plain\",\n \"text/html\",\n \"text/markdown\",\n \"application/json\",\n \"application/xml\",\n \"text/xml\",\n \"application/rtf\"\n ]\n },\n \"image/*\": {\n \"supported_mime_types\": [\n \"image/jpeg\",\n \"image/png\",\n \"image/tiff\",\n \"image/bmp\"\n ],\n \"type\": \"image\"\n },\n \"message/rfc822\": {\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"extract_text_only\": true,\n \"include_images\": false,\n \"include_tables\": true,\n \"supported_mime_types\": [\n \"message/rfc822\"\n ],\n \"type\": \"email\"\n },\n \"text/csv\": {\n \"auto_detect_delimiter\": true,\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"encoding\": \"utf-8\",\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"include_headers\": true,\n \"row_as_document\": true,\n \"supported_mime_types\": [\n \"text/csv\",\n \"application/csv\"\n ],\n \"type\": \"csv\"\n },\n \"text/html\": {\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"extract_text_only\": true,\n \"include_images\": false,\n \"include_tables\": true,\n \"supported_mime_types\": [\n \"text/html\"\n ],\n \"type\": \"html\"\n },\n \"text/plain\": {\n \"chunk_overlap\": 256,\n \"chunk_size\": 1024,\n \"chunking\": true,\n \"enrich_chunks_mode\": \"inject_summary\",\n \"extract_qa_pairs\": false,\n \"preserve_formatting\": true,\n \"supported_mime_types\": [\n \"text/plain\",\n \"text/html\",\n \"text/markdown\",\n \"application/json\",\n \"application/xml\",\n \"text/xml\",\n \"application/rtf\"\n ],\n \"type\": \"text\"\n }\n }\n },\n \"retrieval\": {\n \"type\": \"hybrid_reranking\",\n \"hybrid_settings\": {\n \"fts_weight\": 0.7,\n \"full_text_search\": {\n \"top_k\": 25,\n \"type\": \"full_text_search\"\n },\n \"semantic_search\": {\n \"sets_threshold\": false,\n \"threshold\": 0,\n \"top_k\": 25,\n \"type\": \"semantic\"\n },\n \"semantic_weight\": 0.3,\n \"threshold\": 0,\n \"type\": \"hybrid_relative_score\"\n },\n \"reranker_settings\": {\n \"model_name\": \"semantic-ranker-512@latest\",\n \"ranking_config\": \"default_ranking_config\",\n \"sets_threshold\": false,\n \"threshold\": 0,\n \"top_k\": 10,\n \"type\": \"vertex\"\n }\n },\n \"embeddings\": {\n \"text_model\": \"vertexai/text-multilingual-embedding-002\",\n \"mm_model\": \"vertexai/multimodalembedding@001\"\n }\n },\n \"version\": \"<string>\",\n \"meta\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"document_types": [
"<string>"
],
"size": 123,
"num_docs": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"error": {},
"total_documents": 123,
"training_documents": 123,
"trained_documents": 123,
"error_documents": 123,
"uploaded_documents": 123,
"source_types": {},
"training_source_types": [],
"meta": {},
"settings_": {
"retrieval_info": "",
"retrieval_method": "hybrid_relative_score",
"retrieval_top_k": 25,
"fts_weight": 0.7,
"semantic_weight": 0.3,
"rrf_k": 60,
"threshold_enabled": false,
"threshold": 0,
"reranker_type": "vertex",
"reranker_top_k": 10,
"reranker_threshold_enabled": false,
"reranker_threshold": 0,
"vertex_model": "semantic-ranker-512@latest",
"ingestion_info": "",
"embedding_model": [
"vertexai/text-multilingual-embedding-002"
],
"mm_embedding_model": [
"vertexai/multimodalembedding"
],
"batch_size": 8,
"default_chunk_size": 2048,
"default_chunk_overlap": 512,
"enrich_chunks_mode": "inject_summary",
"enrich_pre_made_qa": false,
"pdf_info": "",
"pdf_extract_images": true,
"pdf_chunk_size": 1024,
"pdf_chunk_overlap": 256,
"pdf_ocr_enabled": false,
"pdf_ocr_confidence": 0.7,
"pdf_ocr_language": "auto",
"text_info": "",
"text_chunking_enabled": true,
"text_chunk_size": 1024,
"text_chunk_overlap": 256,
"text_preserve_formatting": true,
"html_info": "",
"html_extract_text_only": true,
"html_include_tables": true,
"html_include_images": false,
"image_info": "",
"image_ocr_enabled": false,
"image_ocr_confidence": 0.7,
"csv_row_as_document": true,
"csv_include_headers": true,
"csv_auto_detect_delimiter": true,
"csv_delimiter": ",",
"csv_encoding": "utf-8"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Path Parameters
Body
application/json
Available options:
created, trained, training, error Available options:
temporary, entity - KnowledgeBaseSettings
- KBConfig
Show child attributes
Show child attributes
Response
Successful Response
Available options:
created, trained, training, error Available options:
temporary, entity Available options:
v2, v3 Show child attributes
Show child attributes
Available options:
Document, Google Drive, Notion, Website, OneDrive, Slack, Linear, Github, Teams, Sharepoint, ServiceNow, Custom - KBConfig
- KnowledgeBaseSettings
Show child attributes
Show child attributes
⌘I