PUT
/
api
/
v1
/
data_sources
import os
from syllable_sdk import SyllableSDK


with SyllableSDK(
    api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
) as ss_client:

    res = ss_client.data_sources.update(request={
        "name": "Rain",
        "description": "Information about rain.",
        "labels": [
            "Weather Info",
        ],
        "chunk": False,
        "chunk_delimiter": "",
        "id": 1,
        "edit_comments": "Added new info",
        "text": ("The following are names and addresses of pizza shops.\n"
        "\n"
        "Cool Pizza, 123 Main St.\n"
        "\n"
        "Really Good Pizza, 456 Water St.\n"
        "\n"
        "The Best Pizza, 789 Circle Dr."),
    })

    # Handle response
    print(res)
{
  "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

Request model to update an existing data source.

Response

200
application/json
Successful Response

Metadata about a data source, along with the text. A data source is a blob of text that can be made available to an agent's general info tools to provide more context to the agent when generating its responses. For more information, see Console docs.