-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
feat(vertexai): adds a Gemini video example #3612
Conversation
Here is the summary of changes. You are about to add 1 region tag.
This comment is generated by snippet-bot.
|
0914e92
to
39ecfa3
Compare
🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use -- conventional-commit-lint bot |
} | ||
defer client.Close() | ||
|
||
ctx, cancel := context.WithTimeout(ctx, time.Second*50) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this make sense in a sample?
) | ||
|
||
func TestGenerateMultimodalContent(t *testing.T) { | ||
t.Skip("TODO(muncus): remove skip") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed, now that the models are generally available.
ctx := context.Background() | ||
|
||
// create video part | ||
video, err := partFromGCSURI(ctx, "gs://cloud-samples-data/video/animals.mp4") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this work with a genai.FileData
object? If so, it would simplify the sample considerably since we could remove this helper method.
video, | ||
} | ||
|
||
if projectID == "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not necessary, as testutil.SystemTest
ensures we have a non-empty project id.
} | ||
|
||
var buf bytes.Buffer | ||
if err := generateMultimodalContent(ctx, os.Stdout, prompt, projectID, location, modelName); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if err := generateMultimodalContent(ctx, os.Stdout, prompt, projectID, location, modelName); err != nil { | |
if err := generateMultimodalContent(ctx, &buf, prompt, projectID, location, modelName); err != nil { |
Sorry, I was unaware of this PR and opened #3774 for the same purpose |
It looks like Deleplace's duplicate PR #3774 was merged, so i'll close this one. please reopen if it is still needed. |
Description
Fixes #
Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.
Checklist
go test -v ./..
(see Testing)gofmt
(see Formatting)go vet
(see Formatting)