Skip to content

saumitrasapre/dtxplus-chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dtxplus-chatbot

Installation instructions

  • Clone this repository into a location of your choice.
  • Navigate to the project directory.
    cd dtxplus-chatbot
  • Create a python virtual environment in the location.
    python -m venv .venv

Tip

Use python3 instead of python if the above doesn't work.

  • Activate the virtual environment
    • On linux
    source .venv/bin/activate
    • On windows cmd
    .venv\Scripts\activate.bat

Tip

Your terminal/command prompt should have the (.venv) indicator if the virtual environment was successfully activated.

  • Install all required python packages
    pip install -r requirements.txt
  • Verify that Django is installed successfully by running -
    python -m django --version
    This should successfully print the installed Django version if Django is correctly installed.

Before Proceeding with the installation

1. Creating a .env file

  • Create a copy of the .env.example file located in the django_project directory and rename it to .env.

2. Generate API Keys

  • Generate your LLM API keys of your preferred LLM frameworks. (Supported LLM frameworks are GoogleGenAI, OpenAI and Anthropic).
  • Paste in your LLM API keys for the main LLM, entity tools and the summary tools in their appropriate fields. You can use the same or different LLMs for each of them.
  • Go to the Tavily AI website and generate a free API key from there. Paste the API key in the TAVILY_API_KEY field in the .env file. Tavily is an API that is used to perform web searches.

3. Creating a database

  • Please install the latest version of PostgreSQL from here.
  • Ensure that you also have pgAdmin4 installed along with this. pgAdmin4 is a UI for PostgreSQL that is used to easily navigate the database. It usually comes bundled with PostgreSQL.
  • Perform the initial setup of PostgreSQL by setting a password for the postgres user.
  • Create a database using pgAdmin4 with a name of your choice (e.g. chatbot-db).
  • Modify the database details in the # Postgres details section of the .env file.

Caution

Please make sure that the database details you enter in the .env file are the same as that you have for your PostgreSQL database.

Continue with the installation

  • Navigate to the outer django_project directory -
    cd django_project

Warning

All commands from here on out are executed from this outer django_project directory.

Warning

Please again verify that the database details in the .env file are the same for the database you have created.

Tip

You can change other LLM details too in the .env file.

  • Perform the django database migrations -

    python manage.py migrate
  • Populate the django database with dummy data -

    python manage.py loaddata data.json
  • Start the application using -

    python manage.py runserver
  • Navigate to the server link in the command output on your web browser after the command runs successfully.

  • View the about page on the app to get a comprehensive overview of the features of the app.

  • Press ctrl+c to terminate the server after you are done.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published