This is a NestJS backend project powered by a Large Language Model designed to assist bookkeepers and accountants in performing their tasks more efficiently. It includes the following features:
- AI-Enhanced Accounting Assistant: Powered by LLAMA 3.1 with Retrieval-Augmented Generation (RAG) via LangChain, this specialized agent focuses on accounting and bookkeeping tasks.
- Cognitive Accounting Automation Module: Automates the extraction of basic information from invoices and receipts, transforming them into accounting vouchers.
-
Pleas make sure you have the following installed:
- CUDA driversDocker, Use the following command to check if you have installed the drivers:
nvidia-smi
-
If you want to read official Ollama documentation, please visit Ollama
-
Linux user use follow command to install Ollama:
curl -fsSL https://ollama.com/install.sh | sh
-
If you want ollama to be access by non local IP, You can add following content into
/etc/ollama/config.yaml
:sudo vim /etc/systemd/system/ollama.service
- Add following content to the file:
[Service] Environment="OLLAMA_HOST=0.0.0.0"
- Restart Ollama
sudo systemctl daemon-reload sudo systemctl restart ollama
-
Start Ollama using systemd:
sudo systemctl start ollama
- Please make sure you have installed Docker on your machine.
- Use Qdrant docker image build Qdrant:
then run the service
docker pull qdrant/qdrant
docker run -d -p 6333:6333 -p 6334:6334 \ -v $(pwd)/qdrant_storage:/qdrant/storage:z \ qdrant/qdrant
- Please visit Gemini Api to generate your API key.
-
Please Make sure your node version is not
20.5.1
, which will causing Google API error. -
Clone the repository
git clone https://github.com/CAFECA-IO/AICH.git
-
Install the dependencies
npm install
-
Create a
.env
file in the root directory and add the following environment variables (BASE_STORAGE_PATH is the path where the invoice image will be stored):# Google Gemini GOOGLE_GEMINI_API_KEY=Your_API_key # Ollama OLLAMA_HOST=http://127.0.0.1:11434 #QDRANT_HOST QDRANT_HOST=http://127.0.0.1:6333 # File storage path BASE_STORAGE_PATH = ${HOME}/AICH
-
Start the server
- If you want to run the server in development mode, use the following command:
npm run start
- If you want to run the server in production mode, use the following command:
npm run build npm run prod
- Node.js:
^v20.16.0
- Ollama:
^v0.3.4
- Qdrant:
^v1.11.0
AICH is MIT licensed.