Spaces:
Sleeping
Sleeping
Nurse LLM
/your_path/MALI_Nurse/
βββ cli.py
βββ main.py
βββ README.md
βββ llm/
β βββ __init__.py
β βββ client.py
β βββ llm.py
βββ .env
Quick Start
Prerequisites
- Python 3.10
Installation
Clone the repository:
git clone https://github.com/yourusername/MALI_Nurse.git cd MALI_Nurse
Install the required packages:
pip install -r requirements.txt
Alternatively, you can use Poetry for dependency management:
poetry install
Set up your environment variables in a
.env
file:TYPHOON_API_KEY=your_typhoon_api_key
Running the CLI
To start the CLI, run:
python cli.py
Running the API
To start the FastAPI server, run:
uvicorn main:app --reload
The server will be available at http://127.0.0.1:8000
.
API Endpoints
GET /history
: Retrieve chat historyGET /ehr
: Retrieve EHR dataGET /status
: Get current prompt statusPOST /debug
: Toggle debug modePOST /reset
: Reset chat history and EHR dataPOST /nurse_response
: Get a response from the nurse LLM
Example Request
To get a response from the nurse LLM, send a POST request to /nurse_response
with a JSON body:
{
"user_input": "Your question here"
}
CLI Commands
The CLI provides several commands to interact with the Nurse LLM. Below are the available commands:
start
: Start the CLI session.help
: Display help information about the CLI commands.exit
: Exit the CLI session.
Example Usage
To start the CLI session, simply run:
python cli.py
Once the CLI is running, you can use the following commands:
To start interacting with the nurse LLM:
start
To display help information:
help
To exit the CLI session:
exit