Hierarchy

  • BaseAtlasClass<{}>
    • AtlasIndex

Constructors

Properties

_attr: undefined | {}

Type declaration

    _projections?: AtlasProjection[] = undefined
    attributePromise: undefined | Promise<{}>
    id: string
    project: AtlasProject
    viewer: AtlasViewer

    Accessors

    • get attr(): undefined | AttributesType
    • returns the object's information; this may be undefined

      Returns undefined | AttributesType

    Methods

    • Parameters

      • endpoint: string
      • method: "GET" | "POST"
      • payload: Payload = null
      • headers: null | Record<string, string> = null

      Returns Promise<null | string | any[] | Record<string, any> | Uint8Array | Table<any>>

    • Parameters

      • ids: string[] | number[] | bigint[]

        a list of ids (atom_ids, which are scoped to the index level) to fetch. If passing datum_ids, use the project-level fetchIds method. This API is subject to change.

      Returns Promise<any>

      a list of Records containing metadata for each atom.

    • Returns string

    • Fetches basic information about the object. By default, this caches the call; if you want to bust the cache, pass true as the first argument. This immediately.

      Parameters

      • bustCache: boolean = false

        Whether to refetch the relevant information

      Returns Promise<{}>

      A promise that resolves to the organization info.

    • Parameters

      • nn_options: NNOptions

      Returns Promise<Table<any>>

      A table containing the nearest neighbors for each atom.

    • Parameters

      • param0: Omit<{
            atlas_index_id: string;
            k?: number;
            queries: string | number[][];
        }, "atlas_index_id">

        A keyed dictionary including k (the number of neighbors to return) and queries (a list of vectors to search for).

      Returns Promise<{
          distances: number[][];
          neighbors: string[][];
      }>

    • Loads the information associated with the class, removing any existing caches.

      Returns Promise<LoadedObject<AtlasIndex, {}>>

      a LoadedObject instance of the class that is guaranteed to have its attr slot populated with appropriate information.

      Example

      const loadedProject = await (new AtlasProject(projectId)).withLoadedAttributes()

      // OR, in cases where we want to do stuff immediately with the project and ensure
      // that later calls there don't double-fetch information.

      const project = new AtlasProject(projectId)

      // do stuff right away.
      const projection = new AtlasProjection(projectionId, {project: project})
      const loadedProjection = await projection.withLoadedAttributes()
      // do stuff with loadedProjection