setting

package
v0.10.9-alpha.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

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 CheckModelRequestRateLimitGroup

func CheckModelRequestRateLimitGroup(jsonStr string) error

func ContainsAutoGroup

func ContainsAutoGroup(group string) bool

func GetAutoGroups

func GetAutoGroups() []string

func GetGroupRateLimit

func GetGroupRateLimit(group string) (totalCount, successCount int, found bool)

func GetUsableGroupDescription

func GetUsableGroupDescription(groupName string) string

func GetUserUsableGroupsCopy

func GetUserUsableGroupsCopy() map[string]string

func ModelRequestRateLimitGroup2JSONString

func ModelRequestRateLimitGroup2JSONString() string

func SensitiveWordsFromString

func SensitiveWordsFromString(s string)

func SensitiveWordsToString

func SensitiveWordsToString() string

func ShouldCheckPromptSensitive

func ShouldCheckPromptSensitive() bool

func UpdateAutoGroupsByJsonString

func UpdateAutoGroupsByJsonString(jsonString string) error

func UpdateChatsByJsonString

func UpdateChatsByJsonString(jsonString string) error

func UpdateModelRequestRateLimitGroupByJSONString

func UpdateModelRequestRateLimitGroupByJSONString(jsonStr string) error

func UpdateUserUsableGroupsByJSONString

func UpdateUserUsableGroupsByJSONString(jsonStr string) error

func UserUsableGroups2JSONString

func UserUsableGroups2JSONString() string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL