FirebaseAILogic Framework Reference

RetrievalConfig

public struct RetrievalConfig : Sendable, Encodable

Configuration for grounding retrieval tools, such as Grounding with Google Maps.

Use RetrievalConfig inside ToolConfig or TemplateToolConfig to provide optional location coordinates and language preferences to bias and localize search results.

  • Constructs a new RetrievalConfig.

    Declaration

    Swift

    public init(location: CLLocationCoordinate2D? = nil, languageCode: String? = nil)

    Parameters

    location

    Geographic coordinates used to bias results towards the user's location.

    languageCode

    A BCP 47 language code to localize responses.

  • Declaration

    Swift

    public func encode(to encoder: Encoder) throws