All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.cequence.pineconescala.service.PineconePodBasedExtra.scala Maven / Gradle / Ivy

package io.cequence.pineconescala.service

import io.cequence.pineconescala.domain.PodType
import io.cequence.pineconescala.domain.response.{ConfigureIndexResponse, CreateResponse}

import scala.concurrent.Future

trait PineconePodBasedExtra {

  /**
   * This operation returns a list of your Pinecone collections.
   *
   * @return
   *   List of collections
   * @see
   *   Pinecone Doc
   */
  def listCollections: Future[Seq[String]]

  /**
   * This operation creates a Pinecone collection.
   *
   * @param name
   *   The name of the collection to be created.
   * @param source
   *   The name of the source index to be used as the source for the collection.
   * @return
   *   Whether the collection was created successfully or not.
   * @see
   *   Pinecone Doc
   */
  def createCollection(
    name: String,
    source: String
  ): Future[CreateResponse]

  /**
   * This operation specifies the pod type and number of replicas for an index.
   *
   * @param indexName
   *   The name of the index
   * @param replicas
   *   The desired number of replicas for the index.
   * @param podType
   *   The new pod type for the index.
   * @return
   *   Whether the index was updated successfully or not found.
   * @see
   *   Pinecone Doc
   */
  def configureIndex(
    indexName: String,
    replicas: Option[Int],
    podType: Option[PodType]
  ): Future[ConfigureIndexResponse]

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy