OSTIS Legislation is an ostis-system designed with OSTIS Technology.
The OSTIS Legislation project aims to develop a personal legal assistant, providing individuals with a reliable and accessible source of legal information.
First, clone the repository and navigate to the project directory:
git clone https://github.com/ostis-apps/ostis-legislation.git
cd ostis-legislation
git checkout develop
git submodule update --init --recursive
To use Docker with ostis-legislation, follow these steps:
-
Build the Docker images:
docker compose build
-
Build the knowledge base:
docker compose run --rm machine build
-
Start the ostis-system:
docker compose up
These commands will set up and run the entire ostis-system using Docker containers. The system will be accessible through the web interface at localhost:8000.
If you need to rebuild the knowledge base after making changes, you can run the second command again. To stop the system, use:
docker compose down
Note that you need to have Docker and Docker Compose installed on your system before running these commands.
First, clone the repository and navigate to the project directory:
git clone https://github.com/ostis-apps/ostis-legislation.git
cd ostis-legislation
git checkout develop
git submodule update --init --recursive
To install pipx, use this guide: https://pipx.pypa.io/stable/installation/.
Conan is a decentralized package manager for C/C++. It's used in this project to manage dependencies.
# Use pipx to install conan if not already installed
pipx install conan
pipx ensurepath
After installing Conan, relaunch your shell to ensure the new PATH is loaded:
exec $SHELL
sc-machine libraries are the core components of the OSTIS Platform, used to develop C++ agents. They're installed using Conan:
conan remote add ostis-ai https://conan.ostis.net/artifactory/api/conan/ostis-ai-sc-machine
conan profile detect
conan install . --build=missing
sc-machine binaries are pre-compiled executables that provide the runtime environment for the ostis-system: build knowledge base source and launch the ostis-system. The installation process differs slightly between Linux and macOS:
curl -LO https://github.com/ostis-ai/sc-machine/releases/download/0.10.0/sc-machine-0.10.0-Linux.tar.gz
mkdir sc-machine && tar -xvzf sc-machine-0.10.0-Linux.tar.gz -C sc-machine --strip-components 1
rm -rf sc-machine-0.10.0-Linux.tar.gz && rm -rf sc-machine/include
curl -LO https://github.com/ostis-ai/sc-machine/releases/download/0.10.0/sc-machine-0.10.0-Darwin.tar.gz
mkdir sc-machine && tar -xvzf sc-machine-0.10.0-Darwin.tar.gz -C sc-machine --strip-components 1
rm -rf sc-machine-0.10.0-Darwin.tar.gz && rm -rf sc-machine/include
To install python dependencies, run:
python3 -m venv .venv
source .venv/bin/activate
pip3 install -r requirements.txt
sc-web provides the web-based user interface for the ostis-system. The installation process includes setting up dependencies and building the interface:
cd interface/sc-web
./scripts/install_deps_ubuntu.sh
npm run build
cd ../..
cd interface/sc-web
./scripts/install_deps_macOS.sh
npm run build
cd ../..
The problem solver contains custom agents for your ostis-system. Build it using CMake:
cmake --preset release-conan
cmake --build --preset release
The knowledge base contains your custom knowledge represented in SC-code. It needs to be built before launching the system or after making changes:
./sc-machine/bin/sc-builder -i repo.path -o kb.bin --clear
To launch C++ problem solver you should start sc-machine in the first terminal:
./sc-machine/bin/sc-machine -s kb.bin -e "sc-machine/lib/extensions;build/Release/extensions"
To launch Python problem solver you should start sc-machine in the second terminal:
source .venv/bin/activate && python3 problem-solver/py/server.py
After that launch sc-web interface in the third terminal:
cd interface/sc-web
source .venv/bin/activate && python3 server/app.py
To check that everything is fine open localhost:8000 in your browser.
Run on Linux:
#Terminal
pip3 install mkdocs markdown-include mkdocs-material
mkdocs serve
Then open http://127.0.0.1:8005/ in your browser.
Please note that the documentation for this project is still under development and contains only partial information.
knowledge-base
is the place for the knowledge base source text files of your app. Put your .scs and .gwf files here.
After updating your .scs and .gwf files you need to rebuild knowledge-base
:
./sc-machine/bin/sc-builder -i repo.path -o kb.bin --clear
problem-solver
is the place for the problem solver of your app. Put your agents here. After changes in problem-solver you should rebuild it:
After updating your C++ code you need to rebuild problem-solver
:
cmake --preset release-conan
cmake --build --preset release
To build C++ code in debug mode, run:
conan install . --build=missing -s build_type=Debug
cmake --preset debug-conan
cmake --build --preset debug
To enable Debug logs set fields in ostis-legislation.ini:
log_type = Console
log_file = sc-memory.log
log_level = Debug
This project inherits codestyle from sc-machine, which can be found here.
- GitHub: @ostis-apps, @ostis-ai
Give us a βοΈ if you've liked this project!
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
This project is MIT licensed.