| dragon_generate | R Documentation |
Runs through the session's inference backend: by default a local Python worker that keeps the last models loaded, so only the first call pays the load. Pass a server backend to generate from Ollama or any OpenAI-compatible endpoint instead. See dragon_backend.
dragon_generate(
x,
prompt,
system = NULL,
max_new_tokens = 256,
temperature = 0.7,
top_p = 0.9,
base = FALSE,
backend = dragon_backend()
)
x |
A |
prompt |
One or more user prompts. |
system |
Optional system prompt. |
max_new_tokens |
Maximum tokens to generate per reply. |
temperature |
Sampling temperature. |
top_p |
Nucleus sampling threshold. |
base |
Ignore this run's adapter and generate from what it started with: the base model, or the earlier run it continued from. Useful for before-and-after comparisons. |
backend |
Where to run inference. See dragon_backend. Server
backends serve a fixed model and ignore |
A character vector, one reply per prompt.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.