MkLlm
Node for LLM-based text generation.¶
Example: Regular¶
In the realm where knowledge thrives,
MkDocs reigns, where clarity jives.
With Markdown’s grace and ease of prose,
It builds your docs, as wisdom flows.
A simple syntax, a friend so fair,
Crafting pages with meticulous care.
From headers strong to lists that gleam,
In every line, a thoughtful dream.
Themes and styles, so rich, so bright,
Transforming texts into sheer delight.
With a command, mkdocs serve
at play,
Your docs come alive in a vibrant way.
Navigation's smooth, like a gentle stream,
And search functionality fulfills the dream.
With every click, your users explore,
Finding insights, knowledge, and more.
Version control, a savior’s grace,
Documentation kept in its rightful place.
From code to usage, the journey unfolds,
In every project, a story retold.
So here’s to MkDocs, a beacon, a guide,
In the world of documentation, you stand with pride.
With every line penned in your embrace,
You turn chaos to order, and give clarity space.
In the realm where knowledge thrives,
MkDocs reigns, where clarity jives.
With Markdown’s grace and ease of prose,
It builds your docs, as wisdom flows.
A simple syntax, a friend so fair,
Crafting pages with meticulous care.
From headers strong to lists that gleam,
In every line, a thoughtful dream.
Themes and styles, so rich, so bright,
Transforming texts into sheer delight.
With a command, `mkdocs serve` at play,
Your docs come alive in a vibrant way.
Navigation's smooth, like a gentle stream,
And search functionality fulfills the dream.
With every click, your users explore,
Finding insights, knowledge, and more.
Version control, a savior’s grace,
Documentation kept in its rightful place.
From code to usage, the journey unfolds,
In every project, a story retold.
So here’s to MkDocs, a beacon, a guide,
In the world of documentation, you stand with pride.
With every line penned in your embrace,
You turn chaos to order, and give clarity space.
<p>In the realm where knowledge thrives,<br>
MkDocs reigns, where clarity jives.<br>
With Markdown’s grace and ease of prose,<br>
It builds your docs, as wisdom flows. </p>
<p>A simple syntax, a friend so fair,<br>
Crafting pages with meticulous care.<br>
From headers strong to lists that gleam,<br>
In every line, a thoughtful dream. </p>
<p>Themes and styles, so rich, so bright,<br>
Transforming texts into sheer delight.<br>
With a command, <code>mkdocs serve</code> at play,<br>
Your docs come alive in a vibrant way. </p>
<p>Navigation's smooth, like a gentle stream,<br>
And search functionality fulfills the dream.<br>
With every click, your users explore,<br>
Finding insights, knowledge, and more. </p>
<p>Version control, a savior’s grace,<br>
Documentation kept in its rightful place.<br>
From code to usage, the journey unfolds,<br>
In every project, a story retold. </p>
<p>So here’s to MkDocs, a beacon, a guide,<br>
In the world of documentation, you stand with pride.<br>
With every line penned in your embrace,<br>
You turn chaos to order, and give clarity space. </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
94599705988688["mkllm.MkLlm"]
94599705611968["mktext.MkText"]
94599705097232["mknode.MkNode"]
94599703461184["node.Node"]
140153667328480["builtins.object"]
94599705611968 --> 94599705988688
94599705097232 --> 94599705611968
94599703461184 --> 94599705097232
140153667328480 --> 94599703461184
[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>
# """