Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions FirebaseAI/Sources/Constants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ enum Constants {
/// The base reverse-DNS name for `NSError` or `CustomNSError` error domains.
///
/// - Important: A suffix must be appended to produce an error domain (e.g.,
/// "com.google.firebase.vertexai.ExampleError").
static let baseErrorDomain = "com.google.firebase.vertexai"
/// "com.google.firebase.firebaseai.ExampleError").
static let baseErrorDomain = "com.google.firebase.firebaseai"
}
2 changes: 1 addition & 1 deletion FirebaseAI/Tests/TestApp/Sources/Constants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ public enum ModelNames {
public static let gemini2Flash = "gemini-2.0-flash-001"
public static let gemini2FlashLite = "gemini-2.0-flash-lite-001"
public static let gemini2FlashExperimental = "gemini-2.0-flash-exp"
public static let gemma3_27B = "gemma-3-27b-it"
public static let gemma3_4B = "gemma-3-4b-it"
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ struct GenerateContentIntegrationTests {
(InstanceConfig.vertexAI_v1beta, ModelNames.gemini2FlashLite),
(InstanceConfig.vertexAI_v1beta_staging, ModelNames.gemini2FlashLite),
(InstanceConfig.googleAI_v1beta, ModelNames.gemini2FlashLite),
(InstanceConfig.googleAI_v1beta, ModelNames.gemma3_27B),
(InstanceConfig.googleAI_v1beta, ModelNames.gemma3_4B),
(InstanceConfig.googleAI_v1beta_staging, ModelNames.gemini2FlashLite),
(InstanceConfig.googleAI_v1beta_staging, ModelNames.gemma3_27B),
(InstanceConfig.googleAI_v1beta_staging, ModelNames.gemma3_4B),
(InstanceConfig.googleAI_v1_freeTier_bypassProxy, ModelNames.gemini2FlashLite),
(InstanceConfig.googleAI_v1beta_freeTier_bypassProxy, ModelNames.gemini2FlashLite),
(InstanceConfig.googleAI_v1beta_freeTier_bypassProxy, ModelNames.gemma3_27B),
(InstanceConfig.googleAI_v1beta_freeTier_bypassProxy, ModelNames.gemma3_4B),
])
func generateContent(_ config: InstanceConfig, modelName: String) async throws {
let model = FirebaseAI.componentInstance(config).generativeModel(
Expand All @@ -82,7 +82,7 @@ struct GenerateContentIntegrationTests {
#expect(promptTokensDetails.modality == .text)
#expect(promptTokensDetails.tokenCount == usageMetadata.promptTokenCount)
// The field `candidatesTokensDetails` is not included when using Gemma models.
if modelName == ModelNames.gemma3_27B {
if modelName == ModelNames.gemma3_4B {
#expect(usageMetadata.candidatesTokensDetails.isEmpty)
} else {
#expect(usageMetadata.candidatesTokensDetails.count == 1)
Expand Down Expand Up @@ -191,12 +191,12 @@ struct GenerateContentIntegrationTests {
(InstanceConfig.vertexAI_v1beta, ModelNames.gemini2FlashLite),
(InstanceConfig.vertexAI_v1beta_staging, ModelNames.gemini2FlashLite),
(InstanceConfig.googleAI_v1beta, ModelNames.gemini2FlashLite),
(InstanceConfig.googleAI_v1beta, ModelNames.gemma3_27B),
(InstanceConfig.googleAI_v1beta, ModelNames.gemma3_4B),
(InstanceConfig.googleAI_v1beta_staging, ModelNames.gemini2FlashLite),
(InstanceConfig.googleAI_v1beta_staging, ModelNames.gemma3_27B),
(InstanceConfig.googleAI_v1beta_staging, ModelNames.gemma3_4B),
(InstanceConfig.googleAI_v1_freeTier_bypassProxy, ModelNames.gemini2FlashLite),
(InstanceConfig.googleAI_v1beta_freeTier_bypassProxy, ModelNames.gemini2FlashLite),
(InstanceConfig.googleAI_v1beta_freeTier_bypassProxy, ModelNames.gemma3_27B),
(InstanceConfig.googleAI_v1beta_freeTier_bypassProxy, ModelNames.gemma3_4B),
])
func generateContentStream(_ config: InstanceConfig, modelName: String) async throws {
let expectedResponse = [
Expand Down
5 changes: 5 additions & 0 deletions scripts/quickstart_spm_xcodeproj.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ XCODEPROJ=${SAMPLE}/${SAMPLE}Example.xcodeproj/project.pbxproj

if grep -q "branch = main;" "$XCODEPROJ"; then
sed -i "" "s#branch = main;#branch = $BRANCH_NAME;#" "$XCODEPROJ"

# Point SPM CI to the tip of `main` of
# https://github.com/google/GoogleAppMeasurement so that the release process
# can defer publishing the `GoogleAppMeasurement` tag until after testing.
export FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT=1
else
echo "Failed to update quickstart's Xcode project to the current branch"
exit 1
Expand Down
Loading