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

feat(generative_ai): Add code completion example #11809

Merged
merged 11 commits into from
Jun 3, 2024

Conversation

msampathkumar
Copy link
Member

@msampathkumar msampathkumar commented May 31, 2024

Add code completion examples with gemini flash model.

Please merge-on-approval!

Description

Fixes #

Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

Checklist

Add code completion examples with gemini flash model
@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label May 31, 2024
@msampathkumar msampathkumar marked this pull request as ready for review May 31, 2024 16:52
@msampathkumar msampathkumar requested review from a team as code owners May 31, 2024 16:52
Copy link

snippet-bot bot commented May 31, 2024

Here is the summary of changes.

You are about to add 4 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@gericdong gericdong added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 31, 2024
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 31, 2024
@gericdong gericdong added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 2, 2024
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 2, 2024
@gericdong gericdong added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 2, 2024
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 2, 2024
@gericdong
Copy link
Contributor

Updates include:

  • Specify auth scope
  • Change file names to avoid class name collision
  • Change function name to 'generate_text" to be more descriptive
  • Change return to the response object. Returning strings won't work for streaming examples
  • Remove nox config file from sub-directory. It will use the one in parent directory.
  • Add # location="us-central1" in region tag so users are aware of the default location.
  • Use OpenAI naming conversions for variables

Copy link
Contributor

@gericdong gericdong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI test is failing on test_gemini_chat_example which is irrelevant to this PR.

@gericdong gericdong added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 2, 2024
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 2, 2024
@msampathkumar msampathkumar added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 3, 2024
@msampathkumar
Copy link
Member Author

Test cases failed with 500 error(google.api_core.exceptions.InternalServerError: 500. Rerunning the test cases.

@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 3, 2024
@msampathkumar msampathkumar merged commit 5f905ac into main Jun 3, 2024
15 checks passed
@msampathkumar msampathkumar deleted the gemini_chat_completion_example branch June 3, 2024 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants