context_key.go 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. ContextKeyTokenChannelTag ContextKey = "token_channel_tag" // 添加渠道标签上下文键
  16. /* channel related keys */
  17. ContextKeyChannelId ContextKey = "channel_id"
  18. ContextKeyChannelName ContextKey = "channel_name"
  19. ContextKeyChannelCreateTime ContextKey = "channel_create_time"
  20. ContextKeyChannelBaseUrl ContextKey = "base_url"
  21. ContextKeyChannelType ContextKey = "channel_type"
  22. ContextKeyChannelSetting ContextKey = "channel_setting"
  23. ContextKeyChannelParamOverride ContextKey = "param_override"
  24. ContextKeyChannelOrganization ContextKey = "channel_organization"
  25. ContextKeyChannelAutoBan ContextKey = "auto_ban"
  26. ContextKeyChannelModelMapping ContextKey = "model_mapping"
  27. ContextKeyChannelStatusCodeMapping ContextKey = "status_code_mapping"
  28. ContextKeyChannelIsMultiKey ContextKey = "channel_is_multi_key"
  29. ContextKeyChannelMultiKeyIndex ContextKey = "channel_multi_key_index"
  30. ContextKeyChannelKey ContextKey = "channel_key"
  31. /* user related keys */
  32. ContextKeyUserId ContextKey = "id"
  33. ContextKeyUserSetting ContextKey = "user_setting"
  34. ContextKeyUserQuota ContextKey = "user_quota"
  35. ContextKeyUserStatus ContextKey = "user_status"
  36. ContextKeyUserEmail ContextKey = "user_email"
  37. ContextKeyUserGroup ContextKey = "user_group"
  38. ContextKeyUsingGroup ContextKey = "group"
  39. ContextKeyUserName ContextKey = "username"
  40. )