Cppinecone
A C++ client for the Pinecone vector database
pinecone::pinecone_client< Mode > Struct Template Reference

The Pinecone REST API client. More...

#include <pinecone.hpp>

Public Member Functions

auto get_api_metdata () const noexcept -> util::result< types::api_metadata >
 
auto create_index (types::new_index index) const noexcept -> util::result< types::accepted >
 
auto list_indexes () const noexcept -> util::result< std::vector< std::string >>
 
auto describe_index (std::string_view name) const noexcept -> util::result< types::database >
 
auto configure_index (std::string_view name, types::index_configuration config) const noexcept -> util::result< types::accepted >
 
auto delete_index (std::string_view name) const noexcept -> util::result< types::accepted >
 
auto list_collections () const noexcept -> util::result< std::vector< std::string >>
 
auto describe_collection (std::string_view name) const noexcept -> util::result< types::collection >
 
auto delete_collection (std::string_view name) const noexcept -> util::result< types::accepted >
 
auto create_collection (types::new_collection collection) const noexcept -> util::result< types::accepted >
 
auto describe_index_stats (std::string_view name) const noexcept -> util::result< types::index_stats >
 
template<typename filter >
auto query (std::string_view name, types::query< filter > query) const noexcept -> util::result< types::query_result >
 
template<typename filter >
auto delete_vectors (std::string_view name, types::delete_request< filter > req) const noexcept -> util::result< types::accepted >
 
auto upsert_vectors (std::string_view name, types::upsert_request req) const noexcept -> util::result< types::accepted >
 
auto update_vector (std::string_view name, types::update_request req) const noexcept -> util::result< types::accepted >
 

Static Public Member Functions

static auto build (net::connection_args args) -> std::variant< pinecone_client< Mode >, std::string >
 Attempts to initialize a new Pinecone API client. More...
 

Detailed Description

template<net::threading_mode Mode>
struct pinecone::pinecone_client< Mode >

The Pinecone REST API client.

Template Parameters
Modethe threading mode for the client

All functions on this class mirror Pinecone API operations directly; as such, function-level documentation is provided only when Cppinecone functionality somehow diverges from Pinecone's provided API functionality.

Most API operations that require specifically-formatted inputs follow the Builder pattern to easily support optional fields in each message. See the documentation for the builder class contained within each custom type for details on how to construct instances of the type. The values accepted by these builders follow the semantics of the Pinecone API as described in the documentation linked below.

All operations that accept a filter argument make use of the vector metadata filtering API. The API supports an arbitrary number of filters via filter combination. See the linked documentation below for more details.

See also
https://docs.pinecone.io/docs/overview
filters.hpp
Examples
metadata_filtering.hpp.

Definition at line 67 of file pinecone.hpp.

Member Function Documentation

◆ build()

template<net::threading_mode Mode>
static auto pinecone::pinecone_client< Mode >::build ( net::connection_args  args) -> std::variant<pinecone_client<Mode>, std::string>
inlinestatic

Attempts to initialize a new Pinecone API client.

Parameters
argsarguments to initialize the client connection
Returns
a Pinecone client instance initialized according to the provided arguments, or an error message if client construction fails
Examples
main.cpp.

Definition at line 76 of file pinecone.hpp.


The documentation for this struct was generated from the following file: