A python script acting as a interface between openrouter LLM models and openweb ui
Go to file
2025-02-11 01:50:51 +01:00
.gitignore Updated readme and added gitignore 2025-01-23 19:55:11 +01:00
02_oms_sql_pipeline.py Remove debug of body output 2025-02-11 01:50:51 +01:00
README.md Updated readme file and pylightxl import for excel manipulation 2025-02-01 18:41:42 +01:00

Østfold Milsim LLM RAG

This is a comprehensive script that uses database (MariaDB) querying to provide a retrieval augmented generation functionality for the language model accessed through OpenRouter middleware. All configuration values can be edited through open web ui's valve interface.

The language model is first asked to provide a syntactically correct query based on the question the user have asked. It then runs that query and sorts the results from a python toupple data set into a presentable markdown form.

Since the response token window for any LLM are limited when it comes to retrieving large results from a database, another layer is also introduced. The results from the database query are also exported to a Microsoft Excel file, uploaded to a cloud provider (seafile, but any cloud provider can be used through a restful API interface) and shared. The share link is exposed to the response, so the full dataset can be reviewed.