fix(chat): implement Clone trait for ChatParams & ResponseFormat
This commit is contained in:
@@ -46,7 +46,7 @@ pub enum ChatMessageRole {
|
|||||||
/// The format that the model must output.
|
/// The format that the model must output.
|
||||||
///
|
///
|
||||||
/// See the [API documentation](https://docs.mistral.ai/api/#operation/createChatCompletion) for more information.
|
/// See the [API documentation](https://docs.mistral.ai/api/#operation/createChatCompletion) for more information.
|
||||||
#[derive(Debug, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||||
pub struct ResponseFormat {
|
pub struct ResponseFormat {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
pub type_: String,
|
pub type_: String,
|
||||||
@@ -65,7 +65,7 @@ impl ResponseFormat {
|
|||||||
/// The parameters for the chat request.
|
/// The parameters for the chat request.
|
||||||
///
|
///
|
||||||
/// See the [API documentation](https://docs.mistral.ai/api/#operation/createChatCompletion) for more information.
|
/// See the [API documentation](https://docs.mistral.ai/api/#operation/createChatCompletion) for more information.
|
||||||
#[derive(Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct ChatParams {
|
pub struct ChatParams {
|
||||||
/// The maximum number of tokens to generate in the completion.
|
/// The maximum number of tokens to generate in the completion.
|
||||||
///
|
///
|
||||||
|
|||||||
Reference in New Issue
Block a user