Skip to content

Commit

Permalink
Update import examples in README (#167)
Browse files Browse the repository at this point in the history
## Problem

The import examples in the README are missing some class imports.

## Solution

Add the imports.

## 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

Describe specific steps for validating this change.
  • Loading branch information
jseldess authored Oct 24, 2024
1 parent a6f34ab commit 7e8807d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,8 @@ System.out.println(result.getData());
The following example initiates an asynchronous import of vectors from object storage into the index.

```java
import io.pinecone.clients.Pinecone;
import io.pinecone.clients.AsyncIndex;
import org.openapitools.db_data.client.ApiException;
import org.openapitools.db_data.client.model.ImportErrorMode;
import org.openapitools.db_data.client.model.StartImportResponse;
Expand All @@ -680,6 +682,8 @@ StartImportResponse response = asyncIndex.startImport(uri, "123-456-789", Import
The following example lists all recent and ongoing import operations for the specified index.

```java
import io.pinecone.clients.Pinecone;
import io.pinecone.clients.AsyncIndex;
import org.openapitools.db_data.client.ApiException;
import org.openapitools.db_data.client.model.ListImportsResponse;
...
Expand All @@ -698,6 +702,8 @@ ListImportsResponse response = asyncIndex.listImports(100, "some-pagination-toke
The following example retrieves detailed information about a specific import operation using its unique identifier.

```java
import io.pinecone.clients.Pinecone;
import io.pinecone.clients.AsyncIndex;
import org.openapitools.db_data.client.ApiException;
import org.openapitools.db_data.client.model.ImportModel;
...
Expand All @@ -716,6 +722,8 @@ ImportModel importDetails = asyncIndex.describeImport("1");
The following example attempts to cancel an ongoing import operation using its unique identifier.

```java
import io.pinecone.clients.Pinecone;
import io.pinecone.clients.AsyncIndex;
import org.openapitools.db_data.client.ApiException;
...

Expand Down

0 comments on commit 7e8807d

Please sign in to comment.