Skip to content

Latest commit

 

History

History
387 lines (264 loc) · 15 KB

File metadata and controls

387 lines (264 loc) · 15 KB

QuantClient\AIVectorDatabaseApi

All URIs are relative to https://dashboard.quantcdn.io, except if the operation defines another base path.

Method HTTP request Description
createVectorCollection() POST /api/v3/organizations/{organisation}/ai/vector-db/collections Create Vector Database Collection
deleteVectorCollection() DELETE /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId} Delete Collection
getVectorCollection() GET /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId} Get Collection Details
listVectorCollections() GET /api/v3/organizations/{organisation}/ai/vector-db/collections List Vector Database Collections
queryVectorCollection() POST /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/query Semantic Search Query
uploadVectorDocuments() POST /api/v3/organizations/{organisation}/ai/vector-db/collections/{collectionId}/documents Upload Documents to Collection

createVectorCollection()

createVectorCollection($organisation, $create_vector_collection_request): \QuantClient\Model\CreateVectorCollection201Response

Create Vector Database Collection

Creates a new vector database collection (knowledge base category) for semantic search. Collections store documents with embeddings for RAG (Retrieval Augmented Generation). * * Use Cases: * - Product documentation ('docs') * - Company policies ('policies') * - Support knowledge base ('support') * - Technical specifications ('specs')

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer (JWT) authorization: BearerAuth
$config = QuantClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new QuantClient\Api\AIVectorDatabaseApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$organisation = 'organisation_example'; // string | The organisation ID
$create_vector_collection_request = new \QuantClient\Model\CreateVectorCollectionRequest(); // \QuantClient\Model\CreateVectorCollectionRequest

try {
    $result = $apiInstance->createVectorCollection($organisation, $create_vector_collection_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AIVectorDatabaseApi->createVectorCollection: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
organisation string The organisation ID
create_vector_collection_request \QuantClient\Model\CreateVectorCollectionRequest

Return type

\QuantClient\Model\CreateVectorCollection201Response

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteVectorCollection()

deleteVectorCollection($organisation, $collection_id): \QuantClient\Model\DeleteVectorCollection200Response

Delete Collection

Deletes a vector database collection and all its documents. This action cannot be undone.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer (JWT) authorization: BearerAuth
$config = QuantClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new QuantClient\Api\AIVectorDatabaseApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$organisation = 'organisation_example'; // string | The organisation ID
$collection_id = 'collection_id_example'; // string | The collection ID

try {
    $result = $apiInstance->deleteVectorCollection($organisation, $collection_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AIVectorDatabaseApi->deleteVectorCollection: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
organisation string The organisation ID
collection_id string The collection ID

Return type

\QuantClient\Model\DeleteVectorCollection200Response

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getVectorCollection()

getVectorCollection($organisation, $collection_id): \QuantClient\Model\GetVectorCollection200Response

Get Collection Details

Get detailed information about a specific vector database collection.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer (JWT) authorization: BearerAuth
$config = QuantClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new QuantClient\Api\AIVectorDatabaseApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$organisation = 'organisation_example'; // string | The organisation ID
$collection_id = 'collection_id_example'; // string | The collection ID

try {
    $result = $apiInstance->getVectorCollection($organisation, $collection_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AIVectorDatabaseApi->getVectorCollection: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
organisation string The organisation ID
collection_id string The collection ID

Return type

\QuantClient\Model\GetVectorCollection200Response

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listVectorCollections()

listVectorCollections($organisation): \QuantClient\Model\ListVectorCollections200Response

List Vector Database Collections

Lists all vector database collections (knowledge bases) for an organization.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer (JWT) authorization: BearerAuth
$config = QuantClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new QuantClient\Api\AIVectorDatabaseApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$organisation = 'organisation_example'; // string | The organisation ID

try {
    $result = $apiInstance->listVectorCollections($organisation);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AIVectorDatabaseApi->listVectorCollections: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
organisation string The organisation ID

Return type

\QuantClient\Model\ListVectorCollections200Response

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

queryVectorCollection()

queryVectorCollection($organisation, $collection_id, $query_vector_collection_request): \QuantClient\Model\QueryVectorCollection200Response

Semantic Search Query

Performs semantic search on a collection using vector similarity. Returns the most relevant documents based on meaning, not keyword matching. * * Three Search Modes: * * 1. Text Query - Provide query string, server generates embedding * - Query text is embedded using the collection's embedding model * - Embeddings are cached for repeated queries * * 2. Vector Query - Provide pre-computed vector array * - Skip embedding generation (faster) * - Useful when you've already embedded the query elsewhere * - Vector dimension must match collection (e.g., 1024 for Titan v2) * * 3. Metadata List - Set listByMetadata: true with filter * - Skip semantic search entirely * - Return all documents matching the filter * - Supports cursor-based pagination for large datasets * - Results ordered by sortBy/sortOrder (default: created_at DESC) * * Filtering: * - filter.exact: Exact match on metadata fields (AND logic) * - filter.contains: Array contains filter for tags (ANY match) * - Filters can be combined with semantic search or used alone with listByMetadata * * Pagination (listByMetadata mode only): * - Use cursor from previous response's nextCursor to get next page * - Uses keyset pagination for efficient traversal of large datasets * - Control sort with sortBy and sortOrder * * Use Cases: * - Find relevant documentation for user questions * - Power RAG (Retrieval Augmented Generation) in AI assistants * - Semantic search across knowledge bases * - List all artifacts by building/worker/tag

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer (JWT) authorization: BearerAuth
$config = QuantClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new QuantClient\Api\AIVectorDatabaseApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$organisation = 'organisation_example'; // string | The organisation ID
$collection_id = 'collection_id_example'; // string | The collection ID
$query_vector_collection_request = new \QuantClient\Model\QueryVectorCollectionRequest(); // \QuantClient\Model\QueryVectorCollectionRequest

try {
    $result = $apiInstance->queryVectorCollection($organisation, $collection_id, $query_vector_collection_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AIVectorDatabaseApi->queryVectorCollection: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
organisation string The organisation ID
collection_id string The collection ID
query_vector_collection_request \QuantClient\Model\QueryVectorCollectionRequest

Return type

\QuantClient\Model\QueryVectorCollection200Response

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

uploadVectorDocuments()

uploadVectorDocuments($organisation, $collection_id, $upload_vector_documents_request): \QuantClient\Model\UploadVectorDocuments200Response

Upload Documents to Collection

Uploads documents to a vector database collection with automatic embedding generation. Documents are chunked (if needed), embedded using the collection's embedding model, and stored. * * Supported Content: * - Plain text content * - URLs to fetch content from * - Markdown documents * * Metadata: * Each document can include metadata (title, source_url, section, tags) that is returned with search results.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer (JWT) authorization: BearerAuth
$config = QuantClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new QuantClient\Api\AIVectorDatabaseApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$organisation = 'organisation_example'; // string | The organisation ID
$collection_id = 'collection_id_example'; // string | The collection ID
$upload_vector_documents_request = new \QuantClient\Model\UploadVectorDocumentsRequest(); // \QuantClient\Model\UploadVectorDocumentsRequest

try {
    $result = $apiInstance->uploadVectorDocuments($organisation, $collection_id, $upload_vector_documents_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AIVectorDatabaseApi->uploadVectorDocuments: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
organisation string The organisation ID
collection_id string The collection ID
upload_vector_documents_request \QuantClient\Model\UploadVectorDocumentsRequest

Return type

\QuantClient\Model\UploadVectorDocuments200Response

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]