-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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(vertex-ai) convert "example syntax" markdown samples to python #12980
base: main
Are you sure you want to change the base?
feat(vertex-ai) convert "example syntax" markdown samples to python #12980
Conversation
…ndard
vertexai.init(project=PROJECT_ID, location="us-central1") | ||
|
||
|
||
def generate_response() -> TextEmbedding: |
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.
Combines the samples for streaming and non-streaming responses. Adds imports and fixes the syntax, so the sample can be copied and ran, but leaves off all details to keep the sample very concise.
Here is the summary of changes. You are about to add 4 region tags.
This comment is generated by snippet-bot.
|
https://btx.cloud.google.com/invocations/27f9454f-a97e-4e74-a5ce-0612115802bd/log :
The test runs perfectly fine locally. I'm trying to understand why it fails on CI. |
The CI failure in
Debugging steps:
|
I created a new issue to track the embedding test failure on CI. Note, that the failure is not related to this PR — it is reproducible on |
Description
Convert several Markdown samples to Python. The goal is to preserve the "spirit" of original samples (i.e., to provide a very short snippet that only shows how to operate an API on a very high-level), while making it actually copyable, testable, and working. That's why I even moved the
init
calls outside of the sample but added all necessary imports for proper sample functioning.Checklist
nox -s py-3.9
&&nox -s py-3.12
nox -s lint