Add unit tests for OpenAI plugin and establish coding standards
- Introduced comprehensive unit tests for the OpenAI plugin, covering SSE parsing, sentinel matching, delta extraction, request building, and more. - Created a new markdown file detailing coding and naming conventions for the dstalk project, including guidelines for comments, naming rules, code organization, and memory management practices.
This commit is contained in:
20
plugins/openai/CMakeLists.txt
Normal file
20
plugins/openai/CMakeLists.txt
Normal file
@@ -0,0 +1,20 @@
|
||||
# ============================================================
|
||||
# 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)
|
||||
find_package(Boost REQUIRED CONFIG)
|
||||
target_link_libraries(plugin-openai PRIVATE boost::boost dstalk_boost_config)
|
||||
|
||||
set_target_properties(plugin-openai PROPERTIES
|
||||
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins
|
||||
)
|
||||
Reference in New Issue
Block a user