Giter VIP home page Giter VIP logo

chatgpt-sms-js's Introduction

chatGPT-SMS

Use ChatGPT without the browser! Text +17622490430. image

You'll need an OpenAI API Key. You can get one here by clicking on + Create new secret key. image

Set an Environment Variable with Twilio Functions and Assets

Open up your .env file for your Functions project in your root directory and add the following line:

OPENAI_API_KEY=YOUR-OPENAI-API-KEY

Now you can access this API Key if you'd like to do so in your code with context.OPENAI_API_KEY.

Configure the Serverless Function with a Twilio Phone Number

To open up our app to the web with a public-facing URL, run twilio serverless:deploy from the root directory. image Grab the Function URL corresponding to your app (the one that ends with /chatgpt) and configure a Twilio phone number with it as shown below: select a Twilio number you purchased in your Twilio phone numbers console and scroll down to the Messaging section. Paste the link in the text field for A MESSAGE COMES IN webhook making sure that it's set to HTTP POST. When you click Save it should look like this! image

Now take out your phone and text a question or prompt to your Twilio number. image

chatgpt-sms-js's People

Contributors

elizabethsiegle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

chatgpt-sms-js's Issues

UnhandledPromiseRejectionWarning

Hi,
Thanks for the tutorial. Appreciate any advice. I am trying to run your example however I'm hitting an error. Setting it all up it doesn't work.

I get the following error when I check the Function URL:

UnhandledPromiseRejectionWarning: Unhandled promise rejection: TypeError: Cannot read properties of undefined (reading 'toLowerCase')
at Object.exports.handler (/var/task/handlers/ZN9d08e2533c3fdaa4ff6d62aa20db2c6e.js:4:29)
at Object.exports.handler (/var/task/node_modules/runtime-handler/index.js:339:10)
at Runtime.exports.handler (/var/task/runtime-handler.js:17:17)
at Runtime.handleOnceNonStreaming (file:///var/runtime/index.mjs:1089:29)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.