ai-service
This microservice handles everything related to ai service.
Installation
Clone this repository to your local machine:
git clone [email protected]:miralabsai/ai-service.git
Navigate to the project directory:
cd ai-service
Create a virtual environment (recommended) using
venv
orvirtualenv
:# Using venv python -m venv venv # Activate the virtual environment source ./venv/Scripts/activate
Install the required dependencies:
pip install -r requirements.txt
Setting up Environment Variables
Copy the
.env.example
file to create a new.env
file:cp .env.example .env
Edit the
.env
file and provide appropriate values for the environment variables.
Running the service
To run the service, use the following command:
python -m uvicorn app.main:app --reload --port 5001
This will start the server on http://localhost:5001.
You can now access the Swagger UI for interactive documentation at http://localhost:5001/docs.
You can connect to the AI chat agent websocket at http://localhost:5001/ws.
Websocket input structure
{user_input: "input"}