Skip to content

Commit 5959be6

Browse files
authored
Merge pull request #16 from FunctionCalling/renovate/firebase-firebase-ios-sdk-12.x
Update dependency firebase/firebase-ios-sdk to v12
2 parents f10e4bd + fc5874b commit 5959be6

File tree

5 files changed

+25
-13
lines changed

5 files changed

+25
-13
lines changed

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ let package = Package(
1717
],
1818
dependencies: [
1919
.package(url: "https://github.com/fumito-ito/FunctionCalling", from: "0.5.0"),
20-
.package(url: "https://github.com/firebase/firebase-ios-sdk.git", from: "11.15.0")
20+
.package(url: "https://github.com/firebase/firebase-ios-sdk.git", from: "12.1.0")
2121
],
2222
targets: [
2323
// Targets are the basic building blocks of a package, defining a module or a test suite.
@@ -26,7 +26,7 @@ let package = Package(
2626
name: "FunctionCalling-FirebaseVertexAI",
2727
dependencies: [
2828
.product(name: "FunctionCalling", package: "FunctionCalling"),
29-
.product(name: "FirebaseVertexAI", package: "firebase-ios-sdk")
29+
.product(name: "FirebaseAI", package: "firebase-ios-sdk")
3030
]
3131
),
3232
.testTarget(
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//
2+
// FirebaseAI+Extension.swift
3+
// FunctionCalling-FirebaseVertexAI
4+
//
5+
// Created by 伊藤史 on 2025/08/06.
6+
//
7+
8+
import FirebaseAI
9+
10+
// FIXME: "Since specifying FirebaseAI.Tool results in the error 'Tool' is not a
11+
// member type of class 'FirebaseAI.FirebaseAI', I have no choice but to
12+
// specify a typealias
13+
public typealias FirebaseAITool = Tool

Sources/FunctionCalling-FirebaseVertexAI/Extension/InputSchema+Extension.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
//
77

88
import FunctionCalling
9-
import FirebaseVertexAI
9+
import FirebaseAI
1010

1111
extension FunctionCalling.InputSchema {
12-
var toSchema: FirebaseVertexAI.Schema {
12+
var toSchema: Schema {
1313
switch type {
1414
case .string:
1515
return .string(
@@ -59,15 +59,15 @@ extension FunctionCalling.InputSchema {
5959
}
6060

6161
extension Optional<String> {
62-
var toStringFormat: FirebaseVertexAI.Schema.StringFormat? {
62+
var toStringFormat: Schema.StringFormat? {
6363
guard let format = self else {
6464
return nil
6565
}
6666

6767
return .custom(format)
6868
}
6969

70-
var toIntegerFormat: FirebaseVertexAI.Schema.IntegerFormat? {
70+
var toIntegerFormat: Schema.IntegerFormat? {
7171
guard let format = self else {
7272
return nil
7373
}

Sources/FunctionCalling-FirebaseVertexAI/Extension/Tool+Extension.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
//
77

88
import FunctionCalling
9-
import FirebaseVertexAI
9+
import FirebaseAI
1010

1111
extension FunctionCalling.Tool {
12-
var toFunctionDeclaration: FirebaseVertexAI.FunctionDeclaration {
13-
let parameters: [String: FirebaseVertexAI.Schema] = {
12+
var toFunctionDeclaration: FunctionDeclaration {
13+
let parameters: [String: Schema] = {
1414
guard let properties = inputSchema.properties else {
1515
return [:]
1616
}

Sources/FunctionCalling-FirebaseVertexAI/FunctionCalling_FirebaseVertexAI.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@
66
//
77

88
import FunctionCalling
9-
import FirebaseVertexAI
10-
import Foundation
9+
import FirebaseAI
1110

1211
extension ToolContainer {
13-
public var firebaseVertexAITools: [FirebaseVertexAI.Tool] {
12+
public var firebaseVertexAITools: [FirebaseAITool] {
1413
guard let declarations = allTools?.compactMap({ $0.toFunctionDeclaration }) else {
1514
return [.functionDeclarations([])]
1615
}
1716

18-
return [FirebaseVertexAI.Tool.functionDeclarations(declarations)]
17+
return [FirebaseAITool.functionDeclarations(declarations)]
1918
}
2019
}

0 commit comments

Comments
 (0)