Allow tool use + streaming
This commit is contained in:
parent
ef9efc9ed3
commit
62717145f7
1 changed files with 2 additions and 9 deletions
|
@ -586,15 +586,8 @@ static json oaicompat_completion_params_parse(
|
|||
json llama_params;
|
||||
|
||||
auto tools = json_value(body, "tools", json());
|
||||
auto stream = json_value(body, "stream", false);
|
||||
|
||||
if (tools.is_array() && !tools.empty()) {
|
||||
if (stream) {
|
||||
throw std::runtime_error("Cannot use tools with stream");
|
||||
}
|
||||
if (!use_jinja) {
|
||||
throw std::runtime_error("tools param requires --jinja flag");
|
||||
}
|
||||
if (tools.is_array() && !tools.empty() && !use_jinja) {
|
||||
throw std::runtime_error("tools param requires --jinja flag");
|
||||
}
|
||||
|
||||
// Handle "stop" field
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue