Pular para o conteúdo

Create External Source

POST
/api/v1/ai/external-sources

Create a new External Knowledge Source.

x-tenant-id
Any of:
integer
ExternalSourceCreate

Schema for creating an External Source.

object
name
required
Name

Nome da fonte externa

string
>= 1 characters <= 255 characters
description
Any of:
string
source_type
required

Tipo da fonte de dados

string
Allowed values: json_api xml_api csv_url web_page rss_feed
url
required
Url

URL da fonte de dados

string
<= 1000 characters
http_method
Http Method

Método HTTP

string
default: GET
headers
Any of:
object
key
additional properties
string
query_params
Any of:
object
auth_type
Any of:
AuthType

Authentication types.

string
Allowed values: none bearer api_key basic oauth2
auth_config
Any of:
object
response_format

Formato da resposta

string
Allowed values: json xml csv html text
data_path
Any of:
string
<= 500 characters
mapping_config
Any of:
object
key
additional properties
string
cache_duration_seconds
Cache Duration Seconds

Duração do cache em segundos

integer
default: 300
assistant_template_codes
Any of:
Array<string>
trigger_keywords
Any of:
Array<string>
function_name
required
Function Name

Nome da função para LLM

string
>= 1 characters <= 100 characters
function_description
required
Function Description

Descrição da função para LLM

string
>= 1 characters
function_parameters
Any of:
object
is_active
Is Active

Se a fonte está ativa

boolean
default: true
result_filter_config
Any of:
ResultFilterConfig

Configuration for post-fetch result filtering.

object
enabled
Enabled

Se o filtro está ativo

boolean
default: true
mode

Modo de filtragem: keyword, exact, regex, starts_with, ends_with

string
Allowed values: keyword exact regex starts_with ends_with
field
required
Field

Campo principal para filtrar (ex: ‘name’)

string
>= 1 characters
param_mapping
required
Param Mapping

Parâmetro da function call com valor de busca (ex: ‘query’)

string
>= 1 characters
case_sensitive
Case Sensitive

Comparação case-sensitive

boolean
max_results
Any of:
integer
>= 1
fallback_on_empty
Fallback On Empty

Retornar todos os resultados se não houver match

boolean
additional_fields
Any of:
Array<string>

Successful Response

ExternalSourceResponse

Schema for External Source response.

object
name
required
Name

Nome da fonte externa

string
>= 1 characters <= 255 characters
description
Any of:
string
source_type
required

Tipo da fonte de dados

string
Allowed values: json_api xml_api csv_url web_page rss_feed
url
required
Url

URL da fonte de dados

string
<= 1000 characters
http_method
Http Method

Método HTTP

string
default: GET
headers
Any of:
object
key
additional properties
string
query_params
Any of:
object
auth_type
Any of:
AuthType

Authentication types.

string
Allowed values: none bearer api_key basic oauth2
auth_config
Any of:
object
response_format

Formato da resposta

string
Allowed values: json xml csv html text
data_path
Any of:
string
<= 500 characters
mapping_config
Any of:
object
key
additional properties
string
cache_duration_seconds
Cache Duration Seconds

Duração do cache em segundos

integer
default: 300
assistant_template_codes
Any of:
Array<string>
trigger_keywords
Any of:
Array<string>
function_name
required
Function Name

Nome da função para LLM

string
>= 1 characters <= 100 characters
function_description
required
Function Description

Descrição da função para LLM

string
>= 1 characters
function_parameters
Any of:
object
is_active
Is Active

Se a fonte está ativa

boolean
default: true
result_filter_config
Any of:
ResultFilterConfig

Configuration for post-fetch result filtering.

object
enabled
Enabled

Se o filtro está ativo

boolean
default: true
mode

Modo de filtragem: keyword, exact, regex, starts_with, ends_with

string
Allowed values: keyword exact regex starts_with ends_with
field
required
Field

Campo principal para filtrar (ex: ‘name’)

string
>= 1 characters
param_mapping
required
Param Mapping

Parâmetro da function call com valor de busca (ex: ‘query’)

string
>= 1 characters
case_sensitive
Case Sensitive

Comparação case-sensitive

boolean
max_results
Any of:
integer
>= 1
fallback_on_empty
Fallback On Empty

Retornar todos os resultados se não houver match

boolean
additional_fields
Any of:
Array<string>
id
required
Id
integer
last_used_at
Any of:
integer
last_success_at
Any of:
integer
last_error_at
Any of:
integer
last_error_message
Any of:
string
total_calls
Total Calls
integer
0
successful_calls
Successful Calls
integer
0
failed_calls
Failed Calls
integer
0
avg_response_time_ms
Any of:
integer
created_by
required
Created By
integer
created_at
required
Created At
string format: date-time
updated_at
required
Updated At
string format: date-time
deleted_at
Any of:
string format: date-time

Validation Error

HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string