Returns the retrieval settings for a collection.
GET
/
ai
/
collections
/
{uuid}
/
settings
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const response of client.ai.collections.settings.list()) {
console.log(response);
}import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
page = client.ai.collections.settings.list(
"uuid",
)
print(page.data)
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"),
)
settings, err := client.AI.Collections.Settings.List(
context.TODO(),
"uuid",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", settings.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
var page = client.ai().collections().settings().list("uuid");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
page = telnyx.ai.collections.settings.list("uuid")
puts(page)<?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 {
$page = $client->ai->collections->settings->list(
'uuid',
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx ai:collections:settings list \
--api-key 'My API Key' \
--uuid 6a09ccbd-8f9b-4c3a-9b0e-2f1d3c4b5a6ecurl --request GET \
--url https://api.telnyx.com/v2/ai/collections/{uuid}/settings \
--header 'Authorization: Bearer <token>'{
"data": {
"record_type": "ai_collection_settings",
"retrieval": {
"top_k": 5,
"retrieval_type": "vector"
}
}
}{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "The required authentication headers were either invalid or not included in the request.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10009"
}
}
]
}{
"errors": [
{
"code": "collection_not_found",
"title": "Collection not found",
"detail": "No collection with uuid 'b3b1c8a2-9f4e-4d2a-9c1e-2f7a6d5b4c3a' exists for this account."
}
]
}Authorizations
Telnyx API key. Collections and results are automatically scoped to the authenticated user's organization.
Path Parameters
The collection's unique identifier.
Example:
"6a09ccbd-8f9b-4c3a-9b0e-2f1d3c4b5a6e"
Response
The collection's retrieval settings.
Show child attributes
Show child attributes
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
});
// Automatically fetches more pages as needed.
for await (const response of client.ai.collections.settings.list()) {
console.log(response);
}import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
page = client.ai.collections.settings.list(
"uuid",
)
print(page.data)
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"),
)
settings, err := client.AI.Collections.Settings.List(
context.TODO(),
"uuid",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", settings.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
var page = client.ai().collections().settings().list("uuid");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
page = telnyx.ai.collections.settings.list("uuid")
puts(page)<?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 {
$page = $client->ai->collections->settings->list(
'uuid',
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx ai:collections:settings list \
--api-key 'My API Key' \
--uuid 6a09ccbd-8f9b-4c3a-9b0e-2f1d3c4b5a6ecurl --request GET \
--url https://api.telnyx.com/v2/ai/collections/{uuid}/settings \
--header 'Authorization: Bearer <token>'{
"data": {
"record_type": "ai_collection_settings",
"retrieval": {
"top_k": 5,
"retrieval_type": "vector"
}
}
}{
"errors": [
{
"code": "10009",
"title": "Authentication failed",
"detail": "The required authentication headers were either invalid or not included in the request.",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10009"
}
}
]
}{
"errors": [
{
"code": "collection_not_found",
"title": "Collection not found",
"detail": "No collection with uuid 'b3b1c8a2-9f4e-4d2a-9c1e-2f7a6d5b4c3a' exists for this account."
}
]
}