feat(chat)!: change safe_prompt, temperature & top_p to non-Option types
BREAKING CHANGE: - `Chat::ChatParams.safe_prompt` & `Chat::ChatRequest.safe_prompt` are now `bool` instead of `Option<bool>`. Default is `false`. - `Chat::ChatParams.temperature` & `Chat::ChatRequest.temperature` are now `f32` instead of `Option<f32>`. Default is `0.7`. - `Chat::ChatParams.top_p` & `Chat::ChatRequest.top_p` are now `f32` instead of `Option<f32>`. Default is `1.0`.
This commit is contained in:
@@ -115,12 +115,16 @@ pub enum ToolType {
|
||||
Function,
|
||||
}
|
||||
|
||||
/// An enum representing how functions should be called.
|
||||
#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
|
||||
pub enum ToolChoice {
|
||||
/// The model is forced to call a function.
|
||||
#[serde(rename = "any")]
|
||||
Any,
|
||||
/// The model can choose to either generate a message or call a function.
|
||||
#[serde(rename = "auto")]
|
||||
Auto,
|
||||
/// The model won't call a function and will generate a message instead.
|
||||
#[serde(rename = "none")]
|
||||
None,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user