Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
@empiricalrun/llm
Advanced tools
Package to connect and trace LLM calls.
import { LLM } from "@empiricalrun/llm";
const llm = new LLM({
provider: "openai",
defaultModel: "gpt-4o",
});
const llmResponse = await llm.createChatCompletion({ ... });
This package also contains utilities for vision.
Ask a question against the image (e.g. to extract some info, make a decision) and get the answer.
import { query } from "@empiricalrun/llm/vision";
// With Appium
const data = await driver.saveScreenshot("dummy.png");
const instruction =
"Extract number of ATOM tokens from the image. Return only the number.";
const text = await query(data.toString("base64"), instruction);
// Example response: "0.01"
import { getBoundingBox } from "@empiricalrun/llm/vision/bbox";
// With Appium
const data = await driver.saveScreenshot("dummy.png");
// Give a line describing the screen and then the element that you want to find
const instruction =
"This screenshot shows a screen to send crypto tokens. What is the bounding box for the dropdown to select the token?";
const bbox = await getBoundingBox(data.toString("base64"), instruction);
const centerToTap = bbox.center; // { x: 342, y: 450 }
// **Note**: These coordinates are relative to the image dimensions, and actions like
// tap require scaling the coordinates to Appium coordinates
Bounding box can require some prompt iterations, and you can do that with a debug
flag. This flag
returns a base64 image that has the bounding box drawn on top of the original image.
const bbox = await getBoundingBox(data.toString("base64"), instruction, {
debug: true,
});
console.log(bbox.annotatedImage);
FAQs
Package to connect and trace LLM calls.
The npm package @empiricalrun/llm receives a total of 661 weekly downloads. As such, @empiricalrun/llm popularity was classified as not popular.
We found that @empiricalrun/llm 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
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.