temperature() creates a dials parameter for a model's sampling
temperature, for tuning llm_predict() specifications or building grids
for optimize_grid(). Reasoning models restrict it: gpt-6-luna, for
example, accepts temperature only when its reasoning effort is "none".
Usage
temperature(range = c(0, 1), trans = NULL)See also
Other integrations:
as_dsprrr_metric(),
as_dsprrr_traces(),
as_ellmer_tool(),
as_vitals_cost(),
as_vitals_samples(),
as_vitals_solver(),
as_vitals_task(),
create_search_tool(),
llm_predict(),
ragnar_tool(),
reasoning_effort(),
register_dsprrr_engine(),
summarize_traces_df(),
top_p(),
use_dsprrr_template(),
validate_workflow(),
vitals_metrics
Examples
temperature()
#> Temperature (quantitative)
#> Range: [0, 1]
temperature(range = c(0.1, 0.9))
#> Temperature (quantitative)
#> Range: [0.1, 0.9]
dials::grid_regular(temperature(), levels = 3)
#> # A tibble: 3 × 1
#> temperature
#> <dbl>
#> 1 0
#> 2 0.5
#> 3 1