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: chat prompt sample for Vertex LLMs #3246

Merged
merged 3 commits into from
Jun 5, 2023
Merged

feat: chat prompt sample for Vertex LLMs #3246

merged 3 commits into from
Jun 5, 2023

Conversation

gericdong
Copy link
Collaborator

Description

Fixes b281562687

Added a chat prompt sample for Vertex LLMs.

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

Checklist

  • I have followed guidelines from CONTRIBUTING.MD and Samples Style Guide
  • Tests pass: npm test (see Testing)
  • Lint pass: npm run lint (see Style)
  • These samples need a new API enabled in testing projects to pass (let us know which ones)
  • These samples need a new/updated env vars in testing projects set to pass (let us know which ones)
  • This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample
  • This sample adds a new sample directory, and I created GitHub Actions workflow for this sample
  • This sample adds a new Product API, and I updated the Blunderbuss issue/PR auto-assigner with the codeowners for this sample
  • Please merge this PR for me once it is approved

@gericdong gericdong requested review from a team as code owners June 3, 2023 13:41
@snippet-bot
Copy link

snippet-bot bot commented Jun 3, 2023

Here is the summary of changes.

You are about to add 1 region tag.

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 samples Issues that are directly related to samples. api: aiplatform Issues related to the AI Platform API. labels Jun 3, 2023

const prompt = {
context:
'My name is Ned. You are my personal assistant. My favorite movies are Lord of the Rings and Hobbit.',
Copy link
Contributor

Choose a reason for hiding this comment

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

issue: As much as I LOVE LotR and all things Tolkien (ecce my GitHub alias), we should avoid using copyrighted or trademarked strings in our samples.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Agreed. Changed.

// [END aiplatform_sdk_chat]
}

process.on('unhandledRejection', err => {
Copy link
Contributor

Choose a reason for hiding this comment

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

issue: remove CLI per https://googlecloudplatform.github.io/samples-style-guide/#no-cli

Example of how to do it: #2888

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Noted. As discussed, we can handle this later with task "Remove the CLI structure from the Node.js samples for LLMs to track the changes." (b/285884334)

@telpirion telpirion self-assigned this Jun 5, 2023
@telpirion telpirion merged commit bd248d1 into main Jun 5, 2023
14 checks passed
@telpirion telpirion deleted the b281562687-chat branch June 5, 2023 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: aiplatform Issues related to the AI Platform API. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants