feat(clients): azure: Azure OpenAI and AI Foundry package, 147-row spec table, Entra auth, demo
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Vendored
+30
@@ -0,0 +1,30 @@
|
||||
#include "vendors/azure/models.h"
|
||||
|
||||
#include "vendors/azure/check.h"
|
||||
|
||||
namespace molo::azure {
|
||||
|
||||
using clients::body::Json;
|
||||
|
||||
Json ModelsService::list() { return call(Op::kListModels); }
|
||||
|
||||
std::vector<std::string> ModelsService::ids() {
|
||||
std::vector<std::string> out;
|
||||
Json doc = list();
|
||||
if (const Json* data = doc.find("data"); data && data->is_array())
|
||||
for (const Json& m : data->as_array())
|
||||
if (const Json* id = m.find("id"); id && id->is_string()) out.push_back(id->as_string());
|
||||
return out;
|
||||
}
|
||||
|
||||
Json ModelsService::get(const std::string& id) {
|
||||
Check::id("model", id);
|
||||
return call(Op::kRetrieveModel, {"", {id}});
|
||||
}
|
||||
|
||||
Json ModelsService::remove(const std::string& id) {
|
||||
Check::id("model", id);
|
||||
return call(Op::kDeleteModel, {"", {id}});
|
||||
}
|
||||
|
||||
} // namespace molo::azure
|
||||
Reference in New Issue
Block a user