@airbend3r/client
    Preparing search index...

    Function airbenderStreamText

    • 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.

      Parameters

      • defaultConfig: AirbenderConfig

        The configuration passed in by the consumer when instantiating airbenderGenerateText

        • logInputs

          Optional flag to log the parameters sent to OpenAI's create function

        • logOutputs

          Optional flag to log the response received from the OpenAI create function

        • additionalInfo

          Optional. Contains any additional information to be logged

        • onResponse

          Optional callback to handle the response directly

        • onLogId

          Optional callback to handle the log ID directly

        • sessionID

          Can optionally change the session ID to whatever you like

        • productKey

          Associates your logs with a product, needs to be generated in app

        • blockingConfig

          Optional configuration for blocking behavior

        • blockingConfig.messageOnBlock

          Custom message to display when blocking

        • shouldValidateBeforeLogging

          Whether to validate before logging

        • logName

          Optional. The Log name to group this log under

        • dynamicModel

          Optional. Determines whether the model should be dynamic, as defined by the server

        • providers

          A collection of Airbender providers

      Returns any

      the Generate Text function from Vercel's AI with Airbenders governance injected in the apply and finish methods.