Log if one of main LLM providers is not enabled (#60857)

Log if one of big 3 providers is not enabled
This commit is contained in:
Rafał Gajdulewicz 2024-03-05 16:39:28 +01:00 committed by GitHub
parent a3816d2a98
commit 78291f553e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -106,6 +106,8 @@ func NewHandler(
otelhttp.WithPublicEndpoint(),
),
))
} else {
logger.Error("Anthropic access token not set")
}
if config.OpenAI.AccessToken != "" {
v1router.Path("/completions/openai").Methods(http.MethodPost).Handler(
@ -174,6 +176,8 @@ func NewHandler(
otelhttp.WithPublicEndpoint(),
),
))
} else {
logger.Error("OpenAI access token not set")
}
if config.Fireworks.AccessToken != "" {
v1router.Path("/completions/fireworks").Methods(http.MethodPost).Handler(
@ -200,6 +204,8 @@ func NewHandler(
otelhttp.WithPublicEndpoint(),
),
))
} else {
logger.Error("Fireworks access token not set")
}
// Register a route where actors can retrieve their current rate limit state.