top | item 36966859

Template: OpenAI GPT chat bot API running on Cloudflare Worker

1 points| kwhitley | 2 years ago |github.com

4 comments

order

kwhitley|2 years ago

While working on my latest project, I wanted a simple GPT chat bot API hosted on Cloudflare Workers. I decided to make this skeleton a template for future projects and to share it with the community.

Instructions to get started inside the README!

Let me know if this helps, or how to improve it! :)

roadtonyc|2 years ago

Looks interesting, what is the core use case.

kwhitley|2 years ago

I'm about to start hosting apps that need a preconfigured AI context (basically feed it an opening script/instructions), for users to interact with.

This is really just to test the concept, watch the token usage rates, etc.

Since you feed in the entire script with each pass, the API side could simple prepend the origin instructions/first parts, then tack on the user input to the end.