File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 10
10
//! use chromadb::collection::{ChromaCollection, GetResult, GetOptions};
11
11
//! use serde_json::json;
12
12
//!
13
- //!# fn doc_client_demo() -> anyhow::Result<()> {
13
+ //!# async fn doc_client_demo() -> anyhow::Result<()> {
14
14
//! // With default ChromaClientOptions
15
15
//! // Defaults to http://localhost:8000
16
- //! let client: ChromaClient = ChromaClient::new(Default::default());
16
+ //! let client: ChromaClient = ChromaClient::new(Default::default()).await.unwrap() ;
17
17
//!
18
18
//! // With custom ChromaClientOptions
19
19
//! let auth = ChromaAuthMethod::TokenAuth {
20
20
//! token: "<TOKEN>".to_string(),
21
21
//! header: ChromaTokenHeader::Authorization
22
22
//! };
23
23
//! let client: ChromaClient = ChromaClient::new(ChromaClientOptions {
24
- //! url: "<CHROMADB_URL>".into( ),
25
- //! database: Some( "<DATABASE>".into() ),
24
+ //! url: Some( "<CHROMADB_URL>".to_string() ),
25
+ //! database: "<DATABASE>".to_string( ),
26
26
//! auth
27
- //! });
27
+ //! }).await.unwrap() ;
28
28
//!
29
29
//! # Ok(())
30
30
//! # }
You can’t perform that action at this time.
0 commit comments