Skip to content

iCog-Labs-Dev/DAOMatcher-Backend

Repository files navigation

DAOMatcher Backend

This is the backend server for the DAOMatcher project. Follow the instructions below to set up and run the server locally.

Prerequisites

Before you begin, ensure you have the following installed on your machine:

  • Python (version 3.11)
  • Poetry (for dependency management and virtual environments)
  • Python venv (virtual environment module)

Getting Started

  1. Clone the Repository

    Clone this repository to your local machine using the following command:

    git clone https://github.com/your-username/DAOMatcher-backend.git
  2. Navigate to the Project Directory

    Change to the project directory:

    cd DAOMatcher-backend
  3. Install Dependencies

    Install the project dependencies using Poetry:

    poetry install
  4. Activate the Virtual Environment

    Activate the virtual environment:

    poetry shell
  5. Set Up Environment Variables

    Copy the .env.example file to .env and update the values as needed:

    cp .env.example .env

    Open the .env file and set the appropriate values for your environment.

  6. Run the Setup Script

    Run the setup script to initialize the project and run the server:

    ./setup

WebSocket Support (WSS)

You can either wait for the server to finish processing or connect to the WebSocket on the update event from your client to get live updates from the server. To get updates from the WebSocket, you must initiate the request using the get_users event on the WebSocket server first.

Running Tests

The project includes model-based evaluation tests to assess prompt efficiency. To run the tests, follow these steps:

  1. Activate the Virtual Environment (if not already activated):

    poetry shell
  2. Run the Tests

    Run the tests using pytest:

    pytest test_model_graded_eval.py

    To see more detailed output, use:

    pytest test_model_graded_eval.py -s

Docker

You can also use Docker to set up everything locally and run the application.

Docker build and tag

docker build -t daomatcher:latest .

Docker run

docker run -it daomatcher:latest

Feel free to reach out if you have any questions or encounter any issues.

Happy coding!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages