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

Inhwa/refine desc #23

Merged
merged 8 commits into from
Oct 11, 2024
Merged

Conversation

inhwaS
Copy link
Contributor

@inhwaS inhwaS commented Oct 9, 2024

Overview

This PR implements Issue #6 : ChatGPT Functionality, based on Issue #11 of the Experience Form implementation. However, since this implementation does not focus on fine-tuning, the output simply reflects the result from the OpenAI API call.

Requirements

  • OpenAI API key

Dependencies

Added axios to handle HTTP requests to the OpenAI API. if you encounter any error regarding axios, try to use the following command before starting the app:

npm install axios

or

yarn add axios

Changes Introduced

New Files:

  • RefineDescription.js: Contains logic to refine user input using ChatGPT.
  • .env: Stores the OpenAI API key for secure usage.

Updated Files:

  • ExperienceForm.js: Integrated the RefineDescription component to update the description text based on user input.

Testing Steps

  1. Set up your OpenAI API key in the .env file to enable ChatGPT functionality.
REACT_APP_OPENAI_API_KEY=your_api_key
  1. Click the Add Experience button to enter a description.
  2. Click Refine Description and wait for the updated text to appear in the description textarea.
Screen.Recording.2024-10-09.at.16.57.53.mov

@inhwaS
Copy link
Contributor Author

inhwaS commented Oct 10, 2024

@yashika51 I would like ask you for help to fix my Jest test case. It seems like axios is not properly imported during the test, where should I update?

@yashika51
Copy link
Collaborator

@inhwaS can you look at the merge conflicts?
Regarding the failing test cases, I see @aminaopio your recent PR had passing test cases, can you help @inhwaS out and take a look?

@aminaopio
Copy link
Contributor

@inhwaS can you look at the merge conflicts? Regarding the failing test cases, I see @aminaopio your recent PR had passing test cases, can you help @inhwaS out and take a look?

Hi @inhwaS, I believe I just ran the command yarn test on my local environment and it worked after that. If not, maybe try yarn add --dev jest first and then run that same command again.

@yashika51 yashika51 merged commit cc9abb7 into MLH-Fellowship:main Oct 11, 2024
1 of 2 checks passed
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.

3 participants