mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2026-08-27 23:51:18 +02:00
7e4c0a9688
* chat: add reasoning_effort to common_chat_templates_inputs Store OpenAI Chat Completions reasoning_effort and make it available to jinja templates (with model specific translations where required). Assisted-by: llama.cpp:Muse-Glimmer-30B * server : fixup reading reasoning effort from body server_chat_convert_responses_to_chatcmpl already handles conversion of Responses API reasoning.effort to reasoning_effort * chat : expose reasoning effort Assisted-by: Claude Opus 5 * chat : add reasoning_effort to generation_params Assisted-by: Claude Opus 5 * chat : move reasoning_effort next to enable_thinking Assisted-by: Claude Opus 5 * cont : mirror preserve_reasoning * cont : pass context through analyze function --------- Co-authored-by: Alde Rojas <hello@alde.dev>
41 lines
1.0 KiB
C++
41 lines
1.0 KiB
C++
#pragma once
|
|
|
|
#include "runtime.h"
|
|
|
|
#include <string>
|
|
#include <map>
|
|
|
|
namespace jinja {
|
|
|
|
struct caps {
|
|
bool supports_tools = true;
|
|
bool supports_tool_calls = true;
|
|
bool supports_system_role = true;
|
|
bool supports_parallel_tool_calls = true;
|
|
|
|
// supports preserve reasoning trace in the full history, not just the last assistant message
|
|
bool supports_preserve_reasoning = false;
|
|
|
|
// supports reasoning effort levels
|
|
bool supports_reasoning_effort = false;
|
|
|
|
// one of the 2 content capabilities must be true
|
|
bool supports_string_content = true;
|
|
bool supports_typed_content = false;
|
|
|
|
bool supports_object_arguments = false;
|
|
|
|
// for reporting on server
|
|
std::map<std::string, bool> to_map() const;
|
|
|
|
// for debugging
|
|
std::string to_string() const;
|
|
};
|
|
|
|
caps caps_get(jinja::program & prog);
|
|
|
|
void caps_apply_preserve_reasoning(jinja::context & ctx, bool enabled);
|
|
void caps_apply_reasoning_effort(jinja::context & ctx, const std::string & effort);
|
|
|
|
} // namespace jinja
|