The configuration passed in by the consumer when instantiating airbenderGenerateText
Optional flag to log the parameters sent to OpenAI's create function
Optional flag to log the response received from the OpenAI create function
Optional. Contains any additional information to be logged
Optional callback to handle the response directly
Optional callback to handle the log ID directly
Can optionally change the session ID to whatever you like
Associates your logs with a product, needs to be generated in app
Optional configuration for blocking behavior
Custom message to display when blocking
Whether to validate before logging
Optional. The Log name to group this log under
Optional. Determines whether the model should be dynamic, as defined by the server
A collection of Airbender providers
the Generate Text function from Vercel's AI with Airbenders governance injected in the apply and finish methods.
This function wraps Vercel's AI Generate Text function in a Provider agnostic wrapper. Before making the AI Call, this service will Log to Airbender the Input + Setting it plans to use After the Log, this function will attempt to resolve the selected Provider, model and settings. After making the AI Call, this service will Log to Airbender the Output Airbender may return or throw errors if this request is blocked, or config changes are needed.