Skip to content

Commit

Permalink
Fix Azure secret creation after update to azure_llm (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
dorbanianas authored Jan 17, 2025
1 parent f499985 commit 5c4d40b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/model_manager/providers/adapters/azure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ nlohmann::json AzureProvider::CallComplete(const std::string& prompt, const bool
model_details_.model, model_details_.secret["api_version"], true);

// Create a JSON request payload with the provided parameters
nlohmann::json request_payload = {{"model", model_details_.model},
{"messages", {{{"role", "user"}, {"content", prompt}}}},
nlohmann::json request_payload = {{"messages", {{{"role", "user"}, {"content", prompt}}}},
{"max_tokens", model_details_.max_output_tokens},
{"temperature", model_details_.temperature}};

Expand Down
2 changes: 1 addition & 1 deletion src/secret_manager/secret_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ std::vector<SecretDetails> get_secret_details_list() {
}

std::unordered_map<std::string, SecretManager::SupportedProviders> SecretManager::providerNames = {
{"openai", OPENAI}, {"azure", AZURE}, {"ollama", OLLAMA}};
{"openai", OPENAI}, {"azure_llm", AZURE}, {"ollama", OLLAMA}};

SecretManager::SupportedProviders SecretManager::GetProviderType(const std::string& provider) {
return providerNames[provider];
Expand Down

0 comments on commit 5c4d40b

Please sign in to comment.