You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import { embed } from "@nomic-ai/atlas"
if (!process.env.NOMIC_API_KEY) {
throw new Error("NOMIC_API_KEY is required")
}
export async function getNomicTextEmbeddings(input: string[]) {
const result = await embed(
input,
{
model: "nomic-embed-text-v1.5",
},
process.env.NOMIC_API_KEY,
)
return result
}
getNomicTextEmbeddings(["Hello world!"]).then(console.log)
but I'm getting the following error:
> tsx --require dotenv/config lib/nomic.ts
node:internal/modules/esm/resolve:302
return new ERR_PACKAGE_PATH_NOT_EXPORTED(
^
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in /Users/jonk/celebrate/node_modules/@nomic-ai/atlas/package.json
at exportsNotFound (node:internal/modules/esm/resolve:302:10)
at packageExportsResolve (node:internal/modules/esm/resolve:592:13)
at resolveExports (node:internal/modules/cjs/loader:596:36)
at Module._findPath (node:internal/modules/cjs/loader:673:31)
at Module._resolveFilename (node:internal/modules/cjs/loader:1135:27)
at resolve (/Users/jonk/celebrate/node_modules/tsx/dist/register-CCR7NebB.cjs:2:554)
at resolveRequest (/Users/jonk/celebrate/node_modules/tsx/dist/register-CCR7NebB.cjs:1:2758)
at /Users/jonk/celebrate/node_modules/tsx/dist/register-CCR7NebB.cjs:2:583
at m._resolveFilename (file:///Users/jonk/celebrate/node_modules/tsx/dist/register-Cehy_bZS.mjs:1:789)
at Module._load (node:internal/modules/cjs/loader:990:27) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
Node.js v21.6.0
it seems like perhaps the ts-nomic library needs to be updated - any ideas?
The text was updated successfully, but these errors were encountered:
I am trying out this SDK as follows:
but I'm getting the following error:
it seems like perhaps the ts-nomic library needs to be updated - any ideas?
The text was updated successfully, but these errors were encountered: