Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server : add TEI API format for /rerank endpoint #11942

Merged
merged 4 commits into from
Feb 18, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix
  • Loading branch information
ngxson committed Feb 18, 2025
commit 2a3544c1dd2d0bf469a2c19649b3664b397de49a
4 changes: 2 additions & 2 deletions examples/server/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ static json format_response_rerank(
const json & request,
const json & ranks,
bool is_tei_format,
const std::vector<std::string> & texts) {
std::vector<std::string> & texts) {
json res;
if (is_tei_format) {
// TEI response format
Expand Down Expand Up @@ -771,7 +771,7 @@ static json format_response_rerank(
n_tokens += json_value(rank, "tokens_evaluated", 0);
}

res = json {
res = json{
{"model", json_value(request, "model", std::string(DEFAULT_OAICOMPAT_MODEL))},
{"object", "list"},
{"usage", json{
Expand Down
Loading