Download agent/api/api.py from AlexTrinityBlock/Final_Assignment_Template: direct link, hf CLI and curl.
- Browser
- Download file 378 Bytes
-
https://huggingface.co/spaces/AlexTrinityBlock/Final_Assignment_Template/resolve/main/agent/api/api.py
- Command line
-
hf download hf://spaces/AlexTrinityBlock/Final_Assignment_Template/agent/api/api.py
-
curl -L -o api.py https://huggingface.co/spaces/AlexTrinityBlock/Final_Assignment_Template/resolve/main/agent/api/api.py
378 Bytes
| from langchain_google_genai import ChatGoogleGenerativeAI | |
| # from langchain_community.chat_models import MiniMaxChat | |
| _llm = None | |
| def get_llm(): | |
| """Return a shared LLM instance.""" | |
| global _llm | |
| if _llm is None: | |
| _llm = ChatGoogleGenerativeAI(model="gemini-3.1-flash-lite-preview") | |
| # _llm = MiniMaxChat(model="MiniMax-M2.7-highspeed") | |
| return _llm | |