move secrets to env variables add palworld commands
All checks were successful
Build and Publish Docker Image / build-and-push (push) Successful in 37s
All checks were successful
Build and Publish Docker Image / build-and-push (push) Successful in 37s
This commit is contained in:
@@ -25,7 +25,8 @@ public class LlmService
|
||||
_httpClient = new HttpClient();
|
||||
|
||||
_endpoint = configuration["Llm:Endpoint"] ?? throw new InvalidOperationException("Llm:Endpoint is not configured");
|
||||
_apiKey = configuration["Llm:ApiKey"] ?? throw new InvalidOperationException("Llm:ApiKey is not configured");
|
||||
_apiKey = Environment.GetEnvironmentVariable("LLM_API_KEY")
|
||||
?? throw new InvalidOperationException("LLM_API_KEY environment variable is not set");
|
||||
_model = configuration["Llm:Model"] ?? throw new InvalidOperationException("Llm:Model is not configured");
|
||||
_maxTokens = int.Parse(configuration["Llm:MaxTokens"] ?? "1024");
|
||||
_temperature = double.Parse(configuration["Llm:Temperature"] ?? "0.7");
|
||||
|
||||
Reference in New Issue
Block a user