Peter Mutwiri commited on
Commit Β·
19a28b8
1
Parent(s): c996b34
corrected get orgid in ai querry
Browse files- app/routers/ai_query.py +2 -1
app/routers/ai_query.py
CHANGED
|
@@ -10,8 +10,9 @@ router = APIRouter(prefix="/api/v1/ai", tags=["ai"])
|
|
| 10 |
@router.post("/query")
|
| 11 |
async def ai_query(
|
| 12 |
query: str,
|
| 13 |
-
|
| 14 |
):
|
|
|
|
| 15 |
"""RAG endpoint: Question β Vector Search β LLM β Answer"""
|
| 16 |
|
| 17 |
try:
|
|
|
|
| 10 |
@router.post("/query")
|
| 11 |
async def ai_query(
|
| 12 |
query: str,
|
| 13 |
+
current_user: dict = Depends(get_current_user) # β
Get full dict first
|
| 14 |
):
|
| 15 |
+
org_id = current_user["org_id"] # Then extract inside function
|
| 16 |
"""RAG endpoint: Question β Vector Search β LLM β Answer"""
|
| 17 |
|
| 18 |
try:
|