Skip to content

Commit 9d81db0

Browse files
Fixing change log and removing commented out code
1 parent 0166d98 commit 9d81db0

File tree

3 files changed

+46
-133
lines changed

3 files changed

+46
-133
lines changed

docs/changelog/117589.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
pr: 117589
2-
summary: "[Inference API] Add unified api for chat completions"
2+
summary: "Add Inference Unified API for chat completions for OpenAI"
33
area: Machine Learning
44
type: enhancement
55
issues: []

server/src/main/java/org/elasticsearch/inference/UnifiedCompletionRequest.java

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -279,61 +279,6 @@ public void writeTo(StreamOutput out) throws IOException {
279279
}
280280
}
281281

282-
// private static Stop parseStop(XContentParser parser) throws IOException {
283-
// var token = parser.currentToken();
284-
// if (token == XContentParser.Token.START_ARRAY) {
285-
// var parsedStopValues = XContentParserUtils.parseList(parser, XContentParser::text);
286-
// return new StopValues(parsedStopValues);
287-
// } else if (token == XContentParser.Token.VALUE_STRING) {
288-
// return StopString.of(parser);
289-
// }
290-
//
291-
// throw new XContentParseException("Unsupported token [" + token + "]");
292-
// }
293-
294-
// public sealed interface Stop extends NamedWriteable permits StopString, StopValues {}
295-
//
296-
// public record StopString(String value) implements Stop, NamedWriteable {
297-
// public static final String NAME = "stop_string";
298-
//
299-
// public static StopString of(XContentParser parser) throws IOException {
300-
// var content = parser.text();
301-
// return new StopString(content);
302-
// }
303-
//
304-
// public StopString(StreamInput in) throws IOException {
305-
// this(in.readString());
306-
// }
307-
//
308-
// @Override
309-
// public void writeTo(StreamOutput out) throws IOException {
310-
// out.writeString(value);
311-
// }
312-
//
313-
// @Override
314-
// public String getWriteableName() {
315-
// return NAME;
316-
// }
317-
// }
318-
//
319-
// public record StopValues(List<String> values) implements Stop, NamedWriteable {
320-
// public static final String NAME = "stop_values";
321-
//
322-
// public StopValues(StreamInput in) throws IOException {
323-
// this(in.readStringCollectionAsImmutableList());
324-
// }
325-
//
326-
// @Override
327-
// public void writeTo(StreamOutput out) throws IOException {
328-
// out.writeStringCollection(values);
329-
// }
330-
//
331-
// @Override
332-
// public String getWriteableName() {
333-
// return NAME;
334-
// }
335-
// }
336-
337282
private static ToolChoice parseToolChoice(XContentParser parser) throws IOException {
338283
var token = parser.currentToken();
339284
if (token == XContentParser.Token.START_OBJECT) {

0 commit comments

Comments
 (0)