Create Tool
curl --request POST \
--url https://api.in.talqing.com/v1/tools \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "",
"disable_interruptions": false,
"json_schema": {},
"long_running_task": false,
"operations": [
{
"config": {
"url": "<string>",
"body": "<unknown>",
"headers": {},
"query": {},
"timeout": 60
},
"kind": "http",
"background_execution": false,
"on_error": "abort",
"publish_fields": [
{
"path": "<string>",
"key": "<string>"
}
],
"silent": false
}
],
"silent": false
}
'import requests
url = "https://api.in.talqing.com/v1/tools"
payload = {
"name": "<string>",
"description": "",
"disable_interruptions": False,
"json_schema": {},
"long_running_task": False,
"operations": [
{
"config": {
"url": "<string>",
"body": "<unknown>",
"headers": {},
"query": {},
"timeout": 60
},
"kind": "http",
"background_execution": False,
"on_error": "abort",
"publish_fields": [
{
"path": "<string>",
"key": "<string>"
}
],
"silent": False
}
],
"silent": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '',
disable_interruptions: false,
json_schema: {},
long_running_task: false,
operations: [
{
config: {
url: '<string>',
body: JSON.stringify('<unknown>'),
headers: {},
query: {},
timeout: 60
},
kind: 'http',
background_execution: false,
on_error: 'abort',
publish_fields: [{path: '<string>', key: '<string>'}],
silent: false
}
],
silent: false
})
};
fetch('https://api.in.talqing.com/v1/tools', 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.in.talqing.com/v1/tools",
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([
'name' => '<string>',
'description' => '',
'disable_interruptions' => false,
'json_schema' => [
],
'long_running_task' => false,
'operations' => [
[
'config' => [
'url' => '<string>',
'body' => '<unknown>',
'headers' => [
],
'query' => [
],
'timeout' => 60
],
'kind' => 'http',
'background_execution' => false,
'on_error' => 'abort',
'publish_fields' => [
[
'path' => '<string>',
'key' => '<string>'
]
],
'silent' => false
]
],
'silent' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.in.talqing.com/v1/tools"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"\",\n \"disable_interruptions\": false,\n \"json_schema\": {},\n \"long_running_task\": false,\n \"operations\": [\n {\n \"config\": {\n \"url\": \"<string>\",\n \"body\": \"<unknown>\",\n \"headers\": {},\n \"query\": {},\n \"timeout\": 60\n },\n \"kind\": \"http\",\n \"background_execution\": false,\n \"on_error\": \"abort\",\n \"publish_fields\": [\n {\n \"path\": \"<string>\",\n \"key\": \"<string>\"\n }\n ],\n \"silent\": false\n }\n ],\n \"silent\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.in.talqing.com/v1/tools")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"\",\n \"disable_interruptions\": false,\n \"json_schema\": {},\n \"long_running_task\": false,\n \"operations\": [\n {\n \"config\": {\n \"url\": \"<string>\",\n \"body\": \"<unknown>\",\n \"headers\": {},\n \"query\": {},\n \"timeout\": 60\n },\n \"kind\": \"http\",\n \"background_execution\": false,\n \"on_error\": \"abort\",\n \"publish_fields\": [\n {\n \"path\": \"<string>\",\n \"key\": \"<string>\"\n }\n ],\n \"silent\": false\n }\n ],\n \"silent\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.in.talqing.com/v1/tools")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"\",\n \"disable_interruptions\": false,\n \"json_schema\": {},\n \"long_running_task\": false,\n \"operations\": [\n {\n \"config\": {\n \"url\": \"<string>\",\n \"body\": \"<unknown>\",\n \"headers\": {},\n \"query\": {},\n \"timeout\": 60\n },\n \"kind\": \"http\",\n \"background_execution\": false,\n \"on_error\": \"abort\",\n \"publish_fields\": [\n {\n \"path\": \"<string>\",\n \"key\": \"<string>\"\n }\n ],\n \"silent\": false\n }\n ],\n \"silent\": false\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"disable_interruptions": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"json_schema": {},
"long_running_task": true,
"name": "<string>",
"operations": [
{
"config": {
"method": "GET",
"url": "<string>",
"body": "<unknown>",
"headers": {},
"query": {},
"timeout": 60
},
"kind": "http",
"background_execution": false,
"on_error": "abort",
"publish_fields": [
{
"path": "<string>",
"store": "tooldata",
"key": "<string>"
}
],
"silent": false
}
],
"silent": true,
"updated_at": "2023-11-07T05:31:56Z",
"created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"published_at": "2023-11-07T05:31:56Z",
"published_version": 123,
"versions": [
{
"published_at": "2023-11-07T05:31:56Z",
"version": 123,
"changelog": "<string>"
}
]
}{
"detail": {
"errors": [
"<string>"
],
"message": "<string>"
}
}{
"detail": {
"errors": [
"<string>"
],
"message": "<string>"
}
}{
"detail": {
"errors": [
"<string>"
],
"message": "<string>"
}
}{
"detail": {
"errors": [
"<string>"
],
"message": "<string>"
}
}{
"detail": {
"errors": [
"<string>"
],
"message": "<string>"
}
}{
"detail": {
"errors": [
"<string>"
],
"message": "<string>"
}
}tools
Create Tool
Create a draft tool.
name is the function name the agent’s LLM sees, so it must be a valid
identifier and describe the capability. json_schema declares the arguments
that LLM supplies. operations may be sent here or added later with a
patch. The tool is a draft until published.
POST
/
v1
/
tools
Create Tool
curl --request POST \
--url https://api.in.talqing.com/v1/tools \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "",
"disable_interruptions": false,
"json_schema": {},
"long_running_task": false,
"operations": [
{
"config": {
"url": "<string>",
"body": "<unknown>",
"headers": {},
"query": {},
"timeout": 60
},
"kind": "http",
"background_execution": false,
"on_error": "abort",
"publish_fields": [
{
"path": "<string>",
"key": "<string>"
}
],
"silent": false
}
],
"silent": false
}
'import requests
url = "https://api.in.talqing.com/v1/tools"
payload = {
"name": "<string>",
"description": "",
"disable_interruptions": False,
"json_schema": {},
"long_running_task": False,
"operations": [
{
"config": {
"url": "<string>",
"body": "<unknown>",
"headers": {},
"query": {},
"timeout": 60
},
"kind": "http",
"background_execution": False,
"on_error": "abort",
"publish_fields": [
{
"path": "<string>",
"key": "<string>"
}
],
"silent": False
}
],
"silent": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '',
disable_interruptions: false,
json_schema: {},
long_running_task: false,
operations: [
{
config: {
url: '<string>',
body: JSON.stringify('<unknown>'),
headers: {},
query: {},
timeout: 60
},
kind: 'http',
background_execution: false,
on_error: 'abort',
publish_fields: [{path: '<string>', key: '<string>'}],
silent: false
}
],
silent: false
})
};
fetch('https://api.in.talqing.com/v1/tools', 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.in.talqing.com/v1/tools",
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([
'name' => '<string>',
'description' => '',
'disable_interruptions' => false,
'json_schema' => [
],
'long_running_task' => false,
'operations' => [
[
'config' => [
'url' => '<string>',
'body' => '<unknown>',
'headers' => [
],
'query' => [
],
'timeout' => 60
],
'kind' => 'http',
'background_execution' => false,
'on_error' => 'abort',
'publish_fields' => [
[
'path' => '<string>',
'key' => '<string>'
]
],
'silent' => false
]
],
'silent' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.in.talqing.com/v1/tools"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"\",\n \"disable_interruptions\": false,\n \"json_schema\": {},\n \"long_running_task\": false,\n \"operations\": [\n {\n \"config\": {\n \"url\": \"<string>\",\n \"body\": \"<unknown>\",\n \"headers\": {},\n \"query\": {},\n \"timeout\": 60\n },\n \"kind\": \"http\",\n \"background_execution\": false,\n \"on_error\": \"abort\",\n \"publish_fields\": [\n {\n \"path\": \"<string>\",\n \"key\": \"<string>\"\n }\n ],\n \"silent\": false\n }\n ],\n \"silent\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.in.talqing.com/v1/tools")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"\",\n \"disable_interruptions\": false,\n \"json_schema\": {},\n \"long_running_task\": false,\n \"operations\": [\n {\n \"config\": {\n \"url\": \"<string>\",\n \"body\": \"<unknown>\",\n \"headers\": {},\n \"query\": {},\n \"timeout\": 60\n },\n \"kind\": \"http\",\n \"background_execution\": false,\n \"on_error\": \"abort\",\n \"publish_fields\": [\n {\n \"path\": \"<string>\",\n \"key\": \"<string>\"\n }\n ],\n \"silent\": false\n }\n ],\n \"silent\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.in.talqing.com/v1/tools")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"\",\n \"disable_interruptions\": false,\n \"json_schema\": {},\n \"long_running_task\": false,\n \"operations\": [\n {\n \"config\": {\n \"url\": \"<string>\",\n \"body\": \"<unknown>\",\n \"headers\": {},\n \"query\": {},\n \"timeout\": 60\n },\n \"kind\": \"http\",\n \"background_execution\": false,\n \"on_error\": \"abort\",\n \"publish_fields\": [\n {\n \"path\": \"<string>\",\n \"key\": \"<string>\"\n }\n ],\n \"silent\": false\n }\n ],\n \"silent\": false\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"disable_interruptions": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"json_schema": {},
"long_running_task": true,
"name": "<string>",
"operations": [
{
"config": {
"method": "GET",
"url": "<string>",
"body": "<unknown>",
"headers": {},
"query": {},
"timeout": 60
},
"kind": "http",
"background_execution": false,
"on_error": "abort",
"publish_fields": [
{
"path": "<string>",
"store": "tooldata",
"key": "<string>"
}
],
"silent": false
}
],
"silent": true,
"updated_at": "2023-11-07T05:31:56Z",
"created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"published_at": "2023-11-07T05:31:56Z",
"published_version": 123,
"versions": [
{
"published_at": "2023-11-07T05:31:56Z",
"version": 123,
"changelog": "<string>"
}
]
}{
"detail": {
"errors": [
"<string>"
],
"message": "<string>"
}
}{
"detail": {
"errors": [
"<string>"
],
"message": "<string>"
}
}{
"detail": {
"errors": [
"<string>"
],
"message": "<string>"
}
}{
"detail": {
"errors": [
"<string>"
],
"message": "<string>"
}
}{
"detail": {
"errors": [
"<string>"
],
"message": "<string>"
}
}{
"detail": {
"errors": [
"<string>"
],
"message": "<string>"
}
}Authorizations
BearerAuthSessionCookie
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Pattern:
^[a-zA-Z_][a-zA-Z0-9_]*$operations
(HttpOperation · object | CodeOperation · object | FrontendRpcOperation · object | IfOperation · object | SetVariableOperation · object | SayOperation · object | GenerateReplyOperation · object | AddMessageOperation · object | EndCallOperation · object | HandoffOperation · object | TransferOperation · object)[]
- HttpOperation
- CodeOperation
- FrontendRpcOperation
- IfOperation
- SetVariableOperation
- SayOperation
- GenerateReplyOperation
- AddMessageOperation
- EndCallOperation
- HandoffOperation
- TransferOperation
Show child attributes
Show child attributes
Response
Successful Response
operations
(HttpOperation · object | CodeOperation · object | FrontendRpcOperation · object | IfOperation · object | SetVariableOperation · object | SayOperation · object | GenerateReplyOperation · object | AddMessageOperation · object | EndCallOperation · object | HandoffOperation · object | TransferOperation · object)[]
required
- HttpOperation
- CodeOperation
- FrontendRpcOperation
- IfOperation
- SetVariableOperation
- SayOperation
- GenerateReplyOperation
- AddMessageOperation
- EndCallOperation
- HandoffOperation
- TransferOperation
Show child attributes
Show child attributes
Show child attributes
Show child attributes