Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPIK-545: Add chat completions resource #852

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

andrescrz
Copy link
Collaborator

@andrescrz andrescrz commented Dec 10, 2024

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

  • Added naive integration tests covering the streaming and unstreaming responses.

Documentation

@andrescrz andrescrz self-assigned this Dec 10, 2024
@andrescrz andrescrz marked this pull request as ready for review December 10, 2024 17:46
@andrescrz andrescrz requested a review from a team as a code owner December 10, 2024 17:46
Copy link
Contributor

@thiagohora thiagohora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@andrescrz andrescrz merged commit 19d93dd into main Dec 11, 2024
7 checks passed
@andrescrz andrescrz deleted the andrescrz/OPIK-545-add-ai-proxy-resource branch December 11, 2024 09:35
@andrescrz andrescrz added the enhancement New feature or request label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants