chat: fix case where template accepts type content only (#19419)

* chat: fix case where template accepts type content only

* rm stray log

* reuse render_message_to_json
This commit is contained in:
Xuan-Son Nguyen 2026-02-09 22:14:12 +01:00 committed by GitHub
parent 262364e31d
commit 98e57ca422
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 55 additions and 9 deletions

View file

@ -240,6 +240,8 @@ bool common_chat_templates_support_enable_thinking(const common_chat_templates *
// Parses a JSON array of messages in OpenAI's chat completion API format.
std::vector<common_chat_msg> common_chat_msgs_parse_oaicompat(const nlohmann::ordered_json & messages);
// DEPRECATED: only used in tests
nlohmann::ordered_json common_chat_msgs_to_json_oaicompat(const std::vector<common_chat_msg> & msgs, bool concat_typed_text = false);
std::vector<common_chat_tool> common_chat_tools_parse_oaicompat(const nlohmann::ordered_json & tools);