Skip to content

@sqlrooms/ai-rag / AiProviderFactory

Type Alias: AiProviderFactory()

AiProviderFactory: (apiKey?) => AiProvider

Factory function that creates a provider instance, optionally with an API key. This allows creating providers dynamically at runtime with user-provided API keys.

Parameters

ParameterType
apiKey?string

Returns

AiProvider