- Implemented the OpenAI-compatible AI provider plugin, including configuration, chat, and chat_stream functionalities. - Added support for SSE streaming and tool calls. - Integrated Boost.JSON for JSON handling. - Created CMake configuration for the plugin. - Added error handling and logging throughout the plugin.
21 lines
637 B
CMake
21 lines
637 B
CMake
# ============================================================
|
|
# plugin-openai — OpenAI 兼容 AI 服务 / OpenAI-compatible AI service
|
|
# ============================================================
|
|
|
|
find_package(Boost REQUIRED CONFIG)
|
|
|
|
add_library(plugin-openai SHARED
|
|
src/openai_plugin.cpp
|
|
)
|
|
|
|
target_link_libraries(plugin-openai PRIVATE dstalk)
|
|
|
|
# Boost.JSON (header-only)
|
|
target_link_libraries(plugin-openai PRIVATE boost::boost dstalk_boost_config)
|
|
|
|
set_target_properties(plugin-openai PROPERTIES
|
|
PREFIX ""
|
|
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins
|
|
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins
|
|
)
|