Skip to main content

Data Structures

This is a collection of named tuples representing various data structures used in the Vecto Python SDK, which deals with processing and managing embeddings, attributes, and other related data. The following outlines each data structure's purpose and attributes for easy reference and understanding.

Ingest

VectoIngestData

A named tuple that contains the expected Vecto input format. For data, you may use open(path, 'rb') for IMAGE queries or io.StringIO(text) for TEXT queries. You may append as many attribute to attributes as needed.

  • data: IO
  • attributes: dict

IngestResponse

A named tuple that contains a list of ids of ingested data.

  • ids: List[int]

Lookup

LookupResult

A named tuple that contains the lookup result content: attributes, id, and similarity.

  • attributes: object
  • id: int
  • similarity: float

Analogy

VectoAnalogy

A named tuple that contains a Vecto analogy attributes.

  • id: int
  • name: str
  • textAnalogyExampleIds: List
  • createdAt: str
  • updatedAt: str
  • vectorSpaceId: int

VectoAnalogyStartEnd

A named tuple that contains the expected Vecto analogy start-end input format. For data, you may use open(path, 'rb') for IMAGE queries or io.StringIO(text) for TEXT queries.

  • start: IO
  • end: IO

Update

VectoEmbeddingData

A named tuple that contains the expected Vecto embedding format for updating. For data, you may use open(path, 'rb') for IMAGE queries or io.StringIO(text) for TEXT queries.

  • id: int
  • data: IO

VectoAttribute

A named tuple that contains the expected Vecto attribute format for updating. You may append as many attribute to attributes as needed.

  • id: int
  • attributes: dict

Management

VectoModel

A named tuple that contains a Vecto model attributes: description, id, modality, name.

  • description: str
  • id: int
  • modality: str
  • name: str

VectoVectorSpace

A named tuple that contains a Vecto vector space attribute: id, model, name.

  • id: int
  • model: VectoModel
  • name: str

VectoUser

A named tuple that contains a Vecto user attribute: id and name.

  • id: int
  • fullName: str

VectoToken

A named tuple that contains Vecto token attributes.

  • allVectorSpaces: bool
  • createdAt: str
  • id: int
  • name: str
  • tokenType: str
  • vectorSpaceIds: List[int]

VectoNewTokenResponse

A named tuple that contains a new create a Vecto token response attributes.

  • accountId: int
  • allowsAccessToAllVectorSpaces: bool
  • createdAt: str
  • id: int
  • name: str
  • token: str
  • tokenType: str
  • updatedAt: str
  • vectorSpacesIds: List[int]

DataEntry

A named tuple that represents an individual data entry with an ID and attributes.

  • id: int
  • attributes: dict

DataPage

A named tuple of data entries, contains the total count and a list of 'DataEntry' instances.

  • count: int
  • elements: List[DataEntry]

Metrics

DailyUsageMetric

A named tuple that contains daily usage metrics.

  • date: date
  • count: int
  • cumulativeCount: int

UsageMetric

A named tuple that contains usage metrics, including an array of daily metrics.

  • dailyMetrics: List[DailyUsageMetric]

VectoUsageMetrics

A named tuple that contains Vecto usage metrics for lookups and indexing.

  • lookups: UsageMetric
  • indexing: UsageMetric

MonthlyUsageResponse

A named tuple that contains the usage metrics for a specified vector space and month.

  • year: int
  • month: int
  • usage: VectoUsageMetrics