MkLlm
Node for LLM-based text generation.¶
Example: Regular¶
In the realm of code where knowledge flows,
There blooms a tool that quite simply glows,
MkDocs, a craft of a writer's delight,
Turns tangled concepts into structures right.
With Markdown's grace, your words take wing,
Simple syntax, yet so much to bring,
Headers and lists, all neatly aligned,
A canvas for thoughts, both profound and refined.
Documentation, an art we all need,
A guiding light for those who would read,
From API calls to user guides clear,
MkDocs transforms chaos into cheer.
The themes it offers, so stylish and bold,
Customize colors, let your vision unfold,
Responsive and sleek, it dances with ease,
On every device, it aims to please.
With a simple command, the magic begins,
A live server spins, let the journey spin,
Preview your work as inspiration ignites,
And watch as your docs take on new heights.
Version control, a guardian so wise,
Updates and changes, it captures the skies,
No broken links in this fortress of text,
Thanks to MkDocs, your content's not vexed.
So here's to the builders, the scribes of the code,
With MkDocs as canvas, let your knowledge explode,
For in every project, every line that you type,
Is the heart of your message, ready to hype.
In the realm of code where knowledge flows,
There blooms a tool that quite simply glows,
MkDocs, a craft of a writer's delight,
Turns tangled concepts into structures right.
With Markdown's grace, your words take wing,
Simple syntax, yet so much to bring,
Headers and lists, all neatly aligned,
A canvas for thoughts, both profound and refined.
Documentation, an art we all need,
A guiding light for those who would read,
From API calls to user guides clear,
MkDocs transforms chaos into cheer.
The themes it offers, so stylish and bold,
Customize colors, let your vision unfold,
Responsive and sleek, it dances with ease,
On every device, it aims to please.
With a simple command, the magic begins,
A live server spins, let the journey spin,
Preview your work as inspiration ignites,
And watch as your docs take on new heights.
Version control, a guardian so wise,
Updates and changes, it captures the skies,
No broken links in this fortress of text,
Thanks to MkDocs, your content's not vexed.
So here's to the builders, the scribes of the code,
With MkDocs as canvas, let your knowledge explode,
For in every project, every line that you type,
Is the heart of your message, ready to hype.
<p>In the realm of code where knowledge flows,<br>
There blooms a tool that quite simply glows,<br>
MkDocs, a craft of a writer's delight,<br>
Turns tangled concepts into structures right. </p>
<p>With Markdown's grace, your words take wing,<br>
Simple syntax, yet so much to bring,<br>
Headers and lists, all neatly aligned,<br>
A canvas for thoughts, both profound and refined. </p>
<p>Documentation, an art we all need,<br>
A guiding light for those who would read,<br>
From API calls to user guides clear,<br>
MkDocs transforms chaos into cheer. </p>
<p>The themes it offers, so stylish and bold,<br>
Customize colors, let your vision unfold,<br>
Responsive and sleek, it dances with ease,<br>
On every device, it aims to please. </p>
<p>With a simple command, the magic begins,<br>
A live server spins, let the journey spin,<br>
Preview your work as inspiration ignites,<br>
And watch as your docs take on new heights. </p>
<p>Version control, a guardian so wise,<br>
Updates and changes, it captures the skies,<br>
No broken links in this fortress of text,<br>
Thanks to MkDocs, your content's not vexed. </p>
<p>So here's to the builders, the scribes of the code,<br>
With MkDocs as canvas, let your knowledge explode,<br>
For in every project, every line that you type,<br>
Is the heart of your message, ready to hype. </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
94396151800976["mkllm.MkLlm"]
94396149948048["mktext.MkText"]
94396150626816["mknode.MkNode"]
94396150902384["node.Node"]
140181802719712["builtins.object"]
94396149948048 --> 94396151800976
94396150626816 --> 94396149948048
94396150902384 --> 94396150626816
140181802719712 --> 94396150902384
[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>
# """