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

[FEATURE_REQUEST] ChatGPT Widget #1086

Closed
papampi opened this issue Jan 25, 2023 · 8 comments
Closed

[FEATURE_REQUEST] ChatGPT Widget #1086

papampi opened this issue Jan 25, 2023 · 8 comments
Labels
🦄 Feature Request [ISSUE] Suggestion for new feature, update or change 📌 Keep Open [ISSUE][PR] Prevent auto-closing

Comments

@papampi
Copy link

papampi commented Jan 25, 2023

Is your feature request related to a problem? If so, please describe.

No response

Describe the solution you'd like

Would be nice to have a ChatGPT widget.

Loving Dashy, Thanks for its awesomeness.

Priority

Low (Nice-to-have)

Is this something you would be keen to implement

None

@papampi papampi added the 🦄 Feature Request [ISSUE] Suggestion for new feature, update or change label Jan 25, 2023
@papampi papampi changed the title [FEATURE_REQUEST] <ChatGPT> [FEATURE_REQUEST] ChatGPT Widget Jan 25, 2023
@papampi
Copy link
Author

papampi commented Jan 25, 2023

Here is the response from ChatGPT:

Sign up for an OpenAI API key. You will need this to access the GPT-3 model.

Create a HTML file for your web page and add the necessary elements, such as a text input field and a button to initiate the API call.

Add a JavaScript script to your HTML file that will handle the communication with the OpenAI API. You will need to use the Fetch API or a library like jQuery to make the API call.

In the JavaScript script, use the fetch method to make a post request to the OpenAI API, passing in your API key and the text input by the user. The API will return a response with the generated text, which you can then display on the web page.

Style the web page as desired using CSS.

To serve your webpage, you can use any web server like Apache, Nginx, etc.

Here's an example of a simple HTML file that includes a text input field and a button to initiate the API call:


<!DOCTYPE html>
<html>
<head>
    <title>ChatGPT Embedded in a Web Page</title>
</head>
<body>
    <h1>ChatGPT Embedded in a Web Page</h1>
    <form>
        <label for="input-text">Enter your text here:</label>
        <input type="text" id="input-text">
        <button type="button" id="submit-button">Generate Text</button>
    </form>
    <div id="output-text"></div>

    <script>
        // Add your JavaScript code here to handle the API call
    </script>
</body>
</html>


Please note that, this is just a basic example and you need to implement the functionality as per your requirement and also you should use the proper endpoint and pass the parameters as per the documentation.

@liss-bot liss-bot added 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending and removed 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending labels Jan 25, 2023
@liss-bot
Copy link
Collaborator

This issue has gone 6 weeks without an update. To keep the ticket open, please indicate that it is still relevant in a comment below. Otherwise it will be closed in 5 working days.

@liss-bot liss-bot added the ⚰️ Stale [ISSUE] [PR] No activity for over 1 month label Feb 25, 2023
@Lissy93
Copy link
Owner

Lissy93 commented Feb 26, 2023

Heya @papampi
Sorry for the delayed reply, it's been a busy couple of weeks.

What kind of stuff were you thinking the ChatGPT widget would do? Like just a chat and response field? Or something more specific?

@liss-bot liss-bot added 📌 Keep Open [ISSUE][PR] Prevent auto-closing and removed ⚰️ Stale [ISSUE] [PR] No activity for over 1 month labels Feb 27, 2023
@papampi
Copy link
Author

papampi commented Feb 27, 2023

No worries,
Just a chatbox widget would do for sure.

@liss-bot liss-bot added 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending and removed 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending labels Feb 27, 2023
@Lissy93
Copy link
Owner

Lissy93 commented Mar 3, 2023

As if right on que, OpenAI has released the firtst version of the ChatGPT API :) However, although it's reasonably priced, it is not free. Maybe just embedding the site as an iframe widget would be a better situation in your usecase?

@papampi
Copy link
Author

papampi commented Mar 3, 2023

That would be great

@liss-bot liss-bot added 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending and removed 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending labels Mar 3, 2023
@Lissy93
Copy link
Owner

Lissy93 commented Feb 11, 2024

I think, for the time-being this as a widget is probably out of scope. I'd be happy to revisit in the future.

Reason being, OpenAI's API is changing pretty rapidly, as is the whole AI scene, and until more established it's going to be hard to keep this widget up-to-date. As a work-around, building your own as a simple HTML page and embedding via iframe should work.

Happy to help if you've got any questions on this, as I've built a few apps using ChatGPT/OpenAI's API recently.

And will revisit the option for official widget, in a couple of months if there's still interest.

@Lissy93 Lissy93 closed this as completed Feb 11, 2024
@rgsaura
Copy link

rgsaura commented May 8, 2024

Would love to see this going again! I think OpenAi api compatible APIs have been establish, so this could be done without problems. Would love to be able to put my own url api + token etc...
All the best!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🦄 Feature Request [ISSUE] Suggestion for new feature, update or change 📌 Keep Open [ISSUE][PR] Prevent auto-closing
Projects
None yet
Development

No branches or pull requests

4 participants