mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-08-13 11:57:43 -04:00
server : do not get prompt in infill mode (#7286)
* avoid to get prompt in infill mode and embedding mode * remove embedding mode * refactor format --------- Co-authored-by: wudexiang <wudexiang@bytedance.com>
This commit is contained in:
@@ -888,7 +888,7 @@ struct server_context {
|
|||||||
slot.params.input_suffix = json_value(data, "input_suffix", default_params.input_suffix);
|
slot.params.input_suffix = json_value(data, "input_suffix", default_params.input_suffix);
|
||||||
|
|
||||||
// get prompt
|
// get prompt
|
||||||
{
|
if (!task.infill) {
|
||||||
const auto & prompt = data.find("prompt");
|
const auto & prompt = data.find("prompt");
|
||||||
if (prompt == data.end()) {
|
if (prompt == data.end()) {
|
||||||
send_error(task, "Either \"prompt\" or \"messages\" must be provided", ERROR_TYPE_INVALID_REQUEST);
|
send_error(task, "Either \"prompt\" or \"messages\" must be provided", ERROR_TYPE_INVALID_REQUEST);
|
||||||
|
Reference in New Issue
Block a user