Home Reference Source Test
public class | source

ChunkLookupMixins

Extends:

BaseWordEmbeddingClass → ChunkLookupMixins

This ChunkLookupMixins class provide mixins for chunk lookup that first look from the cached chunk then fetch and cache new chunk

Member Summary

Public Members
public get

Return the storage lookup function

Method Summary

Public Methods
public

async queryChunk(chunkId: String | Number ): Object

Query chunk either read from file or fetch from remote server

public

async updateChunkLookUp(chunkId: String | Number , chunk: Object ): String

Update the storage lookup

Public Members

public get ChunkLookUp: * source

Return the storage lookup function

Public Methods

public async queryChunk(chunkId: String | Number ): Object source

Query chunk either read from file or fetch from remote server

Params:

NameTypeAttributeDescription
chunkId String | Number

id in positive interger range

Return:

Object

chunk object containing token keys and correponding vec value

public async updateChunkLookUp(chunkId: String | Number , chunk: Object ): String source

Update the storage lookup

Params:

NameTypeAttributeDescription
chunkId String | Number

id in positive integer range

chunk Object

chunk object containing token keys and correponding vec value

Return:

String

updated chunk path in storage