second-opinion-ai / second-opinion

6 stars 0 forks source link

Setup

Running Locally

Standup the Milvus Vector Database container by running:

docker compose up

Then run the run_app.sh script to start a local instance of the application:

./run_app.sh

Once the application starts, open your browser and navigate to:

http://localhost:5000

Application Architecture

The application follows a modular architecture to ensure flexibility and maintainability. Here's an overview of the main components:

Configuring the LLM

The application supports using different LLMs for generating car diagnostic responses. To specify the LLM to use, set the following environment variables in your .env file:

For example, to use OpenAI's GPT models and embeddings, your .env file should include:

LLM_TYPE=openai
EMBEDDINGS_TYPE=openai
OPENAI_API_KEY=your_openai_api_key

Make sure to provide the necessary API keys for the selected LLM and embeddings providers.

Testing

The application includes unit tests to ensure the correctness of the implemented functionality. The tests are located in the tests/ directory and cover the following modules:

To run the tests, execute the following command:

python -m unittest discover tests

Understanding requirements.txt and dev.txt

In this project, dependency management is divided into two primary categories, each represented by a separate file:

  1. requirements.txt: This file lists the essential Python packages required to run the application. These dependencies are what any user or environment needs to successfully execute the application's core functionality.

  2. dev.txt: On the other hand, dev.txt extends requirements.txt by including additional packages that are only necessary for development environments. These may include code linters, formatters, testing frameworks, and other tools that aid in the development process but are not required for running the application itself.

Minimum Viable Product

Resources

Setup

Running Locally

Standup the Milvus Vector Database container by running:

docker compose up

Then run the run_app.sh script to start a local instance of the application:

./run_app.sh

Once the application starts, open your browser and navigate to:

http://localhost:5000

Understanding requirements.txt and dev.txt

In this project, dependency management is divided into two primary categories, each represented by a separate file:

  1. requirements.txt: This file lists the essential Python packages required to run the application. These dependencies are what any user or environment needs to successfully execute the application's core functionality.

  2. dev.txt: On the other hand, dev.txt extends requirements.txt by including additional packages that are only necessary for development environments. These may include code linters, formatters, testing frameworks, and other tools that aid in the development process but are not required for running the application itself.

Application Architecture

The application follows a modular architecture to ensure flexibility and maintainability. Here's an overview of the main components:

Testing

The application includes unit tests to ensure the correctness of the implemented functionality. The tests are located in the tests/ directory and cover the following modules:

To run the tests, execute the following command:

Minimum Viable Product

Resources