Olivier Chafik 2025-02-05 01:00:12 +00:00 committed by GitHub
parent fd08255d0d
commit 9f4cc8f8d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 233 additions and 58 deletions

View file

@ -18,12 +18,8 @@
using json = nlohmann::ordered_json;
static common_chat_msg msg_from_json(const json & message) {
common_chat_msg ret{
"assistant",
"",
{},
/* .tool_plan = */ "",
};
common_chat_msg ret;
ret.role = "assistant";
if (message.contains("content") && !message.at("content").is_null()) {
ret.content = message.at("content");
}