From a33fc866d0a26688784dae79fd792b2c2cd88ca3 Mon Sep 17 00:00:00 2001 From: Ramon Iglesias Date: Mon, 4 Nov 2024 08:01:49 -0800 Subject: [PATCH] added deserialize --- src/v1/embedding.rs | 2 +- src/v1/image.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/v1/embedding.rs b/src/v1/embedding.rs index 4abd41f..e7ebb4c 100644 --- a/src/v1/embedding.rs +++ b/src/v1/embedding.rs @@ -11,7 +11,7 @@ pub struct EmbeddingData { pub index: i32, } -#[derive(Debug, Serialize, Clone)] +#[derive(Debug, Serialize, Clone, Deserialize)] pub struct EmbeddingRequest { pub model: String, pub input: String, diff --git a/src/v1/image.rs b/src/v1/image.rs index 896b30a..1963146 100644 --- a/src/v1/image.rs +++ b/src/v1/image.rs @@ -9,7 +9,7 @@ pub struct ImageData { pub url: String, } -#[derive(Debug, Serialize, Clone)] +#[derive(Debug, Serialize, Clone, Deserialize)] pub struct ImageGenerationRequest { pub prompt: String, #[serde(skip_serializing_if = "Option::is_none")]