Skip to content

Commit de4d9c3

Browse files
committed
VertexAI - Change logic to use a source library
1 parent 66c0a62 commit de4d9c3

18 files changed

+185
-43
lines changed

unity_packer/debug_single_export_json/vertexai.json

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -215,18 +215,9 @@
215215
"name": "FirebaseVertexAI.unitypackage",
216216
"imports": [
217217
{
218-
"importer": "PluginImporter",
219-
"platforms": [
220-
"Editor",
221-
"Standalone",
222-
"Android",
223-
"iOS",
224-
"tvOS"
225-
],
226-
"cpu": "AnyCPU",
218+
"importer": "DefaultImporter",
227219
"paths": [
228-
"Firebase/Plugins/Firebase.VertexAI.dll",
229-
"Firebase/Plugins/Firebase.VertexAI.pdb"
220+
"Firebase/VertexAI/*"
230221
]
231222
},
232223
{

vertexai/CMakeLists.txt

Lines changed: 10 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -14,41 +14,19 @@
1414

1515
# CMake file for the Vertex AI in Firebase library
1616

17-
# Vertex AI in Firebase CSharp files
18-
set(firebase_vertexai_src
19-
src/Candidate.cs
20-
src/Chat.cs
21-
src/Citation.cs
22-
src/CountTokensResponse.cs
23-
src/FunctionCalling.cs
24-
src/GenerateContentResponse.cs
25-
src/GenerationConfig.cs
26-
src/GenerativeModel.cs
27-
src/ModelContent.cs
28-
src/RequestOptions.cs
29-
src/Safety.cs
30-
src/Schema.cs
31-
src/VertexAI.cs
32-
src/VertexAIException.cs
17+
# Vertex AI in Firebase is different from the other Firebase libraries,
18+
# as instead of prebuilding, we provide it as a source library.
19+
20+
# Package every file under src, including subfolders, since we want them all.
21+
unity_pack_folder(
22+
"${FIREBASE_UNITY_DIR}/vertexai/src/"
23+
PACK_PATH "Firebase/VertexAI"
3324
)
3425

26+
# For documentation, get only the C# files at the top level,
27+
# which make up the public API.
28+
file(GLOB firebase_vertexai_doc_src "src/*.cs")
3529
unity_pack_documentation_sources(vertexai
3630
DOCUMENTATION_SOURCES
3731
${firebase_vertexai_src}
3832
)
39-
40-
mono_add_library(firebase_vertexai
41-
MODULE
42-
Firebase.VertexAI
43-
SOURCES
44-
${firebase_vertexai_src}
45-
REFERENCES
46-
${FIREBASE_PLATFORM_REF}
47-
)
48-
49-
unity_pack_cs(firebase_vertexai)
50-
51-
set_property(TARGET firebase_vertexai
52-
PROPERTY FOLDER
53-
"Firebase ${FIREBASE_PLATFORM_NAME}"
54-
)

vertexai/src/Candidate.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vertexai/src/Chat.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vertexai/src/Citation.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vertexai/src/CountTokensResponse.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vertexai/src/FunctionCalling.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vertexai/src/GenerateContentResponse.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vertexai/src/GenerationConfig.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vertexai/src/GenerativeModel.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)