From f66b720bac696c8901ffe1dc3bf8ead74a24490f Mon Sep 17 00:00:00 2001 From: Cleo Schneider Date: Wed, 8 May 2024 16:29:03 +0000 Subject: [PATCH 1/2] Rename toc titles to be more consistent with behaviors --- docs/_guides.yaml | 8 ++++---- docs/models.md | 16 ++++++++++------ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/docs/_guides.yaml b/docs/_guides.yaml index c6ca663c9..6708e4b30 100644 --- a/docs/_guides.yaml +++ b/docs/_guides.yaml @@ -23,14 +23,14 @@ toc: path: /docs/genkit/devtools - heading: Building AI workflows - - title: Models + - title: Generating content path: /docs/genkit/models + - title: Creating flows + path: /docs/genkit/flows - title: Prompting models path: /docs/genkit/prompts - - title: Prompt management + - title: Managing prompts path: /docs/genkit/dotprompt - - title: Flows - path: /docs/genkit/flows - title: Retrieval-augmented generation (RAG) path: /docs/genkit/rag - title: Evaluation diff --git a/docs/models.md b/docs/models.md index e8cb3b108..fcc479c2b 100644 --- a/docs/models.md +++ b/docs/models.md @@ -1,4 +1,8 @@ -# Models +# Generating Content + +Firebase Genkit provides an easy interface for generating content with LLMs. + +## Models Models in Firebase Genkit are libraries and abstractions that provide access to various Google and non-Google LLMs. @@ -22,7 +26,7 @@ configureGenkit({ }); ``` -Also note that different plugins and models use different methods of +NOTE: Different plugins and models use different methods of authentication. For example, Vertex API uses the Google Auth Library so it can pull required credentials using Application Default Credentials. @@ -51,7 +55,7 @@ are officially supported: See the docs for each plugin for setup and usage information. -## Working with models +## How to generate content `generate` is a helper function for working with models. @@ -169,7 +173,7 @@ await generate({ }); ``` -## Retriever context +### Adding retriever context Documents from a retriever can be passed directly to `generate` to provide grounding context: @@ -187,7 +191,7 @@ await generate({ The document context is automatically appended to the content of the prompt sent to the model. -## Message history +### Recording message history Genkit models support maintaining a history of the messages sent to the model and its responses, which you can use to build interactive experiences, such as @@ -231,7 +235,7 @@ let response = await generate({ history = response.toHistory(); ``` -## Streaming +### Streaming responses Genkit supports chunked streaming of model responses via the `generateStream()` method: From 877e7b7bd34c3239e100bdebeaaaf6b085206a34 Mon Sep 17 00:00:00 2001 From: Cleo Schneider Date: Wed, 8 May 2024 13:07:14 -0400 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Kevin Cheung --- docs/models.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/models.md b/docs/models.md index fcc479c2b..5b9af68bf 100644 --- a/docs/models.md +++ b/docs/models.md @@ -1,4 +1,4 @@ -# Generating Content +# Generating content Firebase Genkit provides an easy interface for generating content with LLMs. @@ -26,7 +26,7 @@ configureGenkit({ }); ``` -NOTE: Different plugins and models use different methods of +Note: Different plugins and models use different methods of authentication. For example, Vertex API uses the Google Auth Library so it can pull required credentials using Application Default Credentials.