Xenova's picture
Xenova HF Staff
Upload 30 files
19431b6 verified
raw
history blame
273 Bytes
import { useContext } from "react";
import { LLMContext, type LLMContextValue } from "./LLMContext";
export function useLLM(): LLMContextValue {
const ctx = useContext(LLMContext);
if (!ctx) throw new Error("useLLM must be used within <LLMProvider>");
return ctx;
}