React Native Firebase
    Preparing search index...

    Base class for Firebase AI model APIs.

    Instances of this class are associated with a specific Firebase AI Backend and provide methods for interacting with the configured generative model.

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    Properties

    Constructors

    • Internal

      Constructs a new instance of the AIModel class.

      This constructor should only be called from subclasses that provide a model API.

      Parameters

      • ai: AI

        an AI instance.

      • modelName: string

        The name of the model being used. It can be in one of the following formats:

        • my-model (short name, will resolve to publishers/google/models/my-model)
        • models/my-model (will resolve to publishers/google/models/my-model)
        • publishers/my-publisher/models/my-model (fully qualified model name)

      Returns AIModel

      If the apiKey or projectId fields are missing in your Firebase config.

    Methods

    • Internal

      Normalizes the given model name to a fully qualified model resource name.

      Parameters

      • modelName: string

        The model name to normalize.

      • backendType: BackendType

      Returns string

      The fully qualified model resource name.

    Properties

    _apiSettings: ApiSettings
    model: string

    The fully qualified model resource name to use for generating images (for example, publishers/google/models/imagen-3.0-generate-002).