OpenAI HTML Wrapper with AWS Polly

I have been working on a project to demo the capabilities of the API’s to my leadership that is basically an OpenAI API wrapper in HTML and Javascript. I feel it’s at a point where I can show that demo.

Things it features

  • Conversation Memory
  • Prompt personalities (not sure what to call that really yet - but a few different initial prompt inputs)
  • Print the full conversation
  • AWS Polly Speech Integration
  • A few model choices
  • Desktop and Mobile Support
  • Exponential Error back-off

I’m really happy with it :slight_smile:

This is a quick edit for a quick badge win :smiley:


Oh this post by @mc1903 about grabbing current account metrics looks really useful!
I’ll try to work that in somewhere.

(Also sharing the link for a quick badge win and great idea by community member)


I just now updated the code to include the new “gpt-3.5-turbo” model support.
Testing it seems pretty good! Just needed to slightly modify the API Call and how I handled the response. Might still need a bit more work for error’ing (like backend 500 errors).

1 Like

Hi Team and Friends!

I just wanted to share a few of the lateset milestones I’ve had fun while attempting to cobble together my own api wrapper.

  • Messages are now sent via an Array that updates with each iterative message, effectively providing memory.
  • Started playing around with pulling external data, such as Date, Weather, Headlines and Market news. Really proud of this part.

The way I am pulling external data (for the time being) is with a server side script that pulls all data I might be interested in for the day. It then variables this data, and I now have the coding look for keywords that might invoke that data to be pulled, but only after the keywords are detected. Once they are, all the updated info is passed along before the question is asked.

Works really nicely with my testing so far :smiley: