diff --git a/.gitignore b/.gitignore index f92d917..07a742a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ Cargo.lock *.pdb /target .cargo/config.toml +.DS_Store diff --git a/Cargo.toml b/Cargo.toml index d0014ef..b8d0a08 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,17 +8,17 @@ edition = "2021" [dependencies] deadqueue = "0.2.4" futures-util = "0.3.30" -gcp_auth = "0.10.0" -reqwest = { version = "0.11.9", features = ["json", "gzip"] } -reqwest-eventsource = "0.5.0" -serde = { version = "*", features = ["derive"] } -serde_json = { version = "*"} +gcp_auth = "0.11.1" +reqwest = { version = "0.12.3", features = ["json", "gzip"] } +reqwest-eventsource = "0.6.0" +serde = { version = "1.0.197", features = ["derive"] } +serde_json = { version = "1.0.115"} tracing = "0.1.40" -tokio = { version = "1.36.0" } +tokio = { version = "1.37.0" } [dev-dependencies] console = "0.15.8" dialoguer = "0.11.0" -indicatif = "0.17.7" -tokio = { version = "1.35.1", features = ["full"] } +indicatif = "0.17.8" +tokio = { version = "1.37.0", features = ["full"] } tracing-subscriber = "0.3.18" diff --git a/examples/text-embedding.rs b/examples/text-embedding.rs index 4c4f91c..7c087e8 100644 --- a/examples/text-embedding.rs +++ b/examples/text-embedding.rs @@ -21,12 +21,12 @@ async fn main() -> Result<(), Box> { let embedding_request = TextEmbeddingRequest { instances: vec![ TextEmbeddingRequestInstance { - title: String::from("Embed testing"), + title: Some(String::from("Embed testing")), content: String::from("Embed testing"), task_type: String::from("RETRIEVAL_DOCUMENT"), }, TextEmbeddingRequestInstance { - title: String::from("Embed testing 2"), + title: Some(String::from("Embed testing 2")), content: String::from("Embed testing 2"), task_type: String::from("RETRIEVAL_DOCUMENT"), }, diff --git a/src/types/text_embeddings.rs b/src/types/text_embeddings.rs index 062b4ac..83f0bd5 100644 --- a/src/types/text_embeddings.rs +++ b/src/types/text_embeddings.rs @@ -11,7 +11,7 @@ pub struct TextEmbeddingRequest { pub struct TextEmbeddingRequestInstance { pub content: String, pub task_type: String, - pub title: String, + pub title: Option, } #[derive(Clone, Debug, Serialize, Deserialize)]