aiService
Syntax
aiService(provider, options)Parameters
Parameter
Type
Required
Default
Description
Supported Providers
Returns
Examples
Get Default Service
Specific Provider
With API Key Override
With Configuration Options (v2.1.0+)
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