CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-portkey-ai

Python client library for the Portkey API - Control Panel for AI Apps with unified API signature, automated fallbacks, retries, load balancing, semantic caching, virtual keys, and comprehensive observability features.

Pending
Overview
Eval results
Files

vector-stores.mddocs/

Vector Stores

Vector database operations for retrieval-augmented generation (RAG) applications with file management and batch processing.

Capabilities

Vector Store Management

class VectorStores:
    def create(self, **kwargs): ...
    def list(self, **kwargs): ...
    def retrieve(self, **kwargs): ...
    def update(self, **kwargs): ...
    def delete(self, **kwargs): ...
    files: VectorFiles
    file_batches: VectorFileBatches

class VectorFiles:
    def create(self, **kwargs): ...
    def list(self, **kwargs): ...
    def retrieve(self, **kwargs): ...
    def delete(self, **kwargs): ...

class VectorFileBatches:
    def create(self, **kwargs): ...
    def list(self, **kwargs): ...
    def retrieve(self, **kwargs): ...
    def cancel(self, **kwargs): ...

Usage Examples

from portkey_ai import Portkey

portkey = Portkey(
    api_key="PORTKEY_API_KEY",
    virtual_key="VIRTUAL_KEY"
)

# Create vector store
vector_store = portkey.beta.vector_stores.create(
    name="Knowledge Base"
)

# Add files to vector store
portkey.beta.vector_stores.files.create(
    vector_store_id=vector_store.id,
    file_id="file-123"
)

# Create file batch
batch = portkey.beta.vector_stores.file_batches.create(
    vector_store_id=vector_store.id,
    file_ids=["file-123", "file-456"]
)

Install with Tessl CLI

npx tessl i tessl/pypi-portkey-ai

docs

administration.md

assistants-threads.md

batch-processing.md

beta-realtime.md

chat-completions.md

configuration-management.md

container-content.md

core-client.md

embeddings.md

evaluation-testing.md

feedback-collections.md

file-management.md

fine-tuning.md

framework-integrations.md

index.md

key-management.md

models.md

multimodal-apis.md

observability-analytics.md

prompt-management.md

provider-integration.md

text-completions.md

uploads.md

vector-stores.md

tile.json