mirror of
https://github.com/zylon-ai/private-gpt.git
synced 2025-12-22 23:22:57 +01:00
Updated with search mode api and search query logging
This commit is contained in:
parent
174c1805ff
commit
fb35ba28a2
14 changed files with 184 additions and 46 deletions
|
|
@ -132,14 +132,12 @@ def get_active_subscription(
|
|||
detail="Access Forbidden - No Active Subscription",
|
||||
)
|
||||
|
||||
|
||||
def get_audit_logger(request: Request, db: Session = Depends(get_db)):
|
||||
try:
|
||||
return lambda model, action, details, user_id=None: log_audit_entry(db, model, action, details, user_id)
|
||||
return lambda model, action, details, user_id=None, ip_address=request.client.host: log_audit_entry(db, model, action, details, user_id, ip_address)
|
||||
except Exception as e:
|
||||
raise HTTPException(status_code=500, detail=f"Error in get_audit_logger: {str(e)}")
|
||||
|
||||
|
||||
def get_current_active_user(
|
||||
current_user: models.User = Security(get_current_user, scopes=[],),
|
||||
) -> models.User:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue