File size: 863 Bytes
670e027
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

import sys
import os
import asyncio
from fastapi.routing import APIRoute

# Add project root to sys.path
sys.path.append(os.getcwd())

try:
    from main import app
    
    print("="*50)
    print("INSPECTING APP ROUTES")
    print("="*50)
    
    found_ai_ask = False
    
    for route in app.routes:
        if isinstance(route, APIRoute):
            methods = ", ".join(route.methods)
            print(f"Path: {route.path} | Methods: {methods} | Name: {route.name}")
            
            if route.path == "/ai/ask":
                found_ai_ask = True
                print(f"!!! FOUND /ai/ask: Methods={methods}")
                
    if not found_ai_ask:
        print("!!! ERROR: /ai/ask NOT FOUND in routes")
    else:
        print("!!! SUCCESS: /ai/ask is registered")
        
except Exception as e:
    print(f"Error inspecting routes: {e}")