DEV Community

jessicakuijer
jessicakuijer

Posted on

Symfony Chatbot with Chat-GPT (and other APIs...)

A symfony 6 Chatbot Demo using ChatGPT-3, Youtube, Giphy, WeatherStack apis...๐Ÿ‡ซ๐Ÿ‡ท ๐Ÿ‡บ๐Ÿ‡ธ


This is a symfony 6 Chatbot Demo by using Botman.

It can be used as Chatbot symfony 6 starter.

Image description


GITHUB code

The project is here: https://github.com/jessicakuijer/ai-chatbot-ChatGPT.

DEMO live

Demo deployed on Heroku
There's also a youtube video in french about it here: Symfony Chat-GPT chatBot <<

This demo is password protected. Send me a request so I can create your credentials.

@jessica kuijer

Install

composer install 
Enter fullscreen mode Exit fullscreen mode

Start

symfony serve -d
# open https://127.0.0.1:8000
Enter fullscreen mode Exit fullscreen mode

On local (dev) environment, use mysql for your own use and then you can create admins with the command:

bin/console app:create:admin
Enter fullscreen mode Exit fullscreen mode

An invite in your terminal will ask for your credentials and password is hashed.

Routes

You can access the main website and /login page only. (& /logout)

Admins can access /chat page for using AI-chatbot.

ChatBot Commands to test

  • "hi"
  • "weather in london"
  • "give me a gif mr bean"
  • "my name is john"
  • "say my name"
  • "what's my name?" or "name"
  • "give me a youtube movie back to the future"
  • "news trump"
  • "weather in new york"
  • THEN... ask for everything you want, AI chatGPT will give you answers. ๐Ÿค–

API used in POC (you have to get your own api keys as environnement variables)

API Youtube data V3

API Giphy

API OpenAI for ChatGPT-3

API WeatherStack

API GNews

Configure your environnement variables that you can find in services.yaml parameters and .env.local

Oldest comments (0)