
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
semantic-embed
Advanced tools
A fast and lightweight TypeScript/JavaScript sdk for generating text embeddings based on FastAPI and other python tools.
The Semantic Embed SDK is a TypeScript library designed to interface with the Semantic Embed API for generating text embeddings. With this SDK, developers can easily create and manage embeddings for their applications and work with semantic models powered by FastAPI. Whether you're building a recommendation system, semantic search, or performing content similarity analysis, Semantic Embed is your go-to tool for text embeddings.
.env
configuration for API keys and other environment variables.Follow these steps to integrate the Semantic Embed SDK into your project:
You can install the SDK via PNPM:
pnpm install semantic-embed
using Npm:
npm add semantic-embed
Or using Yarn:
yarn add semantic-embed
Make sure you have an API key to access the Semantic Embed API, get one at semantic-embed.uanelacomo.com. You can set it up in a .env
file at the root of your project:
SEMANTIC_EMBED_API_KEY=your-api-key-here
After installation, you can easily use the SDK to generate embeddings for your content.
import SemanticEmbed from "semantic-embed";
const semanticEmbed = new SemanticEmbed("your-api-key-if-not-in-env");
// Example text to generate embeddings
const text = "Semantic embedding is the future of search!";
async function generateEmbedding() {
try {
const embedding = await semanticEmbed.generateEmbedding(text);
console.log("Generated Embedding: ", embedding);
} catch (error) {
console.error("Error generating embedding: ", error);
}
}
generateEmbedding();
generateEmbedding(text: string): Promise<number[]>
Generates a semantic embedding for the provided text.
Arguments:
text
(string): The text content for which you want to generate an embedding.Returns:
Promise
: A promise that resolves to the generated embedding data.To contribute or build the SDK from source:
git clone https://github.com/uanela/semantic-embed-sdk.git
cd semantic-embed
pnpm install
pnpm run build
pnpm run dev
This project is licensed under the MIT License - see the LICENSE file for details.
For any issues or questions, please open an issue or contact Uanela Como.
FAQs
A TypeScript SDK for embedding generation
The npm package semantic-embed receives a total of 3 weekly downloads. As such, semantic-embed popularity was classified as not popular.
We found that semantic-embed demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.