How to Modify Request and Response Structure in GenKit? #1245
-
Hi everyone, I’m experimenting with GenKit and running into an issue with both the request and response body structures. Currently, they need to follow these formats: Is there a way to modify these so they can directly accept any without requiring the { "data": ... } or { "result": ... } wrappers? I’m also happy to make the necessary changes in the Flow source code if that’s helpful! Thanks in advance for any guidance or suggestions! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Currently Genkit follows Cloud Functions for Firebase callable function format so that you can use firebase client SDK to call flows from your client app (web, flutter, android, iOS, etc.): https://firebase.google.com/docs/functions/callable?gen=2nd If you need fine control of the protocol I would recommend creating your own express server. We have an example here: https://github.com/firebase/genkit/blob/main/js/testapps/express/src/index.ts |
Beta Was this translation helpful? Give feedback.
Currently Genkit follows Cloud Functions for Firebase callable function format so that you can use firebase client SDK to call flows from your client app (web, flutter, android, iOS, etc.): https://firebase.google.com/docs/functions/callable?gen=2nd
It's not customizable.
If you need fine control of the protocol I would recommend creating your own express server. We have an example here: https://github.com/firebase/genkit/blob/main/js/testapps/express/src/index.ts