Update All Dataset Configurations
curl --request POST \
--url https://api.trieve.ai/api/organization/update_dataset_configs \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'TR-Organization: <tr-organization>' \
--data '
{
"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,
"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/organization/update_dataset_configs"
payload = {
"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,
"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>",
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'TR-Organization': '<tr-organization>',
Authorization: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
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,
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/organization/update_dataset_configs', 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/organization/update_dataset_configs",
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([
'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,
'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 => [
"Authorization: <api-key>",
"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/organization/update_dataset_configs"
payload := strings.NewReader("{\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 \"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("Authorization", "<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.post("https://api.trieve.ai/api/organization/update_dataset_configs")
.header("TR-Organization", "<tr-organization>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\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 \"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/organization/update_dataset_configs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["TR-Organization"] = '<tr-organization>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\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 \"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{
"message": "Bad Request"
}Organization
Update All Dataset Configurations
Update the configurations for all datasets in an organization. Only the specified keys in the configuration object will be changed per dataset such that you can preserve dataset unique values. Auth’ed user or api key must have an owner role for the specified organization.
POST
/
api
/
organization
/
update_dataset_configs
Update All Dataset Configurations
curl --request POST \
--url https://api.trieve.ai/api/organization/update_dataset_configs \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'TR-Organization: <tr-organization>' \
--data '
{
"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,
"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/organization/update_dataset_configs"
payload = {
"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,
"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>",
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'TR-Organization': '<tr-organization>',
Authorization: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
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,
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/organization/update_dataset_configs', 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/organization/update_dataset_configs",
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([
'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,
'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 => [
"Authorization: <api-key>",
"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/organization/update_dataset_configs"
payload := strings.NewReader("{\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 \"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("Authorization", "<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.post("https://api.trieve.ai/api/organization/update_dataset_configs")
.header("TR-Organization", "<tr-organization>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\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 \"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/organization/update_dataset_configs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["TR-Organization"] = '<tr-organization>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\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 \"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{
"message": "Bad Request"
}Authorizations
Headers
The organization id to use for the request
Body
application/json
The organization data that you want to create
The new configuration for all datasets in the organization. Only the specified keys in the configuration object will be changed per dataset such that you can preserve dataset unique values.
The configuration to provide a filter on what datasets to update.
Response
Confirmation that the dataset ServerConfigurations were updated successfully
Was this page helpful?
⌘I