Smart-Notes-backend / app /core /llm_engine.py
pluto90's picture
Update app/core/llm_engine.py
5f12493 verified
raw
history blame
415 Bytes
# llm_engine.py
import google.generativeai as genai
from app.core.config import GEMINI_API_KEY
from langchain_google_genai import ChatGoogleGenerativeAI
# ✅ Configure Gemini client
genai.configure(api_key=GEMINI_API_KEY)
llm = ChatGoogleGenerativeAI(
model="gemini-2.5-flash",
google_api_key=GEMINI_API_KEY,
temperature=0.2,
max_output_tokens=500,
convert_system_message_to_human=True
)