feat: add OpenAI-compatible AI provider plugin with SSE streaming support
- 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.
This commit is contained in:
@@ -58,7 +58,7 @@ int main()
|
||||
<< "model = \"gpt-4o\"\n";
|
||||
}
|
||||
|
||||
// 初始化主机(会自动扫描 plugins/ 加载插件)/ Init host (auto-scans plugins/ to load plugins)
|
||||
// 初始化主机(会自动扫描 plugins_base/middle/upper 加载插件)/ Init host (auto-scans plugins_base/middle/upper to load plugins)
|
||||
if (dstalk_init(config_path.string().c_str()) != 0) {
|
||||
std::cerr << "dstalk_init failed\n";
|
||||
return 1;
|
||||
@@ -112,7 +112,7 @@ int main()
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
std::cerr << "[WARN] file_io service not found (plugin may not be in plugins/ dir)\n";
|
||||
std::cerr << "[WARN] file_io service not found (plugin may not be in plugins_base/ dir)\n";
|
||||
}
|
||||
|
||||
// 测试服务查询: session / Test service query: session
|
||||
|
||||
Reference in New Issue
Block a user