Spaces:
Running
Running
| import { useContext } from "react"; | |
| import { LLMContext } from "./LLMContext"; | |
| export function useLLM() { | |
| const ctx = useContext(LLMContext); | |
| if (!ctx) throw new Error("useLLM must be used inside <LLMProvider>"); | |
| return ctx; | |
| } | |