MCPcopy Create free account
hub / github.com/QuantumNous/new-api / getIoAPIKey

Function getIoAPIKey

controller/deployment.go:16–26  ·  view source on GitHub ↗
(c *gin.Context)

Source from the content-addressed store, hash-verified

14)
15
16func getIoAPIKey(c *gin.Context) (string, bool) {
17 common.OptionMapRWMutex.RLock()
18 enabled := common.OptionMap["model_deployment.ionet.enabled"] == "true"
19 apiKey := common.OptionMap["model_deployment.ionet.api_key"]
20 common.OptionMapRWMutex.RUnlock()
21 if !enabled || strings.TrimSpace(apiKey) == "" {
22 common.ApiErrorMsg(c, "io.net model deployment is not enabled or api key missing")
23 return "", false
24 }
25 return apiKey, true
26}
27
28func GetModelDeploymentSettings(c *gin.Context) {
29 common.OptionMapRWMutex.RLock()

Callers 2

getIoClientFunction · 0.85
getIoEnterpriseClientFunction · 0.85

Calls 1

ApiErrorMsgFunction · 0.92

Tested by

no test coverage detected