mirror of
https://github.com/mii443/openai-api-rs.git
synced 2025-08-22 23:25:39 +00:00
Merge pull request #119 from clementine-tech/main
Add derive Deserialize to ImageRequest and EmbeddingRequest
This commit is contained in:
@ -11,7 +11,7 @@ pub struct EmbeddingData {
|
|||||||
pub index: i32,
|
pub index: i32,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Clone)]
|
#[derive(Debug, Serialize, Clone, Deserialize)]
|
||||||
pub struct EmbeddingRequest {
|
pub struct EmbeddingRequest {
|
||||||
pub model: String,
|
pub model: String,
|
||||||
pub input: String,
|
pub input: String,
|
||||||
|
@ -9,7 +9,7 @@ pub struct ImageData {
|
|||||||
pub url: String,
|
pub url: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Clone)]
|
#[derive(Debug, Serialize, Clone, Deserialize)]
|
||||||
pub struct ImageGenerationRequest {
|
pub struct ImageGenerationRequest {
|
||||||
pub prompt: String,
|
pub prompt: String,
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
Reference in New Issue
Block a user