Skip to content

Conversation

@MaesterChestnut
Copy link
Contributor

No description provided.

---
Generate a tabletop RPG character that would be found in {{location}}.
Generate a restaurant menu that would be found in {{location}}.
Copy link
Member

Choose a reason for hiding this comment

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

This sample is showcasing the ability to coerce the LLM to provide complex JSON output. As such, the schema above (L159-164) specifies an output object with 3 fields name, hitPoints, description..

If we want to go with the menu theme, we should update the schema with a few different properties, and perhaps tweak the prompt.

We could do something like:

---
model: vertexai/gemini-1.0-pro
input:
  schema:
    theme: string
output:
  format: json
  schema:
    name: string
    price: integer
    ingredients(array): string
---

![image](https://github.com/firebase/genkit/assets/2858322/579f29e9-427d-4419-bbce-b2895dba74bf)


Generate a menu item that could be found at a {{theme}} restaurant.

Copy link
Member

Choose a reason for hiding this comment

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

Prompt in action.

image

your flow uses.
1. If you'll access your flow from a web app (which you will be doing in the
next section), in the `httpsOptions` parameter, set a CORS policy:
Copy link
Member

Choose a reason for hiding this comment

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

Please remove this file, in favor of #112.

Alternatively, you can provide an output file to inspect the output in a json file.

```posix-terminal
genkit eval:flow bobQA --input testQuestions.json --output eval-result.json
Copy link
Member

Choose a reason for hiding this comment

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

There is another reference to bobQA much further down below, under "Running on existing datasets"

@MaesterChestnut MaesterChestnut changed the title Update snippets to reflect menuSuggestionFlow theme Update dotprompt and eval doc to reflect menuSuggestionFlow theme May 13, 2024
@MaesterChestnut MaesterChestnut merged commit a9e0180 into main May 13, 2024
@MaesterChestnut MaesterChestnut deleted the cc/docsSnippits branch May 13, 2024 19:29
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