Skip to content

Add ChatGPT API integration #43

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

PeterKeffer
Copy link

@PeterKeffer PeterKeffer commented Apr 29, 2025

Add 'ask' button to use ChatGPT API for querying with comments and transcript.

  • manifest.json

    • Add permission for accessing the ChatGPT API.
  • content-scripts/cscripts.js

    • Add event listener for the 'ask' button click event.
    • Fetch comments and transcript when the 'ask' button is clicked.
    • Send the data to the ChatGPT API.
    • Display the output (the answer of the API) to the user.
    • Add 2 checkboxes for including comments and transcript to the input/prompt.
  • background.js

    • Add function to handle the ChatGPT API request and response.
  • browser-action/baction.html

    • Add 'ask' button next to the search button.
    • Add 2 checkboxes for including comments and transcript to the input/prompt.
  • content-scripts/ask.js

    • Handle the 'ask' button click event.
    • Fetch comments and transcript.
    • Send the data to the ChatGPT API.
    • Display the output (the answer of the API) to the user.

For more details, open the Copilot Workspace session.

Add 'ask' button to use ChatGPT API for querying with comments and transcript.

* **manifest.json**
  - Add permission for accessing the ChatGPT API.

* **content-scripts/cscripts.js**
  - Add event listener for the 'ask' button click event.
  - Fetch comments and transcript when the 'ask' button is clicked.
  - Send the data to the ChatGPT API.
  - Display the output (the answer of the API) to the user.
  - Add 2 checkboxes for including comments and transcript to the input/prompt.

* **background.js**
  - Add function to handle the ChatGPT API request and response.

* **browser-action/baction.html**
  - Add 'ask' button next to the search button.
  - Add 2 checkboxes for including comments and transcript to the input/prompt.

* **content-scripts/ask.js**
  - Handle the 'ask' button click event.
  - Fetch comments and transcript.
  - Send the data to the ChatGPT API.
  - Display the output (the answer of the API) to the user.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/pc035860/YCS-cont?shareId=XXXX-XXXX-XXXX-XXXX).
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.

1 participant