Update LLM
curl --request PATCH \
--url https://api.upon-ai.com/api/llms/{llmId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workspaceId": 123,
"general_prompt": "<string>",
"begin_message": "<string>",
"responsiveness": "<string>",
"model": "<string>",
"s2s_model": "<string>",
"begin_after_user_silence_ms": 123,
"model_temperature": 123,
"model_high_priority": true,
"tool_call_strict_mode": true,
"knowledge_base_ids": [
"<string>"
],
"general_tools": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>"
}
],
"states": [
{
"name": "<string>",
"state_prompt": "<string>",
"edges": [
{
"destination_state_name": "<string>",
"description": "<string>"
}
],
"tools": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>"
}
]
}
],
"starting_state": "<string>",
"default_dynamic_variables": {},
"mcps": [
{
"name": "<string>",
"url": "<string>",
"headers": {},
"query_params": {},
"timeout_ms": 123
}
]
}
'import requests
url = "https://api.upon-ai.com/api/llms/{llmId}"
payload = {
"workspaceId": 123,
"general_prompt": "<string>",
"begin_message": "<string>",
"responsiveness": "<string>",
"model": "<string>",
"s2s_model": "<string>",
"begin_after_user_silence_ms": 123,
"model_temperature": 123,
"model_high_priority": True,
"tool_call_strict_mode": True,
"knowledge_base_ids": ["<string>"],
"general_tools": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>"
}
],
"states": [
{
"name": "<string>",
"state_prompt": "<string>",
"edges": [
{
"destination_state_name": "<string>",
"description": "<string>"
}
],
"tools": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>"
}
]
}
],
"starting_state": "<string>",
"default_dynamic_variables": {},
"mcps": [
{
"name": "<string>",
"url": "<string>",
"headers": {},
"query_params": {},
"timeout_ms": 123
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
workspaceId: 123,
general_prompt: '<string>',
begin_message: '<string>',
responsiveness: '<string>',
model: '<string>',
s2s_model: '<string>',
begin_after_user_silence_ms: 123,
model_temperature: 123,
model_high_priority: true,
tool_call_strict_mode: true,
knowledge_base_ids: ['<string>'],
general_tools: [{name: '<string>', type: '<string>', description: '<string>'}],
states: [
{
name: '<string>',
state_prompt: '<string>',
edges: [{destination_state_name: '<string>', description: '<string>'}],
tools: [{name: '<string>', type: '<string>', description: '<string>'}]
}
],
starting_state: '<string>',
default_dynamic_variables: {},
mcps: [
{
name: '<string>',
url: '<string>',
headers: {},
query_params: {},
timeout_ms: 123
}
]
})
};
fetch('https://api.upon-ai.com/api/llms/{llmId}', 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.upon-ai.com/api/llms/{llmId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'workspaceId' => 123,
'general_prompt' => '<string>',
'begin_message' => '<string>',
'responsiveness' => '<string>',
'model' => '<string>',
's2s_model' => '<string>',
'begin_after_user_silence_ms' => 123,
'model_temperature' => 123,
'model_high_priority' => true,
'tool_call_strict_mode' => true,
'knowledge_base_ids' => [
'<string>'
],
'general_tools' => [
[
'name' => '<string>',
'type' => '<string>',
'description' => '<string>'
]
],
'states' => [
[
'name' => '<string>',
'state_prompt' => '<string>',
'edges' => [
[
'destination_state_name' => '<string>',
'description' => '<string>'
]
],
'tools' => [
[
'name' => '<string>',
'type' => '<string>',
'description' => '<string>'
]
]
]
],
'starting_state' => '<string>',
'default_dynamic_variables' => [
],
'mcps' => [
[
'name' => '<string>',
'url' => '<string>',
'headers' => [
],
'query_params' => [
],
'timeout_ms' => 123
]
]
]),
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.upon-ai.com/api/llms/{llmId}"
payload := strings.NewReader("{\n \"workspaceId\": 123,\n \"general_prompt\": \"<string>\",\n \"begin_message\": \"<string>\",\n \"responsiveness\": \"<string>\",\n \"model\": \"<string>\",\n \"s2s_model\": \"<string>\",\n \"begin_after_user_silence_ms\": 123,\n \"model_temperature\": 123,\n \"model_high_priority\": true,\n \"tool_call_strict_mode\": true,\n \"knowledge_base_ids\": [\n \"<string>\"\n ],\n \"general_tools\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"states\": [\n {\n \"name\": \"<string>\",\n \"state_prompt\": \"<string>\",\n \"edges\": [\n {\n \"destination_state_name\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"tools\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n }\n ],\n \"starting_state\": \"<string>\",\n \"default_dynamic_variables\": {},\n \"mcps\": [\n {\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"headers\": {},\n \"query_params\": {},\n \"timeout_ms\": 123\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.upon-ai.com/api/llms/{llmId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workspaceId\": 123,\n \"general_prompt\": \"<string>\",\n \"begin_message\": \"<string>\",\n \"responsiveness\": \"<string>\",\n \"model\": \"<string>\",\n \"s2s_model\": \"<string>\",\n \"begin_after_user_silence_ms\": 123,\n \"model_temperature\": 123,\n \"model_high_priority\": true,\n \"tool_call_strict_mode\": true,\n \"knowledge_base_ids\": [\n \"<string>\"\n ],\n \"general_tools\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"states\": [\n {\n \"name\": \"<string>\",\n \"state_prompt\": \"<string>\",\n \"edges\": [\n {\n \"destination_state_name\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"tools\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n }\n ],\n \"starting_state\": \"<string>\",\n \"default_dynamic_variables\": {},\n \"mcps\": [\n {\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"headers\": {},\n \"query_params\": {},\n \"timeout_ms\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.upon-ai.com/api/llms/{llmId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workspaceId\": 123,\n \"general_prompt\": \"<string>\",\n \"begin_message\": \"<string>\",\n \"responsiveness\": \"<string>\",\n \"model\": \"<string>\",\n \"s2s_model\": \"<string>\",\n \"begin_after_user_silence_ms\": 123,\n \"model_temperature\": 123,\n \"model_high_priority\": true,\n \"tool_call_strict_mode\": true,\n \"knowledge_base_ids\": [\n \"<string>\"\n ],\n \"general_tools\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"states\": [\n {\n \"name\": \"<string>\",\n \"state_prompt\": \"<string>\",\n \"edges\": [\n {\n \"destination_state_name\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"tools\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n }\n ],\n \"starting_state\": \"<string>\",\n \"default_dynamic_variables\": {},\n \"mcps\": [\n {\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"headers\": {},\n \"query_params\": {},\n \"timeout_ms\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"llm_id": "<string>",
"display_name": "<string>",
"version": 123,
"model": "<string>",
"general_prompt": "<string>",
"begin_message": "<string>",
"responsiveness": "<string>",
"general_tools": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>"
}
],
"updated_at": "2023-11-07T05:31:56Z"
}LLM Models
Update LLM
Apply partial updates to an existing LLM configuration.
PATCH
/
api
/
llms
/
{llmId}
Update LLM
curl --request PATCH \
--url https://api.upon-ai.com/api/llms/{llmId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workspaceId": 123,
"general_prompt": "<string>",
"begin_message": "<string>",
"responsiveness": "<string>",
"model": "<string>",
"s2s_model": "<string>",
"begin_after_user_silence_ms": 123,
"model_temperature": 123,
"model_high_priority": true,
"tool_call_strict_mode": true,
"knowledge_base_ids": [
"<string>"
],
"general_tools": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>"
}
],
"states": [
{
"name": "<string>",
"state_prompt": "<string>",
"edges": [
{
"destination_state_name": "<string>",
"description": "<string>"
}
],
"tools": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>"
}
]
}
],
"starting_state": "<string>",
"default_dynamic_variables": {},
"mcps": [
{
"name": "<string>",
"url": "<string>",
"headers": {},
"query_params": {},
"timeout_ms": 123
}
]
}
'import requests
url = "https://api.upon-ai.com/api/llms/{llmId}"
payload = {
"workspaceId": 123,
"general_prompt": "<string>",
"begin_message": "<string>",
"responsiveness": "<string>",
"model": "<string>",
"s2s_model": "<string>",
"begin_after_user_silence_ms": 123,
"model_temperature": 123,
"model_high_priority": True,
"tool_call_strict_mode": True,
"knowledge_base_ids": ["<string>"],
"general_tools": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>"
}
],
"states": [
{
"name": "<string>",
"state_prompt": "<string>",
"edges": [
{
"destination_state_name": "<string>",
"description": "<string>"
}
],
"tools": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>"
}
]
}
],
"starting_state": "<string>",
"default_dynamic_variables": {},
"mcps": [
{
"name": "<string>",
"url": "<string>",
"headers": {},
"query_params": {},
"timeout_ms": 123
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
workspaceId: 123,
general_prompt: '<string>',
begin_message: '<string>',
responsiveness: '<string>',
model: '<string>',
s2s_model: '<string>',
begin_after_user_silence_ms: 123,
model_temperature: 123,
model_high_priority: true,
tool_call_strict_mode: true,
knowledge_base_ids: ['<string>'],
general_tools: [{name: '<string>', type: '<string>', description: '<string>'}],
states: [
{
name: '<string>',
state_prompt: '<string>',
edges: [{destination_state_name: '<string>', description: '<string>'}],
tools: [{name: '<string>', type: '<string>', description: '<string>'}]
}
],
starting_state: '<string>',
default_dynamic_variables: {},
mcps: [
{
name: '<string>',
url: '<string>',
headers: {},
query_params: {},
timeout_ms: 123
}
]
})
};
fetch('https://api.upon-ai.com/api/llms/{llmId}', 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.upon-ai.com/api/llms/{llmId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'workspaceId' => 123,
'general_prompt' => '<string>',
'begin_message' => '<string>',
'responsiveness' => '<string>',
'model' => '<string>',
's2s_model' => '<string>',
'begin_after_user_silence_ms' => 123,
'model_temperature' => 123,
'model_high_priority' => true,
'tool_call_strict_mode' => true,
'knowledge_base_ids' => [
'<string>'
],
'general_tools' => [
[
'name' => '<string>',
'type' => '<string>',
'description' => '<string>'
]
],
'states' => [
[
'name' => '<string>',
'state_prompt' => '<string>',
'edges' => [
[
'destination_state_name' => '<string>',
'description' => '<string>'
]
],
'tools' => [
[
'name' => '<string>',
'type' => '<string>',
'description' => '<string>'
]
]
]
],
'starting_state' => '<string>',
'default_dynamic_variables' => [
],
'mcps' => [
[
'name' => '<string>',
'url' => '<string>',
'headers' => [
],
'query_params' => [
],
'timeout_ms' => 123
]
]
]),
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.upon-ai.com/api/llms/{llmId}"
payload := strings.NewReader("{\n \"workspaceId\": 123,\n \"general_prompt\": \"<string>\",\n \"begin_message\": \"<string>\",\n \"responsiveness\": \"<string>\",\n \"model\": \"<string>\",\n \"s2s_model\": \"<string>\",\n \"begin_after_user_silence_ms\": 123,\n \"model_temperature\": 123,\n \"model_high_priority\": true,\n \"tool_call_strict_mode\": true,\n \"knowledge_base_ids\": [\n \"<string>\"\n ],\n \"general_tools\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"states\": [\n {\n \"name\": \"<string>\",\n \"state_prompt\": \"<string>\",\n \"edges\": [\n {\n \"destination_state_name\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"tools\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n }\n ],\n \"starting_state\": \"<string>\",\n \"default_dynamic_variables\": {},\n \"mcps\": [\n {\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"headers\": {},\n \"query_params\": {},\n \"timeout_ms\": 123\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.upon-ai.com/api/llms/{llmId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workspaceId\": 123,\n \"general_prompt\": \"<string>\",\n \"begin_message\": \"<string>\",\n \"responsiveness\": \"<string>\",\n \"model\": \"<string>\",\n \"s2s_model\": \"<string>\",\n \"begin_after_user_silence_ms\": 123,\n \"model_temperature\": 123,\n \"model_high_priority\": true,\n \"tool_call_strict_mode\": true,\n \"knowledge_base_ids\": [\n \"<string>\"\n ],\n \"general_tools\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"states\": [\n {\n \"name\": \"<string>\",\n \"state_prompt\": \"<string>\",\n \"edges\": [\n {\n \"destination_state_name\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"tools\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n }\n ],\n \"starting_state\": \"<string>\",\n \"default_dynamic_variables\": {},\n \"mcps\": [\n {\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"headers\": {},\n \"query_params\": {},\n \"timeout_ms\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.upon-ai.com/api/llms/{llmId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workspaceId\": 123,\n \"general_prompt\": \"<string>\",\n \"begin_message\": \"<string>\",\n \"responsiveness\": \"<string>\",\n \"model\": \"<string>\",\n \"s2s_model\": \"<string>\",\n \"begin_after_user_silence_ms\": 123,\n \"model_temperature\": 123,\n \"model_high_priority\": true,\n \"tool_call_strict_mode\": true,\n \"knowledge_base_ids\": [\n \"<string>\"\n ],\n \"general_tools\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"states\": [\n {\n \"name\": \"<string>\",\n \"state_prompt\": \"<string>\",\n \"edges\": [\n {\n \"destination_state_name\": \"<string>\",\n \"description\": \"<string>\"\n }\n ],\n \"tools\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n }\n ],\n \"starting_state\": \"<string>\",\n \"default_dynamic_variables\": {},\n \"mcps\": [\n {\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"headers\": {},\n \"query_params\": {},\n \"timeout_ms\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"llm_id": "<string>",
"display_name": "<string>",
"version": 123,
"model": "<string>",
"general_prompt": "<string>",
"begin_message": "<string>",
"responsiveness": "<string>",
"general_tools": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>"
}
],
"updated_at": "2023-11-07T05:31:56Z"
}Authorizations
Generate tokens from your profile settings at app.uponai.com.
Path Parameters
LLM identifier.
Query Parameters
Specific version to retrieve or update.
Required range:
x >= 1Body
application/json
Speech-to-speech model. Set either model or s2s_model, not both.
Available options:
user, agent Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
200 - application/json
Updated LLM configuration.
⌘I