Skip to content

LazyPota/Cogito

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cogito Backend

This repository contains the backend of the Cogito project, which consists of several main components for handling analytical models, LLM model integration, and the main API server.

Folder Structure

cogito-backend/
├── analytical-setup/           # Analytical model setup (Python)
│   └── fallacy_detector_model/ # Model
│   ├── .gitignore
│   └── app.py                  # Entry point
│
├── llama-setup/               # Integration with LLM (Node.js/Express)
│   ├── node_modules/
│   ├── src/                    # Source code for LLM wrapper/handler
│   ├── .env
│   ├── .gitignore
│   ├── package.json
│   └── package-lock.json
│
├── server-api/                # Main backend (Node.js/Express)
│   ├── migrations/             # Contains database migration scripts
│   ├── node_modules/
│   ├── scripts/                # Additional scripts
│   ├── src/                    # Main application code
│   ├── .env
│   ├── .env.test
│   ├── .gitignore
│   ├── package.json
│   └── package-lock.json

Requirements

analytical-setup (Python)

  • Python >= 3.8
  • Libraries such as flask, transformers, etc. (More details in ./fallacy_detector_model/requirements.py)

llama-setup & server-api (Node.js)

  • Node.js >= 18.x
  • PostgreSQL
  • npm, node-pg-migrate, and other

Model Preparation

Before running the project, make sure the model is placed in the following directory:

Please extract the model file to the appropriate directory after downloading it.

How to Run

1. Run analytical-setup

cd analytical-setup
pip install -r ./fallacy_detector_model/requirements.py
python app.py

2. Run llama-setup

cd llama-setup
npm install
npm start

3. Run server-api

cd server-api
npm install
npm run migrate up
npm start

Notes

  • Ensure that the .env file is available in each component (llama-setup and server-api).
  • For testing, you can use the .env.test file in server-api.
  • The structure may change depending on the final implementation.

License

MIT License

Translated with DeepL.com (free version)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors