Abstract Optional logger: LDLoggerOptional Protected Optional Readonly loggerInvoke the chat model with an array of messages. This method should convert messages to provider format, invoke the model, and return a ChatResponse with the result and metrics.
Default implementation takes no action and returns a placeholder response. Provider implementations should override this method.
Promise that resolves to a ChatResponse containing the model's response
Invoke the chat model with structured output support. This method should convert messages to provider format, invoke the model with structured output configuration, and return a structured response.
Default implementation takes no action and returns a placeholder response. Provider implementations should override this method.
Promise that resolves to a structured response
Static createStatic method that constructs an instance of the provider. Each provider implementation must provide their own static create method that accepts an AIConfig and returns a configured instance.
The LaunchDarkly AI configuration
Optional logger: LDLoggerOptional logger for the provider
Optional Promise that resolves to a configured provider instance
Generated using TypeDoc
Abstract base class for AI providers that implement chat model functionality. This class provides the contract that all provider implementations must follow to integrate with LaunchDarkly's tracking and configuration capabilities.
Following the AICHAT spec recommendation to use base classes with non-abstract methods for better extensibility and backwards compatibility.