Skip to content

Commit

Permalink
chore: update to alpha02
Browse files Browse the repository at this point in the history
  • Loading branch information
thatfiredev committed Apr 11, 2024
1 parent d91eb14 commit fd673ea
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 24 deletions.
Expand Up @@ -30,11 +30,7 @@ void configModelParams() {

GenerativeModel gm = FirebaseVertexAI.Companion.getInstance().generativeModel(
"MODEL_NAME",
generationConfig,
/* safetySettings */ null,
/* tools */ null,
/* toolConfig */ null,
/* requestOptions */ new RequestOptions()
generationConfig
);

GenerativeModelFutures model = GenerativeModelFutures.from(gm);
Expand All @@ -47,11 +43,8 @@ void configSafetySettings() {

GenerativeModel gm1 = FirebaseVertexAI.Companion.getInstance().generativeModel(
"MODEL_NAME",
/* generationConfig */ null,
Collections.singletonList(harassmentSafety1),
/* tools */ null,
/* toolConfig */ null,
/* requestOptions */ new RequestOptions()
/* generationConfig is optional */ null,
Collections.singletonList(harassmentSafety1)
);

GenerativeModelFutures model1 = GenerativeModelFutures.from(gm1);
Expand All @@ -65,11 +58,8 @@ void configSafetySettings() {

GenerativeModel gm = FirebaseVertexAI.Companion.getInstance().generativeModel(
"MODEL_NAME",
/* generationConfig */ null,
List.of(harassmentSafety, hateSpeechSafety),
/* tools */ null,
/* toolConfig */ null,
/* requestOptions */ new RequestOptions()
/* generationConfig is optional */ null,
List.of(harassmentSafety, hateSpeechSafety)
);

GenerativeModelFutures model = GenerativeModelFutures.from(gm);
Expand Down
Expand Up @@ -31,14 +31,8 @@ public class GenerateContentViewModel extends ViewModel {
// so that it doesn't cause a naming clash with the top level declaration
static class InitializationSnippet {
// [START vertexai_init]
GenerativeModel gm = FirebaseVertexAI.Companion.getInstance().generativeModel(
/* modelName */ "gemini-1.5-pro",
/* generationConfig */ null,
/* safetySettings */ null,
/* tools */ null,
/* toolConfig */ null,
/* requestOptions */ new RequestOptions()
);
GenerativeModel gm = FirebaseVertexAI.getInstance()
.generativeModel("gemini-1.5-pro");

GenerativeModelFutures model = GenerativeModelFutures.from(gm);
// [END vertexai_init]
Expand Down
2 changes: 1 addition & 1 deletion vertexai/gradle/libs.versions.toml
Expand Up @@ -10,7 +10,7 @@ lifecycleRuntimeKtx = "2.7.0"
activityCompose = "1.8.2"
composeBom = "2023.08.00"
reactiveStreams = "1.0.4"
vertexAI = "16.0.0-alpha01"
vertexAI = "16.0.0-alpha02"

[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
Expand Down

0 comments on commit fd673ea

Please sign in to comment.