Skip to content

Commit a18335f

Browse files
authored
Merge pull request #17 from FunctionCalling/feature/rename-firebase-ai
rename FirebaseVertexAI to FirebaseAI
2 parents 5959be6 + 24f81c7 commit a18335f

File tree

7 files changed

+20
-20
lines changed

7 files changed

+20
-20
lines changed

Package.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
import PackageDescription
55

66
let package = Package(
7-
name: "FunctionCalling-FirebaseVertexAI",
7+
name: "FunctionCalling-FirebaseAI",
88
platforms: [
99
.macOS(.v13),
1010
.iOS(.v17)
1111
],
1212
products: [
1313
// Products define the executables and libraries a package produces, making them visible to other packages.
1414
.library(
15-
name: "FunctionCalling-FirebaseVertexAI",
16-
targets: ["FunctionCalling-FirebaseVertexAI"])
15+
name: "FunctionCalling-FirebaseAI",
16+
targets: ["FunctionCalling-FirebaseAI"])
1717
],
1818
dependencies: [
1919
.package(url: "https://github.com/fumito-ito/FunctionCalling", from: "0.5.0"),
@@ -23,14 +23,14 @@ let package = Package(
2323
// Targets are the basic building blocks of a package, defining a module or a test suite.
2424
// Targets can depend on other targets in this package and products from dependencies.
2525
.target(
26-
name: "FunctionCalling-FirebaseVertexAI",
26+
name: "FunctionCalling-FirebaseAI",
2727
dependencies: [
2828
.product(name: "FunctionCalling", package: "FunctionCalling"),
2929
.product(name: "FirebaseAI", package: "firebase-ios-sdk")
3030
]
3131
),
3232
.testTarget(
33-
name: "FunctionCalling-FirebaseVertexAITests",
34-
dependencies: ["FunctionCalling-FirebaseVertexAI"])
33+
name: "FunctionCalling-FirebaseAITests",
34+
dependencies: ["FunctionCalling-FirebaseAI"])
3535
]
3636
)

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
# FunctionCalling-FirebaseVertexAI
1+
# FunctionCalling-FirebaseAI
22

3-
This library simplifies the integration of the [FunctionCalling](https://github.com/fumito-ito/FunctionCalling) macro into [FirebaseVertexAI](https://github.com/firebase/firebase-ios-sdk/tree/main/FirebaseVertexAI). By using this library, you can directly generate `Tool` objects from Swift native functions, which can then be specified as FunctionCalling when invoking VertexAI.
3+
This library simplifies the integration of the [FunctionCalling](https://github.com/fumito-ito/FunctionCalling) macro into [FirebaseAI](https://github.com/firebase/firebase-ios-sdk/tree/main/FirebaseAI). By using this library, you can directly generate `Tool` objects from Swift native functions, which can then be specified as FunctionCalling when invoking FirebaseAI.
44

55
## Usage
66

77
```swift
88

99
import FunctionCalling
10-
import FunctionCalling_FirebaseVertexAI
11-
import FirebaseVertexAI
10+
import FunctionCalling_FirebaseAI
11+
import FirebaseAI
1212

1313
// MARK: Declare the container and functions for the tools to be called from FunctionCalling.
1414

@@ -23,9 +23,9 @@ struct MyFunctionTools {
2323
}
2424
}
2525

26-
// MARK: You can directly pass the tools generated from objects to the model in VertexAI.
26+
// MARK: You can directly pass the tools generated from objects to the model in FirebaseAI.
2727

28-
let model = VertexAI.vertexAI().generativeModel(
28+
let model = FirebaseAI.firebaseAI().generativeModel(
2929
modelName: "gemini-1.5-flash",
3030
tools: MyFunctionTools().firebaseVertexAITools
3131
)
@@ -43,12 +43,12 @@ let package = Package(
4343
.target(
4444
"YouAppModule",
4545
dependencies: [
46-
.product(name: "FunctionCalling-FirebaseVertexAI", package: "FunctionCalling-FirebaseVertexAI")
46+
.product(name: "FunctionCalling-FirebaseAI", package: "FunctionCalling-FirebaseAI")
4747
]
4848
)
4949
],
5050
dependencies: [
51-
.package(url: "https://github.com/FunctionCalling/FunctionCalling-FirebaseVertexAI", from: "0.1.0")
51+
.package(url: "https://github.com/FunctionCalling/FunctionCalling-FirebaseAI", from: "0.1.0")
5252
]
5353
)
5454
```

Sources/FunctionCalling-FirebaseVertexAI/Extension/FirebaseAI+Extension.swift renamed to Sources/FunctionCalling-FirebaseAI/Extension/FirebaseAI+Extension.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// FirebaseAI+Extension.swift
3-
// FunctionCalling-FirebaseVertexAI
3+
// FunctionCalling-FirebaseAI
44
//
55
// Created by 伊藤史 on 2025/08/06.
66
//

Sources/FunctionCalling-FirebaseVertexAI/FunctionCalling_FirebaseVertexAI.swift renamed to Sources/FunctionCalling-FirebaseAI/FunctionCalling_FirebaseVertexAI.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// FunctionCalling_FirebaseVertexAI.swift
2+
// FunctionCalling_FirebaseAI.swift
33
//
44
//
55
// Created by Fumito Ito on 2024/09/07.
@@ -9,7 +9,7 @@ import FunctionCalling
99
import FirebaseAI
1010

1111
extension ToolContainer {
12-
public var firebaseVertexAITools: [FirebaseAITool] {
12+
public var firebaseAITools: [FirebaseAITool] {
1313
guard let declarations = allTools?.compactMap({ $0.toFunctionDeclaration }) else {
1414
return [.functionDeclarations([])]
1515
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import XCTest
2-
@testable import FunctionCalling_FirebaseVertexAI
2+
@testable import FunctionCalling_FirebaseAI
33
import FunctionCalling
44

55
// swiftlint:disable:next type_name
6-
final class FunctionCalling_FirebaseVertexAITests: XCTestCase {
6+
final class FunctionCalling_FirebaseAITests: XCTestCase {
77
@FunctionCalling(service: .claude)
88
struct FunctionContainer {
99
/// Return current weather of location that passed by the argument
@@ -21,7 +21,7 @@ final class FunctionCalling_FirebaseVertexAITests: XCTestCase {
2121
}
2222

2323
func testConvertedResults() throws {
24-
guard let tool = FunctionContainer().firebaseVertexAITools.first else {
24+
guard let tool = FunctionContainer().firebaseAITools.first else {
2525
XCTFail("Conainer should contain some functions")
2626
return
2727
}

0 commit comments

Comments
 (0)