* feat: generate default token after register
* chore: use go routine to create default token for new user
---------
Co-authored-by: JustSong <songquanpeng@foxmail.com>
- Refactor constant definitions and organization
- Clean up package level variables and functions
- Introduce new `relaymode` and `apitype` packages for constant definitions
- Refactor and simplify code in several packages including `openai`, `relay/channel/baidu`, `relay/util`, `relay/controller`, `relay/channeltype`
- Add helper functions in `relay/channeltype` package to convert channel type constants to corresponding API type constants
- Remove deprecated functions such as `ResponseText2Usage` from `relay/channel/openai/helper.go`
- Modify code in `relay/util/validation.go` and related files to use new `validator.ValidateTextRequest` function
- Rename `util` package to `relaymode` and update related imports in several packages
* feat: add user list sorting and pagination enhancements
* feat: add user list sorting for THEME=air
* feat: add token list sorting and pagination enhancements
* feat: add token list sorting for THEME=air
- Update the minimum access token length from 16 to 32
- Prevent spam by introducing policies and detecting user agents
- Add an authorization header to the login response
- Use base64 to decode the session secret and generate a random one if not set
- Added new API endpoints for user information retrieval, registration, login, logout, self-management, administration, options management, channel management, token management, redemption management, log management, and group retrieval
- Improved authentication flow with GitHub, WeChat, and email
- Added a function `GetSelfByToken` for getting user information using an OpenAI API token