Skip to content
Framework Docs

Get Data Sink

client.DataSinks.Get(ctx, dataSinkID) (*DataSink, error)
GET/api/v1/data-sinks/{data_sink_id}

Get a data sink by ID.

ParametersExpand Collapse
dataSinkID string
ReturnsExpand Collapse
type DataSink struct{…}

Schema for a data sink.

ID string

Unique identifier

formatuuid
Component DataSinkComponentUnion

Component that implements the data sink

One of the following:
type DataSinkComponentMap map[string, any]
type CloudPineconeVectorStore struct{…}

Cloud Pinecone Vector Store.

This class is used to store the configuration for a Pinecone vector store, so that it can be created and used in LlamaCloud.

Args: api_key (str): API key for authenticating with Pinecone index_name (str): name of the Pinecone index namespace (optional[str]): namespace to use in the Pinecone index insert_kwargs (optional[dict]): additional kwargs to pass during insertion

APIKey string

The API key for authenticating with Pinecone

formatpassword
IndexName string
ClassName stringoptional
InsertKwargs map[string, any]optional
Namespace stringoptional
SupportsNestedMetadataFilters booloptional
type CloudPostgresVectorStore struct{…}
Database string
EmbedDim int64
Host string
Password string
Port int64
SchemaName string
TableName string
User string
ClassName stringoptional
HnswSettings PgVectorHnswSettingsoptional

HNSW settings for PGVector.

DistanceMethod PgVectorHnswSettingsDistanceMethodoptional

The distance method to use.

One of the following:
const PgVectorHnswSettingsDistanceMethodL2 PgVectorHnswSettingsDistanceMethod = "l2"
const PgVectorHnswSettingsDistanceMethodIP PgVectorHnswSettingsDistanceMethod = "ip"
const PgVectorHnswSettingsDistanceMethodCosine PgVectorHnswSettingsDistanceMethod = "cosine"
const PgVectorHnswSettingsDistanceMethodL1 PgVectorHnswSettingsDistanceMethod = "l1"
const PgVectorHnswSettingsDistanceMethodHamming PgVectorHnswSettingsDistanceMethod = "hamming"
const PgVectorHnswSettingsDistanceMethodJaccard PgVectorHnswSettingsDistanceMethod = "jaccard"
EfConstruction int64optional

The number of edges to use during the construction phase.

minimum1

The number of edges to use during the search phase.

minimum1
M int64optional

The number of bi-directional links created for each new element.

minimum1
VectorType PgVectorHnswSettingsVectorTypeoptional

The type of vector to use.

One of the following:
const PgVectorHnswSettingsVectorTypeVector PgVectorHnswSettingsVectorType = "vector"
const PgVectorHnswSettingsVectorTypeHalfVec PgVectorHnswSettingsVectorType = "half_vec"
const PgVectorHnswSettingsVectorTypeBit PgVectorHnswSettingsVectorType = "bit"
const PgVectorHnswSettingsVectorTypeSparseVec PgVectorHnswSettingsVectorType = "sparse_vec"
PerformSetup booloptional
SupportsNestedMetadataFilters booloptional
type CloudQdrantVectorStore struct{…}

Cloud Qdrant Vector Store.

This class is used to store the configuration for a Qdrant vector store, so that it can be created and used in LlamaCloud.

Args: collection_name (str): name of the Qdrant collection url (str): url of the Qdrant instance api_key (str): API key for authenticating with Qdrant max_retries (int): maximum number of retries in case of a failure. Defaults to 3 client_kwargs (dict): additional kwargs to pass to the Qdrant client

APIKey string
CollectionName string
URL string
ClassName stringoptional
ClientKwargs map[string, any]optional
MaxRetries int64optional
SupportsNestedMetadataFilters booloptional
type CloudAzureAISearchVectorStore struct{…}

Cloud Azure AI Search Vector Store.

SearchServiceAPIKey string
SearchServiceEndpoint string
ClassName stringoptional
ClientID stringoptional
ClientSecret stringoptional
EmbeddingDimension int64optional
FilterableMetadataFieldKeys map[string, any]optional
IndexName stringoptional
SearchServiceAPIVersion stringoptional
SupportsNestedMetadataFilters booloptional
TenantID stringoptional

Cloud MongoDB Atlas Vector Store.

This class is used to store the configuration for a MongoDB Atlas vector store, so that it can be created and used in LlamaCloud.

Args: mongodb_uri (str): URI for connecting to MongoDB Atlas db_name (str): name of the MongoDB database collection_name (str): name of the MongoDB collection vector_index_name (str): name of the MongoDB Atlas vector index fulltext_index_name (str): name of the MongoDB Atlas full-text index

type CloudMilvusVectorStore struct{…}

Cloud Milvus Vector Store.

Uri string
Token stringoptional
ClassName stringoptional
CollectionName stringoptional
EmbeddingDimension int64optional
SupportsNestedMetadataFilters booloptional
type CloudAstraDBVectorStore struct{…}

Cloud AstraDB Vector Store.

This class is used to store the configuration for an AstraDB vector store, so that it can be created and used in LlamaCloud.

Args: token (str): The Astra DB Application Token to use. api_endpoint (str): The Astra DB JSON API endpoint for your database. collection_name (str): Collection name to use. If not existing, it will be created. embedding_dimension (int): Length of the embedding vectors in use. keyspace (optional[str]): The keyspace to use. If not provided, 'default_keyspace'

Token string

The Astra DB Application Token to use

formatpassword
APIEndpoint string

The Astra DB JSON API endpoint for your database

CollectionName string

Collection name to use. If not existing, it will be created

EmbeddingDimension int64

Length of the embedding vectors in use

ClassName stringoptional
Keyspace stringoptional

The keyspace to use. If not provided, 'default_keyspace'

SupportsNestedMetadataFilters booloptional
Name string

The name of the data sink.

ProjectID string
SinkType DataSinkSinkType
One of the following:
const DataSinkSinkTypePinecone DataSinkSinkType = "PINECONE"
const DataSinkSinkTypePostgres DataSinkSinkType = "POSTGRES"
const DataSinkSinkTypeQdrant DataSinkSinkType = "QDRANT"
const DataSinkSinkTypeAzureaiSearch DataSinkSinkType = "AZUREAI_SEARCH"
const DataSinkSinkTypeMongoDBAtlas DataSinkSinkType = "MONGODB_ATLAS"
const DataSinkSinkTypeMilvus DataSinkSinkType = "MILVUS"
const DataSinkSinkTypeAstraDB DataSinkSinkType = "ASTRA_DB"
CreatedAt Timeoptional

Creation datetime

formatdate-time
UpdatedAt Timeoptional

Update datetime

formatdate-time

Get Data Sink

package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/llamacloud-prod-go"
  "github.com/stainless-sdks/llamacloud-prod-go/option"
)

func main() {
  client := llamacloudprod.NewClient(
    option.WithAPIKey("My API Key"),
  )
  dataSink, err := client.DataSinks.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", dataSink.ID)
}
{
  "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "component": {
    "foo": "bar"
  },
  "name": "name",
  "project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "sink_type": "PINECONE",
  "created_at": "2019-12-27T18:11:19.117Z",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
Returns Examples
{
  "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "component": {
    "foo": "bar"
  },
  "name": "name",
  "project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "sink_type": "PINECONE",
  "created_at": "2019-12-27T18:11:19.117Z",
  "updated_at": "2019-12-27T18:11:19.117Z"
}