Team Ai
Apppublic

RahulSinghPundir/SQL_Wizard

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
get_llm.py21 linesDownload Raw Back to root
1from langchain_google_genai import ChatGoogleGenerativeAI
2import json
3def get_llm_summary():
4    """Initialize and return the summary LLM."""
5    file=json.load(open("config.json"))
6    return ChatGoogleGenerativeAI(
7        model=file["MODEL_NAME_SUMMARY"],
8        temperature=file["TEMPERATURE_SUMMARY"],
9        convert_system_message_to_human=False,
10        google_api_key=file["GOOGLE_API_KEY"]
11    )
12
13def get_llm_sql():
14    """Initialize and return the SQL LLM."""
15    file=json.load(open("config.json"))
16    return ChatGoogleGenerativeAI(
17        model=file["MODEL_NAME_SQL"],
18        temperature=file["TEMPERATURE_SQL"],
19        convert_system_message_to_human=False,
20        google_api_key=file["GOOGLE_API_KEY"]
21    )