-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from EURAC-EEBgroup/pre/beta
TTL to Description, Custom logger and Improvements
- Loading branch information
Showing
24 changed files
with
341 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
|
||
BrickLLM is a Python library for generating RDF files following the BrickSchema ontology using Large Language Models (LLMs). | ||
|
||
## Features | ||
## 🧰 Features | ||
|
||
- Generate BrickSchema-compliant RDF files from natural language descriptions of buildings and facilities | ||
- Support for multiple LLM providers (OpenAI, Anthropic, Fireworks) | ||
|
@@ -224,12 +224,12 @@ brick_graph_local.save_ttl_output("my_building_local.ttl") | |
## 📖 Documentation | ||
For more detailed information on how to use BrickLLM, please refer to our [documentation](https://brickllm.com/docs). | ||
For more detailed information on how to use BrickLLM, please refer to our [documentation](https://eurac-eebgroup.github.io/brick-llm/). | ||
## ▶️ Web Application | ||
A web app is available to use the library directly through an interface at the following link (). | ||
The application can also be used locally as described in the dedicated repository [BrickLLM App](https://github.com/EURAC-EEBgroup/Brick_ontology_tool). | ||
A web app is available to use the library directly through an interface at the following link (). | ||
The application can also be used locally as described in the dedicated repository [BrickLLM App](https://github.com/EURAC-EEBgroup/Brick_ontology_tool). | ||
**Note**: The tool is currently being deployed on our servers and on the MODERATE platform. It will be online shortly ! | ||
|
@@ -241,25 +241,25 @@ We welcome contributions to BrickLLM! Please see our [contributing guidelines](C | |
BrickLLM is released under the BSD-3-Clause License. See the [LICENSE](LICENSE) file for details. | ||
## Contact | ||
## 📧 Contact | ||
For any questions or support, please contact: | ||
- Marco Perini <[email protected]> | ||
- Daniele Antonucci <[email protected]> | ||
- Rocco Giudice <[email protected]> | ||
## Citation | ||
## 📝 Citation | ||
Please cite us if you use the library | ||
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.14039358.svg)](https://zenodo.org/doi/10.5281/zenodo.14039358) | ||
## 💙 Aknwoledegments | ||
This work was carried out within European projects: | ||
## 💙 Acknowledgements | ||
This work was carried out within European projects: | ||
<p align="center"> | ||
<img src="https://raw.githubusercontent.com/EURAC-EEBgroup/brick-llm/refs/heads/main/docs/assets/moderate_logo.png" alt="Moderate" | ||
<img src="https://raw.githubusercontent.com/EURAC-EEBgroup/brick-llm/refs/heads/main/docs/assets/moderate_logo.png" alt="Moderate" | ||
</p> | ||
Moderate - Horizon Europe research and innovation programme under grant agreement No 101069834, with the aim of contributing to the development of open products useful for defining plausible scenarios for the decarbonization of the built environment | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,20 @@ | ||
from .configs import GraphConfig | ||
from .schemas import ElemListSchema, RelationshipsSchema, TTLSchema | ||
from .logger import custom_logger | ||
from .schemas import ( | ||
ElemListSchema, | ||
RelationshipsSchema, | ||
TTLSchema, | ||
TTLToBuildingPromptSchema, | ||
) | ||
from .states import State, StateLocal | ||
|
||
__all__ = [ | ||
"ElemListSchema", | ||
"RelationshipsSchema", | ||
"TTLSchema", | ||
"TTLToBuildingPromptSchema", | ||
"State", | ||
"StateLocal", | ||
"GraphConfig", | ||
"custom_logger", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import logging | ||
|
||
# Create custom log level | ||
EURAC_LEVEL = 25 | ||
logging.addLevelName(EURAC_LEVEL, "EURAC") | ||
|
||
|
||
def eurac(self, message, *args, **kwargs): | ||
""" | ||
Log with custom EURAC level | ||
""" | ||
if self.isEnabledFor(EURAC_LEVEL): | ||
self._log(EURAC_LEVEL, message, args, **kwargs) | ||
|
||
|
||
# Add eurac method to Logger class | ||
logging.Logger.eurac = eurac | ||
|
||
|
||
# Create and configure logger | ||
def get_logger(name="BrickLLM"): | ||
logger = logging.getLogger(name) | ||
|
||
# Create handler if none exists | ||
if not logger.handlers: | ||
handler = logging.StreamHandler() | ||
formatter = logging.Formatter( | ||
"%(asctime)s - %(name)s - %(levelname)s - %(message)s" | ||
) | ||
handler.setFormatter(formatter) | ||
logger.addHandler(handler) | ||
|
||
logger.setLevel(EURAC_LEVEL) | ||
return logger | ||
|
||
|
||
# Create default logger instance | ||
custom_logger = get_logger() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.