-
Notifications
You must be signed in to change notification settings - Fork 916
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
[CHAT] Refactor ChatGPTProvider to use openai-java
client
#4556
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4556 +/- ##
============================================
- Coverage 53.30% 53.26% -0.04%
Complexity 13 13
============================================
Files 573 573
Lines 31493 31493
Branches 4237 4237
============================================
- Hits 16786 16776 -10
- Misses 13128 13135 +7
- Partials 1579 1582 +3 see 7 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
openai-java
SDKopenai-java
Please check the following things:
|
messages.addLast(new ChatMessage("user", q)) | ||
val completionRequest = ChatCompletionRequest.builder() | ||
.messages(messages.asScala.toList.asJava) | ||
.model("gpt-3.5-turbo") |
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.
let's make it configurable in next PR :)
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.
Sure. Make it configurable of other ChatCompletionRequest settings like model name, max tokens, etc.
I remember that okhttp provides a mock server module for testing, we can add UT then. |
How can I update the LICENSE-binary and NOTICE-binary, in manual way or auto-collect by tools? |
Shall we do the ut in the next PR ? |
openai-java
openai-java
SDK
openai-java
SDKopenai-java
client
Currently, we should update them manually, we haven't found a tool smart enough to automatically process them. |
it's fine. |
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.
LGTM, linked in #4549
Thanks, merged to master. |
Why are the changes needed?
openai-java
for ChatGPT which is popular and listed in official website, https://github.com/TheoKanning/openai-javaHow was this patch tested?
Add some test cases that check the changes thoroughly including negative and positive cases if possible
Add screenshots for manual tests if appropriate
Run test locally before make a pull request