Skip to content

Commit

Permalink
server : do not get prompt in infill mode (ggml-org#7286)
Browse files Browse the repository at this point in the history
* avoid to get prompt in infill mode and embedding mode

* remove embedding mode

* refactor format

---------

Co-authored-by: wudexiang <[email protected]>
  • Loading branch information
woodx9 and wudexiang authored Jun 7, 2024
1 parent d5c938c commit a5cabd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ struct server_context {
slot.params.input_suffix = json_value(data, "input_suffix", default_params.input_suffix);

// get prompt
{
if (!task.infill) {
const auto & prompt = data.find("prompt");
if (prompt == data.end()) {
send_error(task, "Either \"prompt\" or \"messages\" must be provided", ERROR_TYPE_INVALID_REQUEST);
Expand Down

0 comments on commit a5cabd7

Please sign in to comment.