MkLlm
Node for LLM-based text generation.¶
Example: Regular¶
Ode to MkDocs¶
In realms where knowledge flows like streams,
A treasure trove of structured dreams,
MkDocs rises, sleek and bright,
A beacon guiding through the night.
With Markdown's grace, it takes its form,
A canvas where ideas can transform,
Simple syntax, yet so profound,
In organized lines, wisdom is found.
From project docs to wikis wide,
It supports them all, a faithful guide,
A static site, fast and free,
Unlocking the power of community.
Themes to wear, like cloaks of lore,
Inviting all to learn and explore,
Responsive and clean, it stands the test,
A reliable friend in the knowledge quest.
Version control, the artist's touch,
Keeping changes without a fuss,
Collaborative spirits, unite in code,
As Markdown dances, knowledge flowed.
So here's to you, O MkDocs dear,
For simplifying paths, both far and near,
In every line, a story's told,
In your embrace, our wisdom unfolds.
### Ode to MkDocs
In realms where knowledge flows like streams,
A treasure trove of structured dreams,
MkDocs rises, sleek and bright,
A beacon guiding through the night.
With Markdown's grace, it takes its form,
A canvas where ideas can transform,
Simple syntax, yet so profound,
In organized lines, wisdom is found.
From project docs to wikis wide,
It supports them all, a faithful guide,
A static site, fast and free,
Unlocking the power of community.
Themes to wear, like cloaks of lore,
Inviting all to learn and explore,
Responsive and clean, it stands the test,
A reliable friend in the knowledge quest.
Version control, the artist's touch,
Keeping changes without a fuss,
Collaborative spirits, unite in code,
As Markdown dances, knowledge flowed.
So here's to you, O MkDocs dear,
For simplifying paths, both far and near,
In every line, a story's told,
In your embrace, our wisdom unfolds.
<h3 id="ode-to-mkdocs">Ode to MkDocs</h3>
<p>In realms where knowledge flows like streams,<br>
A treasure trove of structured dreams,<br>
MkDocs rises, sleek and bright,<br>
A beacon guiding through the night. </p>
<p>With Markdown's grace, it takes its form,<br>
A canvas where ideas can transform,<br>
Simple syntax, yet so profound,<br>
In organized lines, wisdom is found. </p>
<p>From project docs to wikis wide,<br>
It supports them all, a faithful guide,<br>
A static site, fast and free,<br>
Unlocking the power of community. </p>
<p>Themes to wear, like cloaks of lore,<br>
Inviting all to learn and explore,<br>
Responsive and clean, it stands the test,<br>
A reliable friend in the knowledge quest. </p>
<p>Version control, the artist's touch,<br>
Keeping changes without a fuss,<br>
Collaborative spirits, unite in code,<br>
As Markdown dances, knowledge flowed. </p>
<p>So here's to you, O MkDocs dear,<br>
For simplifying paths, both far and near,<br>
In every line, a story's told,<br>
In your embrace, our wisdom unfolds. </p>
Bases: MkText
__init__
¶
__init__(
user_prompt: str,
system_prompt: str | None = None,
model: str = "openai:gpt-4o-mini",
context: str | None = None,
extra_files: Sequence[str | PathLike[str]] | None = None,
**kwargs: Any
)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
user_prompt
|
str
|
Main prompt for the LLM |
required |
system_prompt
|
str | None
|
System prompt to set LLM behavior |
None
|
model
|
str
|
LLM model identifier to use |
'openai:gpt-4o-mini'
|
context
|
str | None
|
Main context string |
None
|
extra_files
|
Sequence[str | PathLike[str]] | None
|
Additional context files or strings |
None
|
kwargs
|
Any
|
Keyword arguments passed to parent |
{}
|
Name | Children | Inherits |
---|---|---|
MkText mknodes.basenodes.mktext Class for any Markup text. |
graph TD
93860739174608["mkllm.MkLlm"]
93860742935328["mktext.MkText"]
93860744073616["mknode.MkNode"]
93860744080896["node.Node"]
140589822947552["builtins.object"]
93860742935328 --> 93860739174608
93860744073616 --> 93860742935328
93860744080896 --> 93860744073616
140589822947552 --> 93860744080896
[metadata]
icon = "mdi:view-grid"
status = "new"
name = "MkLlm"
[examples.regular]
title = "Regular"
jinja = """
{{ "Write a poem about MkDocs" | MkLlm(model="openai:gpt-4o-mini") }}
"""
# [output.markdown]
# template = """
# <div class="grid cards" markdown="1">
# {% for item in node.items %}
# - {{ item | indent }}
# {% endfor %}
# </div>
# """