curl --location --request POST 'https://app.gpt-trainer.com/api/v1/chatbot/<uuid>/source-tag/create' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"name": "string",
"color": "#088F8F",
}'
import requests
url = 'https://app.gpt-trainer.com/api/v1/chatbot/<uuid>/source-tag/create'
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer <token>'
}
data = {
"name": "string",
"color": "#088F8F",
}
response = requests.post(url, headers=headers, json=data)
if response.status_code == 200:
print("Request successful!")
print(response.json())
else:
print("Request failed with status code:", response.status_code)
print(response.text)
const axios = require("axios");
const url =
"https://app.gpt-trainer.com/api/v1/chatbot/{uuid}/source-tags/create";
const headers = {
"Content-Type": "application/json",
Authorization: "Bearer <token>",
};
const data = {
name: "string",
color: "#088F8F",
};
axios
.post(url, data, { headers })
.then((response) => {
console.log("Request successful!");
console.log(response.data);
})
.catch((error) => {
console.error("Request failed:", error);
});
{
"color": "#088F8F",
"created_at": "2024-09-12T00:19:12Z",
"data_source_uuids": [],
"modified_at": "2024-09-12T00:19:12Z",
"name": "string",
"uuid": "d6099f4845794b4bb088b291fc3ef23a"
}
Data Source Tags
Create Source Tag
Create a source tag for a chatbot. Source tags can be used to organize sources.
POST
/
api
/
v1
/
chatbot
/
<uuid>
/
source-tag
/
create
curl --location --request POST 'https://app.gpt-trainer.com/api/v1/chatbot/<uuid>/source-tag/create' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"name": "string",
"color": "#088F8F",
}'
import requests
url = 'https://app.gpt-trainer.com/api/v1/chatbot/<uuid>/source-tag/create'
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer <token>'
}
data = {
"name": "string",
"color": "#088F8F",
}
response = requests.post(url, headers=headers, json=data)
if response.status_code == 200:
print("Request successful!")
print(response.json())
else:
print("Request failed with status code:", response.status_code)
print(response.text)
const axios = require("axios");
const url =
"https://app.gpt-trainer.com/api/v1/chatbot/{uuid}/source-tags/create";
const headers = {
"Content-Type": "application/json",
Authorization: "Bearer <token>",
};
const data = {
name: "string",
color: "#088F8F",
};
axios
.post(url, data, { headers })
.then((response) => {
console.log("Request successful!");
console.log(response.data);
})
.catch((error) => {
console.error("Request failed:", error);
});
{
"color": "#088F8F",
"created_at": "2024-09-12T00:19:12Z",
"data_source_uuids": [],
"modified_at": "2024-09-12T00:19:12Z",
"name": "string",
"uuid": "d6099f4845794b4bb088b291fc3ef23a"
}
Path
Chatbot uuid
Body
The color of the tag in code format, e.g. #088F8F
The list of data sources to initially be included in the source tag.
Response
curl --location --request POST 'https://app.gpt-trainer.com/api/v1/chatbot/<uuid>/source-tag/create' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"name": "string",
"color": "#088F8F",
}'
import requests
url = 'https://app.gpt-trainer.com/api/v1/chatbot/<uuid>/source-tag/create'
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer <token>'
}
data = {
"name": "string",
"color": "#088F8F",
}
response = requests.post(url, headers=headers, json=data)
if response.status_code == 200:
print("Request successful!")
print(response.json())
else:
print("Request failed with status code:", response.status_code)
print(response.text)
const axios = require("axios");
const url =
"https://app.gpt-trainer.com/api/v1/chatbot/{uuid}/source-tags/create";
const headers = {
"Content-Type": "application/json",
Authorization: "Bearer <token>",
};
const data = {
name: "string",
color: "#088F8F",
};
axios
.post(url, data, { headers })
.then((response) => {
console.log("Request successful!");
console.log(response.data);
})
.catch((error) => {
console.error("Request failed:", error);
});
{
"color": "#088F8F",
"created_at": "2024-09-12T00:19:12Z",
"data_source_uuids": [],
"modified_at": "2024-09-12T00:19:12Z",
"name": "string",
"uuid": "d6099f4845794b4bb088b291fc3ef23a"
}
⌘I