chatgpt-go

command module
v0.0.0-...-dc1493b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2023 License: MIT Imports: 17 Imported by: 0

README

NeuralChat - using Go (golang) and OpenAI (ChatGPT)

NeuralChat is a cutting-edge chatbot project that allows users to chat with the state-of-the-art OpenAI chatbot, GPT-3.5, in a seamless and user-friendly manner. The project is built using Golang, PostgreSQL, Javascript, HTML, and CSS, making it a powerful and robust solution for all your chatbot needs.

NeuralChat implements stateful authentication, which ensures that users can securely log in and engage with the chatbot. The user experience is smooth and intuitive, thanks to the project's sleek and modern design.

Using NeuralChat, users can interact with GPT-3.5 through prompts, allowing them to chat about a wide range of topics and receive intelligent and insightful responses. The chatbot is trained to understand natural language, making conversations feel human-like and engaging.

Overall, NeuralChat is a fantastic solution for anyone looking to build a powerful chatbot that can engage with users in a natural and intuitive way. With its stateful authentication and advanced GPT-3.5 technology, this project is sure to impress and delight users.

Tech Stack

I used Go (golang), PostgreSQL, OpenAI, Html, Javascript and CSS to build this project.

Full Stack
  • Go (Golang)
  • PostgreSQL
  • OpenAI
  • JAVASCRIPT
  • Html
  • CSS
Major Dependencies

Demo

Capture_home

Capture

Capture_home_m Capture-m

💻 Getting Started

  • To get star with this package first of all you have to clone the project ⬇️
https://github.com/raihan2bd/chatgpt-go.git
  • Then Make sure you have install Go (golang) version 1.8.0 or latest stable version.
  • Then make sure you have install PostgreSQL on your local machine if you want to use this project as locally.
  • Then Create a database called chatgpt inside the database create two table with below command ⬇️
 CREATE TABLE public.users (
	id serial4 NOT NULL,
	first_name varchar(50) NOT NULL,
	last_name varchar(50) NOT NULL,
	email varchar(255) NOT NULL,
	"password" varchar(60) NOT NULL,
	created_at timestamp NOT NULL,
	updated_at timestamp NOT NULL,
	access_level int4 NULL DEFAULT 1,
	CONSTRAINT users_email_key UNIQUE (email),
	CONSTRAINT users_pkey PRIMARY KEY (id)
);

CREATE TABLE sessions (
	token TEXT PRIMARY KEY,
	data BYTEA NOT NULL,
	expiry TIMESTAMPTZ NOT NULL
);

CREATE INDEX sessions_expiry_idx ON sessions (expiry);
  • To install all the Go packages navigate the folder address on your terminal and enter the below command ⬇️
go mod tidy

Capture

  • Make sure you rename example.env file to .env file and modify it with your database credentials (you created earlier) and other info too.

Usages

Note: Before enter the below command make sure you are in the right directory.

  • After finishing the above instructions you can see the project in your local machine by entering the below command ⬇️
go run main.go
  • Then you can see this project live on your browser by this link http://localhost:8080 or your given the port number you set for the project.

👥 Author

👤 Abu Raihan

🙏 Acknowledgments

I would like to thanks Trevor Sawler Who help me a lot learn go. I would like to thanks OpenAI for providing us this awesome and excitant API 🙏.

⭐️ Show your support

Thanks for visiting my repository. Give a ⭐️ if you like this project!

📝 License

This project is MIT licensed.

Contribution

Your suggestions will be more than appreciated. If you want to suggest anything for this project feel free to do that. 🙂

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL