目录

Tencent VectorDB C++ SDK

C++ SDK for Tencent Cloud VectorDB.

Getting started

Prerequisites

- c++ 17 or higher

dependencies

grpc

 git clone https://github.com/grpc/grpc
 cd grpc
 git submodule update --init

 mkdir -p cmake/build
 cd cmake/build
 cmake ../..
 make
 make install

protobuf

version 3.11.4

git clone https://github.com/protocolbuffers/protobuf.git
cd protobuf
git submodule update --init --recursive
cmake .
cmake --build . --parallel 10
sudo cmake --install .

生成olama.pb.cc和olama.grpc.pb.cc等文件

protoc -I=. --cpp_out=. olama.proto
protoc -I=. --grpc_out=. --plugin=protoc-gen-grpc=$(which grpc_cpp_plugin) olama.proto

重新生成后,需将olama.grpc.pb.cc中的SearchEngine_method_names修改为

static const char* SearchEngine_method_names[] = {
  "/alias/set",
  "/alias/get",
  "/alias/delete",
  "/collection/create",
  "/collection/drop",
  "/collection/truncate",
  "/collection/describe",
  "/collection/list",
  "/index/rebuild",
  "/document/upsert",
  "/document/update",
  "/document/query",
  "/document/search",
  "/document/delete",
  "/database/create",
  "/database/drop",
  "/database/list",
};

googletest

git clone https://github.com/google/googletest.git
cd googletest
git submodule update --init
mkdir build         
cd build
cmake ..     
make
sudo make install 

CMake

mkdir build && cd build
cmake ..
make

编译完成后在build文件夹下会得到libvectordb_sdk.a静态库

Examples

See example/main.cpp about how to use this package to communicate with TencentCloud VectorDB.

关于
435.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802032778号