Skip to content

Files

Latest commit

a535541 · May 22, 2024

History

History
This branch is 1 commit ahead of, 43 commits behind appwrite/templates:main.

sync-with-pinecone

⚡ Node.js Sync with Pinecone Function

Syncs documents in an Appwrite database collection to the Pinecone vector database.

🧰 Usage

GET /

Returns HTML page where search can be performed to test the indexing.

POST /

Triggers indexing of the Appwrite database collection to Pinecone.

Response

Sample 204 Response: No content.

⚙️ Configuration

Setting Value
Runtime Node (18.0)
Entrypoint src/main.js
Build Commands npm install
Permissions any
Timeout (Seconds) 15

🔒 Environment Variables

APPWRITE_API_KEY

API Key to talk to Appwrite backend APIs.

Question Answer
Required Yes
Sample Value d1efb...aec35
Documentation Appwrite: Getting Started for Server

APPWRITE_DATABASE_ID

The ID of the Appwrite database that contains the collection to sync.

Question Answer
Required Yes
Sample Value 612a3...5b6c9
Documentation Appwrite: Databases

APPWRITE_COLLECTION_ID

The ID of the collection in the Appwrite database to sync.

Question Answer
Required Yes
Sample Value 7c3e8...2a9f1
Documentation Appwrite: Collections

APPWRITE_ENDPOINT

The URL endpoint of the Appwrite server. If not provided, it defaults to the Appwrite Cloud server: https://cloud.appwrite.io/v1.

Question Answer
Required No
Sample Value https://cloud.appwrite.io/v1

PINECONE_API_KEY

The admin API key for Meilisearch. Used to create the index and sync the documents from Appwrite.

Question Answer
Required Yes
Sample Value masterKey1234
Documentation Pinecone: API Keys

PINECONE_INDEX_ID

The ID of the Pinecone index to sync the documents to.

Question Answer
Required Yes
Sample Value index1234
Documentation Pinecone: Indexes

OPENAI_API_KEY

API Key for OpenAI API. Used to generate the embeddings for the documents.

Question Answer
Required Yes
Sample Value searchKey1234
Documentation OpenAI: API Keys