Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@energetic-ai/embeddings
Advanced tools
Readme
Fast, easy-to-use AI sentence embeddings, optimized for serverless functions.
EnergeticAI Embeddings is a library for computing sentence embeddings, which are vector representations of sentences that capture their meaning.
Sentence embeddings can be used for semantic search, recommendations, clustering, and more.
It leverages the Universal Sentence Encoder model from Google Research, which is trained on a variety of data sources and outputs 512-dimensional embeddings.
Install this package, along with @energetic-ai/core
and model weights (e.g. @energetic-ai/model-embeddings-en
):
npm install @energetic-ai/core @energetic-ai/embeddings @energetic-ai/model-embeddings-en
You can easily call this method to compute embeddings for a list of sentences, and compare distances:
import { initModel, distance } from "@energetic-ai/embeddings";
import { modelSource } from "@energetic-ai/model-embeddings-en";
(async () => {
const model = await initModel(modelSource);
const embeddings = await model.embed(["hello", "world"]);
console.log(distance(embeddings[0], embeddings[1])));
})();
See the examples directory for examples.
This repository uses Lerna to manage packages, and Vitest to run tests.
Run tests with this method:
npm run test
Apache 2.0, except for dependencies.
This project is derived from TensorFlow.js and the Universal Sentence Encoder model library, which are also Apache 2.0 licensed.
FAQs
Fast, easy-to-use AI text embeddings, optimized for serverless functions.
The npm package @energetic-ai/embeddings receives a total of 6 weekly downloads. As such, @energetic-ai/embeddings popularity was classified as not popular.
We found that @energetic-ai/embeddings demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.