Ministral_3B_WebGPU / src /context /useVLMContext.ts
Jofthomas's picture
Add demo files (#1)
d5c6d34 verified
import { useContext } from "react";
import { VLMContext } from "./VLMContext.ts";
import type { VLMContextValue } from "../types/vlm";
export function useVLMContext(): VLMContextValue {
const ctx = useContext(VLMContext);
if (!ctx) throw new Error("useVLMContext must be inside VLMProvider");
return ctx;
}