curl --request POST \
--url https://api.trieve.ai/api/dataset/clone \
--header 'Content-Type: application/json' \
--header 'TR-Organization: <tr-organization>' \
--data '
{
"dataset_name": "My Dataset",
"dataset_to_clone": "00000000-0000-0000-0000-000000000000",
"organization_id": "00000000-0000-0000-0000-000000000000",
"server_configuration": {
"AIMON_RERANKER_TASK_DEFINITION": "Your task is to grade the relevance of context document(s) against the specified user query.",
"BM25_AVG_LEN": 256,
"BM25_B": 0.75,
"BM25_ENABLED": true,
"BM25_K": 0.75,
"DISTANCE_METRIC": "cosine",
"EMBEDDING_BASE_URL": "https://api.openai.com/v1",
"EMBEDDING_MODEL_NAME": "text-embedding-3-small",
"EMBEDDING_QUERY_PREFIX": "",
"EMBEDDING_SIZE": 1536,
"FREQUENCY_PENALTY": 0,
"FULLTEXT_ENABLED": true,
"INDEXED_ONLY": false,
"LLM_BASE_URL": "https://api.openai.com/v1",
"LLM_DEFAULT_MODEL": "gpt-3.5-turbo-1106",
"LOCKED": false,
"MAX_LIMIT": 10000,
"MESSAGE_TO_QUERY_PROMPT": "Write a 1-2 sentence semantic search query along the lines of a hypothetical response to: \n\n",
"N_RETRIEVALS_TO_INCLUDE": 8,
"PRESENCE_PENALTY": 0,
"QDRANT_ONLY": false,
"RAG_PROMPT": "Use the following retrieved documents to respond briefly and accurately:",
"SEMANTIC_ENABLED": true,
"STOP_TOKENS": [
"\n\n",
"\n"
],
"SYSTEM_PROMPT": "You are a helpful assistant",
"TEMPERATURE": 0.5,
"USE_MESSAGE_TO_QUERY_PROMPT": false
}
}
'import requests
url = "https://api.trieve.ai/api/dataset/clone"
payload = {
"dataset_name": "My Dataset",
"dataset_to_clone": "00000000-0000-0000-0000-000000000000",
"organization_id": "00000000-0000-0000-0000-000000000000",
"server_configuration": {
"AIMON_RERANKER_TASK_DEFINITION": "Your task is to grade the relevance of context document(s) against the specified user query.",
"BM25_AVG_LEN": 256,
"BM25_B": 0.75,
"BM25_ENABLED": True,
"BM25_K": 0.75,
"DISTANCE_METRIC": "cosine",
"EMBEDDING_BASE_URL": "https://api.openai.com/v1",
"EMBEDDING_MODEL_NAME": "text-embedding-3-small",
"EMBEDDING_QUERY_PREFIX": "",
"EMBEDDING_SIZE": 1536,
"FREQUENCY_PENALTY": 0,
"FULLTEXT_ENABLED": True,
"INDEXED_ONLY": False,
"LLM_BASE_URL": "https://api.openai.com/v1",
"LLM_DEFAULT_MODEL": "gpt-3.5-turbo-1106",
"LOCKED": False,
"MAX_LIMIT": 10000,
"MESSAGE_TO_QUERY_PROMPT": "Write a 1-2 sentence semantic search query along the lines of a hypothetical response to:
",
"N_RETRIEVALS_TO_INCLUDE": 8,
"PRESENCE_PENALTY": 0,
"QDRANT_ONLY": False,
"RAG_PROMPT": "Use the following retrieved documents to respond briefly and accurately:",
"SEMANTIC_ENABLED": True,
"STOP_TOKENS": ["
", "
"],
"SYSTEM_PROMPT": "You are a helpful assistant",
"TEMPERATURE": 0.5,
"USE_MESSAGE_TO_QUERY_PROMPT": False
}
}
headers = {
"TR-Organization": "<tr-organization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'TR-Organization': '<tr-organization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dataset_name: 'My Dataset',
dataset_to_clone: '00000000-0000-0000-0000-000000000000',
organization_id: '00000000-0000-0000-0000-000000000000',
server_configuration: {
AIMON_RERANKER_TASK_DEFINITION: 'Your task is to grade the relevance of context document(s) against the specified user query.',
BM25_AVG_LEN: 256,
BM25_B: 0.75,
BM25_ENABLED: true,
BM25_K: 0.75,
DISTANCE_METRIC: 'cosine',
EMBEDDING_BASE_URL: 'https://api.openai.com/v1',
EMBEDDING_MODEL_NAME: 'text-embedding-3-small',
EMBEDDING_QUERY_PREFIX: '',
EMBEDDING_SIZE: 1536,
FREQUENCY_PENALTY: 0,
FULLTEXT_ENABLED: true,
INDEXED_ONLY: false,
LLM_BASE_URL: 'https://api.openai.com/v1',
LLM_DEFAULT_MODEL: 'gpt-3.5-turbo-1106',
LOCKED: false,
MAX_LIMIT: 10000,
MESSAGE_TO_QUERY_PROMPT: 'Write a 1-2 sentence semantic search query along the lines of a hypothetical response to: \n\n',
N_RETRIEVALS_TO_INCLUDE: 8,
PRESENCE_PENALTY: 0,
QDRANT_ONLY: false,
RAG_PROMPT: 'Use the following retrieved documents to respond briefly and accurately:',
SEMANTIC_ENABLED: true,
STOP_TOKENS: ['\n\n', '\n'],
SYSTEM_PROMPT: 'You are a helpful assistant',
TEMPERATURE: 0.5,
USE_MESSAGE_TO_QUERY_PROMPT: false
}
})
};
fetch('https://api.trieve.ai/api/dataset/clone', 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.trieve.ai/api/dataset/clone",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'dataset_name' => 'My Dataset',
'dataset_to_clone' => '00000000-0000-0000-0000-000000000000',
'organization_id' => '00000000-0000-0000-0000-000000000000',
'server_configuration' => [
'AIMON_RERANKER_TASK_DEFINITION' => 'Your task is to grade the relevance of context document(s) against the specified user query.',
'BM25_AVG_LEN' => 256,
'BM25_B' => 0.75,
'BM25_ENABLED' => true,
'BM25_K' => 0.75,
'DISTANCE_METRIC' => 'cosine',
'EMBEDDING_BASE_URL' => 'https://api.openai.com/v1',
'EMBEDDING_MODEL_NAME' => 'text-embedding-3-small',
'EMBEDDING_QUERY_PREFIX' => '',
'EMBEDDING_SIZE' => 1536,
'FREQUENCY_PENALTY' => 0,
'FULLTEXT_ENABLED' => true,
'INDEXED_ONLY' => false,
'LLM_BASE_URL' => 'https://api.openai.com/v1',
'LLM_DEFAULT_MODEL' => 'gpt-3.5-turbo-1106',
'LOCKED' => false,
'MAX_LIMIT' => 10000,
'MESSAGE_TO_QUERY_PROMPT' => 'Write a 1-2 sentence semantic search query along the lines of a hypothetical response to:
',
'N_RETRIEVALS_TO_INCLUDE' => 8,
'PRESENCE_PENALTY' => 0,
'QDRANT_ONLY' => false,
'RAG_PROMPT' => 'Use the following retrieved documents to respond briefly and accurately:',
'SEMANTIC_ENABLED' => true,
'STOP_TOKENS' => [
'
',
'
'
],
'SYSTEM_PROMPT' => 'You are a helpful assistant',
'TEMPERATURE' => 0.5,
'USE_MESSAGE_TO_QUERY_PROMPT' => false
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"TR-Organization: <tr-organization>"
],
]);
$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.trieve.ai/api/dataset/clone"
payload := strings.NewReader("{\n \"dataset_name\": \"My Dataset\",\n \"dataset_to_clone\": \"00000000-0000-0000-0000-000000000000\",\n \"organization_id\": \"00000000-0000-0000-0000-000000000000\",\n \"server_configuration\": {\n \"AIMON_RERANKER_TASK_DEFINITION\": \"Your task is to grade the relevance of context document(s) against the specified user query.\",\n \"BM25_AVG_LEN\": 256,\n \"BM25_B\": 0.75,\n \"BM25_ENABLED\": true,\n \"BM25_K\": 0.75,\n \"DISTANCE_METRIC\": \"cosine\",\n \"EMBEDDING_BASE_URL\": \"https://api.openai.com/v1\",\n \"EMBEDDING_MODEL_NAME\": \"text-embedding-3-small\",\n \"EMBEDDING_QUERY_PREFIX\": \"\",\n \"EMBEDDING_SIZE\": 1536,\n \"FREQUENCY_PENALTY\": 0,\n \"FULLTEXT_ENABLED\": true,\n \"INDEXED_ONLY\": false,\n \"LLM_BASE_URL\": \"https://api.openai.com/v1\",\n \"LLM_DEFAULT_MODEL\": \"gpt-3.5-turbo-1106\",\n \"LOCKED\": false,\n \"MAX_LIMIT\": 10000,\n \"MESSAGE_TO_QUERY_PROMPT\": \"Write a 1-2 sentence semantic search query along the lines of a hypothetical response to: \\n\\n\",\n \"N_RETRIEVALS_TO_INCLUDE\": 8,\n \"PRESENCE_PENALTY\": 0,\n \"QDRANT_ONLY\": false,\n \"RAG_PROMPT\": \"Use the following retrieved documents to respond briefly and accurately:\",\n \"SEMANTIC_ENABLED\": true,\n \"STOP_TOKENS\": [\n \"\\n\\n\",\n \"\\n\"\n ],\n \"SYSTEM_PROMPT\": \"You are a helpful assistant\",\n \"TEMPERATURE\": 0.5,\n \"USE_MESSAGE_TO_QUERY_PROMPT\": false\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("TR-Organization", "<tr-organization>")
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.post("https://api.trieve.ai/api/dataset/clone")
.header("TR-Organization", "<tr-organization>")
.header("Content-Type", "application/json")
.body("{\n \"dataset_name\": \"My Dataset\",\n \"dataset_to_clone\": \"00000000-0000-0000-0000-000000000000\",\n \"organization_id\": \"00000000-0000-0000-0000-000000000000\",\n \"server_configuration\": {\n \"AIMON_RERANKER_TASK_DEFINITION\": \"Your task is to grade the relevance of context document(s) against the specified user query.\",\n \"BM25_AVG_LEN\": 256,\n \"BM25_B\": 0.75,\n \"BM25_ENABLED\": true,\n \"BM25_K\": 0.75,\n \"DISTANCE_METRIC\": \"cosine\",\n \"EMBEDDING_BASE_URL\": \"https://api.openai.com/v1\",\n \"EMBEDDING_MODEL_NAME\": \"text-embedding-3-small\",\n \"EMBEDDING_QUERY_PREFIX\": \"\",\n \"EMBEDDING_SIZE\": 1536,\n \"FREQUENCY_PENALTY\": 0,\n \"FULLTEXT_ENABLED\": true,\n \"INDEXED_ONLY\": false,\n \"LLM_BASE_URL\": \"https://api.openai.com/v1\",\n \"LLM_DEFAULT_MODEL\": \"gpt-3.5-turbo-1106\",\n \"LOCKED\": false,\n \"MAX_LIMIT\": 10000,\n \"MESSAGE_TO_QUERY_PROMPT\": \"Write a 1-2 sentence semantic search query along the lines of a hypothetical response to: \\n\\n\",\n \"N_RETRIEVALS_TO_INCLUDE\": 8,\n \"PRESENCE_PENALTY\": 0,\n \"QDRANT_ONLY\": false,\n \"RAG_PROMPT\": \"Use the following retrieved documents to respond briefly and accurately:\",\n \"SEMANTIC_ENABLED\": true,\n \"STOP_TOKENS\": [\n \"\\n\\n\",\n \"\\n\"\n ],\n \"SYSTEM_PROMPT\": \"You are a helpful assistant\",\n \"TEMPERATURE\": 0.5,\n \"USE_MESSAGE_TO_QUERY_PROMPT\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trieve.ai/api/dataset/clone")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["TR-Organization"] = '<tr-organization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dataset_name\": \"My Dataset\",\n \"dataset_to_clone\": \"00000000-0000-0000-0000-000000000000\",\n \"organization_id\": \"00000000-0000-0000-0000-000000000000\",\n \"server_configuration\": {\n \"AIMON_RERANKER_TASK_DEFINITION\": \"Your task is to grade the relevance of context document(s) against the specified user query.\",\n \"BM25_AVG_LEN\": 256,\n \"BM25_B\": 0.75,\n \"BM25_ENABLED\": true,\n \"BM25_K\": 0.75,\n \"DISTANCE_METRIC\": \"cosine\",\n \"EMBEDDING_BASE_URL\": \"https://api.openai.com/v1\",\n \"EMBEDDING_MODEL_NAME\": \"text-embedding-3-small\",\n \"EMBEDDING_QUERY_PREFIX\": \"\",\n \"EMBEDDING_SIZE\": 1536,\n \"FREQUENCY_PENALTY\": 0,\n \"FULLTEXT_ENABLED\": true,\n \"INDEXED_ONLY\": false,\n \"LLM_BASE_URL\": \"https://api.openai.com/v1\",\n \"LLM_DEFAULT_MODEL\": \"gpt-3.5-turbo-1106\",\n \"LOCKED\": false,\n \"MAX_LIMIT\": 10000,\n \"MESSAGE_TO_QUERY_PROMPT\": \"Write a 1-2 sentence semantic search query along the lines of a hypothetical response to: \\n\\n\",\n \"N_RETRIEVALS_TO_INCLUDE\": 8,\n \"PRESENCE_PENALTY\": 0,\n \"QDRANT_ONLY\": false,\n \"RAG_PROMPT\": \"Use the following retrieved documents to respond briefly and accurately:\",\n \"SEMANTIC_ENABLED\": true,\n \"STOP_TOKENS\": [\n \"\\n\\n\",\n \"\\n\"\n ],\n \"SYSTEM_PROMPT\": \"You are a helpful assistant\",\n \"TEMPERATURE\": 0.5,\n \"USE_MESSAGE_TO_QUERY_PROMPT\": false\n }\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2021-01-01 00:00:00.000",
"id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"name": "Trieve",
"organization_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"server_configuration": {
"AIMON_RERANKER_TASK_DEFINITION": "Your task is to grade the relevance of context document(s) against the specified user query.",
"BM25_AVG_LEN": 256,
"BM25_B": 0.75,
"BM25_ENABLED": true,
"BM25_K": 0.75,
"DISTANCE_METRIC": "cosine",
"EMBEDDING_BASE_URL": "https://embedding.trieve.ai",
"EMBEDDING_MODEL_NAME": "jina-base-en",
"EMBEDDING_QUERY_PREFIX": "",
"EMBEDDING_SIZE": 768,
"FREQUENCY_PENALTY": 0,
"FULLTEXT_ENABLED": true,
"INDEXED_ONLY": false,
"LLM_BASE_URL": "https://api.openai.com/v1",
"LLM_DEFAULT_MODEL": "gpt-4o",
"LOCKED": false,
"MAX_LIMIT": 10000,
"MESSAGE_TO_QUERY_PROMPT": "Write a 1-2 sentence semantic search query along the lines of a hypothetical response to: \n\n",
"N_RETRIEVALS_TO_INCLUDE": 8,
"PRESENCE_PENALTY": 0,
"QDRANT_ONLY": false,
"RAG_PROMPT": "Use the following retrieved documents to respond briefly and accurately:",
"SEMANTIC_ENABLED": true,
"STOP_TOKENS": [
"\n\n",
"\n"
],
"SYSTEM_PROMPT": "You are a helpful assistant",
"TEMPERATURE": 0.5,
"USE_MESSAGE_TO_QUERY_PROMPT": false
},
"tracking_id": "foobar-dataset",
"updated_at": "2021-01-01 00:00:00.000"
}{
"message": "Bad Request"
}{
"message": "Bad Request"
}Clone Dataset
Clones a dataset and creates a new dataset with the same configuration and chunks. The auth’ed user must be an owner of the organization to clone a dataset.
curl --request POST \
--url https://api.trieve.ai/api/dataset/clone \
--header 'Content-Type: application/json' \
--header 'TR-Organization: <tr-organization>' \
--data '
{
"dataset_name": "My Dataset",
"dataset_to_clone": "00000000-0000-0000-0000-000000000000",
"organization_id": "00000000-0000-0000-0000-000000000000",
"server_configuration": {
"AIMON_RERANKER_TASK_DEFINITION": "Your task is to grade the relevance of context document(s) against the specified user query.",
"BM25_AVG_LEN": 256,
"BM25_B": 0.75,
"BM25_ENABLED": true,
"BM25_K": 0.75,
"DISTANCE_METRIC": "cosine",
"EMBEDDING_BASE_URL": "https://api.openai.com/v1",
"EMBEDDING_MODEL_NAME": "text-embedding-3-small",
"EMBEDDING_QUERY_PREFIX": "",
"EMBEDDING_SIZE": 1536,
"FREQUENCY_PENALTY": 0,
"FULLTEXT_ENABLED": true,
"INDEXED_ONLY": false,
"LLM_BASE_URL": "https://api.openai.com/v1",
"LLM_DEFAULT_MODEL": "gpt-3.5-turbo-1106",
"LOCKED": false,
"MAX_LIMIT": 10000,
"MESSAGE_TO_QUERY_PROMPT": "Write a 1-2 sentence semantic search query along the lines of a hypothetical response to: \n\n",
"N_RETRIEVALS_TO_INCLUDE": 8,
"PRESENCE_PENALTY": 0,
"QDRANT_ONLY": false,
"RAG_PROMPT": "Use the following retrieved documents to respond briefly and accurately:",
"SEMANTIC_ENABLED": true,
"STOP_TOKENS": [
"\n\n",
"\n"
],
"SYSTEM_PROMPT": "You are a helpful assistant",
"TEMPERATURE": 0.5,
"USE_MESSAGE_TO_QUERY_PROMPT": false
}
}
'import requests
url = "https://api.trieve.ai/api/dataset/clone"
payload = {
"dataset_name": "My Dataset",
"dataset_to_clone": "00000000-0000-0000-0000-000000000000",
"organization_id": "00000000-0000-0000-0000-000000000000",
"server_configuration": {
"AIMON_RERANKER_TASK_DEFINITION": "Your task is to grade the relevance of context document(s) against the specified user query.",
"BM25_AVG_LEN": 256,
"BM25_B": 0.75,
"BM25_ENABLED": True,
"BM25_K": 0.75,
"DISTANCE_METRIC": "cosine",
"EMBEDDING_BASE_URL": "https://api.openai.com/v1",
"EMBEDDING_MODEL_NAME": "text-embedding-3-small",
"EMBEDDING_QUERY_PREFIX": "",
"EMBEDDING_SIZE": 1536,
"FREQUENCY_PENALTY": 0,
"FULLTEXT_ENABLED": True,
"INDEXED_ONLY": False,
"LLM_BASE_URL": "https://api.openai.com/v1",
"LLM_DEFAULT_MODEL": "gpt-3.5-turbo-1106",
"LOCKED": False,
"MAX_LIMIT": 10000,
"MESSAGE_TO_QUERY_PROMPT": "Write a 1-2 sentence semantic search query along the lines of a hypothetical response to:
",
"N_RETRIEVALS_TO_INCLUDE": 8,
"PRESENCE_PENALTY": 0,
"QDRANT_ONLY": False,
"RAG_PROMPT": "Use the following retrieved documents to respond briefly and accurately:",
"SEMANTIC_ENABLED": True,
"STOP_TOKENS": ["
", "
"],
"SYSTEM_PROMPT": "You are a helpful assistant",
"TEMPERATURE": 0.5,
"USE_MESSAGE_TO_QUERY_PROMPT": False
}
}
headers = {
"TR-Organization": "<tr-organization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'TR-Organization': '<tr-organization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dataset_name: 'My Dataset',
dataset_to_clone: '00000000-0000-0000-0000-000000000000',
organization_id: '00000000-0000-0000-0000-000000000000',
server_configuration: {
AIMON_RERANKER_TASK_DEFINITION: 'Your task is to grade the relevance of context document(s) against the specified user query.',
BM25_AVG_LEN: 256,
BM25_B: 0.75,
BM25_ENABLED: true,
BM25_K: 0.75,
DISTANCE_METRIC: 'cosine',
EMBEDDING_BASE_URL: 'https://api.openai.com/v1',
EMBEDDING_MODEL_NAME: 'text-embedding-3-small',
EMBEDDING_QUERY_PREFIX: '',
EMBEDDING_SIZE: 1536,
FREQUENCY_PENALTY: 0,
FULLTEXT_ENABLED: true,
INDEXED_ONLY: false,
LLM_BASE_URL: 'https://api.openai.com/v1',
LLM_DEFAULT_MODEL: 'gpt-3.5-turbo-1106',
LOCKED: false,
MAX_LIMIT: 10000,
MESSAGE_TO_QUERY_PROMPT: 'Write a 1-2 sentence semantic search query along the lines of a hypothetical response to: \n\n',
N_RETRIEVALS_TO_INCLUDE: 8,
PRESENCE_PENALTY: 0,
QDRANT_ONLY: false,
RAG_PROMPT: 'Use the following retrieved documents to respond briefly and accurately:',
SEMANTIC_ENABLED: true,
STOP_TOKENS: ['\n\n', '\n'],
SYSTEM_PROMPT: 'You are a helpful assistant',
TEMPERATURE: 0.5,
USE_MESSAGE_TO_QUERY_PROMPT: false
}
})
};
fetch('https://api.trieve.ai/api/dataset/clone', 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.trieve.ai/api/dataset/clone",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'dataset_name' => 'My Dataset',
'dataset_to_clone' => '00000000-0000-0000-0000-000000000000',
'organization_id' => '00000000-0000-0000-0000-000000000000',
'server_configuration' => [
'AIMON_RERANKER_TASK_DEFINITION' => 'Your task is to grade the relevance of context document(s) against the specified user query.',
'BM25_AVG_LEN' => 256,
'BM25_B' => 0.75,
'BM25_ENABLED' => true,
'BM25_K' => 0.75,
'DISTANCE_METRIC' => 'cosine',
'EMBEDDING_BASE_URL' => 'https://api.openai.com/v1',
'EMBEDDING_MODEL_NAME' => 'text-embedding-3-small',
'EMBEDDING_QUERY_PREFIX' => '',
'EMBEDDING_SIZE' => 1536,
'FREQUENCY_PENALTY' => 0,
'FULLTEXT_ENABLED' => true,
'INDEXED_ONLY' => false,
'LLM_BASE_URL' => 'https://api.openai.com/v1',
'LLM_DEFAULT_MODEL' => 'gpt-3.5-turbo-1106',
'LOCKED' => false,
'MAX_LIMIT' => 10000,
'MESSAGE_TO_QUERY_PROMPT' => 'Write a 1-2 sentence semantic search query along the lines of a hypothetical response to:
',
'N_RETRIEVALS_TO_INCLUDE' => 8,
'PRESENCE_PENALTY' => 0,
'QDRANT_ONLY' => false,
'RAG_PROMPT' => 'Use the following retrieved documents to respond briefly and accurately:',
'SEMANTIC_ENABLED' => true,
'STOP_TOKENS' => [
'
',
'
'
],
'SYSTEM_PROMPT' => 'You are a helpful assistant',
'TEMPERATURE' => 0.5,
'USE_MESSAGE_TO_QUERY_PROMPT' => false
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"TR-Organization: <tr-organization>"
],
]);
$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.trieve.ai/api/dataset/clone"
payload := strings.NewReader("{\n \"dataset_name\": \"My Dataset\",\n \"dataset_to_clone\": \"00000000-0000-0000-0000-000000000000\",\n \"organization_id\": \"00000000-0000-0000-0000-000000000000\",\n \"server_configuration\": {\n \"AIMON_RERANKER_TASK_DEFINITION\": \"Your task is to grade the relevance of context document(s) against the specified user query.\",\n \"BM25_AVG_LEN\": 256,\n \"BM25_B\": 0.75,\n \"BM25_ENABLED\": true,\n \"BM25_K\": 0.75,\n \"DISTANCE_METRIC\": \"cosine\",\n \"EMBEDDING_BASE_URL\": \"https://api.openai.com/v1\",\n \"EMBEDDING_MODEL_NAME\": \"text-embedding-3-small\",\n \"EMBEDDING_QUERY_PREFIX\": \"\",\n \"EMBEDDING_SIZE\": 1536,\n \"FREQUENCY_PENALTY\": 0,\n \"FULLTEXT_ENABLED\": true,\n \"INDEXED_ONLY\": false,\n \"LLM_BASE_URL\": \"https://api.openai.com/v1\",\n \"LLM_DEFAULT_MODEL\": \"gpt-3.5-turbo-1106\",\n \"LOCKED\": false,\n \"MAX_LIMIT\": 10000,\n \"MESSAGE_TO_QUERY_PROMPT\": \"Write a 1-2 sentence semantic search query along the lines of a hypothetical response to: \\n\\n\",\n \"N_RETRIEVALS_TO_INCLUDE\": 8,\n \"PRESENCE_PENALTY\": 0,\n \"QDRANT_ONLY\": false,\n \"RAG_PROMPT\": \"Use the following retrieved documents to respond briefly and accurately:\",\n \"SEMANTIC_ENABLED\": true,\n \"STOP_TOKENS\": [\n \"\\n\\n\",\n \"\\n\"\n ],\n \"SYSTEM_PROMPT\": \"You are a helpful assistant\",\n \"TEMPERATURE\": 0.5,\n \"USE_MESSAGE_TO_QUERY_PROMPT\": false\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("TR-Organization", "<tr-organization>")
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.post("https://api.trieve.ai/api/dataset/clone")
.header("TR-Organization", "<tr-organization>")
.header("Content-Type", "application/json")
.body("{\n \"dataset_name\": \"My Dataset\",\n \"dataset_to_clone\": \"00000000-0000-0000-0000-000000000000\",\n \"organization_id\": \"00000000-0000-0000-0000-000000000000\",\n \"server_configuration\": {\n \"AIMON_RERANKER_TASK_DEFINITION\": \"Your task is to grade the relevance of context document(s) against the specified user query.\",\n \"BM25_AVG_LEN\": 256,\n \"BM25_B\": 0.75,\n \"BM25_ENABLED\": true,\n \"BM25_K\": 0.75,\n \"DISTANCE_METRIC\": \"cosine\",\n \"EMBEDDING_BASE_URL\": \"https://api.openai.com/v1\",\n \"EMBEDDING_MODEL_NAME\": \"text-embedding-3-small\",\n \"EMBEDDING_QUERY_PREFIX\": \"\",\n \"EMBEDDING_SIZE\": 1536,\n \"FREQUENCY_PENALTY\": 0,\n \"FULLTEXT_ENABLED\": true,\n \"INDEXED_ONLY\": false,\n \"LLM_BASE_URL\": \"https://api.openai.com/v1\",\n \"LLM_DEFAULT_MODEL\": \"gpt-3.5-turbo-1106\",\n \"LOCKED\": false,\n \"MAX_LIMIT\": 10000,\n \"MESSAGE_TO_QUERY_PROMPT\": \"Write a 1-2 sentence semantic search query along the lines of a hypothetical response to: \\n\\n\",\n \"N_RETRIEVALS_TO_INCLUDE\": 8,\n \"PRESENCE_PENALTY\": 0,\n \"QDRANT_ONLY\": false,\n \"RAG_PROMPT\": \"Use the following retrieved documents to respond briefly and accurately:\",\n \"SEMANTIC_ENABLED\": true,\n \"STOP_TOKENS\": [\n \"\\n\\n\",\n \"\\n\"\n ],\n \"SYSTEM_PROMPT\": \"You are a helpful assistant\",\n \"TEMPERATURE\": 0.5,\n \"USE_MESSAGE_TO_QUERY_PROMPT\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trieve.ai/api/dataset/clone")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["TR-Organization"] = '<tr-organization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dataset_name\": \"My Dataset\",\n \"dataset_to_clone\": \"00000000-0000-0000-0000-000000000000\",\n \"organization_id\": \"00000000-0000-0000-0000-000000000000\",\n \"server_configuration\": {\n \"AIMON_RERANKER_TASK_DEFINITION\": \"Your task is to grade the relevance of context document(s) against the specified user query.\",\n \"BM25_AVG_LEN\": 256,\n \"BM25_B\": 0.75,\n \"BM25_ENABLED\": true,\n \"BM25_K\": 0.75,\n \"DISTANCE_METRIC\": \"cosine\",\n \"EMBEDDING_BASE_URL\": \"https://api.openai.com/v1\",\n \"EMBEDDING_MODEL_NAME\": \"text-embedding-3-small\",\n \"EMBEDDING_QUERY_PREFIX\": \"\",\n \"EMBEDDING_SIZE\": 1536,\n \"FREQUENCY_PENALTY\": 0,\n \"FULLTEXT_ENABLED\": true,\n \"INDEXED_ONLY\": false,\n \"LLM_BASE_URL\": \"https://api.openai.com/v1\",\n \"LLM_DEFAULT_MODEL\": \"gpt-3.5-turbo-1106\",\n \"LOCKED\": false,\n \"MAX_LIMIT\": 10000,\n \"MESSAGE_TO_QUERY_PROMPT\": \"Write a 1-2 sentence semantic search query along the lines of a hypothetical response to: \\n\\n\",\n \"N_RETRIEVALS_TO_INCLUDE\": 8,\n \"PRESENCE_PENALTY\": 0,\n \"QDRANT_ONLY\": false,\n \"RAG_PROMPT\": \"Use the following retrieved documents to respond briefly and accurately:\",\n \"SEMANTIC_ENABLED\": true,\n \"STOP_TOKENS\": [\n \"\\n\\n\",\n \"\\n\"\n ],\n \"SYSTEM_PROMPT\": \"You are a helpful assistant\",\n \"TEMPERATURE\": 0.5,\n \"USE_MESSAGE_TO_QUERY_PROMPT\": false\n }\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2021-01-01 00:00:00.000",
"id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"name": "Trieve",
"organization_id": "e3e3e3e3-e3e3-e3e3-e3e3-e3e3e3e3e3e3",
"server_configuration": {
"AIMON_RERANKER_TASK_DEFINITION": "Your task is to grade the relevance of context document(s) against the specified user query.",
"BM25_AVG_LEN": 256,
"BM25_B": 0.75,
"BM25_ENABLED": true,
"BM25_K": 0.75,
"DISTANCE_METRIC": "cosine",
"EMBEDDING_BASE_URL": "https://embedding.trieve.ai",
"EMBEDDING_MODEL_NAME": "jina-base-en",
"EMBEDDING_QUERY_PREFIX": "",
"EMBEDDING_SIZE": 768,
"FREQUENCY_PENALTY": 0,
"FULLTEXT_ENABLED": true,
"INDEXED_ONLY": false,
"LLM_BASE_URL": "https://api.openai.com/v1",
"LLM_DEFAULT_MODEL": "gpt-4o",
"LOCKED": false,
"MAX_LIMIT": 10000,
"MESSAGE_TO_QUERY_PROMPT": "Write a 1-2 sentence semantic search query along the lines of a hypothetical response to: \n\n",
"N_RETRIEVALS_TO_INCLUDE": 8,
"PRESENCE_PENALTY": 0,
"QDRANT_ONLY": false,
"RAG_PROMPT": "Use the following retrieved documents to respond briefly and accurately:",
"SEMANTIC_ENABLED": true,
"STOP_TOKENS": [
"\n\n",
"\n"
],
"SYSTEM_PROMPT": "You are a helpful assistant",
"TEMPERATURE": 0.5,
"USE_MESSAGE_TO_QUERY_PROMPT": false
},
"tracking_id": "foobar-dataset",
"updated_at": "2021-01-01 00:00:00.000"
}{
"message": "Bad Request"
}{
"message": "Bad Request"
}Headers
The organization id to use for the request
Body
JSON request payload to clone a dataset
Name of the dataset.
The id of the dataset you want to clone.
Parameter to Clone Chunks from the original dataset to the new dataset. defaults to true.
Optional tracking ID for the dataset. Can be used to track the dataset in external systems. Must be unique within the organization. Strongly recommended to not use a valid uuid value as that will not work with the TR-Dataset header.
Response
Dataset cloned successfully
Timestamp of the creation of the dataset
Flag to indicate if the dataset has been deleted. Deletes are handled async after the flag is set so as to avoid expensive search index compaction.
Unique identifier of the dataset, auto-generated uuid created by Trieve
Name of the dataset
Unique identifier of the organization that owns the dataset
Configuration of the dataset for RAG, embeddings, BM25, etc.
Timestamp of the last update of the dataset
Tracking ID of the dataset, can be any string, determined by the user. Tracking ID's are unique identifiers for datasets within an organization. They are designed to match the unique identifier of the dataset in the user's system.
Was this page helpful?