Skip to content

Commit

Permalink
Merge pull request #119 from clementine-tech/main
Browse files Browse the repository at this point in the history
Add derive Deserialize to ImageRequest and EmbeddingRequest
  • Loading branch information
dongri authored Nov 5, 2024
2 parents 9ea319b + 79e87fc commit 095aeea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/v1/embedding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/v1/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down

0 comments on commit 095aeea

Please sign in to comment.