Bündelung der Jinja2 -Vorlage mit UVPython

Python-Programme
Anonymous
 Bündelung der Jinja2 -Vorlage mit UV

Post by Anonymous »

Ich versuche, Jinja2 -Vorlagen in meinen UV -Build aufzunehmen, aber es scheint nicht zu funktionieren.
meine Verzeichnisstruktur lautet wie folgt.

Code: Select all

project/
├── src/
│   ├── mypackage/
│   └──── j2/ (all templates live here)

└── pyproject.toml
< /code>
Im Folgenden ist mein PY -Projekt Toml < /p>
[project]
name = "dojipipeline"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"groq>=0.16.0",
"jinja2>=3.1.5",
"pydantic>=2.10.6",
"python-dotenv>=1.0.1",
"pyyaml>=6.0.2",
]
< /code>
Meine Arbeit ist es, alle J2 als doc_string in .py -Datei wie unten zu erfassen und sie zu [url=viewtopic.php?t=8986]importieren[/url] < /p>
#j2_template.py
GENERATE_DATA_MODEL = """
You are a data governance expert and are tasked to perform the following
{ % for task in tasks % }
{{ task }}
{ % endfor % }
===========================
{% if contexts %}
Following are the contexts for the tasks:
{% for context in contexts %}
{{ context }}
{% endfor %}
{% endif %}

The required responses must be in JSON format.
"response": {
"data": {{ data_shema }}
"thoughts":  List of thoughts
}

Generate a valid data object and explain your thought process.
Answer only with json and do not include any other information.
"""

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post