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

Update deploy and auth documentation to use menuSuggestionFlow #112

Merged
merged 3 commits into from
May 13, 2024

Conversation

MaesterChestnut
Copy link
Contributor

No description provided.

docs/dotprompt.md Outdated Show resolved Hide resolved
docs/dotprompt.md Outdated Show resolved Hide resolved
docs/dotprompt.md Outdated Show resolved Hide resolved
@MichaelDoyle
Copy link
Member

MichaelDoyle commented May 10, 2024

I suggest we split this into 2 PRs.

One that ensures that the "deployment" related docs work as intended with genkit init (these are firebase.md, cloud-run.md and deploy-node.md), and another that does more of the snippet standardization work.

@MichaelDoyle MichaelDoyle changed the title Modify several examples of inconsistent theme Update deploy and auth documentation to use menuSuggestionFlow May 13, 2024
Copy link
Member

@MichaelDoyle MichaelDoyle left a comment

Choose a reason for hiding this comment

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

Made a few comments.

Please pay particular attention to variable names that need to change along with the flow. I highlighted ones that I spotted, but there are likely more.

@@ -104,7 +104,7 @@ sample flow.
Then, in another window:

```posix-terminal
curl -X POST "http://127.0.0.1:3400/jokeFlow?stream=true" -H "Content-Type: application/json" -d '{"data": "banana"}'
curl -X POST "http://127.0.0.1:3400/menuSuggestionFlow?stream=true" -H "Content-Type: application/json" -d '{"data": "banana"}'
Copy link
Member

Choose a reason for hiding this comment

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

Should this still take "banana" as input?

@@ -81,7 +81,7 @@ sample flow.
```posix-terminal
npm run build

genkit flow:run jokeFlow "\"banana\"" -s
genkit flow:run menuSuggestionFlow "\"banana\"" -s
Copy link
Member

Choose a reason for hiding this comment

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

Should this still take "banana" as input?

docs/auth.md Outdated
@@ -140,7 +140,7 @@ above. When running this flow during development, you would pass the user object
in the same way:

```posix-terminal
genkit flow:run jokeFlow '"Banana"' --auth '{"admin": true}'
genkit flow:run menuSuggestionFlow '"Banana"' --auth '{"admin": true}'
Copy link
Member

Choose a reason for hiding this comment

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

Should this still take "banana" as input?

Copy link
Member

Choose a reason for hiding this comment

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

(if we're still going w/ menuSuggestionFlow)

docs/auth.md Outdated
@@ -121,8 +121,8 @@ You can use Firebase Auth to protect your flows defined with `onFlow()`:
import { firebaseAuth } from '@genkit-ai/firebase/auth';
import { onFlow } from '@genkit-ai/firebase/functions';

export const jokeFlow = onFlow({
name: 'jokeFlow',
export const menuSuggestionFlow = onFlow({
Copy link
Member

Choose a reason for hiding this comment

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

I'm a little torn on using menuSuggestionFlow here, since the rest of the doc before and after this point refer to selfSummaryFlow. I'm wondering if we should use the same (i.e. selfSummaryFlow) throughout.

@@ -122,7 +122,7 @@ flow.

1. In the developer UI (http://localhost:4000/), run the flow:

1. Click **jokeFlow**.
Copy link
Member

Choose a reason for hiding this comment

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

There are still some references below that need to be updated.

L129-131 - subject matter doesn't work as well w/ menuSuggestionFlow

L162-166 curls jokeFlow w/ banana as input.

docs/auth.md Outdated
export const jokeFlow = onFlow({
name: 'jokeFlow',
export const menuSuggestionFlow = onFlow({
name: 'menuSuggestionFlow',
Copy link
Member

Choose a reason for hiding this comment

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

Reference to (joke) a few more lines below as an input param under authPolicy.

Copy link
Member

@MichaelDoyle MichaelDoyle left a comment

Choose a reason for hiding this comment

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

image

@MaesterChestnut MaesterChestnut merged commit 2d1427f into main May 13, 2024
4 checks passed
@MaesterChestnut MaesterChestnut deleted the cc/docSampleUpdates branch May 13, 2024 19:32
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.

4 participants