WildOjisan commited on
Commit
f3ab397
·
1 Parent(s): 8b10582
Files changed (1) hide show
  1. routers/llm_router.py +11 -1
routers/llm_router.py CHANGED
@@ -7,9 +7,19 @@ router = APIRouter(
7
  tags=["llm"]
8
  )
9
 
10
- @router.get("/")
11
  def test_home():
12
  try:
 
 
 
 
 
 
 
 
 
 
13
  return CommonResponse(success=True)
14
  except Exception as e:
15
  return CommonResponse(success=False, msg=str(e))
 
7
  tags=["llm"]
8
  )
9
 
10
+ @router.post("/askllm")
11
  def test_home():
12
  try:
13
+ with get_connection() as conn:
14
+ with conn.cursor() as cur:
15
+ cur.execute("""
16
+ SELECT
17
+ api_key
18
+ FROM t_api_keys
19
+ WHERE service_name='pollination'
20
+ LIMIT 1
21
+ """)
22
+ row = cur.fetchone()
23
  return CommonResponse(success=True)
24
  except Exception as e:
25
  return CommonResponse(success=False, msg=str(e))