curl --request POST \
--url https://api.getoneprofile.ai/agents/assistant/conversations/{conversation_id}/turns/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"instruction": "<string>",
"summary": "<string>",
"added": 50000,
"inputs": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"prompt": {
"segments": [
{
"text": "<string>",
"type": "text"
}
]
},
"removed": 50000,
"status": "complete"
}
'import requests
url = "https://api.getoneprofile.ai/agents/assistant/conversations/{conversation_id}/turns/"
payload = {
"instruction": "<string>",
"summary": "<string>",
"added": 50000,
"inputs": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"prompt": { "segments": [
{
"text": "<string>",
"type": "text"
}
] },
"removed": 50000,
"status": "complete"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
instruction: '<string>',
summary: '<string>',
added: 50000,
inputs: [{id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', name: '<string>'}],
prompt: {segments: [{text: '<string>', type: 'text'}]},
removed: 50000,
status: 'complete'
})
};
fetch('https://api.getoneprofile.ai/agents/assistant/conversations/{conversation_id}/turns/', 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.getoneprofile.ai/agents/assistant/conversations/{conversation_id}/turns/",
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([
'instruction' => '<string>',
'summary' => '<string>',
'added' => 50000,
'inputs' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>'
]
],
'prompt' => [
'segments' => [
[
'text' => '<string>',
'type' => 'text'
]
]
],
'removed' => 50000,
'status' => 'complete'
]),
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.getoneprofile.ai/agents/assistant/conversations/{conversation_id}/turns/"
payload := strings.NewReader("{\n \"instruction\": \"<string>\",\n \"summary\": \"<string>\",\n \"added\": 50000,\n \"inputs\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\"\n }\n ],\n \"prompt\": {\n \"segments\": [\n {\n \"text\": \"<string>\",\n \"type\": \"text\"\n }\n ]\n },\n \"removed\": 50000,\n \"status\": \"complete\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.getoneprofile.ai/agents/assistant/conversations/{conversation_id}/turns/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"instruction\": \"<string>\",\n \"summary\": \"<string>\",\n \"added\": 50000,\n \"inputs\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\"\n }\n ],\n \"prompt\": {\n \"segments\": [\n {\n \"text\": \"<string>\",\n \"type\": \"text\"\n }\n ]\n },\n \"removed\": 50000,\n \"status\": \"complete\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/agents/assistant/conversations/{conversation_id}/turns/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"instruction\": \"<string>\",\n \"summary\": \"<string>\",\n \"added\": 50000,\n \"inputs\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\"\n }\n ],\n \"prompt\": {\n \"segments\": [\n {\n \"text\": \"<string>\",\n \"type\": \"text\"\n }\n ]\n },\n \"removed\": 50000,\n \"status\": \"complete\"\n}"
response = http.request(request)
puts response.read_body{
"added": 123,
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"inputs": [
{}
],
"instruction": "<string>",
"prompt_segments": [
{}
],
"removed": 123,
"sequence": 123,
"status": "complete",
"summary": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Record an agent builder turn
Record a turn made through the saved-agent prompt edit route: the instruction, the summary it answered with, the diff’s line counts, and the prompt and inputs as revised. A failed turn is recorded too, with status set to failed, so the thread shows what was asked. Nothing runs here and nothing is counted against the daily limit.
curl --request POST \
--url https://api.getoneprofile.ai/agents/assistant/conversations/{conversation_id}/turns/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"instruction": "<string>",
"summary": "<string>",
"added": 50000,
"inputs": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"prompt": {
"segments": [
{
"text": "<string>",
"type": "text"
}
]
},
"removed": 50000,
"status": "complete"
}
'import requests
url = "https://api.getoneprofile.ai/agents/assistant/conversations/{conversation_id}/turns/"
payload = {
"instruction": "<string>",
"summary": "<string>",
"added": 50000,
"inputs": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
}
],
"prompt": { "segments": [
{
"text": "<string>",
"type": "text"
}
] },
"removed": 50000,
"status": "complete"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
instruction: '<string>',
summary: '<string>',
added: 50000,
inputs: [{id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', name: '<string>'}],
prompt: {segments: [{text: '<string>', type: 'text'}]},
removed: 50000,
status: 'complete'
})
};
fetch('https://api.getoneprofile.ai/agents/assistant/conversations/{conversation_id}/turns/', 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.getoneprofile.ai/agents/assistant/conversations/{conversation_id}/turns/",
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([
'instruction' => '<string>',
'summary' => '<string>',
'added' => 50000,
'inputs' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>'
]
],
'prompt' => [
'segments' => [
[
'text' => '<string>',
'type' => 'text'
]
]
],
'removed' => 50000,
'status' => 'complete'
]),
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.getoneprofile.ai/agents/assistant/conversations/{conversation_id}/turns/"
payload := strings.NewReader("{\n \"instruction\": \"<string>\",\n \"summary\": \"<string>\",\n \"added\": 50000,\n \"inputs\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\"\n }\n ],\n \"prompt\": {\n \"segments\": [\n {\n \"text\": \"<string>\",\n \"type\": \"text\"\n }\n ]\n },\n \"removed\": 50000,\n \"status\": \"complete\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.getoneprofile.ai/agents/assistant/conversations/{conversation_id}/turns/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"instruction\": \"<string>\",\n \"summary\": \"<string>\",\n \"added\": 50000,\n \"inputs\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\"\n }\n ],\n \"prompt\": {\n \"segments\": [\n {\n \"text\": \"<string>\",\n \"type\": \"text\"\n }\n ]\n },\n \"removed\": 50000,\n \"status\": \"complete\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/agents/assistant/conversations/{conversation_id}/turns/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"instruction\": \"<string>\",\n \"summary\": \"<string>\",\n \"added\": 50000,\n \"inputs\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\"\n }\n ],\n \"prompt\": {\n \"segments\": [\n {\n \"text\": \"<string>\",\n \"type\": \"text\"\n }\n ]\n },\n \"removed\": 50000,\n \"status\": \"complete\"\n}"
response = http.request(request)
puts response.read_body{
"added": 123,
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"inputs": [
{}
],
"instruction": "<string>",
"prompt_segments": [
{}
],
"removed": 123,
"sequence": 123,
"status": "complete",
"summary": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
Path Parameters
Body
Record a turn the prompt edit route produced.
The change asked for, exactly as typed.
1 - 4000What the revision did, in one line, as the assistant said it.
1 - 2000Prompt lines the revision added. Leave both counts out for a revision that was not measured; 0 and 0 is a measured revision that changed no line.
0 <= x <= 100000The inputs the revised prompt declares, as the edit route returned them.
20Show child attributes
Show child attributes
The prompt as the edit route returned it. Send it so a reopened thread can show the revision; a failed turn has none.
Show child attributes
Show child attributes
Prompt lines the revision removed. Leave both counts out when not measured.
0 <= x <= 100000Whether a recorded turn's revision landed.
A failed turn stays in the thread rather than being dropped, so the person sees what was asked and that the prompt did not change.
complete, failed Response
Successful Response
One recorded turn: what was asked, and what the revision did.
Prompt lines the revision added; null, with removed, when the revision was not measured.
The inputs the revised prompt declares; null when the turn was recorded without them.
The prompt as revised, in the prompt edit route's segment shape; null when the turn was recorded without it.
Prompt lines the revision removed; null, with added, when the revision was not measured.
Whether a recorded turn's revision landed.
A failed turn stays in the thread rather than being dropped, so the person sees what was asked and that the prompt did not change.
complete, failed Was this page helpful?