💻Inserting with API - encoding before inserting

A simple tutorial on encoding before inserting

Option 1 - Encoding Before Inserting

Encoding before inserting can often be the best decision when you have a locally saved model and want to test it out without having to deploy it. This allows you to quickly test if the model will be a good fit (and is even faster if you are using the Vector AI API and SDK).

If you are looking to insert, you will be using the following API endpoint.

import requests
url = "https://vectorai-development-api.azurewebsites.net/collection/bulk_insert" 
response = requests.post(
    url=url,
        json={
        "username": "string",
        "api_key": "string",
        "collection_name": "string",
        "documents": [{},{}],
        "insert_date": true,
        "overwrite": true,
        "update_schema": true,
        "quick": false,
        "pipeline": [ ]
        }
    )

The documentation for this endpoint can be found in the API.

If the collection name does not exist, Vector AI will automatically create a collection for you so you can just insert properly.

Last updated