File tree Expand file tree Collapse file tree 3 files changed +2
-2
lines changed Expand file tree Collapse file tree 3 files changed +2
-2
lines changed Original file line number Diff line number Diff line change 3
3
4
4
#include < string>
5
5
#include < tuple>
6
+ #include < vector>
6
7
7
8
/* *
8
9
* @brief 处理JSON流中的转义字符。
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ std::string unescape_string(std::string s) {
16
16
return s;
17
17
}
18
18
19
-
20
19
std::tuple<std::string, std::string> safe_print_with_escapes (const std::string& buffer) {
21
20
if (buffer.empty ()) {
22
21
return {" " , " " };
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ void main_loop() {
95
95
try {
96
96
std::string tool_name = tool_call.function [" name" ];
97
97
auto arguments = nlohmann::json::parse (tool_call.function [" arguments" ].get <std::string>());
98
- std::string code_to_run = unescape_string ( arguments[" code" ]) ;
98
+ std::string code_to_run = arguments[" code" ];
99
99
100
100
if (tool_name == " python" ) {
101
101
result = python_executor.execute (code_to_run);
You can’t perform that action at this time.
0 commit comments