context_key.go 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package constant
  2. type ContextKey string
  3. const (
  4. ContextKeyOriginalModel ContextKey = "original_model"
  5. ContextKeyRequestStartTime ContextKey = "request_start_time"
  6. /* token related keys */
  7. ContextKeyTokenUnlimited ContextKey = "token_unlimited_quota"
  8. ContextKeyTokenKey ContextKey = "token_key"
  9. ContextKeyTokenId ContextKey = "token_id"
  10. ContextKeyTokenGroup ContextKey = "token_group"
  11. ContextKeyTokenAllowIps ContextKey = "allow_ips"
  12. ContextKeyTokenSpecificChannelId ContextKey = "specific_channel_id"
  13. ContextKeyTokenModelLimitEnabled ContextKey = "token_model_limit_enabled"
  14. ContextKeyTokenModelLimit ContextKey = "token_model_limit"
  15. /* channel related keys */
  16. ContextKeyChannelId ContextKey = "channel_id"
  17. ContextKeyChannelName ContextKey = "channel_name"
  18. ContextKeyChannelCreateTime ContextKey = "channel_create_name"
  19. ContextKeyChannelBaseUrl ContextKey = "base_url"
  20. ContextKeyChannelType ContextKey = "channel_type"
  21. ContextKeyChannelSetting ContextKey = "channel_setting"
  22. ContextKeyChannelParamOverride ContextKey = "param_override"
  23. ContextKeyChannelOrganization ContextKey = "channel_organization"
  24. ContextKeyChannelAutoBan ContextKey = "auto_ban"
  25. ContextKeyChannelModelMapping ContextKey = "model_mapping"
  26. ContextKeyChannelStatusCodeMapping ContextKey = "status_code_mapping"
  27. ContextKeyChannelIsMultiKey ContextKey = "channel_is_multi_key"
  28. /* user related keys */
  29. ContextKeyUserId ContextKey = "id"
  30. ContextKeyUserSetting ContextKey = "user_setting"
  31. ContextKeyUserQuota ContextKey = "user_quota"
  32. ContextKeyUserStatus ContextKey = "user_status"
  33. ContextKeyUserEmail ContextKey = "user_email"
  34. ContextKeyUserGroup ContextKey = "user_group"
  35. ContextKeyUsingGroup ContextKey = "group"
  36. ContextKeyUserName ContextKey = "username"
  37. )