![]() |
VOOZH | about |
By Wade Wegner
Chief Ecosystem and Growth Officer
Imagine building a ChatGPT-like experience that you can fully customize to your needs. With DigitalOcean’s new Gradient Platform, which just launched into Public Preview at this year’s Deploy conference, you can do exactly that.
What’s particularly exciting about the Gradient Platform is its flexibility. For many use cases, you don’t need to write any code at all – you can simply grab a JavaScript snippet from the DigitalOcean Control Panel and embed a chatbot directly into your application. But as a developer, what really excites me is the ability to use the APIs to build any kind of experience I want.
In this post, I’ll walk through building a custom chat application that mimics the ChatGPT experience. This example will teach you three key components of building a robust chat application:
The best part is that once you understand all the pieces, you can customize it to work the way you want.
Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.
Chief Ecosystem and Growth Officer at DigitalOcean. Ultrarunner, adventure seeker, tragic optimist.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Tried setting this up and could not get it to work. We get a “pong” back from the API, so we know that’s working. But, when we tried to send a message to the chat application we always get this error: 'Error: Failed to send message to AI: Failed to get refresh token: Request failed with status code 401\n' + ' at ChatService.sendMessage (do-genai-customchatbot\\services\\chatService.js:189:13)\n' + ' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' + ' at async do-genai-customchatbot\\routes\\chat.js:27:20
I assume this is because we are missing some correct value in the ENV, but unfortunately, there is no guidance as to what the ENV values should actually be. What is the API_BASE? Where do we get this? What is the SESSION_SECRET? Where do we get this. AGENT_ENDPOINT? AGENT_ID? There is no explanation on where to find these values in the dashboard. Please provide screenshots and an explanation for where to find the values that are needed in the ENV. Thanks.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.