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

[CHAT] Code improvement in ChatGPTProvider #4554

Closed
wants to merge 1 commit into from

Conversation

bowenliang123
Copy link
Contributor

@bowenliang123 bowenliang123 commented Mar 17, 2023

Why are the changes needed?

  • set authentication as default header in client construction instead of request construction
  • handle response's status code in scala style
  • transforming config's long value to int with .intValue instead of asInstanceOf casting
  • fix var name to response

How 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

@bowenliang123 bowenliang123 changed the title [CHAT] Improvement request sending and response handling with httpclient in ChatGPTProvider [CHAT] Improvement of request sending and response handling in ChatGPTProvider Mar 17, 2023
@pan3793 pan3793 changed the title [CHAT] Improvement of request sending and response handling in ChatGPTProvider [CHAT] Code improvement in ChatGPTProvider Mar 18, 2023
@pan3793 pan3793 added this to the v1.8.0 milestone Mar 18, 2023
@pan3793 pan3793 closed this in 067c601 Mar 18, 2023
@pan3793
Copy link
Member

pan3793 commented Mar 18, 2023

Thanks, merged to master

@bowenliang123 bowenliang123 deleted the chatgpt-http branch March 23, 2023 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants