@airbend3r/client
    Preparing search index...

    Function wrappedStreamText

    • This function wraps three of Vercel's Providers with Airbender's logging features. Before making the AI Call, this service will Log to Airbender the Input + Setting used 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: LoggerConfig

        Vercel's AI Input Params + Airbenders Input Params

        • 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

      Returns any

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