PUT
/
api
/
v1
/
data_sources
import { SyllableSDK } from "syllable-sdk";

const syllableSDK = new SyllableSDK({
  apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
});

async function run() {
  const result = await syllableSDK.dataSources.update({
    name: "Rain",
    description: "Information about rain.",
    labels: [
      "Weather Info",
    ],
    chunk: false,
    chunkDelimiter: "",
    id: 1,
    editComments: "Added new info",
    text: "<value>",
  });

  // Handle the result
  console.log(result);
}

run();
{
  "name": "Rain",
  "description": "Information about rain.",
  "labels": [
    "Weather Info"
  ],
  "chunk": false,
  "chunk_delimiter": "",
  "id": 1,
  "edit_comments": "Added new info",
  "updated_at": "2023-11-07T05:31:56Z",
  "last_updated_by": "user@email.com",
  "text": "<string>"
}

Authorizations

Syllable-API-Key
string
header
required

Body

application/json
name
string
required

The data source name. Must be unique within suborg. Cannot contain whitespace.

Example:

"Rain"

chunk
boolean
required

Whether the content should be split into smaller chunks. (This feature is coming in the future - currently this value will always be treated as False.)

Example:

false

id
integer
required

The data source ID.

Example:

1

text
string
required

Information that the data source will provide to the agent accessing it.

description
string | null

The description of the data source.

Example:

"Information about rain."

labels
string[]

Searchable labels for the data source. Can be included in agent.prompt_tool_defaults for a given tool to give the agent access to data sources with those labels when calling that tool.

Example:
["Weather Info"]
chunk_delimiter
string | null

String that should be treated as delimiter between intended chunks. (This feature is coming in the future - currently this value will always be treated as None.)

Example:

""

edit_comments
string | null

The comments for the most recent edit to the data source

Example:

"Added new info"

Response

200
application/json
Successful Response

Metadata about a data source, along with the text.

name
string
required

The data source name. Must be unique within suborg. Cannot contain whitespace.

Example:

"Rain"

chunk
boolean
required

Whether the content should be split into smaller chunks. (This feature is coming in the future - currently this value will always be treated as False.)

Example:

false

id
integer
required

The data source ID.

Example:

1

updated_at
string
required

Timestamp of most recent update

last_updated_by
string | null
required

Email of the user who last updated the data source

Example:

"user@email.com"

text
string
required

Information that the data source will provide to the agent accessing it.

description
string | null

The description of the data source.

Example:

"Information about rain."

labels
string[]

Searchable labels for the data source. Can be included in agent.prompt_tool_defaults for a given tool to give the agent access to data sources with those labels when calling that tool.

Example:
["Weather Info"]
chunk_delimiter
string | null

String that should be treated as delimiter between intended chunks. (This feature is coming in the future - currently this value will always be treated as None.)

Example:

""

edit_comments
string | null

The comments for the most recent edit to the data source

Example:

"Added new info"