MCPcopy Create free account
hub / github.com/fruitbars/simple-one-api / validateAPIKey

Function validateAPIKey

pkg/handler/openai_handler.go:329–338  ·  view source on GitHub ↗
(apikey string)

Source from the content-addressed store, hash-verified

327}
328
329func validateAPIKey(apikey string) bool {
330 if config.APIKey == "" {
331 return true
332 }
333
334 if config.APIKey != apikey {
335 return false
336 }
337 return true
338}
339
340func getModelDetails(oaiReq *openai.ChatCompletionRequest) (*config.ModelDetails, string, error) {
341 if oaiReq.Model == config.KEYNAME_RANDOM {

Callers 1

OpenAIHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected