Safe InBed is a powerful text vector embedding library that allows you to safely perform vector embedding on text that exceeds the context window size supported by traditional methods. By leveraging advanced calculations, Safe InBed ensures accurate and reliable vector embeddings for large text inputs.
- Safe and reliable vector embedding for large text inputs
- Advanced calculations to handle text exceeding context window size
To install Safe InBed, use the appropriate command for your package manager:
deno add @zac/safe-inbed
pnpm add @zac/safe-inbed
bun add @zac/safe-inbed
npm install @zac/safe-inbed
yarn add @zac/safe-inbed
Here's a quick example of how to use Safe InBed in your project:
* import { calculateTokenCount } from "@zac/safe-inbed";
*
* console.log("Token count:", calculateTokenCount("Hello, world!"));
* // Output: Token count: 4
Contributions are welcome! If you have any ideas, suggestions, or bug reports, please open an issue or submit a pull request.
Safe InBed is licensed under the MIT License.