Skip to content

Commit

Permalink
Update README.md (#51)
Browse files Browse the repository at this point in the history
## 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.
  • Loading branch information
ericapywang authored Aug 7, 2024
1 parent 66e5279 commit 4dbfe6c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 12 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ readme = "./README.md"
license = "Apache-2.0"
keywords = ["pinecone", "vector", "database", "cloud", "vectordb"]
categories = ["api-bindings", "database"]
exclude = ["tests/*"]

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

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ let pinecone: PineconeClient = config.client().expect("Failed to create Pinecone
```

### Default client
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.
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.
```rust
let pinecone: PineconeClient = pinecone_sdk::pinecone::default_client().expect("Failed to create Pinecone instance");
```
Expand Down Expand Up @@ -390,7 +390,7 @@ let pinecone = config.client()?;

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

let vectors = &["1".to_string(), "2".to_string()];
let vectors = &["1", "2"];

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

# Contributing
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)
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)
2 changes: 1 addition & 1 deletion codegen/apis
Submodule apis updated from 062b11 to 4de445
16 changes: 9 additions & 7 deletions src/models/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ mod embedding;
pub use self::embedding::Embedding;

pub use crate::openapi::models::{
serverless_spec::Cloud, CollectionList, CollectionModel, ConfigureIndexRequest,
ConfigureIndexRequestSpec, ConfigureIndexRequestSpecPod, CreateCollectionRequest,
DeletionProtection, EmbedRequestParameters, IndexModelSpec, IndexModelStatus, IndexSpec,
PodSpec, PodSpecMetadataConfig, ServerlessSpec,
index_model_status::State, serverless_spec::Cloud, CollectionList, CollectionModel,
ConfigureIndexRequest, ConfigureIndexRequestSpec, ConfigureIndexRequestSpecPod,
CreateCollectionRequest, DeletionProtection, EmbedRequestParameters, IndexModelSpec,
IndexModelStatus, IndexSpec, PodSpec, PodSpecMetadataConfig, ServerlessSpec,
};

pub use crate::protos::{DescribeIndexStatsResponse, FetchResponse, ListResponse, QueryResponse, SparseValues,
UpdateResponse, UpsertResponse, Vector};
pub use crate::protos::{
DescribeIndexStatsResponse, FetchResponse, ListResponse, QueryResponse, SparseValues,
UpdateResponse, UpsertResponse, Vector,
};

pub use prost_types::{value::Kind as Kind, Struct as Metadata, Value};
pub use prost_types::{value::Kind, Struct as Metadata, Value};
4 changes: 3 additions & 1 deletion tests/integration_test_control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,9 @@ async fn test_create_delete_collection() -> Result<(), PineconeError> {
let index_name = &get_pod_index();
loop {
if match pinecone.describe_index(index_name).await {
Ok(index) => index.status.ready,
Ok(index) => {
index.status.ready && (index.status.state == pinecone_sdk::models::State::Ready)
}
Err(_) => false,
} {
break;
Expand Down

0 comments on commit 4dbfe6c

Please sign in to comment.