DEV Community

jessicakuijer
jessicakuijer

Posted on

10 1

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

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay