Skip to main content

Implementation of SAMO AI Assistant into project

Here is few steps which have to be done to successful deployment of SAMO AI Assistant into your project

Metadata Package

Add the @ai/base package as a dependency in your project and install it. This package contains all the necessary configurations for lids, gateway and dynamic app that allow for smooth integration of SAMO AI Assistant into your projects.

If you want to use ai-base package in your project, ask for access rights @Přemysl Obšil

Configuring .env file

Specify port, version and properties for SAMO AI Assistant container in ".env" file. For container properties see Configuration page

samo_ai_port=11980
samo_ai_version=1.1.2

Docker container

Add samo-ai-app as docker container to your "docker-compose" file

Please refer to the Docker Page

Database for samo-ai-app

There are two options how to handle DB.

A) You can use small SQLite represented by C-language library. In this case do these steps:

  • create "requests.db" file and save it to /"project-repository"/configuration/samo-ai-app/requests.db. CI would deploy this file in server environment.
  • use this value: sqlite:///requests.db for "DB_CONNECT_STRING" variable
  • fo "samo-ai-app" container configuration in "docker-compose.yaml" file add this volume: - ${configuration_dir:-./configuration/samo-ai-app/requests.db}:/api/requests.db

B) You can use PostgreSQL as standalone container next to "samo-ai-app" container. How to use PostgreSQL as docker container follow official manual. In this case you also need to set correct "DB_CONNECT_STRING" variable.

Proxy

Proxy is already defined inside the @ai/base package

Reference "ai.url" variable in your properties files.

ai.url=http://dev-server:11980 # for local.properties
ai.url=http://samo-ai-app:8080 # for "server".properties