This project serves as a demonstration of a simple, AI-powered workflow for triaging IT tickets. It is intended for educational purposes to showcase the integration of local and cloud-based AI models, such as Ollama and the Google Gemini API, in a practical application. Please note that this is not a production-ready system.
Note on Code Comments: The Python scripts in this project are commented more extensively than is typical for a production codebase. This is done intentionally to make the code more accessible and understandable for developers who may be less familiar with the libraries and concepts used.
-
Install Dependencies: Install the required Python libraries from the
pyproject.tomlfile usinguv sync:uv sync
This project uses the following tools for code quality:
rufffor linting.tyandmypyfor type checking.
It is recommended to install ruff as a persistent tool using uv, as it is a general-purpose linter that can be used across multiple projects:
uv tool install ruffNote: After installing, you may need to add the tool's installation directory to your system's PATH. The
uv tool installcommand will provide the necessary command to run, such asexport PATH="/Users/your-user/.local/bin:$PATH".
The type checkers, ty and mypy, are managed as project-specific development dependencies and can be installed with:
uv sync --extra devTo process the tickets in the tickets-original directory, you can use either the ollama or gemini model.
Using Ollama:
python triage.py --model ollamaUsing Gemini:
python triage.py --model geminiYou can also run the script without the --model argument, and it will default to using ollama.
To remove all the triaged tickets and reset the demo, run the following command:
python clean.pyTo see the full documentation of the command-line options, run:
python triage.py --help-
Ruff (Linting):
ruff check . -
Ty (Type Checking):
uv run ty check . -
Mypy (Type Checking):
uv run mypy .