11# ZeroEntropy Rust SDK
22
3+ [ ![ CI] ( https://github.com/davidatoms/zeroentropy-rust/workflows/CI/badge.svg )] ( https://github.com/davidatoms/zeroentropy-rust/actions )
34[ ![ Crates.io] ( https://img.shields.io/crates/v/zeroentropy-community.svg )] ( https://crates.io/crates/zeroentropy-community )
45[ ![ Documentation] ( https://docs.rs/zeroentropy-community/badge.svg )] ( https://docs.rs/zeroentropy-community )
56[ ![ License] ( https://img.shields.io/badge/license-Apache--2.0-blue.svg )] ( LICENSE )
7+ [ ![ Downloads] ( https://img.shields.io/crates/d/zeroentropy-community.svg )] ( https://crates.io/crates/zeroentropy-community )
68
79Rust client library for the [ ZeroEntropy API] ( https://zeroentropy.dev ) - a powerful semantic search and document retrieval service.
810
@@ -16,14 +18,14 @@ Add this to your `Cargo.toml`:
1618
1719``` toml
1820[dependencies ]
19- zeroentropy-community = " 0.1.0 "
21+ zeroentropy-community = " 0.1.1 "
2022tokio = { version = " 1.0" , features = [" full" ] }
2123```
2224
2325## Quick Start
2426
2527``` rust
26- use zeroentropy :: Client ;
28+ use zeroentropy_community :: Client ;
2729
2830#[tokio:: main]
2931async fn main () -> Result <(), Box <dyn std :: error :: Error >> {
@@ -72,7 +74,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
7274For advanced configuration, use the client builder:
7375
7476``` rust
75- use zeroentropy :: Client ;
77+ use zeroentropy_community :: Client ;
7678use std :: time :: Duration ;
7779
7880let client = Client :: builder ()
@@ -92,7 +94,7 @@ client.collections().add("my_collection").await?;
9294
9395// List all collections
9496let collections = client . collections (). get_list (). await ? ;
95- for name in collections . collections {
97+ for name in collections . collection_names {
9698 println! (" Collection: {}" , name );
9799}
98100
@@ -117,7 +119,7 @@ client.documents().add_text(
117119
118120``` rust
119121use std :: collections :: HashMap ;
120- use zeroentropy :: MetadataValue ;
122+ use zeroentropy_community :: MetadataValue ;
121123
122124let mut metadata = HashMap :: new ();
123125metadata . insert (
@@ -229,7 +231,7 @@ let results = client.queries().top_pages(
229231). await ? ;
230232
231233for page in results . results {
232- println! (" Page {} of {}" , page . page_number , page . path);
234+ println! (" Page {} of {}" , page . page_index , page . path);
233235}
234236```
235237
@@ -260,7 +262,7 @@ let results = client.queries().top_snippets(
260262Improve search result quality with reranking:
261263
262264``` rust
263- use zeroentropy :: RerankDocument ;
265+ use zeroentropy_community :: RerankDocument ;
264266
265267let documents = vec! [
266268 RerankDocument {
@@ -290,7 +292,7 @@ for result in results.results {
290292The SDK provides specific error types for different failure scenarios:
291293
292294``` rust
293- use zeroentropy :: Error ;
295+ use zeroentropy_community :: Error ;
294296
295297match client . collections (). add (" my_collection" ). await {
296298 Ok (_ ) => println! (" Success!" ),
@@ -356,7 +358,7 @@ This project is licensed under the Apache 2.0 License - see the [LICENSE](LICENS
356358
357359- ** Documentation** : [ docs.zeroentropy.dev] ( https://docs.zeroentropy.dev )
358360- ** Email** : founders@zeroentropy.dev
359- - ** Issues** : [ GitHub Issues] ( https://github.com/zeroentropy-ai /zeroentropy-rust/issues )
361+ - ** Issues** : [ GitHub Issues] ( https://github.com/davidatoms /zeroentropy-rust/issues )
360362
361363## Related Projects
362364
0 commit comments