PineconeSwift

0.7.4

Swift API for Pinecone Vector database access
ArchieGoodwin/PineconeSwift

What's New

Added license

2023-08-12T06:02:09Z

PineconeSwift

PineconeSwift is an open-source Swift Package designed to seamlessly integrate Pinecone, a powerful vector database, into your Swift applications. With PineconeSwift, you can easily leverage Pinecone's capabilities to efficiently store and query high-dimensional vectors, enabling you to build state-of-the-art machine learning and recommendation systems.

Features

  • Effortless integration with Pinecone, a high-performance vector database
  • Support for key database operations, including upsert, query, fetch, and update
  • Intuitive and easy-to-use API designed specifically for Swift developers
  • Built with performance and scalability in mind, suitable for various application types
  • Thoroughly tested and documented, ensuring a smooth development experience

PineconeSwift is your go-to solution for integrating Pinecone's cutting-edge vector database technology into your Swift projects, enabling you to build advanced, scalable, and robust applications with ease.

Usage

For example for upsert:

Create an array of EmbedResult structs:

public struct EmbedResult: Codable {
    public let id: String? = UUID().uuidString
    public let index: Int
    public let embedding: [Double]
    public let text: String
    
    public init(index: Int, embedding: [Double], text: String) {
        self.index = index
        self.embedding = embedding
        self.text = text
    }
}

Then simply create PineconeSwift object and call for upsert method:

let pai = PineconeSwift(apikey: {your_Pinecone_API_key}}, baseURL: {your Pinecone_base_url_to_index}})

let result = try await pai.upsertVectors(with: embeddings, namespace: {string}})

Description

  • Swift Tools 5.8.0
View More Packages from this Author

Dependencies

  • None
Last updated: Fri Oct 18 2024 19:42:25 GMT-0900 (Hawaii-Aleutian Daylight Time)