diff options
author | woodx <124784234+woodx9@users.noreply.github.com> | 2024-06-07 15:09:45 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-07 10:09:45 +0300 |
commit | a5cabd76491f07494c5b8267f921c73f5e2bbfb4 (patch) | |
tree | 395dacce3ee26eea81630a450286851b2f39bc93 /examples | |
parent | d5c938cd7716b9a2ace49a43a469dfbffcff4d28 (diff) |
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>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/server/server.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/server/server.cpp b/examples/server/server.cpp index 74da81da..52822060 100644 --- a/examples/server/server.cpp +++ b/examples/server/server.cpp @@ -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); |