Documentation
¶
Overview ¶
Example_basic demonstrates a basic proxy setup with multiple providers. Providers are configured from standard environment variables.
Usage:
export OPENAI_API_KEY=sk-your-key export MODELS_DEV_JSON=/path/to/models.json # optional, for billing go run main.go
With OpenTelemetry tracing:
otelExporter, _ := otlptracehttp.New(ctx) tp := tracesdk.NewTracerProvider(tracesdk.WithBatcher(otelExporter)) defer tp.Shutdown(ctx) otel.SetTracerProvider(tp) # Then run the example - traces will be propagated upstream
Click to show internal directories.
Click to hide internal directories.