PromptTemplate
Object Hierarchy:
Description:
public class PromptTemplate :
Template
Prompt template that loads from the skill-prompts resource only (no filesystem).
Constructor takes filename only. Call sites use filenames such as task_creation_initial.md, task_refinement.md,
task_list_iteration.md, task_execution.md.
Content:
Properties:
Static methods:
Creation methods:
Methods:
- public string fill (int n_pairs, ...)
Fills the user template with varargs key-value pairs. First argument
is the number of pairs. Call e.g. fill(6, "key1", value1, "key2", value2, …). Vala appends null after the last argument; we critical
if we get null too early or extra args.
- public string header_fenced (string heading, string body, string type = "")
## heading + fenced block with type (e.g. "text", "json", "vala"). No
output when body is empty.
- public string header_file (string heading, File file)
## heading + fenced code block. Uses file.language (FileBase; set by
detect_language()). Exception: we do output the header (and empty block if needed) when file content is empty. Caller must not pass
null file.
- public string header_raw (string heading, string body)
## heading + body, no fence. Unfenced markdown. No output when body is
empty.
- public string system_fill (int n_pairs, ...)
Same as
fill but operates on the system message and stores the result in
filled_system. First argument is the number of key-
value pairs.
- public Document system_to_document ()
Returns the markdown-parsed version of filled_system. Call after
system_fill().
- public Document user_to_document ()
Inherited Members:
All known members inherited from class OLLMchat.Prompt.Template
All known members inherited from class GLib.Object
- @get
- @new
- @ref
- @set
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- force_floating
- freeze_notify
- get_class
- get_data
- get_property
- get_qdata
- get_type
- getv
- interface_find_property
- interface_install_property
- interface_list_properties
- is_floating
- new_valist
- new_with_properties
- newv
- notify
- notify_property
- ref_count
- ref_sink
- remove_toggle_ref
- remove_weak_pointer
- replace_data
- replace_qdata
- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- set_valist
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref