dav74 commited on
Commit
7b2bb29
·
verified ·
1 Parent(s): 7013654

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +5 -0
main.py CHANGED
@@ -17,6 +17,10 @@ import logging
17
  from langchain_google_genai import ChatGoogleGenerativeAI
18
 
19
  create_table()
 
 
 
 
20
 
21
  GOOGLE_API_KEY = ''
22
 
@@ -150,6 +154,7 @@ def get_title():
150
  @app.get('/exercise/{id}')
151
  def get_exercise(id : int):
152
  ex = return_exercise(id)
 
153
  return {"title" : ex[1].replace("\n",""), "enonce" : ex[4], "test": ex[5]}
154
 
155
 
 
17
  from langchain_google_genai import ChatGoogleGenerativeAI
18
 
19
  create_table()
20
+ logging.basicConfig(
21
+ format="%(asctime)s - %(levelname)s - %(message)s",
22
+ level=logging.INFO
23
+ )
24
 
25
  GOOGLE_API_KEY = ''
26
 
 
154
  @app.get('/exercise/{id}')
155
  def get_exercise(id : int):
156
  ex = return_exercise(id)
157
+ logging.info(f"Endpoint /exercise/{id} called")
158
  return {"title" : ex[1].replace("\n",""), "enonce" : ex[4], "test": ex[5]}
159
 
160