New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@empiricalrun/llm

Package Overview
Dependencies
Maintainers
0
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@empiricalrun/llm - npm Package Compare versions

Comparing version 0.7.4 to 0.8.0

dist/vision/captcha/index.d.ts

6

CHANGELOG.md
# @empiricalrun/llm
## 0.8.0
### Minor Changes
- 1c4780e: feat: add recaptcha solver
## 0.7.4

@@ -4,0 +10,0 @@

1

dist/vision/index.d.ts
export { getBoundingBox } from "./bbox";
export { solveRecaptchaGrid } from "./captcha";
export { extractText } from "./extract";
//# sourceMappingURL=index.d.ts.map

4

dist/vision/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.extractText = exports.getBoundingBox = void 0;
exports.extractText = exports.solveRecaptchaGrid = exports.getBoundingBox = void 0;
var bbox_1 = require("./bbox");
Object.defineProperty(exports, "getBoundingBox", { enumerable: true, get: function () { return bbox_1.getBoundingBox; } });
var captcha_1 = require("./captcha");
Object.defineProperty(exports, "solveRecaptchaGrid", { enumerable: true, get: function () { return captcha_1.solveRecaptchaGrid; } });
var extract_1 = require("./extract");
Object.defineProperty(exports, "extractText", { enumerable: true, get: function () { return extract_1.extractText; } });
import { LLMProvider } from "..";
export declare function imageFormatForProvider(provider: LLMProvider, image: string): string;
export declare function cropImage(base64Image: string, { x, y, width, height, }: {
x: number;
y: number;
width: number;
height: number;
}): Promise<string>;
//# sourceMappingURL=utils.d.ts.map
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.imageFormatForProvider = void 0;
exports.cropImage = exports.imageFormatForProvider = void 0;
const sharp_1 = __importDefault(require("sharp"));
function imageFormatForProvider(provider, image) {
let base64Image = image;
if (provider === "openai") {
if (provider === "openai" || provider === "anthropic") {
if (!image.startsWith("data:image")) {

@@ -14,1 +18,10 @@ base64Image = `data:image/png;base64,${image}`;

exports.imageFormatForProvider = imageFormatForProvider;
async function cropImage(base64Image, { x, y, width, height, }) {
const imgBuffer = Buffer.from(base64Image, "base64");
const img = (0, sharp_1.default)(imgBuffer);
const croppedImage = await img
.extract({ left: Math.floor(x), top: Math.floor(y), width, height })
.toBuffer();
return croppedImage.toString("base64");
}
exports.cropImage = cropImage;
{
"name": "@empiricalrun/llm",
"version": "0.7.4",
"version": "0.8.0",
"main": "dist/index.js",

@@ -29,3 +29,4 @@ "exports": {

"openai": "^4.55.4",
"portkey-ai": "^1.3.2"
"portkey-ai": "^1.3.2",
"sharp": "^0.33.5"
},

@@ -32,0 +33,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc