File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ async def read_top_stocks(cache: RedisBackend = Depends(get_cache)):
8787 await cache .set (cache_key , json .dumps (stock_info ), 5 )
8888 return stock_info
8989
90- @app .get ("health/ " ) # Changed to GET since it's retrieving status
90+ @app .get ("/health " ) # Changed to GET since it's retrieving status
9191async def health_check ():
9292 try :
9393 return {
@@ -96,8 +96,9 @@ async def health_check():
9696 "uptime" : "OK" ,
9797 "api" : {
9898 "groq_api" : "connected" if GROQ_API_KEY else "not configured" ,
99+ "redis_cache" : "connected" if REDIS_URL else "not configured" ,
99100 },
100- "ip" : requests .client . host ,
101+ "ip" : requests .get ( 'https://api.ipify.org' ). text ,
101102 "services" : {
102103 "top_stocks" : app .url_path_for ("read_top_stocks" ),
103104 "chat" : app .url_path_for ("chat" ),
@@ -117,7 +118,7 @@ def chat(query: str):
117118 """
118119 API endpoint to handle user investment-related questions and return AI-generated insights.
119120 """
120-
121+
121122 try :
122123 answer = groq_chat (query )
123124 return answer
You can’t perform that action at this time.
0 commit comments