Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Vertex AI] Update samples/docs to use gemini-1.5-flash #13099

Merged
merged 3 commits into from
Jun 8, 2024
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
7 changes: 7 additions & 0 deletions FirebaseVertexAI/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 10.28.0
- [changed] Removed uses of the `gemini-1.5-flash-preview-0514` model in docs
and samples. Developers should now use the auto-updated versions,
`gemini-1.5-pro` or `gemini-1.5-flash`, or a specific stable version; see
[available model names](https://firebase.google.com/docs/vertex-ai/gemini-models#available-model-names)
for more details. (#13099)

# 10.27.0
- [changed] Removed uses of the `gemini-1.5-pro-preview-0409` model in docs and
samples. Developers should now use `gemini-1.5-pro-preview-0514` or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class ConversationViewModel: ObservableObject {
private var chatTask: Task<Void, Never>?

init() {
model = VertexAI.vertexAI().generativeModel(modelName: "gemini-1.5-flash-preview-0514")
model = VertexAI.vertexAI().generativeModel(modelName: "gemini-1.5-flash")
chat = model.startChat()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class FunctionCallingViewModel: ObservableObject {

init() {
model = VertexAI.vertexAI().generativeModel(
modelName: "gemini-1.5-flash-preview-0514",
modelName: "gemini-1.5-flash",
tools: [Tool(functionDeclarations: [
FunctionDeclaration(
name: "get_exchange_rate",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class PhotoReasoningViewModel: ObservableObject {
private var model: GenerativeModel?

init() {
model = VertexAI.vertexAI().generativeModel(modelName: "gemini-1.5-flash-preview-0514")
model = VertexAI.vertexAI().generativeModel(modelName: "gemini-1.5-flash")
}

func reason() async {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class SummarizeViewModel: ObservableObject {
private var model: GenerativeModel?

init() {
model = VertexAI.vertexAI().generativeModel(modelName: "gemini-1.5-flash-preview-0514")
model = VertexAI.vertexAI().generativeModel(modelName: "gemini-1.5-flash")
}

func summarize(inputText: String) async {
Expand Down
4 changes: 2 additions & 2 deletions FirebaseVertexAI/Sources/VertexAI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ public class VertexAI: NSObject {
/// guidance on choosing an appropriate model for your use case.
///
/// - Parameters:
/// - modelName: The name of the model to use, for example `"gemini-1.5-flash-preview-0514"`;
/// see [available model names
/// - modelName: The name of the model to use, for example `"gemini-1.5-flash"`; see
/// [available model names
/// ](https://firebase.google.com/docs/vertex-ai/gemini-models#available-model-names) for a
/// list of supported model names.
/// - generationConfig: The content generation parameters your model should use.
Expand Down
Loading