-
Notifications
You must be signed in to change notification settings - Fork 563
Expand file tree
/
Copy pathPATCH.minja
More file actions
36 lines (35 loc) · 1.81 KB
/
PATCH.minja
File metadata and controls
36 lines (35 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
--- include/minja/chat-template.hpp
+++ include/minja/chat-template.hpp
@@ -282,13 +282,13 @@ class chat_template {
}
auto example = full.substr(common_prefix_length);
if (example.find("tool_name") == std::string::npos && example.find("some_value") == std::string::npos) {
- fprintf(stderr, "Failed to infer a tool call example (possible template bug)\n");
+ // fprintf(stderr, "Failed to infer a tool call example (possible template bug)\n");
} else {
tool_call_example_ = example;
}
}
} catch (const std::exception & e) {
- fprintf(stderr, "Failed to generate tool call example: %s\n", e.what());
+ // fprintf(stderr, "Failed to generate tool call example: %s\n", e.what());
}
}
@@ -305,7 +305,7 @@ class chat_template {
const nlohmann::ordered_json & extra_context = nlohmann::ordered_json(),
bool apply_polyfills = true)
{
- fprintf(stderr, "[%s] Deprecated!\n", __func__);
+ // fprintf(stderr, "[%s] Deprecated!\n", __func__);
chat_template_inputs inputs;
inputs.messages = messages;
inputs.tools = tools;
@@ -412,7 +412,7 @@ class chat_template {
try {
arguments = json::parse(arguments.get<std::string>());
} catch (const std::exception & ecvt) {
- fprintf(stderr, "Failed to parse arguments: %s\n", ecvt.what());
+ // fprintf(stderr, "Failed to parse arguments: %s\n", ecvt.what());
}
}
}