POST
/
api
/
datastores
/
update
/
{datastoreId}
curl --location --request POST 'https://gptbots.chat/api/datastores/update/<datastoreId>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_KEY>' \
--data-raw '{
    "id": "<datasourceID>",
    "text": "Lorem Ipsum...",
    "name": "My Document",
    "metadata": {
      "source" : "https://en.wikipedia.org/wiki/Lorem_ipsum",
      "author": "John Doe",
      "date": "2021-01-01",
    }
}'
{
  "id": "60f9b9f0-0b1a-11ec-9a03-0242ac130003"
}

Path

datastoreId
string
required
Идентификатор хранилища данных, к которому вы хотите получить доступ.

Body

id
string
required
Идентификатор источника данных, который вы хотите обновить.
text
string
required
name
string
Имя источника данных.
metadata
JSON or null
Объект метаданных источника данных.

Response

id
string
curl --location --request POST 'https://gptbots.chat/api/datastores/update/<datastoreId>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_KEY>' \
--data-raw '{
    "id": "<datasourceID>",
    "text": "Lorem Ipsum...",
    "name": "My Document",
    "metadata": {
      "source" : "https://en.wikipedia.org/wiki/Lorem_ipsum",
      "author": "John Doe",
      "date": "2021-01-01",
    }
}'
{
  "id": "60f9b9f0-0b1a-11ec-9a03-0242ac130003"
}