| 708 | } |
| 709 | |
| 710 | common_reasoning_format common_reasoning_format_from_name(const std::string & format) { |
| 711 | if (format == "none") { |
| 712 | return COMMON_REASONING_FORMAT_NONE; |
| 713 | } |
| 714 | if (format == "auto") { |
| 715 | return COMMON_REASONING_FORMAT_AUTO; |
| 716 | } |
| 717 | if (format == "deepseek") { |
| 718 | return COMMON_REASONING_FORMAT_DEEPSEEK; |
| 719 | } |
| 720 | if (format == "deepseek-legacy") { |
| 721 | return COMMON_REASONING_FORMAT_DEEPSEEK_LEGACY; |
| 722 | } |
| 723 | throw std::runtime_error("Unknown reasoning format: " + format); |
| 724 | } |
| 725 | |
| 726 | static void foreach_function(const json & tools, const std::function<void(const json &)> & fn) { |
| 727 | for (const auto & tool : tools) { |
no outgoing calls
no test coverage detected