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

Add a sample Google Cloud Function script #169

Merged
merged 1 commit into from
Dec 14, 2023
Merged

Conversation

markmcd
Copy link
Member

@markmcd markmcd commented Nov 10, 2023

Description of the change

This illustrates how to use Cloud Functions with the PaLM API.

As the default service account is un-scoped, there is an extra step required to work with the API. This script can be dropped in to a GCF editor to get the service account authorised against the PaLM API.

Motivation

A couple of users have gotten stuck doing this, so I figured we should drop a reference in here. If we don't want it in this repo I can dump it in a gist.

Type of change

Choose one: Other

Checklist

  • I have performed a self-review of my code.
  • I have added detailed comments to my code where applicable.
  • I have verified that my change does not break existing code.
  • My PR is based on the latest changes of the main branch (if unsure, please run git pull --rebase upstream main).
  • I am familiar with the Google Style Guide for the language I have coded in.
  • I have read through the Contributing Guide and signed the Contributor License Agreement.

This illustrates how to use Cloud Functions with the PaLM API.

As the default service account is un-scoped, there is an extra step required to work with the API. This script can be dropped in to a GCF editor to get the service account authorised against the PaLM API.
@markmcd markmcd requested a review from a team as a code owner November 10, 2023 08:42
@github-actions github-actions bot added the status:awaiting review PR awaiting review from a maintainer label Nov 10, 2023
@williamito williamito merged commit 60fc871 into main Dec 14, 2023
3 checks passed
@github-actions github-actions bot removed the status:awaiting review PR awaiting review from a maintainer label Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants