GenkitG
Genkit14mo ago
2 replies
full-green

Tool return types

Hi!

I had a chance to take a look at Firebase agents and made this (GitHub gist). Looks great! I'm a big fan of what Genkit and this is a great addition. @Dmitry Lyalin (Firebase) recommended that I throw something in here that I found:

* The only thing that tripped me up was how to get the sample code working in the async function. I didn't understand that I would need to return something from my function to indicate to the LLM that the save to the database was successful. Makes sense, but not something I knew going into it.
* The example also seems to have a boolean output, but the zod schema is a string? It might make sense to have a different output? It could just be a boolean?

    outputSchema: z
      .boolean()
      .describe(
        "true if the reservation was successfully booked and false if there's" +
          ' no table available for the requested time'
      ),
Was this page helpful?