Skip to content

Commit a5cabd7

Browse files
woodx9wudexiang
and
wudexiang
authored
server : do not get prompt in infill mode (ggml-org#7286)
* avoid to get prompt in infill mode and embedding mode * remove embedding mode * refactor format --------- Co-authored-by: wudexiang <[email protected]>
1 parent d5c938c commit a5cabd7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/server/server.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ struct server_context {
888888
slot.params.input_suffix = json_value(data, "input_suffix", default_params.input_suffix);
889889

890890
// get prompt
891-
{
891+
if (!task.infill) {
892892
const auto & prompt = data.find("prompt");
893893
if (prompt == data.end()) {
894894
send_error(task, "Either \"prompt\" or \"messages\" must be provided", ERROR_TYPE_INVALID_REQUEST);

0 commit comments

Comments
 (0)