From c5d49fac71c157a47caab853d4ed41dc4754aa01 Mon Sep 17 00:00:00 2001 From: Jesse Seldess Date: Thu, 8 Aug 2024 11:52:22 +0200 Subject: [PATCH] Fix heading hierarchy We had multiple h1 headings. --- README.md | 45 ++++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 2fec0dca..8a70a208 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ -# Pinecone Python SDK +# Pinecone Python SDK + ![License](https://img.shields.io/github/license/pinecone-io/pinecone-python-client?color=orange) [![CI](https://github.com/pinecone-io/pinecone-python-client/actions/workflows/pr.yaml/badge.svg)](https://github.com/pinecone-io/pinecone-python-client/actions/workflows/pr.yaml) The official Pinecone Python SDK. @@ -193,9 +194,7 @@ index.upsert(vectors=[]) index.query(vector=[...], top_key=10) ``` -# Indexes - -## Create Index +## Indexes ### Create a serverless index @@ -264,7 +263,7 @@ pc.create_index( ) ``` -## List indexes +### List indexes The following example returns all indexes in your project. @@ -276,7 +275,7 @@ for index in pc.list_indexes(): print(index['name']) ``` -## Describe index +### Describe index The following example returns information about the index `example-index`. @@ -288,7 +287,7 @@ pc = Pinecone(api_key='<>') index_description = pc.describe_index("example-index") ``` -## Delete an index +### Delete an index The following example deletes the index named `example-index`. Only indexes which are not protected by deletion protection may be deleted. @@ -300,7 +299,7 @@ pc = Pinecone(api_key='<>') pc.delete_index("example-index") ``` -## Scale replicas +### Scale replicas The following example changes the number of replicas for `example-index`. @@ -313,7 +312,7 @@ new_number_of_replicas = 4 pc.configure_index("example-index", replicas=new_number_of_replicas) ``` -## Configuring deletion protection +### Configuring deletion protection If you would like to enable deletion protection, which prevents an index from being deleted, the `configure_index` method also handles that via an optional `deletion_protection` keyword argument. @@ -333,7 +332,7 @@ desc = pc.describe_index("example-index") print(desc.deletion_protection) ``` -## Describe index statistics +### Describe index statistics The following example returns statistics about the index `example-index`. @@ -347,7 +346,7 @@ index = pc.Index(host=os.environ.get('INDEX_HOST')) index_stats_response = index.describe_index_stats() ``` -## Upsert vectors +### Upsert vectors The following example upserts vectors to `example-index`. @@ -367,7 +366,7 @@ upsert_response = index.upsert( ) ``` -## Query an index +### Query an index The following example queries the index `example-index` with metadata filtering. @@ -394,7 +393,7 @@ query_response = index.query( ) ``` -## Delete vectors +### Delete vectors The following example deletes vectors by ID. @@ -411,7 +410,7 @@ index = pc.Index(host=os.environ.get('INDEX_HOST')) delete_response = index.delete(ids=["vec1", "vec2"], namespace="example-namespace") ``` -## Fetch vectors +### Fetch vectors The following example fetches vectors by ID. @@ -428,7 +427,7 @@ index = pc.Index(host=os.environ.get('INDEX_HOST')) fetch_response = index.fetch(ids=["vec1", "vec2"], namespace="example-namespace") ``` -## Update vectors +### Update vectors The following example updates vectors by ID. @@ -449,7 +448,7 @@ update_response = index.update( ) ``` -## List vectors +### List vectors The `list` and `list_paginated` methods can be used to list vector ids matching a particular id prefix. With clever assignment of vector ids, this can be used to help model hierarchical relationships between @@ -494,9 +493,9 @@ print(results.pagination.next) # 'eyJza2lwX3Bhc3QiOiI5IiwicHJlZml4IjpudWxsfQ==' print(results.usage) # { 'read_units': 1 } ``` -# Collections +## Collections -## Create collection +### Create collection The following example creates the collection `example-collection` from `example-index`. @@ -512,7 +511,7 @@ pc.create_collection( ) ``` -## List collections +### List collections The following example returns a list of the collections in the current project. @@ -524,7 +523,7 @@ pc = Pinecone(api_key='<>') active_collections = pc.list_collections() ``` -## Describe a collection +### Describe a collection The following example returns a description of the collection `example-collection`. @@ -537,7 +536,7 @@ pc = Pinecone(api_key='<>') collection_description = pc.describe_collection("example-collection") ``` -## Delete a collection +### Delete a collection The following example deletes the collection `example-collection`. @@ -549,7 +548,7 @@ pc = Pinecone(api_key='<>') pc.delete_collection("example-collection") ``` -# Inference API +## Inference API The Pinecone SDK now supports creating embeddings via the [Inference API](https://docs.pinecone.io/guides/inference/understanding-inference). @@ -583,6 +582,6 @@ query_embeddings = pc.inference.embed( # Send query to Pinecone index to retrieve similar documents ``` -# Contributing +## Contributing If you'd like to make a contribution, or get setup locally to develop the Pinecone Python SDK, please see our [contributing guide](https://github.com/pinecone-io/pinecone-python-client/blob/main/CONTRIBUTING.md)