Skip to content

Commit

Permalink
[ML] Return both modelId and inferenceId (elastic#111490)
Browse files Browse the repository at this point in the history
Temporarily return both `modelId` and `inferenceId` for GET /_inference until we migrate clients to only `inferenceId`.
  • Loading branch information
prwhelan authored Jul 31, 2024
1 parent 41a26a1 commit 3b8970c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/changelog/111490.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 111490
summary: Temporarily return both `modelId` and `inferenceId` for GET /_inference until we migrate clients to only `inferenceId`
area: Machine Learning
type: bug
issues: []
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
if (params.paramAsBoolean(USE_ID_FOR_INDEX, false)) {
builder.field(INDEX_ONLY_ID_FIELD_NAME, inferenceEntityId);
} else {
builder.field(INDEX_ONLY_ID_FIELD_NAME, inferenceEntityId);
builder.field(INFERENCE_ID_FIELD_NAME, inferenceEntityId);
}
builder.field(TaskType.NAME, taskType.toString());
Expand All @@ -142,6 +143,7 @@ public XContentBuilder toFilteredXContent(XContentBuilder builder, Params params
if (params.paramAsBoolean(USE_ID_FOR_INDEX, false)) {
builder.field(INDEX_ONLY_ID_FIELD_NAME, inferenceEntityId);
} else {
builder.field(INDEX_ONLY_ID_FIELD_NAME, inferenceEntityId);
builder.field(INFERENCE_ID_FIELD_NAME, inferenceEntityId);
}
builder.field(TaskType.NAME, taskType.toString());
Expand Down

0 comments on commit 3b8970c

Please sign in to comment.