Skip to content

Build AI methods with your coding agent, then run them anywhere: as an MCP for chatbots, as a webapp for people, or via API for your software.

temporary fix template_library

thomashebrard679fa455b243
diff --git a/pipelex/tools/templating/template_library.py b/pipelex/tools/templating/template_library.py
index 92a3946a3..990d38063 100644
--- a/pipelex/tools/templating/template_library.py
+++ b/pipelex/tools/templating/template_library.py
@@ -1,3 +1,4 @@
+from pathlib import Path
from typing import Any, ClassVar, cast
from jinja2 import TemplateSyntaxError
@@ -33,7 +34,8 @@ class TemplateLibrary(TemplateProviderAbstract, RootModel[TemplateLibraryRoot]):
@override
def setup(self) -> None:
- template_toml_paths = find_files_in_dir(dir_path="pipelex/tools/templating/templates", pattern="*.toml", is_recursive=True)
+ templates_dir = Path(__file__).parent / "templates"
+ template_toml_paths = find_files_in_dir(dir_path=str(templates_dir), pattern="*.toml", is_recursive=True)
for template_toml_path in template_toml_paths:
self._load_from_toml(toml_path=str(template_toml_path))
self.validate_templates(template_category=Jinja2TemplateCategory.LLM_PROMPT)