context_key.go 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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_time"
  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. ContextKeyChannelMultiKeyIndex ContextKey = "channel_multi_key_index"
  29. ContextKeyChannelKey ContextKey = "channel_key"
  30. /* user related keys */
  31. ContextKeyUserId ContextKey = "id"
  32. ContextKeyUserSetting ContextKey = "user_setting"
  33. ContextKeyUserQuota ContextKey = "user_quota"
  34. ContextKeyUserStatus ContextKey = "user_status"
  35. ContextKeyUserEmail ContextKey = "user_email"
  36. ContextKeyUserGroup ContextKey = "user_group"
  37. ContextKeyUsingGroup ContextKey = "group"
  38. ContextKeyUserName ContextKey = "username"
  39. )