Skip to content

Commit

Permalink
server : add one level list nesting for embeddings (ggerganov#8936)
Browse files Browse the repository at this point in the history
  • Loading branch information
gelim authored and arthw committed Nov 15, 2024
1 parent 3fbbbd7 commit f246163
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -975,6 +975,8 @@ struct server_context {
(prompt->is_array() && prompt->size() == 1 && prompt->at(0).is_string()) ||
(prompt->is_array() && !prompt->empty() && prompt->at(0).is_number_integer())) {
slot.prompt = *prompt;
} else if (prompt->is_array() && prompt->size() == 1 && prompt->at(0).is_array()) {
slot.prompt = prompt->at(0);
} else {
send_error(task, "\"prompt\" must be a string or an array of integers", ERROR_TYPE_INVALID_REQUEST);
return false;
Expand Down

0 comments on commit f246163

Please sign in to comment.