Your nomic API key, beginning with 'nk'.
Protected
_attrProtected
attributePrivate
backoffPrivate
embedPrivate
Optional
epitaphPrivate
nextreturns the object's information; this may be undefined
Private
_embedProtected
endpointFetches 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.
Whether to refetch the relevant information
A promise that resolves to the organization info.
Private
flushPrivate
periodicallyLoads the information associated with the class, removing any existing caches.
a LoadedObject instance of the class that is guaranteed to
have its attr
slot populated with appropriate information.
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
A class that pools and runs requests to the Nomic embedding API. If you are dispatching dozens or more embedding requests in quick succession, this class handles pooling and backoff to ensure you get your results as quickly as possible.
For best results, do not await your embedding results until they are needed.
For example, if you are embedding 1000 lines of text, you can do the following:
GOOD -- Nomic will break down your big request into multiple medium-sized ones.
GOOD -- Nomic will combine your small requests into several medium-size ones.
BAD -- You will generate many small, inefficient requests.