Skip to content
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
bf507e7
Adding some shell classes
jonathan-buttner Nov 20, 2024
705aa42
modeling the request objects
jonathan-buttner Nov 21, 2024
bd5df97
Writeable changes to schema
jonathan-buttner Nov 22, 2024
bd59543
Working parsing tests
jonathan-buttner Nov 22, 2024
1e30c6d
Creating a new action
jonathan-buttner Nov 25, 2024
2846942
Add outbound request writing (WIP)
Nov 25, 2024
9cb401c
Improvements to request serialization
Nov 25, 2024
1e0eb20
Adding separate transport classes
jonathan-buttner Nov 25, 2024
d6cc223
separate out unified request and combine inputs
Nov 25, 2024
7986c81
Merge branch 'ml-inference-unified-api-elastic' of github.com:elastic…
jonathan-buttner Nov 26, 2024
bf817d0
Reworking unified inputs
jonathan-buttner Nov 26, 2024
81a05b7
Adding unsupported operation calls
jonathan-buttner Nov 26, 2024
cb440e1
Fixing parsing logic
jonathan-buttner Nov 26, 2024
86d477e
get the build working
Nov 26, 2024
359d305
Update docs/changelog/117589.yaml
maxhniebergall Nov 26, 2024
4070231
Merge branch 'main' of github.com:elastic/elasticsearch into ml-infer…
jonathan-buttner Nov 26, 2024
ce57bea
Merge branch 'ml-inference-unified-api-elastic' of github.com:elastic…
jonathan-buttner Nov 26, 2024
834676d
Fixing injection issue
jonathan-buttner Nov 26, 2024
5909a7d
Allowing model to be overridden but not working yet
jonathan-buttner Nov 26, 2024
315be2c
Fixing issues
jonathan-buttner Nov 27, 2024
657561e
Switch field name for tool
jonathan-buttner Nov 27, 2024
97b330f
Add suport for toolCalls and refusal in streaming completion
Nov 27, 2024
2660ecb
Working tool call response
jonathan-buttner Nov 27, 2024
03fada0
Separate unified and legacy code paths
jonathan-buttner Nov 27, 2024
b76a47d
Updated the parser, but there are some class cast exceptions to fix
Nov 27, 2024
8900d61
Merge branch 'ml-inference-unified-api-elastic' of github.com:elastic…
Dec 2, 2024
0dfd081
Refactoring tests and request entities
jonathan-buttner Dec 2, 2024
3735bf1
Parse response from OpenAI
Dec 2, 2024
ab53397
Merge branch 'ml-inference-unified-api-elastic' of github.com:elastic…
Dec 2, 2024
ecdf5c3
Removing unused request classes
jonathan-buttner Dec 2, 2024
6d216d5
Merge branch 'ml-inference-unified-api-elastic' of github.com:elastic…
jonathan-buttner Dec 2, 2024
f7f8a2e
precommit
Dec 2, 2024
f983d6a
Merge branch 'ml-inference-unified-api-elastic' of github.com:elastic…
Dec 2, 2024
10ac1ae
Adding tests for UnifiedCompletionAction Request
jonathan-buttner Dec 2, 2024
99d202f
Refactoring stop to be a list of strings
jonathan-buttner Dec 3, 2024
6831aaa
Testing for OpenAI response parsing
Dec 3, 2024
127eeb7
Merge branch 'ml-inference-unified-api-elastic' of github.com:elastic…
Dec 3, 2024
41f9bce
Refactoring transport action tests to test unified validation code
jonathan-buttner Dec 3, 2024
fa415d8
Merge branch 'main' of github.com:elastic/elasticsearch into ml-infer…
jonathan-buttner Dec 3, 2024
f382246
Fixing various tests
jonathan-buttner Dec 3, 2024
b7d1c86
Fixing license header
jonathan-buttner Dec 3, 2024
6bf3fcd
Merge branch 'main' of github.com:elastic/elasticsearch into ml-infer…
jonathan-buttner Dec 4, 2024
93a671a
Reformat streaming results
Dec 4, 2024
0ba212f
Merge branch 'ml-inference-unified-api-elastic' of github.com:elastic…
Dec 4, 2024
6e3db61
Finalize response format
Dec 4, 2024
56735c6
remove debug logs
Dec 4, 2024
0fb9a17
remove changes for debugging
Dec 4, 2024
a530f02
Task type and base inference action tests
jonathan-buttner Dec 4, 2024
1d37d8c
Merge branch 'ml-inference-unified-api-elastic' of github.com:elastic…
jonathan-buttner Dec 4, 2024
df1b006
Adding openai service tests
jonathan-buttner Dec 4, 2024
0166d98
Adding model tests
jonathan-buttner Dec 4, 2024
3dfb8f5
tests for StreamingUnifiedChatCompletionResultsTests toXContentChunked
Dec 4, 2024
933087d
Merge branch 'ml-inference-unified-api-elastic' of github.com:elastic…
Dec 4, 2024
9d81db0
Fixing change log and removing commented out code
jonathan-buttner Dec 4, 2024
881f162
Merge branch 'ml-inference-unified-api-elastic' of github.com:elastic…
jonathan-buttner Dec 4, 2024
00ae5ab
Switch usage to accept null
Dec 4, 2024
e47cb9c
Merge branch 'ml-inference-unified-api-elastic' of github.com:elastic…
jonathan-buttner Dec 4, 2024
88a7eb0
Adding test for TestStreamingCompletionServiceExtension
jonathan-buttner Dec 5, 2024
be3a459
Avoid serializing empty lists + request entity tests
Dec 5, 2024
e40e41e
Register named writeables from UnifiedCompletionRequest
Dec 5, 2024
c1e4ba1
Removing commented code
jonathan-buttner Dec 5, 2024
8fbdb9e
Merge branch 'ml-inference-unified-api-elastic' of github.com:elastic…
jonathan-buttner Dec 5, 2024
10a5b12
Clean up and add more of an explination
jonathan-buttner Dec 5, 2024
bc7dbb8
remove duplicate test
Dec 5, 2024
357277e
remove old todos
Dec 5, 2024
e2ed5cc
Merge branch 'ml-inference-unified-api-elastic' of github.com:elastic…
Dec 5, 2024
8f22f56
Refactoring some duplication
jonathan-buttner Dec 5, 2024
a9b44b5
Adding javadoc
jonathan-buttner Dec 5, 2024
fc173ff
Merge branch 'ml-inference-unified-api-elastic' of github.com:elastic…
jonathan-buttner Dec 5, 2024
4c2573e
Merge branch 'main' of github.com:elastic/elasticsearch into ml-infer…
jonathan-buttner Dec 5, 2024
e1decca
Merge branch 'main' into ml-inference-unified-api-elastic
jonathan-buttner Dec 5, 2024
3c4428f
Addressing feedback
jonathan-buttner Dec 6, 2024
b16008f
Merge branch 'main' of github.com:elastic/elasticsearch into ml-infer…
jonathan-buttner Dec 6, 2024
481aa90
Merge branch 'ml-inference-unified-api-elastic' of github.com:elastic…
jonathan-buttner Dec 6, 2024
7fc36ce
Removing unused import
jonathan-buttner Dec 6, 2024
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
5 changes: 5 additions & 0 deletions docs/changelog/117589.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 117589
summary: "[Inference API] Add unified api for chat completions"
area: Machine Learning
type: enhancement
issues: []
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ static TransportVersion def(int id) {
public static final TransportVersion INDEXING_PRESSURE_THROTTLING_STATS = def(8_798_00_0);
public static final TransportVersion REINDEX_DATA_STREAMS = def(8_799_00_0);
public static final TransportVersion ESQL_REMOVE_NODE_LEVEL_PLAN = def(8_800_00_0);
public static final TransportVersion ML_INFERENCE_UNIFIED_COMPLETIONS_API = def(8_801_00_0);
/*
* STOP! READ THIS FIRST! No, really,
* ____ _____ ___ ____ _ ____ _____ _ ____ _____ _ _ ___ ____ _____ ___ ____ ____ _____ _
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,21 @@ void infer(
ActionListener<InferenceServiceResults> listener
);

/**
* Perform completion inference on the model using the unified schema.
*
* @param model The model
* @param request Parameters for the request
* @param timeout The timeout for the request
* @param listener Inference result listener
*/
void unifiedCompletionInfer(
Model model,
UnifiedCompletionRequest request,
TimeValue timeout,
ActionListener<InferenceServiceResults> listener
);

/**
* Chunk long text according to {@code chunkingOptions} or the
* model defaults if {@code chunkingOptions} contains unset
Expand Down
Loading