Skip to content

Latest commit

 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Drai Medical Chatbot

Welcome to the Drai Medical Chatbot! This application leverages the OpenAI GPT-3.5 Turbo model that has been fine-tuned to simulate a medical assistant capable of providing preliminary medical advice. Users can interact with the chatbot by sending messages describing their symptoms or asking health-related questions.

Getting Started

To get started with the chatbot, follow these steps:

  1. Clone the repository:

    git clone https://github.com/MBobie/Drai.git
    cd drai
  2. Install dependencies:

    pip install -r requirements.txt
  3. Set up your environment variables:

    Create a .env file in the project root and add your OpenAI API key:

    OPENAI_API_KEY=your_openai_api_key
    
  4. Run the FastAPI application:

    uvicorn main:app --reload

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

Usage

Swager UI

Swagger UI provides a convenient way to test your API endpoints. Visit http://127.0.0.1:8000/docs in your browser to explore and interact with the API.

Chat Endpoint

Send a POST request to /chat/ with a JSON payload containing the user's message. The Swagger UI allows you to input and test different requests.

OR

Send a POST request to /chat/ with a JSON payload containing the user's message:

curl -X POST "http://127.0.0.1:8000/chat/" -H "accept: application/json" -H "Content-Type: application/json" -d '{"message": "I have a headache"}'

Special Commands

The chatbot recognizes special commands such as exit, clear, help, and info. Use these commands to interact with the chatbot:

/exit: End the conversation.

/clear: Clear the conversation history and start a new session.

/help: Get information on using the chatbot.

/info: Learn more about the chatbot and its capabilities.

Conversation History

To retrieve the conversation history, send a GET request to /history/ using the Swagger UI

OR

curl -X GET "http://127.0.0.1:8000/history/" -H "accept: application/json"

Test

To run the tests in the script

pytest test_main.py

Feedback

Your feedback is valuable! Feel free to provide input on the chatbot responses to help improve its performance.

Acknowledgments

This project utilizes the OpenAI GPT-3.5 Turbo model for natural language processing.

Happy chatting with DRAI!

Credits

David Aleoghena Victor Ofor

About

An application that allows patients to describe their symptoms and receive preliminary medical advice from an AI-powered chatbot. This app offers quick responses and help users decide if they need to seek in-person medical care.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages