Firebase reposted this
Last week in #learn_genkit, we looked at how to use Genkit to generate content using LLMs like Gemini. This week, let's take a look at flows! Genkit Flows are functions with some additional characteristics: 1) They are strongly typed 2) They can be streamed 3) You can call them both locally and remotely 4) They are fully observable What does this mean? When defining a flow, you provide a name (which will be shown in the Genkit Developer UI), as well as an input and output scheme. This means that Genkit can make sure you always provide the correct attributes when calling a flow. You can stream a response from a flow by providing a streaming callback. Clients can then request the response to be streamed. To use streaming in Genkit's Developer UI, tick the "Stream response" check box. You already learned that you can can call flows locally using the `runFlow` or `streamFlow` functions. To make a flow callable remotely, use the `onFlow` function. This will turn a flow into a callable function. You can observe and monitor execution of flows in Genkit's Developer UI, or in Google Cloud's log explorer and other OpenTelemetry-enabled monitoring solutions.
-
-
-
-
-
+2