Documentation
¶
Index ¶
- Variables
- func AutoGroups2JsonString() string
- func Chats2JsonString() string
- func CheckModelRequestRateLimitGroup(jsonStr string) error
- func ContainsAutoGroup(group string) bool
- func GetAutoGroups() []string
- func GetGroupRateLimit(group string) (totalCount, successCount int, found bool)
- func GetUsableGroupDescription(groupName string) string
- func GetUserUsableGroupsCopy() map[string]string
- func ModelRequestRateLimitGroup2JSONString() string
- func SensitiveWordsFromString(s string)
- func SensitiveWordsToString() string
- func ShouldCheckPromptSensitive() bool
- func UpdateAutoGroupsByJsonString(jsonString string) error
- func UpdateChatsByJsonString(jsonString string) error
- func UpdateModelRequestRateLimitGroupByJSONString(jsonStr string) error
- func UpdateUserUsableGroupsByJSONString(jsonStr string) error
- func UserUsableGroups2JSONString() string
Constants ¶
This section is empty.
Variables ¶
View Source
var Chats = []map[string]string{
{
"Cherry Studio": "cherrystudio://providers/api-keys?v=1&data={cherryConfig}",
},
{
"流畅阅读": "fluentread",
},
{
"Lobe Chat 官方示例": "https://chat-preview.lobehub.com/?settings={\"keyVaults\":{\"openai\":{\"apiKey\":\"{key}\",\"baseURL\":\"{address}/v1\"}}}",
},
{
"AI as Workspace": "https://aiaw.app/set-provider?provider={\"type\":\"openai\",\"settings\":{\"apiKey\":\"{key}\",\"baseURL\":\"{address}/v1\",\"compatibility\":\"strict\"}}",
},
{
"AMA 问天": "ama://set-api-key?server={address}&key={key}",
},
{
"OpenCat": "opencat://team/join?domain={address}&token={key}",
},
}
View Source
var CheckSensitiveEnabled = true
View Source
var CheckSensitiveOnPromptEnabled = true
View Source
var CreemApiKey = ""
View Source
var CreemProducts = "[]"
View Source
var CreemTestMode = false
View Source
var CreemWebhookSecret = ""
View Source
var DefaultUseAutoGroup = false
View Source
var MjAccountFilterEnabled = false
View Source
var MjActionCheckSuccessEnabled = true
View Source
var MjForwardUrlEnabled = true
View Source
var MjModeClearEnabled = false
View Source
var MjNotifyEnabled = false
View Source
var ModelRequestRateLimitCount = 0
View Source
var ModelRequestRateLimitDurationMinutes = 1
View Source
var ModelRequestRateLimitEnabled = false
View Source
var ModelRequestRateLimitGroup = map[string][2]int{}
View Source
var ModelRequestRateLimitMutex sync.RWMutex
View Source
var ModelRequestRateLimitSuccessCount = 1000
View Source
var SensitiveWords = []string{
"test_sensitive",
}
SensitiveWords 敏感词 var SensitiveWords []string
View Source
var StopOnSensitiveEnabled = true
StopOnSensitiveEnabled 如果检测到敏感词,是否立刻停止生成,否则替换敏感词
View Source
var StreamCacheQueueLength = 0
StreamCacheQueueLength 流模式缓存队列长度,0表示无缓存
View Source
var StripeApiSecret = ""
View Source
var StripeMinTopUp = 1
View Source
var StripePriceId = ""
View Source
var StripePromotionCodesEnabled = false
View Source
var StripeUnitPrice = 8.0
View Source
var StripeWebhookSecret = ""
Functions ¶
func AutoGroups2JsonString ¶
func AutoGroups2JsonString() string
func Chats2JsonString ¶
func Chats2JsonString() string
func ContainsAutoGroup ¶
func GetAutoGroups ¶
func GetAutoGroups() []string
func GetGroupRateLimit ¶
func GetUserUsableGroupsCopy ¶
func ModelRequestRateLimitGroup2JSONString ¶
func ModelRequestRateLimitGroup2JSONString() string
func SensitiveWordsFromString ¶
func SensitiveWordsFromString(s string)
func SensitiveWordsToString ¶
func SensitiveWordsToString() string
func ShouldCheckPromptSensitive ¶
func ShouldCheckPromptSensitive() bool
func UpdateChatsByJsonString ¶
func UserUsableGroups2JSONString ¶
func UserUsableGroups2JSONString() string
Types ¶
This section is empty.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.