-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcodebuff.txt
More file actions
1 lines (1 loc) · 1.92 KB
/
codebuff.txt
File metadata and controls
1 lines (1 loc) · 1.92 KB
1
i want to do a super minimalist demo for pastor.bot inspired by ~/Code/mattborn.com/darrin that uses the same openai endpoints to greet the user after they press the Meet Pastor Bot button with something like "Hello! I’m Pastor Bot." or "Good to you see you again." based on a localstorage flag we set like firstVisited epoch timetamp. that’s just for the audio, tho. on page load, we need to craft a messages array and system base prompt to emulate a typical, charistmatic, evangelical pastor and if possible use a british male accent (not sure if openai has a voice for this). and we should submit this to craft a unique greeting each time (again based on the logic above) that is queued up and ready to be played as soon as they hit the button. if its not ready, we can show a loading state that just says One moment in the center of the page (replaces the button) then switches to Pastor Bot is talking each time that’s true. then the question every time is something like "I’d love an opportunity to pray for you. can you tell me a little about yourself and what you have going on in your life?" immediately after that we ask for microphone permissions so we can record and the message changes to Pastor Bot is listening and there should be a button that says I’m done sharing that when clicked does two things: first a generic line is spoken like "Ok, great. I’d like to pray for you now so you can bow your head and close your eyes or whatever posture you feel comfortable with that might help you feel open, receptive, unguarded, and welcoming of the Spirit." and simultaneously we send an openai request to generate the prayer including the transcription of what they said. i am most interested in an elegant pattern for this. there are a series of generic statements and audio generated sequentially and queued from the start to minimize delays while also processing requests transactionally in real-time. keep the code as minimal as possible.