OPIK-545: Add chat completions resource #852
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Details
Created the skeleton of the chat completion proxy endpoint, with same signature as the Open API one.
Integrated langchain4j and re-used request and response models.
Supported both stream and un-stream mode in the get chat completion endpoint.
Naive implementation that only returns a 501 not implemented status code, with random data.
Left a reference implementation of server sent events (mime type: text/event-stream) based on a chunked output, that can be reused in the future for any similar endpoint.
Added a proper Open API spec, but not updated nor generated the models yet. Will go in a follow-up PR once this contract is fully agreed.
Issues
Testing
Documentation