Socket
Book a DemoInstallSign in
Socket

@mediapipe/tasks-genai

Package Overview
Dependencies
Maintainers
7
Versions
324
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mediapipe/tasks-genai

MediaPipe GenAI Tasks

latest
npmnpm
Version
0.10.25
Version published
Weekly downloads
683
8.93%
Maintainers
7
Weekly downloads
 
Created
Source

MediaPipe Tasks GenAI Package

This package contains the GenAI tasks for MediaPipe.

LLM Inference

The MediaPipe LLM Inference task generates text responses from input text. For Gemma 3n models, it can process input images and audio as well.

In order to begin, you must have a model available. You can download Gemma 3n E4B or Gemma 3n E2B, or browse for more pre-converted models on our LiteRT HuggingFace community, where files named "-web.task" are specially converted to run optimally in the browser. All text-only variants of Gemma 3 are available there, as well as MedGemma-27B-Text. See our web inference guide for more information. Note that only models encoded for the GPU backend are currently supported.

const genai = await FilesetResolver.forGenAiTasks(
    "https://cdn.jsdelivr.net/npm/@mediapipe/tasks-genai/wasm"
);
const llmInference = await LlmInference.createFromModelPath(genai, MODEL_URL);
const response = await llmInference.generateResponse(inputText);

Keywords

AR

FAQs

Package last updated on 31 Aug 2025

Did you know?

Socket

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.

Install

Related posts