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

[gemini/vertex] text instrumentation #565

Open
Tracked by #525
mikeldking opened this issue Jul 3, 2024 · 0 comments
Open
Tracked by #525

[gemini/vertex] text instrumentation #565

mikeldking opened this issue Jul 3, 2024 · 0 comments
Assignees

Comments

@mikeldking
Copy link
Contributor

mikeldking commented Jul 3, 2024

Instrument the Vertex AI text completion endpoints:

import vertexai
from vertexai.generative_models import GenerativeModel

# TODO(developer): Update and un-comment below line
# project_id = "PROJECT_ID"

vertexai.init(project=project_id, location="us-central1")

model = GenerativeModel(model_name="gemini-1.5-flash-001")

response = model.generate_content(
    "What's a good name for a flower shop that specializes in selling bouquets of dried flowers?"
)

print(response.text)

https://cloud.google.com/vertex-ai/generative-ai/docs/start/quickstarts/quickstart-multimodal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📘 Todo
Development

No branches or pull requests

2 participants