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

Revamped get started guide to be more similar to typical libraries #953

Open
wants to merge 4 commits into
base: next
Choose a base branch
from

Conversation

chrisraygill
Copy link
Contributor

Currently, our Get started guide uses genkit init to set up a new Genkit project from scratch, but I think this is too magical. We should show that it's extremely simple to add Genkit to your project. This version of the Get started guide is much more similar to that of the Gemini API, and more similar to typical library / API quickstart guides.

Copy link

google-cla bot commented Sep 24, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Collaborator

@tonybaroneee tonybaroneee left a comment

Choose a reason for hiding this comment

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

I really dig this simplification. It's much more aligned with how developers are used to getting started with other node libraries. Thanks Chris!

// Make sure to include these imports:
// import { generate } from '@genkit-ai/ai';
// import { configureGenkit } from '@genkit-ai/core';
// import { googleAI, gemini15Flash } from '@genkit-ai/googleai';
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: I'd probably just leave these uncommented, it's easier for the dev to simply not copy them if they already have them, vs. copying then having to uncomment each one.

Copy link
Contributor

@i2amsam i2amsam left a comment

Choose a reason for hiding this comment

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

Looks great!

docs/get-started.md Outdated Show resolved Hide resolved
Copy link

@mjchristy mjchristy left a comment

Choose a reason for hiding this comment

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

Love it! And love the "what to do next section" at the bottom.

docs/get-started.md Outdated Show resolved Hide resolved
Co-authored-by: Sam Phillips <samphillips@google.com>
docs/get-started.md Outdated Show resolved Hide resolved

1. Create a new Node project:
```posix-terminal
npm install genkit @genkit-ai/ai @genkit-ai/core @genkit-ai/googleai
Copy link
Collaborator

Choose a reason for hiding this comment

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

installing npm install genkit for CLI will need to make sure to say npx genkit ... for cli commands.

Co-authored-by: Pavel Jbanov <pavelj@google.com>
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.

6 participants