tool-call
: fix missing initializer errors
This commit is contained in:
parent
3ebdb2b805
commit
35ac17f3f1
1 changed files with 14 additions and 4 deletions
|
@ -207,8 +207,13 @@ static llama_tool_calls parse_llama_3_tool_calls(const json & tools, const std::
|
|||
std::smatch match;
|
||||
if (std::regex_search(input, match, python_tag_regex)) {
|
||||
return {
|
||||
match.prefix().str(), {
|
||||
{"ipython", (json {{"code", match[1].str()}}).dump()},
|
||||
/* .content = */ match.prefix().str(),
|
||||
/* .tool_calls = */ {
|
||||
{
|
||||
/* .name = */ "ipython",
|
||||
/* .arguments = */ (json {{"code", match[1].str()}}).dump(),
|
||||
/* .id = */ "",
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -224,8 +229,13 @@ static llama_tool_calls parse_functionary_v3_llama_3_1_tool_calls(const json & t
|
|||
std::smatch match;
|
||||
if (std::regex_search(input, match, python_tag_regex)) {
|
||||
return {
|
||||
match.prefix().str(), {
|
||||
{"ipython", (json {{"code", match[1].str()}}).dump()},
|
||||
/* .content = */ match.prefix().str(),
|
||||
/* .tool_calls = */ {
|
||||
{
|
||||
/* .name = */ "ipython",
|
||||
/* .arguments = */ (json {{"code", match[1].str()}}).dump(),
|
||||
/* .id = */ "",
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue