Skip to content

Commit b597d0a

Browse files
author
Guantong
committed
Pub data struct. #3
1 parent 9abc3af commit b597d0a

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "openai_api_rust"
3-
version = "0.1.6"
3+
version = "0.1.7"
44
authors = ["i@guantong.dev"]
55
edition = "2021"
66
license = "MIT"

src/apis/audio.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub struct AudioBody {
3636

3737
#[derive(Debug, Serialize, Deserialize)]
3838
pub struct Audio {
39-
text: Option<String>,
39+
pub text: Option<String>,
4040
}
4141

4242
pub trait AudioApi {

src/apis/edits.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ mod tests {
4848
let openai = new_test_openai();
4949
let body = EditsBody {
5050
model: "text-davinci-edit-001".to_string(),
51-
temperature: None,
51+
temperature: Some(1.0),
5252
top_p: None,
5353
n: Some(2),
5454
instruction: "Fix the spelling mistakes".to_string(),

src/apis/embeddings.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ pub struct Embeddings {
3434

3535
#[derive(Debug, Serialize, Deserialize)]
3636
pub struct EmbeddingData {
37-
object: Option<String>,
38-
embedding: Option<Vec<f64>>,
39-
index: i32,
37+
pub object: Option<String>,
38+
pub embedding: Option<Vec<f64>>,
39+
pub index: i32,
4040
}
4141

4242
pub trait EmbeddingsApi {

src/apis/images.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ pub struct ImagesEditBody {
4545

4646
#[derive(Debug, Serialize, Deserialize)]
4747
pub struct Images {
48-
created: u64,
49-
data: Option<Vec<ImageData>>,
48+
pub created: u64,
49+
pub data: Option<Vec<ImageData>>,
5050
}
5151

5252
#[derive(Debug, Serialize, Deserialize)]
5353
pub struct ImageData {
54-
url: String,
54+
pub url: String,
5555
}
5656

5757
pub trait ImagesApi {

0 commit comments

Comments
 (0)