This repository contains tools and models for analyzing and reporting on test automation logs. It includes utilities for extracting keywords from queries, querying a ChromaDB database, and providing insights into test case failures.
Hailey
├── modelfile
│ └── report
│ └── Modelfile
├── src
│ ├── report
│ │ └── finding.py
│ └── utils.py
└── tutorials
└── QueryWithChromaDB.md
- /modelfile/report/Modelfile: Defines the models and system information for analyzing test case failures and providing job reports.
- /src/utils.py: Contains utility functions for extracting keywords from user queries and determining the intent of the queries.
- /src/report/finding.py: Contains functions for querying the ChromaDB database and retrieving relevant data based on user queries.
- /tutorials/QueryWithChromaDB.md: A tutorial on how to write AI queries using ChromaDB.
-
Clone the repository:
https://github.com/Sin-Nguyen/Hailey.git cd Hailey -
Install the required Python packages:
pip install -r requirements.txt
-
Set up environment variables: Create a
.envfile in the root directory and add the following:CHROMADB_PATH=your_chromadb_path
Use the extract_keywords function to extract keywords from a user query:
from utils import extract_keywords
question = "Can you show me the latest failed test results for miniapp?"
keywords = extract_keywords(question)
print("Extracted Keywords:", keywords)Use the query_db function to query the ChromaDB database:
from report.finding import query_db
query = "Show me the latest failed test results for miniapp"
results = query_db(query)
print("Query Results:", results)Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for details.