Remove Assistant Tool
DELETE
/
ai
/
assistants
/
{assistant_id}
/
tools
/
{tool_id}
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const tool = await client.ai.assistants.tools.remove('tool_id', { assistant_id: 'assistant_id' });
console.log(tool);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
tool = client.ai.assistants.tools.remove(
tool_id="tool_id",
assistant_id="assistant_id",
)
print(tool)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
tool, err := client.AI.Assistants.Tools.Remove(
context.TODO(),
"tool_id",
telnyx.AIAssistantToolRemoveParams{
AssistantID: "assistant_id",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", tool)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.ai.assistants.tools.ToolRemoveParams;
import com.telnyx.sdk.models.ai.assistants.tools.ToolRemoveResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ToolRemoveParams params = ToolRemoveParams.builder()
.assistantId("assistant_id")
.toolId("tool_id")
.build();
ToolRemoveResponse tool = client.ai().assistants().tools().remove(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
tool = telnyx.ai.assistants.tools.remove("tool_id", assistant_id: "assistant_id")
puts(tool)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$tool = $client->ai->assistants->tools->remove(
'tool_id', assistantID: 'assistant_id'
);
var_dump($tool);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx ai:assistants:tools remove \
--api-key 'My API Key' \
--assistant-id assistant_id \
--tool-id tool_idcurl --request DELETE \
--url https://api.telnyx.com/v2/ai/assistants/{assistant_id}/tools/{tool_id} \
--header 'Authorization: Bearer <token>'{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Was this page helpful?
⌘I
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const tool = await client.ai.assistants.tools.remove('tool_id', { assistant_id: 'assistant_id' });
console.log(tool);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
tool = client.ai.assistants.tools.remove(
tool_id="tool_id",
assistant_id="assistant_id",
)
print(tool)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
tool, err := client.AI.Assistants.Tools.Remove(
context.TODO(),
"tool_id",
telnyx.AIAssistantToolRemoveParams{
AssistantID: "assistant_id",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", tool)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.ai.assistants.tools.ToolRemoveParams;
import com.telnyx.sdk.models.ai.assistants.tools.ToolRemoveResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ToolRemoveParams params = ToolRemoveParams.builder()
.assistantId("assistant_id")
.toolId("tool_id")
.build();
ToolRemoveResponse tool = client.ai().assistants().tools().remove(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
tool = telnyx.ai.assistants.tools.remove("tool_id", assistant_id: "assistant_id")
puts(tool)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$tool = $client->ai->assistants->tools->remove(
'tool_id', assistantID: 'assistant_id'
);
var_dump($tool);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx ai:assistants:tools remove \
--api-key 'My API Key' \
--assistant-id assistant_id \
--tool-id tool_idcurl --request DELETE \
--url https://api.telnyx.com/v2/ai/assistants/{assistant_id}/tools/{tool_id} \
--header 'Authorization: Bearer <token>'{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}