From 0df67b1b2571fb04b636ce015a2daabe629ff352 Mon Sep 17 00:00:00 2001 From: Ivan Gabriele Date: Sat, 22 Jun 2024 13:09:15 +0200 Subject: [PATCH] fix(chat): implement Clone trait for ChatParams & ResponseFormat --- src/v1/chat.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/v1/chat.rs b/src/v1/chat.rs index 2ce252a..2309029 100644 --- a/src/v1/chat.rs +++ b/src/v1/chat.rs @@ -46,7 +46,7 @@ pub enum ChatMessageRole { /// The format that the model must output. /// /// 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 { #[serde(rename = "type")] pub type_: String, @@ -65,7 +65,7 @@ impl ResponseFormat { /// The parameters for the chat request. /// /// See the [API documentation](https://docs.mistral.ai/api/#operation/createChatCompletion) for more information. -#[derive(Debug)] +#[derive(Clone, Debug)] pub struct ChatParams { /// The maximum number of tokens to generate in the completion. ///