-
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(Codey): Add python sdk samples for Codey API #10144
Conversation
Here is the summary of changes. You are about to add 5 region tags.
This comment is generated by snippet-bot.
|
Will come back and check once the model is published on endpoint (Pypi). |
Converting this to a draft for now @yil532 - once you're ready for review please
|
…docs-samples into yvonne-codey-api
I wonder why this takes forever to run the tests? |
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) |
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.
I think it would be better if this prompt were an argument to the function, not hard coded here.
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.
Also, could the prompt be to calculate the minimum or smaller of two numbers, instead of "min"?
|
||
|
||
if __name__ == "__main__": | ||
write_a_function() |
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.
The prompt could be hard-coded here, or be the default value of the function argument.
Description
Fixes #
Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.
Checklist
nox -s py-3.9
(see Test Environment Setup)nox -s lint
(see Test Environment Setup)