Generates the system prompt that teaches a model a library (prompt.md,
section 4). For the same library and options the prompt is byte-identical
to the official generateSystemPrompt.
OpenUI.Prompt.generate(MyApp.Library, tools: ["list_tickets"], edit_mode: true)Options:
:tools: tool names, or maps%{name:, description:, input_schema:, output_schema:}. Schemas may be JSON text,OpenUI.JSON.Objector maps; a plain map lists its properties in key order, so use one of the first two to keep the order you wrote.:tool_calls: teachesQuery,Mutationand@Run. Defaults to true when:toolsis given.:bindings: teaches$variables,@Setand@Reset. Defaults to:tool_calls.:builtin_functions: lists the built-in functions even when the two options above are off.:edit_mode,:inline_mode: teach edits by changed statements and prose with fenced code.:preamble,:examples,:tool_examples,:additional_rules: text the host adds.
Summary
Functions
Generates the system prompt for a library.
Functions
@spec generate(OpenUI.Library.t() | module(), keyword()) :: String.t()
Generates the system prompt for a library.