STORY
Pay2Chat: Video Tutorials on How To Build an AI Chatbot with LN Payments
AUTHOR
Joined 2022.06.04
DATE
VOTES
sats
COMMENTS

Pay2Chat: Video Tutorials on How To Build an AI Chatbot with LN Payments

In the past couple of days, I had the chance to give 2 workshops for #AI4ALL hackathon.

These 2 workshops were about building a chatbot client that connects to OpenAI API but ask the user for payments in lightning.

In these 2 workshops, we learned about the different flows for requesting a payment, we used L402 specs, saw how to connect to OpenAI API, & talked about some challenges & security concerns that one should be aware of

1st Video: AI chatbot with pay-per-prompt payments

In the first version, we went for the simpler flow of payment by making the user pay on each new prompt he submits.

We saw how we could simplify his job using webln budgets, & we also saw how we can connect to OpenAI API & make the chatbot act in a certain way.

Video link:

<iframe class="remirror-iframe remirror-iframe-youtube" src="https://www.youtube-nocookie.com/embed/w7njz9P2je8?" data-embed-type="youtube" allowfullscreen="true" frameborder="0"></iframe>

Code link:
https://github.com/peakshift/webln-chatbot/tree/pay-per-prompt

2nd Video: AI chatbot with L402

In the second version, we improved the user journey a lot by enabling the user to pay in advance for several requests.

We did that by implementing the L402 specs.

This also enabled us to create interesting features like enabling the user to export his payment token & give to someone else who can use it right away without needing to pay.

We also had a great discussion with Bumi & johns at the end regarding several topics like the correct pricing strategy, pitfalls that you should be aware of,...etc

Video link:

<iframe class="remirror-iframe remirror-iframe-youtube" src="https://www.youtube-nocookie.com/embed/QiP1z3fuP-8?" data-embed-type="youtube" allowfullscreen="true" frameborder="0"></iframe>

Code Link:
https://github.com/peakshift/webln-chatbot/