2

Customizable ChatGPT agent for your website

 1 year ago
source link: https://web-gpt-demo.com/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

WebGPT: Demo

Customizable ChatGPT agent for your website

This is a simple demo that shows how to build your own ChatGPT bot on the web. Source code available here. It's hosted on Autocode, a serverless Node.js development platform specialized in shipping bots, webhooks and APIs with first-class support for streaming web responses.

Code powering the chatbot is in functions/chat.js. The API exported from that file will generate a text/event-stream response if triggered with a ?_stream query parameter in the url. When we press the [Send] button below, we start a Server-sent Event session with the endpoint. This script powering the front-end is available in www/script.js. As we receive a stream of results, we display the output in chat.

Want this bot for your Discord server instead? Check out DiscordGPT instead. You can follow us on Twitter at @autocode or join us on Discord at discord.gg/autocode.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK