Network configuration including proxy support, connection pooling, custom headers, timeout management, and retry logic.
Field | Type | Description | Default |
---|---|---|---|
BaseURL | string | Custom provider endpoint | Provider default |
ExtraHeaders | map[string]string | Additional HTTP headers | {} |
DefaultRequestTimeoutInSeconds | int | Request timeout | 30 |
MaxRetries | int | Retry attempts | 0 |
RetryBackoffInitial | time.Duration | Initial retry delay | 500ms |
RetryBackoffMax | time.Duration | Maximum retry delay | 5s |
config.json
):
Field | Type | Description | Required |
---|---|---|---|
Type | ProxyType | Proxy type (http/socks5/env) | ✅ |
URL | string | Proxy server URL | ✅ |
Username | string | Proxy authentication user | ❌ |
Password | string | Proxy authentication pass | ❌ |
Use Case | Timeout | Max Retries | Initial Backoff |
---|---|---|---|
Interactive Chat | 30s | 2 | 500ms |
Batch Processing | 120s | 5 | 1s |
Real-time API | 15s | 1 | 250ms |
Background Jobs | 300s | 3 | 2s |
Task | Documentation |
---|---|
🔑 Configure API keys | Key Management |
🔗 Set up providers | Providers |
⚡ Optimize performance | Memory Management |
❌ Handle network errors | Error Handling |
💡 Tip: Always test your proxy and timeout settings in a staging environment before deploying to production.