Skip to content

Commit

Permalink
Updated pinecone_interface.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jhamon committed Jan 29, 2025
1 parent f2b1de0 commit 72c627c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions pinecone/control/pinecone_interface.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from abc import ABC, abstractmethod

from typing import Optional, Dict, Union, Literal
from typing import Optional, Dict, Union


from pinecone.config import Config
Expand All @@ -9,6 +9,7 @@


from pinecone.models import ServerlessSpec, PodSpec, IndexList, CollectionList
from pinecone.enums import Metric, VectorType, DeletionProtection, PodType


class PineconeDBControlInterface(ABC):
Expand Down Expand Up @@ -177,10 +178,10 @@ def create_index(
name: str,
spec: Union[Dict, ServerlessSpec, PodSpec],
dimension: Optional[int],
metric: Optional[Literal["cosine", "euclidean", "dotproduct"]] = "cosine",
metric: Optional[Union[Metric, str]] = Metric.COSINE,
timeout: Optional[int] = None,
deletion_protection: Optional[Literal["enabled", "disabled"]] = "disabled",
vector_type: Optional[Literal["dense", "sparse"]] = "dense",
deletion_protection: Optional[Union[DeletionProtection, str]] = DeletionProtection.DISABLED,
vector_type: Optional[Union[VectorType, str]] = VectorType.DENSE,
):
"""Creates a Pinecone index.
Expand Down Expand Up @@ -377,8 +378,8 @@ def configure_index(
self,
name: str,
replicas: Optional[int] = None,
pod_type: Optional[str] = None,
deletion_protection: Optional[Literal["enabled", "disabled"]] = None,
pod_type: Optional[Union[PodType, str]] = None,
deletion_protection: Optional[Union[DeletionProtection, str]] = None,
tags: Optional[Dict[str, str]] = None,
):
"""This method is used to scale configuration fields for your pod-based Pinecone index.
Expand Down

0 comments on commit 72c627c

Please sign in to comment.