LLM-Chatbot
Installation
To get the Chatbot Python package by the following commands:
- PyPy
pip install llmchatbot
- GitHub repository
pip install git+https://github.com/egpivo/llmchatbot.git
Serving Automation
This repository automates the process of checking and fine-tuning pre-trained models for the Chatbot application. The automation script allows you to customize SpeechT5 and SWhisper models and enables retraining if needed.
Serving Process Flow
graph TD
A[Check if Model Exists]
B[Fine-Tune Model]
C[Load BentoML Configuration]
D[Serve the App]
E[Check SSL Certificates]
F[Generate Dummy SSL Certificates]
A -- Yes --> C
A -- No --> B
B --> C
C --> D
D --> E
E -- No --> F
E -- Yes --> D
Artifact Folder
During the model serving process, the artifacts folder is used to store the BentoML artifacts, essential for serving the Chatbot application.
Usage
Local Model Serving
Default Model Values
Run the Chatbot service with default model values:
make local-serve
Customizing the Serving Process
Customize the Chatbot serving process using the automation script. Specify your desired models and options:
bash scripts/run_app_service.sh \
--t5_pretrained_model {replace_with_actual_t5_model} \
--t5_pretrained_vocoder {replace_with_actual_t5_vocoder} \
--whisper_pretrained_model {replace_with_actual_whisper_model} \
--is_retraining
- Note: Replace
{replace_with_actual_t5_model},{replace_with_actual_t5_vocoder}, and{replace_with_actual_whisper_model}with your preferred values. Adding the--is_retrainingflag forces model retraining.
Model Serving via Docker
By Makefile:
make docker-serve
By docker CLI
- DockerHub
docker run -p 443:443 egpivo/chatbot:latest
- GitHub Package
docker run -p 443:443 ghcr.io/egpivo/llmchatbot:latest
Client Side
Access the demo chatbot at https://{ip}/chatbot, with the default values being 0.0.0.0 for the ip.
- Note: Dummy SSL certificates and keys are created by default for secure communication if
key.pemandcert.pemdo not exit inartifacts/. Or you can replace them manually.
Demo
-
Explore the demo site hosted on Alibaba Cloud via https://egpivo.com/chatbot/.
-
Note: This site is intended for demo purposes only, and there is no guarantee of computing efficiency.
Remark
- Reference: BentoChain Repository
- License: BSD 2-Clause License
Metadata
Release files for llmchatbot 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| llmchatbot-1.0.4.tar.gz | 11.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| llmchatbot-1.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.5 kB
Release files / llmchatbot-1.0.4.tar.gz
| Download URL | llmchatbot-1.0.4.tar.gz |
|---|---|
| Size | 11.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fa69b0b2564c909325bde3dbacd1254fbeb9cf71362c9cb1104ce4bd1f390bf3
|
|
BLAKE2b-256 checksum How to use checksums |
fa5cee1ab274a1b6a3d530b12faaa9dc197c4ebfe54f15a90eb05e8ca44e2bd7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.10.12 Linux/6.2.0-1018-azure
|
Release files / llmchatbot-1.0.4-py3-none-any.whl
| Download URL | llmchatbot-1.0.4-py3-none-any.whl |
|---|---|
| Size | 16.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
30458d9999f85d096aa221987357a88a97e5e36861850d84879005e3af824e93
|
|
BLAKE2b-256 checksum How to use checksums |
1bba21e30ca5328b5c18be9c66d72b8ed97ed60a6b9f81508559989a33bf4f82
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.10.12 Linux/6.2.0-1018-azure
|