Overview

VibeKit Proxy seamlessly integrates with the OpenAI SDK, providing automatic data redaction and security for your OpenAI applications without changing your existing code.

Installation

Start the VibeKit proxy server:
npm install -g @vibe-kit/proxy
npx @vibe-kit/proxy start --port 8080

Integration

Simply add the VibeKit Proxy URL to your existing OpenAI SDK configuration:

Chat Completions

from openai import OpenAI

client = OpenAI(
    base_url="http://localhost:8080/v1"  # Add this line
)

response = client.chat.completions.create(
    model="gpt-4",
    messages=[
        {"role": "user", "content": "My SSN is 123-45-6789. Help me with privacy."}
    ]
)

Environment Configuration

import os
from openai import OpenAI

proxy_url = os.getenv("VIBEKIT_PROXY_URL", "http://localhost:8080/v1")

client = OpenAI(
    base_url=proxy_url  # Use environment variable
)