Skip to content

A chatbot that read pdf files and give answers about that

Notifications You must be signed in to change notification settings

Wandrys-dev/Enchanced-GPT

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Enchanced-GPT

⚪ It is a College project for project exhibition

I decided to make a project of chatbot which have features like Chatgpt as well as it can speak to you and hear your voice, as well as read PDF files and give answers about questions ask about that pdf file.

Here is a Breif Detail of How it works

🔵 How it works

Enhanced Chatbot Project is maade in Python Library streamlit(for interface). Here is a breif overview of how it works

Home Page

Home page is built in file Home.py. It first checks if the user is login or not by checking if the file json.data named as account.json exists. image

If it is not it takes necessary Information and sign for signing up the user.

image

When the sign in process complete user data is store in a dataframe then in the file account.json

image

Now the file exists thus sign in process is complete and user is now signed in.

🙂 ### User can chat now image

Chat History.py

In Main file History Dataframe is used to save history chats. It can do so by storing this record in a file named as DD-MM-YY.json format. Time module is used to get current day, mounth and year. then the history dataframe is stored in file DD-MM-YY.json file

Chat history.py get list of these files get there data and display them in form of radio options in sidebar.

image

PDF Reader.py

This file has a browse button to upload a PDF file and ask questions about that file

The Reality of Backend

I use open ai api key which is not for free. But if you make a new account you can get 5$ free trial which you can use to build your own chatbot.

A chatbot file has been created in File 🗄️ Functions.py in which API key is given in constructor and a function called chatbot response is used to get response from chatgpt 3.5 turbo version you can see the details in code.

Important concepts

🔴 Tokens

Here is a breif explanation of tokens

image

You can say tokens are words for chatbot see details here : https://help.openai.com/en/articles/4936856-what-are-tokens-and-how-to-count-them

🔴 Temprature

Temprature ranges from 0 to 1

High temperature: The model is more likely to produce a variety of words and generate novel, imaginative responses. Low temperature: The model is more likely to stick to what it has learned and provide more conservative, probable responses.

How should I set the temperature parameter?

Lower values for temperature result in more consistent outputs, while higher values generate more diverse and creative results. Select a temperature value based on the desired trade-off between coherence and creativity for your specific application.

Known BUGS

🔴 .sttextarea key error

image image

⏭️ This Project is Incomplete for now if there are any suggestions comment down please

About

A chatbot that read pdf files and give answers about that

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%