Skip to content

Commit b93b52f

Browse files
ngxsonggerganov
andauthored
Apply suggestions from code review
Co-authored-by: Georgi Gerganov <[email protected]>
1 parent b742015 commit b93b52f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/server/utils.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ static json format_response_rerank(
741741
const json & request,
742742
const json & ranks,
743743
bool is_tei_format,
744-
std::vector<std::string> & texts) {
744+
const std::vector<std::string> & texts) {
745745
json res;
746746
if (is_tei_format) {
747747
// TEI response format
@@ -754,7 +754,7 @@ static json format_response_rerank(
754754
{"score", json_value(rank, "score", 0.0)},
755755
};
756756
if (return_text) {
757-
elem["text"] = texts[index];
757+
elem["text"] = std::move(texts[index]);
758758
}
759759
res.push_back(elem);
760760
}

0 commit comments

Comments
 (0)