Spaces:
Runtime error
Runtime error
| from __future__ import annotations | |
| import os | |
| from functools import lru_cache | |
| from langchain_groq import ChatGroq | |
| def get_groq_llm(model: str = "llama-3.3-70b-versatile", temperature: float = 0.0) -> ChatGroq: | |
| api_key = os.getenv("GROQ_API_KEY", "") | |
| if not api_key: | |
| raise ValueError("Missing GROQ_API_KEY.") | |
| return ChatGroq(model=model, temperature=temperature, api_key=api_key) | |