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(Codey): Add python sdk samples for Codey API #10144

Merged
merged 19 commits into from
Jun 14, 2023
Merged

Conversation

yil532
Copy link
Member

@yil532 yil532 commented Jun 2, 2023

Description

Fixes #

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

Checklist

@yil532 yil532 requested review from a team as code owners June 2, 2023 17:17
@snippet-bot
Copy link

snippet-bot bot commented Jun 2, 2023

Here is the summary of changes.

You are about to add 5 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

@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Jun 2, 2023
@yil532
Copy link
Member Author

yil532 commented Jun 2, 2023

Will come back and check once the model is published on endpoint (Pypi).

@leahecole leahecole marked this pull request as draft June 5, 2023 15:17
@leahecole
Copy link
Collaborator

Converting this to a draft for now @yil532 - once you're ready for review please

  • switch it back to a regular pr
  • add the blunderbuss:assign label to make sure you get a reviewer assigned :)

@leahecole leahecole removed their assignment Jun 5, 2023
@yil532 yil532 added the kokoro:run Add this label to force Kokoro to re-run the tests. label Jun 7, 2023
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Jun 7, 2023
@yil532 yil532 force-pushed the yvonne-codey-api branch from 84a772e to c2cd470 Compare June 8, 2023 18:33
@yil532 yil532 marked this pull request as ready for review June 9, 2023 19:56
@yil532
Copy link
Member Author

yil532 commented Jun 9, 2023

I wonder why this takes forever to run the tests?

@yil532 yil532 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 9, 2023
@yil532 yil532 added the kokoro:run Add this label to force Kokoro to re-run the tests. label Jun 9, 2023
@kokoro-team kokoro-team removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Jun 9, 2023
code_chat_model = CodeChatModel.from_pretrained("codechat-bison@001")
chat = code_chat_model.start_chat()

response = chat.send_message("Please help write a function to calculate the min of two numbers", **parameters)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be better if this prompt were an argument to the function, not hard coded here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, could the prompt be to calculate the minimum or smaller of two numbers, instead of "min"?



if __name__ == "__main__":
write_a_function()
Copy link
Contributor

Choose a reason for hiding this comment

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

The prompt could be hard-coded here, or be the default value of the function argument.

@yil532 yil532 added kokoro:force-run Add this label to force Kokoro to re-run the tests. kokoro:run Add this label to force Kokoro to re-run the tests. labels Jun 14, 2023
@kokoro-team kokoro-team removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Jun 14, 2023
@yil532 yil532 added kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Jun 14, 2023
@kokoro-team kokoro-team removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Jun 14, 2023
@yil532 yil532 merged commit e86dcc5 into main Jun 14, 2023
@yil532 yil532 deleted the yvonne-codey-api branch June 14, 2023 20:32
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.

6 participants