aiService
Syntax
aiService(provider, apiKey)Parameters
Parameter
Type
Required
Default
Description
Supported Providers
Returns
Examples
Get Default Service
Specific Provider
With API Key Override
Direct Invocation
Streaming Response
Multiple Providers
Environment Variable Detection
Service Configuration
Reusable Services
With Custom Options
Error Handling
Tool-Augmented Generation
Embedding Service
Provider Comparison Utility
Service Factory Pattern
Long-Running Service
Provider Detection
Notes
Related Functions
Best Practices
Last updated