pub struct CreateEvalCompletionsRunDataSourceSamplingParams {
pub temperature: Option<f64>,
pub max_completion_tokens: Option<u64>,
pub top_p: Option<f64>,
pub seed: Option<u64>,
pub response_format: Option<CreateEvalCompletionsRunDataSourceSamplingParamsResponseFormat>,
pub tools: Option<Vec<ChatCompletionTool>>,
}
Fields§
§temperature: Option<f64>
A higher temperature increases randomness in the outputs.
max_completion_tokens: Option<u64>
The maximum number of tokens in the generated output.
top_p: Option<f64>
An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
seed: Option<u64>
A seed value to initialize the randomness, during sampling.
response_format: Option<CreateEvalCompletionsRunDataSourceSamplingParamsResponseFormat>
An object specifying the format that the model must output.
Setting to { "type": "json_schema", "json_schema": {...} }
enables
Structured Outputs which ensures the model will match your supplied JSON
schema. Learn more in the Structured Outputs
guide.
Setting to { "type": "json_object" }
enables the older JSON mode, which
ensures the message the model generates is valid JSON. Using json_schema
is preferred for models that support it.
tools: Option<Vec<ChatCompletionTool>>
A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.
Implementations§
Source§impl CreateEvalCompletionsRunDataSourceSamplingParams
impl CreateEvalCompletionsRunDataSourceSamplingParams
Sourcepub fn builder() -> CreateEvalCompletionsRunDataSourceSamplingParamsBuilder<((), (), (), (), (), ())>
pub fn builder() -> CreateEvalCompletionsRunDataSourceSamplingParamsBuilder<((), (), (), (), (), ())>
Create a builder for building CreateEvalCompletionsRunDataSourceSamplingParams
.
On the builder, call .temperature(...)
(optional), .max_completion_tokens(...)
(optional), .top_p(...)
(optional), .seed(...)
(optional), .response_format(...)
(optional), .tools(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of CreateEvalCompletionsRunDataSourceSamplingParams
.
Trait Implementations§
Source§impl Clone for CreateEvalCompletionsRunDataSourceSamplingParams
impl Clone for CreateEvalCompletionsRunDataSourceSamplingParams
Source§fn clone(&self) -> CreateEvalCompletionsRunDataSourceSamplingParams
fn clone(&self) -> CreateEvalCompletionsRunDataSourceSamplingParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Default for CreateEvalCompletionsRunDataSourceSamplingParams
impl Default for CreateEvalCompletionsRunDataSourceSamplingParams
Source§fn default() -> CreateEvalCompletionsRunDataSourceSamplingParams
fn default() -> CreateEvalCompletionsRunDataSourceSamplingParams
Source§impl<'de> Deserialize<'de> for CreateEvalCompletionsRunDataSourceSamplingParams
impl<'de> Deserialize<'de> for CreateEvalCompletionsRunDataSourceSamplingParams
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl PartialEq for CreateEvalCompletionsRunDataSourceSamplingParams
impl PartialEq for CreateEvalCompletionsRunDataSourceSamplingParams
Source§fn eq(&self, other: &CreateEvalCompletionsRunDataSourceSamplingParams) -> bool
fn eq(&self, other: &CreateEvalCompletionsRunDataSourceSamplingParams) -> bool
self
and other
values to be equal, and is used by ==
.