text
string
required
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
import os
from profound import Profound
client = Profound(
api_key=os.environ.get("PROFOUND_API_KEY"),
)
document = client.knowledge_bases.documents.update(
knowledge_base_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
name="x",
text="x",
)
print(document)import Profound from '@profoundai/client';
const client = new Profound({
apiKey: process.env['PROFOUND_API_KEY'], // defaults to the PROFOUND_API_KEY env var
environment: 'production',
});
const document = await client.knowledgeBases.documents.update('7c9e6679-7425-40de-944b-e07fc1f90ae7', {
name: 'x',
text: 'x',
});
console.log(document);use profound::*;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = ProfoundClient::builder()
.api_key(std::env::var("PROFOUND_API_KEY")?)
.build()?;
let response = client
.knowledge_bases()
.documents()
.update(
"7c9e6679-7425-40de-944b-e07fc1f90ae7",
DocumentsUpdateBody::new("x".to_string(), "x".to_string()),
)
.send()
.await?;
println!("{:?}", response);
Ok(())
}import Foundation
import Profound
let client = ProfoundClient(
apiKey: ProcessInfo.processInfo.environment["PROFOUND_API_KEY"]
)
let response = try await client.knowledgeBases.documents.update(
"7c9e6679-7425-40de-944b-e07fc1f90ae7",
name: "x",
text: "x"
)
print(response)curl --request PUT \
--url https://api.tryprofound.com/v1/knowledge-bases/{knowledge_base_id}/documents \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "<string>",
"text": "<string>",
"folder": "<string>"
}
'const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', text: '<string>', folder: '<string>'})
};
fetch('https://api.tryprofound.com/v1/knowledge-bases/{knowledge_base_id}/documents', 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.tryprofound.com/v1/knowledge-bases/{knowledge_base_id}/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'text' => '<string>',
'folder' => '<string>'
]),
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.tryprofound.com/v1/knowledge-bases/{knowledge_base_id}/documents"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"text\": \"<string>\",\n \"folder\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.tryprofound.com/v1/knowledge-bases/{knowledge_base_id}/documents")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"text\": \"<string>\",\n \"folder\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryprofound.com/v1/knowledge-bases/{knowledge_base_id}/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"text\": \"<string>\",\n \"folder\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"name": "<string>",
"path": "<string>",
"folder": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Overwrite a knowledge base document using JSON text or multipart file upload.
import os
from profound import Profound
client = Profound(
api_key=os.environ.get("PROFOUND_API_KEY"),
)
document = client.knowledge_bases.documents.update(
knowledge_base_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
name="x",
text="x",
)
print(document)import Profound from '@profoundai/client';
const client = new Profound({
apiKey: process.env['PROFOUND_API_KEY'], // defaults to the PROFOUND_API_KEY env var
environment: 'production',
});
const document = await client.knowledgeBases.documents.update('7c9e6679-7425-40de-944b-e07fc1f90ae7', {
name: 'x',
text: 'x',
});
console.log(document);use profound::*;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = ProfoundClient::builder()
.api_key(std::env::var("PROFOUND_API_KEY")?)
.build()?;
let response = client
.knowledge_bases()
.documents()
.update(
"7c9e6679-7425-40de-944b-e07fc1f90ae7",
DocumentsUpdateBody::new("x".to_string(), "x".to_string()),
)
.send()
.await?;
println!("{:?}", response);
Ok(())
}import Foundation
import Profound
let client = ProfoundClient(
apiKey: ProcessInfo.processInfo.environment["PROFOUND_API_KEY"]
)
let response = try await client.knowledgeBases.documents.update(
"7c9e6679-7425-40de-944b-e07fc1f90ae7",
name: "x",
text: "x"
)
print(response)curl --request PUT \
--url https://api.tryprofound.com/v1/knowledge-bases/{knowledge_base_id}/documents \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "<string>",
"text": "<string>",
"folder": "<string>"
}
'const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', text: '<string>', folder: '<string>'})
};
fetch('https://api.tryprofound.com/v1/knowledge-bases/{knowledge_base_id}/documents', 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.tryprofound.com/v1/knowledge-bases/{knowledge_base_id}/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'text' => '<string>',
'folder' => '<string>'
]),
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.tryprofound.com/v1/knowledge-bases/{knowledge_base_id}/documents"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"text\": \"<string>\",\n \"folder\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.tryprofound.com/v1/knowledge-bases/{knowledge_base_id}/documents")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"text\": \"<string>\",\n \"folder\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryprofound.com/v1/knowledge-bases/{knowledge_base_id}/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"text\": \"<string>\",\n \"folder\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"name": "<string>",
"path": "<string>",
"folder": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Was this page helpful?