0.10.22-rc.20250304 • Published 1 year ago

@mediapipe/tasks-genai-experimental v0.10.22-rc.20250304

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
1 year ago

MediaPipe Tasks GenAI Experimental Package

This package contains experimental GenAI tasks for MediaPipe.

RAG Pipeline Inference

You can use the RAG Pipeline to augment an LLM Inference Task with existing knowledge.

const genaiFileset = await FilesetResolver.forGenAiTasks();
const genaiExperimentalFileset =
  await FilesetResolver.forGenAiExperimentalTasks();
const llmInference = await LlmInference.createFromModelPath(genaiFileset, ...);
const ragPipeline = await RagPipeline.createWithEmbeddingModel(
  genaiExperimentalFileset,
  llmInference,
  EMBEDDING_MODEL_URL,
);
await ragPipeline.recordBatchedMemory([
  'Paris is the capital of France.',
  'Berlin is the capital of Germany.',
]);
const result = await ragPipeline.generateResponse(
  'What is the capital of France?',
);
console.log(result);
0.10.18

1 year ago

0.10.19

1 year ago

0.10.20

1 year ago

0.10.21

1 year ago

0.10.15

2 years ago

0.10.16

1 year ago

0.10.14

2 years ago