Skip to content

Commit 4dbfe6c

Browse files
authored
Update README.md (#51)
## Problem Some readme docs weren't updated. ## Solution I updated the readme. ## Type of Change - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update - [ ] Infrastructure change (CI configs, etc) - [x] Non-code change (docs, etc) - [ ] None of the above: (explain here) ## Test Plan Tests should pass.
1 parent 66e5279 commit 4dbfe6c

File tree

5 files changed

+17
-12
lines changed

5 files changed

+17
-12
lines changed

Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ readme = "./README.md"
1010
license = "Apache-2.0"
1111
keywords = ["pinecone", "vector", "database", "cloud", "vectordb"]
1212
categories = ["api-bindings", "database"]
13+
exclude = ["tests/*"]
1314

1415
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1516

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ let pinecone: PineconeClient = config.client().expect("Failed to create Pinecone
3838
```
3939

4040
### Default client
41-
Use the `default_client()` function, which is the equivalent of constructing a `PineconeClientConfig` struct with all fields set to `None`. Configuration values will be read from environment variables.
41+
Use the `default_client()` function, which is the equivalent of constructing a `PineconeClientConfig` struct with all fields set to `None`. The API key and control plane host (optional) will be read from environment variables.
4242
```rust
4343
let pinecone: PineconeClient = pinecone_sdk::pinecone::default_client().expect("Failed to create Pinecone instance");
4444
```
@@ -390,7 +390,7 @@ let pinecone = config.client()?;
390390

391391
let mut index = pinecone.index("index-host").await?;
392392

393-
let vectors = &["1".to_string(), "2".to_string()];
393+
let vectors = &["1", "2"];
394394

395395
let response: FetchResponse = index.fetch(vectors, &Default::default()).await?;
396396
```
@@ -490,4 +490,4 @@ pinecone.delete_collection("collection-name").await?;
490490
```
491491

492492
# Contributing
493-
If you'd like to make a contribution, or get setup locally to develop the Pinecone Rust client, please see our [contributing guide](https://github.com/pinecone-io/pinecone-rust-client/blob/emily/update-readme/CONTRIBUTING.md)
493+
If you'd like to make a contribution, or get setup locally to develop the Pinecone Rust client, please see our [contributing guide](https://github.com/pinecone-io/pinecone-rust-client/blob/emily/update-readme/CONTRIBUTING.md)

codegen/apis

Submodule apis updated from 062b114 to 4de4456

src/models/mod.rs

+9-7
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@ mod embedding;
2323
pub use self::embedding::Embedding;
2424

2525
pub use crate::openapi::models::{
26-
serverless_spec::Cloud, CollectionList, CollectionModel, ConfigureIndexRequest,
27-
ConfigureIndexRequestSpec, ConfigureIndexRequestSpecPod, CreateCollectionRequest,
28-
DeletionProtection, EmbedRequestParameters, IndexModelSpec, IndexModelStatus, IndexSpec,
29-
PodSpec, PodSpecMetadataConfig, ServerlessSpec,
26+
index_model_status::State, serverless_spec::Cloud, CollectionList, CollectionModel,
27+
ConfigureIndexRequest, ConfigureIndexRequestSpec, ConfigureIndexRequestSpecPod,
28+
CreateCollectionRequest, DeletionProtection, EmbedRequestParameters, IndexModelSpec,
29+
IndexModelStatus, IndexSpec, PodSpec, PodSpecMetadataConfig, ServerlessSpec,
3030
};
3131

32-
pub use crate::protos::{DescribeIndexStatsResponse, FetchResponse, ListResponse, QueryResponse, SparseValues,
33-
UpdateResponse, UpsertResponse, Vector};
32+
pub use crate::protos::{
33+
DescribeIndexStatsResponse, FetchResponse, ListResponse, QueryResponse, SparseValues,
34+
UpdateResponse, UpsertResponse, Vector,
35+
};
3436

35-
pub use prost_types::{value::Kind as Kind, Struct as Metadata, Value};
37+
pub use prost_types::{value::Kind, Struct as Metadata, Value};

tests/integration_test_control.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,9 @@ async fn test_create_delete_collection() -> Result<(), PineconeError> {
395395
let index_name = &get_pod_index();
396396
loop {
397397
if match pinecone.describe_index(index_name).await {
398-
Ok(index) => index.status.ready,
398+
Ok(index) => {
399+
index.status.ready && (index.status.state == pinecone_sdk::models::State::Ready)
400+
}
399401
Err(_) => false,
400402
} {
401403
break;

0 commit comments

Comments
 (0)