SOURCE CODE (OpenAI Facebook Messenger Integration) update w/ vid tutorial(windows & android)

 


"For Educational Purposes Only!!"


What is OpenAI?

OpenAI is a research company that aims to create safe and beneficial artificial intelligence. It was founded in December 2015 by a group of philanthropists and researchers, including Elon Musk, Sam Altman, Greg Brockman, Ilya Sutskever, and Wojciech Zaremba, among others. The company's mission is to promote and develop friendly AI for the betterment of society. OpenAI also provides machine learning tools and APIs for developers, researchers, and businesses to create intelligent applications that can impact various sectors of the economy.


What is included in this source code?

  • OpenAI API
  • Facebook Chat API
  • OpenWeatherMap API
  • DALL-E
  • Nodejs Modules

Updated to chat-completion-gpt-3.5-turbo-0301

Added Message History: The AI can only remember the past 10 conversations to save usage from the OpenAI API .


tested on:

  • termux android with packages
  • linux
  • windows

Notes:

  • No need to install dependencies.
  • Use nodejs v15 up. If not working on nodejs v19. downgrade, use nvm.


Default commands to trigger the bot or ai:

/start - starts to listen for any incoming messages.

/help - show list of commands to trigger the bot.

/forecast 'iNPUT CITY NAME'- show weather forecast.

/weather 'INPUT CITY NAME'- show current weather

/img 'ANY COMMANDS eg. image of a pug'- Generate an image

/ai 'YOUR QUESTION'- Ask the AI

/stop - Stop

/continue - continue the ai

/mp3 - request mp3

/define -defines a phrase or word from Google

/imgSearch- search image from google


Installation:


Step 1: Get your fb state.

  • Login to your dummy account.
  • You are going to make your dummy account as the bot or the AI..
  • Install cookie editor extention.
  • Export cookie.
  • Paste it inside session.json.
  • Edit the session.json, search for value "name" rename it all with the value "key".
Step 2: Get your OPENAI API key
  • Go to openai
  • Paste it inside the api_key.json
Step 3: Get openweathermap API key.
  • Go to openweather map sign up and get your apikey.
  • openweather map
  • Paste it inside
  • ../functions/forecast.js
  • ../functions/weather.js
Now execute or run the code:
Code:
node execute.js

Instructions:
git clone -b master https://github.com/suff3r1ng/openai-messenger-public


Windows Tutorial:




Android tutorial:




REPLIT:




Credits and contributors:
  • fb-chat-api
  • openai
  • openweather map
  • maryrose143 
  • wab0u










PLEASE SUPPORT MAINTAINING THE LIFE OF THE WEBSITE

CLICK THE ADVERTISEMENT BELOW  🙏




FileInformation
NameSOURCE CODE
Size 7.03 MB 
DownloadSource Code + GitRepo

Categories:
Similar Category

0 comments: