File size: 378 Bytes
9236a37
bcdc55d
9236a37
bcdc55d
 
 
 
 
 
 
 
9236a37
 
bcdc55d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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