Skip to content

Commit

Permalink
iter
Browse files Browse the repository at this point in the history
  • Loading branch information
pmpailis committed Oct 3, 2024
1 parent a281f10 commit 65c2771
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,7 @@ public int rankWindowSize() {

@Override
protected void doToXContent(XContentBuilder builder, Params params) throws IOException {
builder.field(RETRIEVER_FIELD.getPreferredName());
builder.startObject();
builder.field(retrieverBuilder.getName(), retrieverBuilder);
builder.endObject();
builder.field(RETRIEVER_FIELD.getPreferredName(), retrieverBuilder);
builder.field(FIELD_FIELD.getPreferredName(), field);
builder.field(RANK_WINDOW_SIZE_FIELD.getPreferredName(), rankWindowSize);
if (seed != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,17 +179,11 @@ public int rankWindowSize() {

@Override
protected void doToXContent(XContentBuilder builder, Params params) throws IOException {
builder.field(RETRIEVER_FIELD.getPreferredName());
builder.startObject();
builder.field(retrieverBuilder.getName(), retrieverBuilder);
builder.endObject();
builder.field(RETRIEVER_FIELD.getPreferredName(), retrieverBuilder);
builder.field(INFERENCE_ID_FIELD.getPreferredName(), inferenceId);
builder.field(INFERENCE_TEXT_FIELD.getPreferredName(), inferenceText);
builder.field(FIELD_FIELD.getPreferredName(), field);
builder.field(RANK_WINDOW_SIZE_FIELD.getPreferredName(), rankWindowSize);
if (minScore != null) {
builder.field(MIN_SCORE_FIELD.getPreferredName(), minScore);
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,7 @@ public void doToXContent(XContentBuilder builder, Params params) throws IOExcept
builder.startArray(RETRIEVERS_FIELD.getPreferredName());

for (var entry : innerRetrievers) {
builder.startObject();
builder.field(entry.retriever().getName());
entry.retriever().toXContent(builder, params);
builder.endObject();
}
builder.endArray();
}
Expand Down

0 comments on commit 65c2771

Please sign in to comment.