Skip to content

OpenPecha/ai-chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ai-chat

Installation

Follow these steps to set up the project on your local machine:

  1. Clone the repository:
    git clone https://github.com/OpenPecha/ai-chat
  2. Navigate to the project directory:
    cd chat_api
  3. Install the dependencies:
    poetry install

Database Setup

  1. Navigate to the local setup directory:
    cd local_setup
  2. Start the database using Docker:
    docker-compose up -d
  3. Apply database migrations:
    poetry run alembic upgrade head

Running the Application

  1. Start the FastAPI development server:
    poetry run uvicorn chat_api.app:api --reload

The application will be available at http://127.0.0.1:8000/.

API Documentation

You can access the Swagger UI for the API documentation at http://127.0.0.1:8000/docs. sh poetry install

Alembic Commands

Alembic is used for handling database migrations. Here are some common commands:

  1. Create a new migration:
    poetry run alembic revision --autogenerate -m "description of migration"
  2. Apply the latest migrations:
    poetry run alembic upgrade head
  3. Downgrade to a previous migration:
    poetry run alembic downgrade -1
  4. View the current migration history:
    poetry run alembic history
  5. Show the current migration state:
    poetry run alembic current

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •