mirror of
https://github.com/mudler/LocalAI.git
synced 2026-07-31 02:18:50 -04:00
Add protocol-neutral model configuration and runtime ownership against the pinned audio.cpp interfaces. Validate task capabilities, preserve the active model on replacement failures, serialize inference calls, and guarantee session-first teardown. Assisted-by: Codex:gpt-5
27 lines
627 B
C++
27 lines
627 B
C++
// SPDX-License-Identifier: MIT
|
|
|
|
#pragma once
|
|
|
|
#include "engine/framework/runtime/model.h"
|
|
#include "engine/framework/runtime/session.h"
|
|
|
|
#include <filesystem>
|
|
#include <string>
|
|
#include <unordered_map>
|
|
|
|
namespace audio_cpp {
|
|
|
|
struct AudioCppModelConfig {
|
|
std::filesystem::path model_path;
|
|
std::string family;
|
|
engine::runtime::TaskSpec task;
|
|
engine::runtime::ModelLoadRequest load;
|
|
engine::runtime::SessionOptions session;
|
|
};
|
|
|
|
AudioCppModelConfig parse_model_config(
|
|
const std::filesystem::path & model_path,
|
|
const std::unordered_map<std::string, std::string> & options);
|
|
|
|
} // namespace audio_cpp
|