quivr/backend/models/user_identity.py
Zineb El Bachiri 9aaedcff51
Fix/requests limiting (#980)
* 🗃️ Rename users table into user_daily_usage

* 💥 replace User model with UserIdentity model

* 🗃️ New UserDailyUsage class for database interaction

* 🐛 fix daily requests rate limiting per user

* 🐛 fix user stats and properties update

* ✏️ add typing and linting

* 🚚 rename user_dialy_usage Class  into user_usage & requests_count into daily_requests_count

* 🚑 fix some rebase errors
2023-08-21 14:05:13 +02:00

11 lines
201 B
Python

from typing import Optional
from uuid import UUID
from pydantic import BaseModel
class UserIdentity(BaseModel):
id: UUID
email: Optional[str] = None
openai_api_key: Optional[str] = None