(apikey string)
| 327 | } |
| 328 | |
| 329 | func 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 | |
| 340 | func getModelDetails(oaiReq *openai.ChatCompletionRequest) (*config.ModelDetails, string, error) { |
| 341 | if oaiReq.Model == config.KEYNAME_RANDOM { |