Releases
v1.4.0
Db
namespaces update
Db
namespace is now undefined
by default for non-Astra backends if unset
Still defaults to 'default_keyspace'
for Astra usage
Will error out if attempting to perform an operation that requires a namespace
db.useNamespace('<namespace>')
Switches the current working namespace
Does not affect collections previously spawned from the Db
using the old namespace
dbAdmin.createNamespace('<namespace>', { updateDbNamespace: true })
New idiom for working with namespaces right after creating them
Sets the DbAdmin
's parent Db
's namespace to the newly created one
See examples/non-astra-backends
for an example
findEmbeddingProviders
dbAdmin.findEmbeddingProviders()
Provides in-depth, structured information about all of the available embedding providers supported on the working database
Output may vary slightly depending on the cloud-provider/region
EmbeddingHeadersProvider
All embeddingApiKey
parameters now take in string | EmbeddingHeadersProvider | undefined
Two default token providers
AWSEmbeddingHeadersProvider
for bedrock vectorization
EmbeddingAPIKeyHeaderProvider
for symmetry (unit implementation)
New EmbeddingHeadersProvider
subclasses may be created, additionally providing "token refreshing logic" as necessary
Fully backwards compatible—string API keys can still be passed in like normal
Misc improvements
Better private field encapsulation for the main classes (Collection
, Db
, etc.)
private get _httpClient()
escape hatch present if necessary
Authentication failure errors are no longer intercepted/wrapped by the client
Now shows the raw error straight from the Data API
Root cause of error should be a bit less obfuscated now
TokenProvider doesn't have to return a Promise
anymore
Like the new EmbeddingHeadersProvider
, it can now return string | nullish | Promise<string | nullish>
Avoids the slight performance penalty of await
ing a Promise
if one isn't returned anymore
Further documentation fixes/tweaks (especially around vectorize)
v1.3.0...v1.4.0
You can’t perform that action at this time.