Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
model_store.hpp File Reference
#include <filesystem>
#include <functional>
#include <string>
#include <string_view>
#include <utility>
#include <vector>
#include <pulp/runtime/model_registry.hpp>

Go to the source code of this file.

Classes

struct  pulp::runtime::InstalledModelRecord
struct  pulp::runtime::ListedModel
struct  pulp::runtime::ModelListResult
struct  pulp::runtime::ActivateModelResult
struct  pulp::runtime::InstallModelResult

Namespaces

namespace  pulp
namespace  pulp::runtime

Functions

std::filesystem::path pulp::runtime::resolve_pulp_home (const std::filesystem::path &override_path={})
std::filesystem::path pulp::runtime::model_state_path (std::string_view subsystem, const std::filesystem::path &pulp_home_override={})
std::filesystem::path pulp::runtime::model_install_path (std::string_view subsystem, std::string_view model_id, const std::filesystem::path &pulp_home_override={})
InstalledModelRecord pulp::runtime::read_installed_model (std::string_view subsystem, std::string_view model_id, const std::filesystem::path &pulp_home_override={})
std::string pulp::runtime::read_active_model_id (std::string_view subsystem, const std::filesystem::path &pulp_home_override={})
ModelListResult pulp::runtime::list_models (const std::vector< ModelEntry > &registry, std::string_view subsystem, const std::filesystem::path &pulp_home_override={})
ActivateModelResult pulp::runtime::activate_model (const std::vector< ModelEntry > &registry, std::string_view subsystem, std::string_view model_id, const std::filesystem::path &pulp_home_override={})
std::string pulp::runtime::to_json (const ModelListResult &result)
std::string pulp::runtime::to_json (const ActivateModelResult &result)
InstallModelResult pulp::runtime::install_model (const ModelEntry &model, std::string_view subsystem, const std::function< bool(const struct DownloadProgress &)> &on_progress={}, const CancelToken *cancel=nullptr, const std::vector< std::pair< std::string, std::string > > &headers={}, const std::filesystem::path &pulp_home_override={}, bool allow_unverified=false)
 Download model's checkpoint into <home>/<subsystem>/models/<id>/ (streaming, resumable, sha256-verified), then write the install metadata so read_installed_model/ activate_model see it.
bool pulp::runtime::remove_model (std::string_view subsystem, std::string_view model_id, std::string &error, const std::filesystem::path &pulp_home_override={})
 Delete an installed model's files + metadata.