Some checks failed
- Introduced `ai_endpoint_mgr` plugin to manage multiple AI provider endpoints. - Added configuration reference documentation for `config.toml`. - Implemented endpoint loading, active endpoint switching, and model mutation. - Included error handling for missing endpoints and configuration failures. - Developed unit tests covering various scenarios including error paths and concurrency.
33 lines
973 B
CMake
33 lines
973 B
CMake
# ============================================================
|
|
# AI endpoint manager plugin / AI endpoint manager 插件
|
|
# ============================================================
|
|
|
|
find_package(Boost REQUIRED CONFIG)
|
|
|
|
add_library(plugin_ai_endpoint_mgr SHARED
|
|
src/endpoint_mgr_plugin.cpp
|
|
)
|
|
|
|
target_include_directories(plugin_ai_endpoint_mgr
|
|
PRIVATE
|
|
${CMAKE_SOURCE_DIR}/dstalk_core/include
|
|
${CMAKE_SOURCE_DIR}/plugins_upper/ai_common/include
|
|
)
|
|
|
|
target_link_libraries(plugin_ai_endpoint_mgr
|
|
PRIVATE
|
|
dstalk
|
|
ai_common
|
|
dstalk_boost_config
|
|
boost::boost
|
|
)
|
|
|
|
# cxx_std_20 已由 dstalk 和 ai_common (PUBLIC) 传播,无需重复声明
|
|
# cxx_std_20 is already propagated by dstalk and ai_common (PUBLIC); no need to redeclare
|
|
|
|
set_target_properties(plugin_ai_endpoint_mgr PROPERTIES
|
|
PREFIX ""
|
|
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/plugins"
|
|
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/plugins"
|
|
)
|