-
Notifications
You must be signed in to change notification settings - Fork 65
feat: Support Chat Completions API endpoint #30
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
Conversation
OpenAI made an official ChatGPT API endpoint: https://openai.com/blog/introducing-chatgpt-and-whisper-apis The implementation here is modeled after the existing `Completion` function but follows the documentation and request and response formats outlined here: https://platform.openai.com/docs/guides/chat/introduction
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ This pull request was sent to the PullRequest network.
@abatilo you can click here to see the review status or cancel the code review job.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PullRequest Breakdown
Reviewable lines of change
+ 156
- 20
56% Go (tests)
44% Go
Type of change
Feature - These changes are adding a new feature or improvement to existing code.
@tylermann Please take a look! |
Great job @abatilo! Are you willing to implement the chat stream too? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR for adding Chat completions to the API looks good to me. As it's fairly straightforward, I didn't notice any issues, and it does seem to follow the documentation quite well.
As an aside, I am quite interested to see how this ends up being used with PullRequest. Great to see support for the new model / endpoint being added so quickly.
Reviewed with ❤️ by PullRequest
@abatilo Want to merge this PR in first? Or shall we close this one and do mine? Happy either way |
@bakks I don't have any ability to merge this PR. If yours was already approved and mergeable, let's go ahead and merge yours! |
Oh, I guess I can't either, hah - will wait then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this @abatilo , sorry for the delay here I have been away from my computer this week. The changes here look good to me and fairly isolated so should be good to merge in.
Thank you much @tylermann |
OpenAI made an official ChatGPT API endpoint:
https://openai.com/blog/introducing-chatgpt-and-whisper-apis
The implementation here is modeled after the existing
Completion
function but follows the documentation and request and response formats
outlined here:
https://platform.openai.com/docs/guides/chat/introduction