Skip to content

Latest commit

 

History

History
65 lines (48 loc) · 1.96 KB

README.md

File metadata and controls

65 lines (48 loc) · 1.96 KB

NLP Project API.

Implementation using FastAPI & SQLAlchemy ORM.

ApiImage

Installation Guide

1. Install FastAPI

Install FastAPI

$pip install fastapi

2. Install Uvicorn

Install Uvicorn:

$pip install "uvicorn[standard]"

To run the server - cd/ into the project directory and run the command:

$uvicorn endpoints:app --reload

3. Install Pydantic

Install Pydantic:

$pip install pydantic

Features

  • API to add custom intents, tags, patterns & responses to AI model.
  • API to customize AI text-to-speech responses including: tone, personality, name, voice, etc.
  • Modify API endpoints to train model.
  • Can be built upon later to add NLP neural net model to games (mini plugin).

Customize

Have a look at Postman to checkout the API endpoints. Refer to the endpoints.py file to view/manage the API endpoints. Customize the database schema in the database/models.py file. Add in your own database integrations by replacing the SQLALCHEMY_DATABASE_URL = '' in the database/database.py file. Refer to SQLAlchemy documentation for further info based on the database provider you choose.

from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker

# establish connection database using SQLAlchemy ORM
SQLALCHEMY_DATABASE_URL = ''

engine = create_engine(SQLALCHEMY_DATABASE_URL)

# the database session
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)

# base class to create a database model/table
Base = declarative_base()

License

MIT